From a5ee3e3dcebcc38a29d3785b07c0261208121a72 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 17 Aug 2026 09:00:37 +0000 Subject: [PATCH 01/16] sync: fetch 2026-08-17 spec --- .../fabricv4/oas3.fetched/openapi.yaml | 30417 +++++++++++----- 1 file changed, 20634 insertions(+), 9783 deletions(-) diff --git a/spec/services/fabricv4/oas3.fetched/openapi.yaml b/spec/services/fabricv4/oas3.fetched/openapi.yaml index 3a7e36c2..7c64f728 100644 --- a/spec/services/fabricv4/oas3.fetched/openapi.yaml +++ b/spec/services/fabricv4/oas3.fetched/openapi.yaml @@ -9,7 +9,7 @@ info: license: name: Equinix Inc url: https://developer.equinix.com/agreement - version: "4.30" + version: "4.31" externalDocs: description: Find more information on Equinix Docs Portal url: https://docs.equinix.com/fabric/ @@ -19,6 +19,14 @@ servers: security: - BearerAuth: [] tags: + - name: Application Domains + description: Application Domains Beta + - name: Application Links + description: Application Links Beta + - name: Application Services + description: Application Services Beta + - name: Application Subscriptions + description: Application Subscriptions Beta - name: Cloud Events description: Cloud Events - name: Cloud Routers @@ -27,12 +35,32 @@ tags: description: Company Profiles Beta - name: Connections description: Connections + - name: Health + description: Health + - name: Internet Exchange Services + description: Internet Exchange Services Beta + - name: Gateways + description: Fabric Gateway Service Beta + - name: Fabric One + description: Fabric One Beta - name: Internet Access Services description: Equinix Internet Access (EIA) Beta - - name: Ip Blocks - description: Ip Blocks Beta + - name: IP Blocks + description: IP Blocks Beta + - name: Loas + description: Loas Beta + - name: Logos + description: Logos Beta + - name: Marketplace Subscriptions + description: Marketplace Subscriptions - name: Metrics description: Metrics + - name: Metros + description: Metros + - name: Networks + description: Networks + - name: Optical Metro Connects + description: Optical Metro Connects Beta - name: Port Packages description: Port Packages Beta - name: Ports @@ -58,579 +86,14 @@ tags: - name: Statistics description: Statistics - name: Stream Alert Rules - description: Stream Alert Rules Beta + description: Stream Alert Rules - name: Stream Subscriptions description: Stream Subscriptions - name: Streams description: Streams + - name: Tags + description: Tags Beta paths: - /fabric/v4/agentTemplates: - get: - tags: - - Agent Templates - summary: Get Agent Templates - description: This API provides capability to retrieve agent templates Beta - operationId: getAgentTemplates - parameters: - - name: offset - in: query - description: offset - required: false - schema: - type: integer - example: 1 - - name: limit - in: query - description: number of records to fetch - required: false - schema: - type: integer - example: 10 - responses: - "200": - description: Successful operation - content: - application/json: - schema: - $ref: "#/components/schemas/AgentTemplateGetAllResponse" - examples: - Example: - $ref: "#/components/examples/AgentTemplatesGetAllResponseExample" - "401": - description: Unauthorized - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorList" - examples: - example: - $ref: "#/components/examples/AgentTemplate_401" - "403": - description: Forbidden - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorList" - examples: - example: - $ref: "#/components/examples/AgentTemplate_403" - "404": - description: Not Found - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorList" - examples: - example: - $ref: "#/components/examples/AgentTemplate_404" - "500": - description: Internal server error - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorList" - examples: - example: - $ref: "#/components/examples/AgentTemplate_500" - "/fabric/v4/agentTemplates/{agentTemplateId}": - get: - tags: - - Agent Templates - summary: Get Agent Template by UUID - description: This API provides capability to retrieve an agent template by uuid Beta - operationId: getAgentTemplateByUuid - parameters: - - name: agentTemplateId - in: path - description: Agent Template UUID - required: true - schema: - $ref: "#/components/schemas/AgentTemplateId" - - name: offset - in: query - description: offset - required: false - schema: - type: integer - example: 1 - - name: limit - in: query - description: number of records to fetch - required: false - schema: - type: integer - example: 10 - responses: - "200": - description: Agent object - content: - application/json: - schema: - $ref: "#/components/schemas/AgentTemplates" - examples: - AgentByUuidResponse: - $ref: "#/components/examples/AgentTemplatesResponseExample" - "401": - description: Unauthorized - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorList" - examples: - example: - $ref: "#/components/examples/AgentTemplate_401" - "403": - description: Forbidden - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorList" - examples: - example: - $ref: "#/components/examples/AgentTemplate_403" - "404": - description: Not Found - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorList" - examples: - example: - $ref: "#/components/examples/AgentTemplate_404" - "500": - description: Internal server error - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorList" - examples: - example: - $ref: "#/components/examples/AgentTemplate_500" - /fabric/v4/agents: - get: - tags: - - Agents - summary: Get Agents - description: This API provides capability to retrieve agents Beta - operationId: getAgents - parameters: - - name: offset - in: query - description: offset - required: false - schema: - type: integer - example: 1 - - name: limit - in: query - description: number of records to fetch - required: false - schema: - type: integer - example: 10 - responses: - "200": - description: Successful operation - content: - application/json: - schema: - $ref: "#/components/schemas/AgentGetAllResponse" - examples: - Example: - $ref: "#/components/examples/AgentGetAllResponseExample" - "401": - description: Unauthorized - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorList" - examples: - example: - $ref: "#/components/examples/Agent_401" - "403": - description: Forbidden - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorList" - examples: - example: - $ref: "#/components/examples/Agent_403" - "404": - description: Not Found - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorList" - examples: - example: - $ref: "#/components/examples/Agent_404" - "500": - description: Internal server error - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorList" - examples: - example: - $ref: "#/components/examples/Agent_500" - post: - tags: - - Agents - summary: Create Agent - description: This API provides capability to create user's agent Beta - operationId: createAgent - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/AgentPostRequest" - examples: - CreateAgent: - $ref: "#/components/examples/AgentPostRequestExample" - required: true - responses: - "202": - description: Agent object - content: - application/json: - schema: - $ref: "#/components/schemas/Agents" - examples: - AgentPostResponse: - $ref: "#/components/examples/AgentPostResponseExample" - "400": - description: Bad request - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorList" - "401": - description: Unauthorized - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorList" - examples: - example: - $ref: "#/components/examples/Agent_401" - "403": - description: Forbidden - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorList" - examples: - example: - $ref: "#/components/examples/Agent_403" - "415": - description: Unsupported Media Type - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorList" - examples: - example: - $ref: "#/components/examples/Agent_415" - "500": - description: Internal server error - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorList" - examples: - example: - $ref: "#/components/examples/Agent_500" - "/fabric/v4/agents/{agentId}": - get: - tags: - - Agents - summary: Get Agent by UUID - description: This API provides capability to retrieve an agent by uuid Beta - operationId: getAgentByUuid - parameters: - - name: agentId - in: path - description: Agent UUID - required: true - schema: - $ref: "#/components/schemas/AgentId" - - name: offset - in: query - description: offset - required: false - schema: - type: integer - example: 1 - - name: limit - in: query - description: number of records to fetch - required: false - schema: - type: integer - example: 10 - responses: - "200": - description: Agent object - content: - application/json: - schema: - $ref: "#/components/schemas/Agents" - examples: - AgentByUuidResponse: - $ref: "#/components/examples/AgentResponseExample" - "401": - description: Unauthorized - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorList" - examples: - example: - $ref: "#/components/examples/Agent_401" - "403": - description: Forbidden - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorList" - examples: - example: - $ref: "#/components/examples/Agent_403" - "404": - description: Not Found - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorList" - examples: - example: - $ref: "#/components/examples/Agent_404" - "500": - description: Internal server error - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorList" - examples: - example: - $ref: "#/components/examples/Agent_500" - delete: - tags: - - Agents - summary: Delete Agent by UUID - description: This API provides capability to delete an agent by uuid Beta - operationId: deleteAgentByUuid - parameters: - - name: agentId - in: path - description: Agent UUID - required: true - schema: - $ref: "#/components/schemas/AgentId" - - name: offset - in: query - description: offset - required: false - schema: - type: integer - example: 1 - - name: limit - in: query - description: number of records to fetch - required: false - schema: - type: integer - example: 10 - responses: - "202": - description: Agent object - content: - application/json: - schema: - $ref: "#/components/schemas/Agents" - examples: - AgentDeleteResponse: - $ref: "#/components/examples/AgentDeleteResponseExample" - "401": - description: Unauthorized - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorList" - examples: - example: - $ref: "#/components/examples/Agent_401" - "403": - description: Forbidden - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorList" - examples: - example: - $ref: "#/components/examples/Agent_403" - "404": - description: Not Found - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorList" - examples: - example: - $ref: "#/components/examples/Agent_404" - "500": - description: Internal server error - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorList" - examples: - example: - $ref: "#/components/examples/Agent_500" - patch: - tags: - - Agents - summary: Update Agent by UUID - description: This API provides capability to update an agent by uuid Beta - operationId: patchAgentByUuid - parameters: - - name: agentId - in: path - description: Agent UUID - required: true - schema: - $ref: "#/components/schemas/AgentId" - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/AgentPatchRequest" - examples: - PatchAgent: - $ref: "#/components/examples/AgentPatchRequestExample" - required: true - responses: - "202": - description: Agent object - content: - application/json: - schema: - $ref: "#/components/schemas/Agents" - examples: - AgentPostResponse: - $ref: "#/components/examples/AgentPatchResponseExample" - "401": - description: Unauthorized - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorList" - examples: - example: - $ref: "#/components/examples/Agent_401" - "403": - description: Forbidden - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorList" - examples: - example: - $ref: "#/components/examples/Agent_403" - "404": - description: Not Found - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorList" - examples: - example: - $ref: "#/components/examples/Agent_404" - "500": - description: Internal server error - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorList" - examples: - example: - $ref: "#/components/examples/Agent_500" - "/fabric/v4/agents/{agentId}/activities": - get: - tags: - - Agents - summary: Get Agent Activities - description: This API provides capability to retrieve an agent activities Beta - operationId: getAgentActivities - parameters: - - name: agentId - in: path - description: Agent UUID - required: true - schema: - $ref: "#/components/schemas/AgentId" - - name: offset - in: query - description: offset - required: false - schema: - type: integer - example: 1 - - name: limit - in: query - description: number of records to fetch - required: false - schema: - type: integer - example: 10 - responses: - "200": - description: Successful operation - content: - application/json: - schema: - $ref: "#/components/schemas/AgentGetActivities" - examples: - Example: - $ref: "#/components/examples/AgentActivitiesResponseExample" - "401": - description: Unauthorized - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorList" - examples: - example: - $ref: "#/components/examples/Agent_401" - "403": - description: Forbidden - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorList" - examples: - example: - $ref: "#/components/examples/Agent_403" - "404": - description: Not Found - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorList" - examples: - example: - $ref: "#/components/examples/Agent_404" - "500": - description: Internal server error - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorList" - examples: - example: - $ref: "#/components/examples/Agent_500" "/fabric/v4/{asset}/{assetId}/cloudevents": get: tags: @@ -844,6 +307,69 @@ paths: examples: example: $ref: "#/components/examples/500" + /fabric/v4/latestOperationalEvents/search: + post: + tags: + - Cloud Events + summary: Search Last Operational Cloud Events + description: This API provides capability to search last operational cloud events from a filtered query + operationId: searchLastOpEvents + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/OperationalEventSearchRequest" + examples: + OperationalEventSearchRequestExample: + $ref: "#/components/examples/search-latest-operational-events" + required: true + responses: + "200": + description: Successful operation + content: + application/json: + schema: + $ref: "#/components/schemas/SearchOperationalEventResponse" + examples: + Example: + $ref: "#/components/examples/search-latest-operational-events-response" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/401" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/403" + "404": + description: Not Found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/404" + "500": + description: Internal server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/500" "/fabric/v4/{asset}/{assetId}/metrics": get: tags: @@ -1202,6 +728,8 @@ paths: $ref: "#/components/examples/COLO2AWSSPwithDot1q-Primary" Colo2Sp-Azure-Primary: $ref: "#/components/examples/COLO2AzureSP-Primary" + Colo2Sp-LMaaS-Primary: + $ref: "#/components/examples/COLO2LMaaSSP" Colo2Sp-Google: $ref: "#/components/examples/COLO2GoogleSPwithDot1q" Colo2Sp-Ibm_1.0: @@ -1372,6 +900,8 @@ paths: $ref: "#/components/examples/COLO2COLO-MetroConnect-Response" Colo2Sp-Azure-Primary: $ref: "#/components/examples/COLO2AzureSP-Primary-Response" + Colo2Sp-LMaaS-Primary: + $ref: "#/components/examples/COLO2LMaaSSP-Response" Colo2Sp-Google: $ref: "#/components/examples/COLO2GoogleSPwithDot1q-Response" Colo2Sp-Alibaba: @@ -1524,6 +1054,10 @@ paths: $ref: "#/components/examples/NonGenericConnectionResponseExample" genericConnectionResponse: $ref: "#/components/examples/GenericConnectionResponseExample" + coloToColoWithMaintenanceResponse: + $ref: "#/components/examples/ColoToColoWithMaintenanceResponseExample" + Colo2Sp-LMaaS: + $ref: "#/components/examples/LMaaSConnectionResponse" "400": description: Bad request content: @@ -3085,6 +2619,138 @@ paths: examples: example: $ref: "#/components/examples/500_internal_error" + /fabric/v4/exchangeServices/{exchangeServiceId}: + get: + tags: + - Internet Exchange Services + summary: Get Internet Exchange Service + description: The API provides capability to get Internet Exchange Service + operationId: getExchangeServiceById + parameters: + - name: exchangeServiceId + in: path + description: Internet Exchange Service Id + required: true + schema: + $ref: "#/components/schemas/ExchangeServiceId" + responses: + "200": + description: Successful Operation + content: + application/json: + schema: + $ref: "#/components/schemas/ExchangeServiceResponse" + examples: + GetExchangeServiceResponse: + $ref: "#/components/examples/ExchangeServiceResponse" + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/ExchangeService_400" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/ExchangeService_401" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/ExchangeService_403" + "404": + description: Not Found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/ExchangeService_404" + "500": + description: Internal Server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/ExchangeService_500" + /fabric/v4/exchangeServices/search: + post: + tags: + - Internet Exchange Services + summary: Search Internet Exchange Service + description: The API provides capability to get list of user's Internet Exchange Service using search criteria, including optional filtering, pagination and sorting. + operationId: searchExchangeService + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/ExchangeServiceSearchRequest" + examples: + ExchangeServiceSearchProjectId: + $ref: "#/components/examples/ExchangeServiceSearchProjectId" + required: true + responses: + "200": + description: Successful operation + content: + application/json: + schema: + $ref: "#/components/schemas/ExchangeServiceSearchResponse" + examples: + example: + $ref: "#/components/examples/ExchangeServiceSearchResponse" + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + example: + - errorCode: EQ-3000035 + errorMessage: Invalid request body + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/ExchangeService_401" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + example: + - errorCode: EQ-3000197 + errorMessage: User not authorized to perform given action + "500": + description: Internal Server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/ExchangeService_500" /fabric/v4/internetAccessServices: post: tags: @@ -3283,12 +2949,343 @@ paths: application/json: schema: $ref: "#/components/schemas/ErrorList" + /fabric/v4/interconnects: + post: + tags: + - Fabric One + summary: Create Interconnect + description: This API provides capability to create user's Interconnect Beta + operationId: createInterconnect + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/InterconnectPostRequest" + examples: + CreateInterconnect: + $ref: "#/components/examples/InterconnectCreate" + required: true + responses: + "201": + description: Interconnect created successfully + content: + application/json: + schema: + $ref: "#/components/schemas/Interconnect" + examples: + CreateInterconnectResponse: + $ref: "#/components/examples/InterconnectResponse" + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/400" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/401" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/403" + "415": + description: Unsupported Media Type + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/415" + "500": + description: Internal server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/500" + "/fabric/v4/interconnects/{interconnectId}": + get: + tags: + - Fabric One + summary: Get Interconnect By ID + description: This API provides capability to retrieve user's Interconnect Beta + operationId: getInterconnectByUuid + parameters: + - name: interconnectId + in: path + description: Interconnect UUID + required: true + schema: + $ref: "#/components/schemas/InterconnectId" + responses: + "200": + description: Interconnect object + content: + application/json: + schema: + $ref: "#/components/schemas/Interconnect" + examples: + interconnectResponse: + $ref: "#/components/examples/InterconnectResponse" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/401" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/403" + "404": + description: Not Found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/400" + delete: + tags: + - Fabric One + summary: Delete Interconnect By ID + description: This API provides capability to delete user's Interconnect Beta + operationId: deleteInterconnectByUuid + parameters: + - name: interconnectId + in: path + description: Interconnect UUID + required: true + schema: + $ref: "#/components/schemas/InterconnectId" + responses: + "202": + description: Fabric Interconnect object + content: + application/json: + schema: + $ref: "#/components/schemas/Interconnect" + examples: + interconnectDeleteResponse: + $ref: "#/components/examples/InterconnectDeleteResponse" + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/400" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/401" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/403" + "404": + description: Not Found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/400" + /fabric/v4/interconnects/search: + post: + tags: + - Fabric One + summary: Search Interconnects + description: The API provides capability to get list of user's Interconnects using search criteria, including optional filtering, pagination and sorting Beta + operationId: searchInterconnects + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/InterconnectSearchRequest" + examples: + SearchInterconnects: + $ref: "#/components/examples/InterconnectSearchRequest" + required: true + responses: + "200": + description: Fabric Interconnect Search Response + content: + application/json: + schema: + $ref: "#/components/schemas/InterconnectSearchResponse" + examples: + interconnectSearchResponse: + $ref: "#/components/examples/InterconnectSearchResponse" + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/400" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/401" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/403" + "415": + description: Unsupported Media Type + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/415" + "500": + description: Internal server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/500" + /fabric/v4/interconnectPackages: + get: + tags: + - Fabric One + summary: Get All Interconnect Packages + description: Get All Interconnect Packages returns details of all available interconnect packages for the specified user credentials. Beta + operationId: getInterconnectPackages + parameters: + - name: offset + in: query + description: offset + required: false + schema: + type: integer + example: 1 + - name: limit + in: query + description: number of records to fetch + required: false + schema: + type: integer + example: 10 + responses: + "200": + description: Successful operation + content: + application/json: + schema: + $ref: "#/components/schemas/AllInterconnectPackagesResponse" + examples: + interconnectPackagesExample: + $ref: "#/components/examples/interconnect-packages" + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/400" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/401" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/403" + "404": + description: Not Found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/400" + "415": + description: Unsupported Media Type + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/415" /fabric/v4/ipBlocks: post: tags: - - Ip Blocks - summary: Submits new Equinix owned or customer owned Ip Block request - description: Submits new Equinix owned or customer owned Ip Block request + - IP Blocks + summary: Submits new Equinix owned or customer owned IP Block request + description: Submits new Equinix owned or customer owned IP Block request operationId: submitIpBlock parameters: [] requestBody: @@ -3304,7 +3301,7 @@ paths: required: true responses: "202": - description: Ip Block submitted, patched, or deletion accepted + description: IP Block submitted, patched, or deletion accepted content: application/json: schema: @@ -3335,21 +3332,21 @@ paths: "/fabric/v4/ipBlocks/{uuid}": get: tags: - - Ip Blocks - summary: Retrieve Ip Block by UUID - description: Retrieve Ip Block by UUID + - IP Blocks + summary: Retrieve IP Block by UUID + description: Retrieve IP Block by UUID operationId: getIpBlock parameters: - name: uuid in: path - description: UUID of the Ip Block + description: UUID of the IP Block required: true schema: type: string format: uuid responses: "200": - description: Ip Block retrieved successfully + description: IP Block retrieved successfully content: application/json: schema: @@ -3366,7 +3363,7 @@ paths: schema: $ref: "#/components/schemas/ErrorList" "404": - description: Ip Block not found + description: IP Block not found content: application/json: schema: @@ -3379,21 +3376,21 @@ paths: $ref: "#/components/schemas/ErrorList" delete: tags: - - Ip Blocks - summary: Delete Ip Block by UUID - description: Delete Ip Block by UUID + - IP Blocks + summary: Delete IP Block by UUID + description: Delete IP Block by UUID operationId: deleteIpBlockById parameters: - name: uuid in: path - description: UUID of the Ip Block + description: UUID of the IP Block required: true schema: type: string format: uuid responses: "202": - description: Ip Block submitted, patched, or deletion accepted + description: IP Block submitted, patched, or deletion accepted content: application/json: schema: @@ -3416,13 +3413,13 @@ paths: schema: $ref: "#/components/schemas/ErrorList" "404": - description: Ip Block not found + description: IP Block not found content: application/json: schema: $ref: "#/components/schemas/ErrorList" "409": - description: Ip Block cannot be deleted due to active products + description: IP Block cannot be deleted due to active products content: application/json: schema: @@ -3435,14 +3432,14 @@ paths: $ref: "#/components/schemas/ErrorList" patch: tags: - - Ip Blocks - summary: patch Ip Block by UUID - description: patch Ip Block by UUID + - IP Blocks + summary: patch IP Block by UUID + description: patch IP Block by UUID operationId: patchIpBlockById parameters: - name: uuid in: path - description: UUID of the Ip Block + description: UUID of the IP Block required: true schema: type: string @@ -3455,7 +3452,7 @@ paths: required: true responses: "202": - description: Ip Block submitted, patched, or deletion accepted + description: IP Block submitted, patched, or deletion accepted content: application/json: schema: @@ -3466,7 +3463,7 @@ paths: CustomerOwnedAccepted: $ref: "#/components/examples/IpBlockCustomerOwnershipAcceptedResponse" "404": - description: Ip Block not found + description: IP Block not found content: application/json: schema: @@ -3480,9 +3477,9 @@ paths: /fabric/v4/ipBlocks/search: post: tags: - - Ip Blocks - summary: Search for Ip Blocks - description: Search for Ip Blocks based on criteria + - IP Blocks + summary: Search for IP Blocks + description: Search for IP Blocks based on criteria operationId: searchIpBlocks parameters: [] requestBody: @@ -3493,7 +3490,7 @@ paths: required: true responses: "200": - description: Ip Blocks found successfully + description: IP Blocks found successfully content: application/json: schema: @@ -3596,6 +3593,8 @@ paths: $ref: "#/components/examples/ConnectionSearchANDClause" ConnectionSearchANDwithNestedOR: $ref: "#/components/examples/ConnectionSearchANDwithNestedOR" + ConnectionSearchByMaintenanceStatus: + $ref: "#/components/examples/ConnectionSearchByMaintenanceStatus" required: true responses: "200": @@ -3651,6 +3650,8 @@ paths: operation: providerStatus: PROVISIONING equinixStatus: PROVISIONED + maintenanceStatus: SCHEDULED + lockEnabled: true changeLog: createdDateTime: 2020-05-21T10:30:00Z updatedDateTime: 2020-05-21T10:30:00Z @@ -3723,6 +3724,8 @@ paths: $ref: "#/components/examples/VirtualConnectionProductOfflineEvplVcTypeFromColoToSp" virtualConnectionProductOfflineEvpLanVcTypeFromColoToNetwork: $ref: "#/components/examples/VirtualConnectionProductEvpLanVcTypeFromColoToNetwork" + virtualConnectionProductColoToColoWithGeoScope: + $ref: "#/components/examples/VirtualConnectionProductColoToColoWithGeoScope" cloudRouterProduct: $ref: "#/components/examples/FabricCloudRouterProduct" ipBlockProduct: @@ -3741,8 +3744,8 @@ paths: $ref: "#/components/examples/PrecisionTimePtpStandardPackage" precisionTimeProductPtpEnterprisePackageCode: $ref: "#/components/examples/PrecisionTimePtpEnterprisePackage" - metroConnectProduct: - $ref: "#/components/examples/MetroConnectProduct" + opticalConnectProduct: + $ref: "#/components/examples/OpticalConnectProduct" required: true responses: "200": @@ -3766,8 +3769,8 @@ paths: $ref: "#/components/examples/VirtualPortIX" precisionTimeService: $ref: "#/components/examples/PrecisionTimeService" - metroConnect: - $ref: "#/components/examples/MetroConnect" + opticalConnect: + $ref: "#/components/examples/OpticalConnect" "400": description: Bad Request content: @@ -3943,10 +3946,10 @@ paths: description: flips view between buyer and seller representation schema: type: string + default: aSide enum: - aSide - zSide - default: aSide responses: "200": description: Successful operation @@ -4012,6 +4015,8 @@ paths: $ref: "#/components/examples/ServiceProfileCreate" ServiceProfileCreate-CRH: $ref: "#/components/examples/ServiceProfileCreate-CRH" + LmaasServiceProfileCreate: + $ref: "#/components/examples/LmaasServiceProfileCreate" required: true responses: "201": @@ -4026,6 +4031,8 @@ paths: examples: ServiceProfile: $ref: "#/components/examples/ServiceProfileCreateResponse" + LmaasServiceProfile: + $ref: "#/components/examples/LmaasServiceProfileCreateResponse" "400": description: Bad request content: @@ -4075,10 +4082,10 @@ paths: description: flips view between buyer and seller representation schema: type: string + default: aSide enum: - aSide - zSide - default: aSide requestBody: content: application/json: @@ -4158,10 +4165,10 @@ paths: description: flips view between buyer and seller representation schema: type: string + default: aSide enum: - aSide - zSide - default: aSide responses: "200": description: Successful operation @@ -4177,6 +4184,8 @@ paths: $ref: "#/components/examples/ServiceProfileResponse" ZSideServiceProfile: $ref: "#/components/examples/SellerServiceProfileResponse" + LmaasServiceProfile: + $ref: "#/components/examples/LmaasServiceProfileResponse" "400": description: Bad request content: @@ -4387,7 +4396,7 @@ paths: content: application/json-patch+json: schema: - $ref: "#/components/schemas/JsonPatch_1" + $ref: "#/components/schemas/ServiceProfileUpdateRequest" examples: ServiceProfilePatchRequest: $ref: "#/components/examples/ServiceProfilePatchRequest" @@ -4454,7 +4463,7 @@ paths: examples: example: $ref: "#/components/examples/sp-500" - "/fabric/v4/serviceProfiles/{serviceProfileId}/actions": + /fabric/v4/serviceProfiles/{serviceProfileId}/actions: post: tags: - Service Profiles @@ -4534,6 +4543,155 @@ paths: examples: example: $ref: "#/components/examples/sp-500" + "/fabric/v4/serviceProfiles/{serviceProfileId}/environments": + get: + tags: + - Service Profiles + summary: Get Profile Environments + description: Get service profile provider environments by UUID Beta. + operationId: getServiceProfileEnvironmentsByUuid + parameters: + - name: serviceProfileId + in: path + description: Service Profile UUID + required: true + schema: + $ref: "#/components/schemas/ServiceProfileId" + - name: offset + in: query + description: offset + required: false + schema: + type: integer + example: 1 + - name: limit + in: query + description: number of records to fetch + required: false + schema: + type: integer + example: 10 + responses: + "200": + description: Successful operation + content: + application/json; charset=UTF-8: + schema: + $ref: "#/components/schemas/ProviderEnvironments" + examples: + ServiceProfileEnvironments: + $ref: "#/components/examples/ServiceProfileEnvironmentsResponse" + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/sp-400" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/sp-401" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/sp-403-read" + "500": + description: Internal Server Error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/sp-500" + "/fabric/v4/serviceProfiles/{serviceProfileId}/environments/{environmentId}/actions": + post: + tags: + - Service Profiles + summary: Service Profile Environment Actions + description: This API provides capability to perform actions on a service profile environment, such as validating an activation key.Beta + operationId: serviceProfileEnvironmentAction + parameters: + - name: serviceProfileId + in: path + description: Service Profile UUID + required: true + schema: + $ref: "#/components/schemas/ServiceProfileId" + - name: environmentId + in: path + description: Provider Environment Reference + required: true + schema: + $ref: "#/components/schemas/EnvironmentId" + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/EnvironmentActionRequest" + examples: + ValidateActivationKey: + value: + type: VALIDATE_ACTIVATION_KEY + keyDetails: + value: key_here + required: true + responses: + "201": + description: Successful service profile environment action operation + content: + application/json: + schema: + $ref: "#/components/schemas/EnvironmentActionResponse" + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/sp-400" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/sp-401" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/sp-403-update" + "500": + description: Internal Server Error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/sp-500" "/fabric/v4/serviceProfiles/{serviceProfileId}/metros": get: tags: @@ -5092,6 +5250,292 @@ paths: examples: example: $ref: "#/components/examples/500_internal_error" + /fabric/v4/opticalConnects: + post: + tags: + - Optical Metro Connects + summary: Create Optical Metro Connect Service + description: | + Create a single Optical Metro Connect circuit. + operationId: createOpticalConnect + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/OpticalConnectPostRequest" + examples: + COLOToCOLO: + $ref: "#/components/examples/ColoOpticalConnectCreate" + COLOToRemote: + $ref: "#/components/examples/RemoteOpticalConnectCreate" + COLOToBMMR: + $ref: "#/components/examples/BMMROpticalConnectCreate" + required: true + responses: + "202": + description: Accepted Operation + content: + application/json: + schema: + $ref: "#/components/schemas/OpticalConnectResponse" + examples: + COLOToCOLO: + $ref: "#/components/examples/ColoOpticalConnectResponseExample" + COLOToRemote: + $ref: "#/components/examples/RemoteOpticalConnectResponseExample" + COLOToBMMR: + $ref: "#/components/examples/BMMROpticalConnectResponseExample" + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/OpticalConnect_400" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/OpticalConnect_403" + "404": + description: Not Found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/OpticalConnect_404" + "500": + description: Internal Server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/OpticalConnect_500" + /fabric/v4/opticalConnects/bulk: + post: + tags: + - Optical Metro Connects + summary: Create Dual Diverse Optical Metro Connect Service + description: | + Create a dual diverse pair of circuits on separate optical paths. + operationId: createBulkOpticalConnect + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/BulkOpticalConnectRequest" + examples: + COLOToCOLO: + $ref: "#/components/examples/ColoOpticalConnectBulkCreate" + COLOToRemote: + $ref: "#/components/examples/RemoteOpticalConnectBulkCreate" + COLOToBMMR: + $ref: "#/components/examples/BMMROpticalConnectBulkCreate" + required: true + responses: + "202": + description: Accepted Operation + content: + application/json: + schema: + $ref: "#/components/schemas/OpticalConnectBulk" + examples: + COLOToCOLO: + $ref: "#/components/examples/ColoOpticalConnectBulkResponseExample" + COLOToRemote: + $ref: "#/components/examples/RemoteOpticalConnectBulkResponseExample" + COLOToBMMR: + $ref: "#/components/examples/BMMROpticalConnectBulkResponseExample" + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/OpticalConnect_400" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/OpticalConnect_403" + "404": + description: Not Found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/OpticalConnect_404" + "500": + description: Internal Server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/OpticalConnect_500" + "/fabric/v4/opticalConnects/{opticalConnectId}": + get: + tags: + - Optical Metro Connects + summary: Get Optical Metro Connect Service + description: | + Get a single Optical Metro Connect by UUID. + operationId: getOpticalConnectByUuid + parameters: + - name: opticalConnectId + in: path + description: Unique identifier of an Optical Connect. + required: true + schema: + $ref: "#/components/schemas/OpticalConnectId" + responses: + "200": + description: Successful Operation + content: + application/json: + schema: + $ref: "#/components/schemas/OpticalConnectResponse" + examples: + COLOToCOLO: + $ref: "#/components/examples/ColoOpticalConnectResponseExample" + COLOToRemote: + $ref: "#/components/examples/RemoteOpticalConnectResponseExample" + COLOToBMMR: + $ref: "#/components/examples/BMMROpticalConnectResponseExample" + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/OpticalConnect_400" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/OpticalConnect_403" + "404": + description: Not Found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/OpticalConnect_404" + "500": + description: Internal Server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/OpticalConnect_500" + /fabric/v4/opticalConnects/search: + post: + tags: + - Optical Metro Connects + summary: Search Optical Metro Connect Services + description: | + Get Optical Metro Connects matching the supplied criteria, with optional filtering, pagination and sorting. + operationId: searchOpticalConnect + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/OpticalConnectSearchRequest" + examples: + SearchFilterByStatus: + $ref: "#/components/examples/SearchOpticalConnectFilterByStatus" + SearchFilterByName: + $ref: "#/components/examples/SearchOpticalConnectByName" + SearchFilterOrAnd: + $ref: "#/components/examples/SearchOpticalConnectFilterOrAnd" + required: true + responses: + "200": + description: Successful operation + content: + application/json: + schema: + $ref: "#/components/schemas/OpticalConnectServiceSearchResponse" + examples: + Example: + $ref: "#/components/examples/OpticalConnectSearchResponseExample" + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/OpticalConnect_400_invalid_sorting" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/OpticalConnect_401" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/OpticalConnect_403" + "404": + description: Not Found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/OpticalConnect_404" + "500": + description: Internal Server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/OpticalConnect_500" /fabric/v4/metros: get: tags: @@ -5157,7 +5601,7 @@ paths: examples: example: $ref: "#/components/examples/500_metros" - "/fabric/v4/metros/{metroCode}": + /fabric/v4/metros/{metroCode}: get: tags: - Metros @@ -5474,6 +5918,8 @@ paths: examples: portExample: $ref: "#/components/examples/portByUUID" + maintenanceScheduledPortExample: + $ref: "#/components/examples/maintenanceScheduledPortByUUID" "400": description: Bad request content: @@ -5713,6 +6159,8 @@ paths: $ref: "#/components/examples/portSearchByOptionalFilters" PortSearchRangeOperators: $ref: "#/components/examples/portSearchRangeOperators" + PortSearchByMaintenanceStatus: + $ref: "#/components/examples/portSearchByMaintenanceStatus" required: true responses: "200": @@ -9697,7 +10145,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/CloudRouter" + $ref: "#/components/schemas/CloudRouterReadResponse" examples: cloudRouterResponse: $ref: "#/components/examples/CloudRouterResponseExample" @@ -10073,7 +10521,7 @@ paths: examples: example: $ref: "#/components/examples/500" - "/fabric/v4/routers/{routerId}/actions/search": + /fabric/v4/routers/{routerId}/actions/search: post: tags: - Cloud Routers @@ -12966,261 +13414,33 @@ paths: examples: example: $ref: "#/components/examples/500" - "/fabric/v4/streams/{streamId}": - get: - tags: - - Streams - summary: Get Stream - description: This API provides capability to get user's stream - operationId: getStreamByUuid - parameters: - - name: streamId - in: path - description: Stream UUID - required: true - schema: - $ref: "#/components/schemas/StreamId" - responses: - "200": - description: Stream object - content: - application/json: - schema: - $ref: "#/components/schemas/Stream" - examples: - StreamSubscriptionResponse: - $ref: "#/components/examples/StreamResponseExample" - "400": - description: Bad request - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorList" - "401": - description: Unauthorized - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorList" - examples: - example: - $ref: "#/components/examples/401" - "403": - description: Forbidden - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorList" - examples: - example: - $ref: "#/components/examples/403" - "404": - description: Not Found - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorList" - examples: - example: - $ref: "#/components/examples/404" - "500": - description: Internal server error - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorList" - examples: - example: - $ref: "#/components/examples/500" - put: - tags: - - Streams - summary: Update Stream - description: This API provides capability to update user's stream - operationId: updateStreamByUuid - parameters: - - name: streamId - in: path - description: Stream UUID - required: true - schema: - $ref: "#/components/schemas/StreamId" - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/StreamPutRequest" - examples: - UpdateStream: - $ref: "#/components/examples/StreamPutRequestExample" - required: true - responses: - "202": - description: Stream object - content: - application/json: - schema: - $ref: "#/components/schemas/Stream" - examples: - StreamResponse: - $ref: "#/components/examples/StreamResponseExample" - "400": - description: Bad request - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorList" - "401": - description: Unauthorized - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorList" - examples: - example: - $ref: "#/components/examples/401" - "403": - description: Forbidden - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorList" - examples: - example: - $ref: "#/components/examples/403" - "404": - description: Not Found - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorList" - examples: - example: - $ref: "#/components/examples/404" - "415": - description: Unsupported Media Type - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorList" - examples: - example: - $ref: "#/components/examples/415" - "500": - description: Internal server error - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorList" - examples: - example: - $ref: "#/components/examples/500" - delete: - tags: - - Streams - summary: Delete Stream - description: This API provides capability to delete user's stream - operationId: deleteStreamByUuid - parameters: - - name: streamId - in: path - description: Stream UUID - required: true - schema: - $ref: "#/components/schemas/StreamId" - responses: - "202": - description: Stream object - content: - application/json: - schema: - $ref: "#/components/schemas/Stream" - examples: - StreamSubscriptionResponse: - $ref: "#/components/examples/StreamDeleteRequestExample" - "400": - description: Bad request - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorList" - "401": - description: Unauthorized - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorList" - examples: - example: - $ref: "#/components/examples/401" - "403": - description: Forbidden - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorList" - examples: - example: - $ref: "#/components/examples/403" - "404": - description: Not Found - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorList" - examples: - example: - $ref: "#/components/examples/404" - "500": - description: Internal server error - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorList" - examples: - example: - $ref: "#/components/examples/500" - /fabric/v4/streamAssets/search: + /fabric/v4/streams/search: post: tags: - Streams - summary: Get Assets - description: This API provides capability to retrieve stream assets - operationId: getStreamsAssets - parameters: - - name: offset - in: query - description: offset - required: false - schema: - type: integer - example: 1 - - name: limit - in: query - description: number of records to fetch - required: false - schema: - type: integer - example: 10 + summary: Search Streams + description: This API provides capability to search streams + operationId: searchStreams + parameters: [] requestBody: content: application/json: schema: - $ref: "#/components/schemas/StreamAssetSearchRequest" + $ref: "#/components/schemas/StreamSearchRequest" examples: - SearchAssets: - $ref: "#/components/examples/StreamAssetSearchRequestExample" - required: true + SearchStreams: + $ref: "#/components/examples/StreamSearchRequestExample" + required: false responses: "200": description: Successful operation content: application/json: schema: - $ref: "#/components/schemas/GetAllStreamAssetResponse" + $ref: "#/components/schemas/SearchStreamResponse" examples: Example: - $ref: "#/components/examples/stream-asset-get-all-example" + $ref: "#/components/examples/stream-search-all-example" "401": description: Unauthorized content: @@ -13257,26 +13477,14 @@ paths: examples: example: $ref: "#/components/examples/500" - "/fabric/v4/streams/{streamId}/{asset}/{assetId}": + "/fabric/v4/streams/{streamId}": get: tags: - Streams - summary: Get Asset - description: This API provides capability to get user's assets attached to a stream - operationId: getStreamAssetByUuid + summary: Get Stream + description: This API provides capability to get user's stream + operationId: getStreamByUuid parameters: - - name: assetId - in: path - description: asset UUID - required: true - schema: - $ref: "#/components/schemas/AssetId_1" - - name: asset - in: path - description: asset - required: true - schema: - $ref: "#/components/schemas/Asset" - name: streamId in: path description: Stream UUID @@ -13285,14 +13493,309 @@ paths: $ref: "#/components/schemas/StreamId" responses: "200": - description: Stream asset object + description: Stream object content: application/json: schema: - $ref: "#/components/schemas/StreamAsset" + $ref: "#/components/schemas/Stream" examples: StreamSubscriptionResponse: - $ref: "#/components/examples/StreamConnectionAssetResponseExample" + $ref: "#/components/examples/StreamResponseExample" + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/401" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/403" + "404": + description: Not Found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/404" + "500": + description: Internal server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/500" + put: + tags: + - Streams + summary: Update Stream + description: This API provides capability to update user's stream + operationId: updateStreamByUuid + parameters: + - name: streamId + in: path + description: Stream UUID + required: true + schema: + $ref: "#/components/schemas/StreamId" + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/StreamPutRequest" + examples: + UpdateStream: + $ref: "#/components/examples/StreamPutRequestExample" + required: true + responses: + "202": + description: Stream object + content: + application/json: + schema: + $ref: "#/components/schemas/Stream" + examples: + StreamResponse: + $ref: "#/components/examples/StreamResponseExample" + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/401" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/403" + "404": + description: Not Found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/404" + "415": + description: Unsupported Media Type + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/415" + "500": + description: Internal server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/500" + delete: + tags: + - Streams + summary: Delete Stream + description: This API provides capability to delete user's stream + operationId: deleteStreamByUuid + parameters: + - name: streamId + in: path + description: Stream UUID + required: true + schema: + $ref: "#/components/schemas/StreamId" + responses: + "202": + description: Stream object + content: + application/json: + schema: + $ref: "#/components/schemas/Stream" + examples: + StreamSubscriptionResponse: + $ref: "#/components/examples/StreamDeleteRequestExample" + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/401" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/403" + "404": + description: Not Found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/404" + "500": + description: Internal server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/500" + /fabric/v4/streamAssets/search: + post: + tags: + - Streams + summary: Search Stream Assets + description: This API provides capability to search stream assets + operationId: searchStreamAssets + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/StreamAssetSearchRequest" + examples: + SearchStreamAssets: + $ref: "#/components/examples/StreamAssetSearchRequestExample" + required: true + responses: + "200": + description: Successful operation + content: + application/json: + schema: + $ref: "#/components/schemas/SearchStreamAssetResponse" + examples: + Example: + $ref: "#/components/examples/stream-asset-search-all-example" + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/401" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/403" + "404": + description: Not Found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/404" + "500": + description: Internal server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/500" + "/fabric/v4/streams/{streamId}/{asset}/{assetId}": + get: + tags: + - Streams + summary: Get Asset + description: This API provides capability to get user's assets attached to a stream + operationId: getStreamAssetByUuid + parameters: + - name: assetId + in: path + description: asset UUID + required: true + schema: + $ref: "#/components/schemas/AssetId_1" + - name: asset + in: path + description: asset + required: true + schema: + $ref: "#/components/schemas/Asset" + - name: streamId + in: path + description: Stream UUID + required: true + schema: + $ref: "#/components/schemas/StreamId" + responses: + "200": + description: Stream asset object + content: + application/json: + schema: + $ref: "#/components/schemas/StreamAsset" + examples: + StreamSubscriptionResponse: + $ref: "#/components/examples/StreamConnectionAssetResponseExample" "400": description: Bad request content: @@ -13614,8 +14117,14 @@ paths: $ref: "#/components/examples/StreamSubscriptionPostRequestExampleTeams" CreateStreamSubscription_Servicenow: $ref: "#/components/examples/StreamSubscriptionPostRequestExampleServicenow" - CreateStreamSubscription_Webhook: - $ref: "#/components/examples/StreamSubscriptionPostRequestExampleWebhook" + CreateStreamSubscription_Generic_Webhook_No_Auth: + $ref: "#/components/examples/StreamSubscriptionPostRequestExampleGenericWebhookNoAuth" + CreateStreamSubscription_Generic_Webhook_With_ApiKey: + $ref: "#/components/examples/StreamSubscriptionPostRequestExampleGenericWebhookApiKey" + CreateStreamSubscription_Generic_Webhook_With_AccessToken: + $ref: "#/components/examples/StreamSubscriptionPostRequestExampleGenericWebhookAccessToken" + CreateStreamSubscription_Generic_Webhook_With_Username_Password: + $ref: "#/components/examples/StreamSubscriptionPostRequestExampleGenericWebhookUsernamePassword" CreateStreamSubscription_Grafana_Webhook: $ref: "#/components/examples/StreamSubscriptionPostRequestExampleGrafanaWebhook" CreateStreamSubscription_Google_PubSub: @@ -13905,6 +14414,75 @@ paths: examples: example: $ref: "#/components/examples/500" + /fabric/v4/streamSubscriptions/search: + post: + tags: + - Stream Subscriptions + summary: Search Stream Subscriptions + description: This API provides capability to search stream subscriptions + operationId: searchStreamSubscriptions + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/StreamSubscriptionSearchRequest" + examples: + SearchStreamSubscriptions: + $ref: "#/components/examples/StreamSubscriptionSearchRequestExample" + required: true + responses: + "200": + description: Successful operation + content: + application/json: + schema: + $ref: "#/components/schemas/SearchStreamSubscriptionResponse" + examples: + Example: + $ref: "#/components/examples/stream-subscription-search-all-example" + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/401" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/403" + "404": + description: Not Found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/404" + "500": + description: Internal server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/500" "/fabric/v4/streams/{streamId}/alertRules": get: tags: @@ -14302,8 +14880,8 @@ paths: $ref: "#/components/schemas/CompanyProfileRequest" required: true responses: - "201": - description: Company profile created successfully + "202": + description: Company profile created and pending for approval content: application/json: schema: @@ -14827,7 +15405,52 @@ paths: application/json: schema: $ref: "#/components/schemas/ErrorList" - "/fabric/v4/logos/{uuid}": + /fabric/v4/logos: + post: + tags: + - Logos + summary: Create Logo + description: Create Logo for Equinix Fabric™ Company Profile. + operationId: createLogo + parameters: [] + requestBody: + content: + multipart/form-data: + schema: + $ref: "#/components/schemas/LogoRequest" + required: true + responses: + "201": + description: Successful Create operation + content: + application/json: + schema: + $ref: "#/components/schemas/LogoResponse" + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + "500": + description: Internal Server Error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + /fabric/v4/logos/{uuid}: get: tags: - Logos @@ -14925,336 +15548,3943 @@ paths: application/json: schema: $ref: "#/components/schemas/ErrorList" - /fabric/v4/tags: + /fabric/v4/loas: + post: + tags: + - Loas + summary: Create Loa + description: The API provides capability to create a new Loa + operationId: createLoa + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/CreateLoa" + examples: + IssueLoa-OnCageWithCageId: + $ref: "#/components/examples/IssueLoaOnCageWithCageId" + IssueLoa-OnPatchPanelPort: + $ref: "#/components/examples/IssueLoaOnPatchPanelPort" + IssueLoa-OnPatchPanel: + $ref: "#/components/examples/IssueLoaOnPatchPanel" + RequestLoa-OnCage: + $ref: "#/components/examples/RequestLoaOnCage" + RequestLoa-OnPatchPanel: + $ref: "#/components/examples/RequestLoaOnPatchPanel" + RequestLoa-OnPatchPanelPort: + $ref: "#/components/examples/RequestLoaOnPatchPanelPort" + required: true + responses: + "202": + description: Accepted + content: + application/json: + schema: + $ref: "#/components/schemas/LoaResponse" + examples: + ByRequestor: + $ref: "#/components/examples/LoaCreateResponseByRequestor" + ByIssuerWithCageType: + $ref: "#/components/examples/LoaCreateResponseByIssuerWithCageType" + ByIssuerWithPatchPanelPortType: + $ref: "#/components/examples/LoaCreateResponseByIssuerWithPatchPanelPortType" + ByIssuerWithPatchPanelType: + $ref: "#/components/examples/LoaCreateResponseByIssuerWithPatchPanelType" + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Loa_400" + "401": + description: Unauthorized request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Loa_401" + "403": + description: Operation not allowed + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Loa_403" + "404": + description: Not found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Loa_404" + "500": + description: Internal Server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Loa_500" + "/fabric/v4/loas/{loaId}": get: tags: - - Tags - summary: List Tags - description: Get all Tags - operationId: listTags + - Loas + summary: Get Loa + description: The API provides capability to get Loa details by Loa ID + operationId: getLoaByUuid parameters: - - name: type - in: query - description: Filter by tag type - required: false + - name: loaId + in: path + description: Loa UUID + required: true schema: - type: array - items: - type: string - - name: offset - in: query - description: Offset for pagination - required: false + $ref: "#/components/schemas/LoaId" + responses: + "200": + description: Successful Operation + content: + application/json: + schema: + $ref: "#/components/schemas/LoaResponse" + examples: + LoaExample: + $ref: "#/components/examples/LoaResponse" + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Loa_400" + "401": + description: Unauthorized request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Loa_401" + "403": + description: Operation not allowed + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Loa_403" + "404": + description: Not found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Loa_404" + "500": + description: Internal Server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Loa_500" + patch: + tags: + - Loas + summary: Update Loa + description: The API provides capability to update Loa details by Loa ID + operationId: updateLoaByUuid + parameters: + - name: loaId + in: path + description: Loa UUID + required: true schema: - type: integer - format: int32 - default: 0 - - name: limit - in: query - description: Limit for pagination - required: false + $ref: "#/components/schemas/LoaId" + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/LoaUpdate" + examples: + LoaPatchRequest: + $ref: "#/components/examples/LoaPatchRequest" + required: true + responses: + "200": + description: Successful operation + content: + application/json: + schema: + $ref: "#/components/schemas/LoaResponse" + examples: + PatchLoaResponse: + $ref: "#/components/examples/LoaPatchResponse" + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Loa_400" + "401": + description: Unauthorized request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Loa_401" + "403": + description: Operation not allowed + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Loa_403" + "404": + description: Not found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Loa_404" + "500": + description: Internal Server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Loa_500" + "/fabric/v4/loas/{loaId}/actions": + post: + tags: + - Loas + summary: Loa Actions + description: The API provides capability to perform actions on Loa + operationId: performLoaAction + parameters: + - name: loaId + in: path + description: Loa UUID + required: true schema: - maximum: 100 - type: integer - format: int32 - default: 20 + $ref: "#/components/schemas/LoaId" + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/LoaActionRequest" + examples: + AuthorizeLoa: + $ref: "#/components/examples/AuthorizeLoaActionRequest" + AcceptLoa: + $ref: "#/components/examples/AcceptLoaActionRequest" + CopyLoa: + $ref: "#/components/examples/CopyLoaActionRequest" + SendLoa: + $ref: "#/components/examples/SendLoaActionRequest" + CancelLoa: + $ref: "#/components/examples/CancelLoaActionRequest" + required: true + responses: + "202": + description: Accepted + content: + application/json: + schema: + $ref: "#/components/schemas/LoaActionResponse" + examples: + AuthorizeLoa: + $ref: "#/components/examples/AuthorizeLoaActionResponse" + AcceptLoa: + $ref: "#/components/examples/AcceptLoaActionResponse" + SendLoa: + $ref: "#/components/examples/SendLoaActionResponse" + CopyLoa: + $ref: "#/components/examples/CopyLoaActionResponse" + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Loa_Action_400" + "401": + description: Unauthorized request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Loa_401" + "403": + description: Operation not allowed + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Loa_403" + "404": + description: Not found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Loa_Action_404" + "500": + description: Internal Server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Loa_500" + "/fabric/v4/loas/{loaId}/actions/{actionId}": + get: + tags: + - Loas + summary: Get Loa Action by Action ID + description: This API provides capability to fetch action details + operationId: getLoaActionsByUuid + parameters: + - name: loaId + in: path + description: Loa UUID + required: true + schema: + $ref: "#/components/schemas/LoaId" + - name: actionId + in: path + description: Action UUID + required: true + schema: + $ref: "#/components/schemas/ActionId_2" responses: "200": - description: Successful List operation + description: Successful Operation content: application/json: schema: - $ref: "#/components/schemas/TagListResponse" + $ref: "#/components/schemas/LoaActionResponse" + examples: + AuthorizeLoaActionExample: + $ref: "#/components/examples/AuthorizeLoaActionResponse" "400": description: Bad request content: application/json: schema: $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Loa_Action_400" "401": - description: Unauthorized + description: Unauthorized request content: application/json: schema: $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Loa_401" "403": - description: Forbidden + description: Operation not allowed + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Loa_403" + "404": + description: Not found content: application/json: schema: $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Loa_Action_404" "500": - description: Internal Server Error + description: Internal Server error content: application/json: schema: $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Loa_500" + /fabric/v4/loas/search: post: tags: - - Tags - summary: Create Tag - description: Create Tag for Equinix Fabric™. - operationId: createTag + - Loas + summary: Search Loas + description: The API provides capability to get list of user's Loa using search criteria, including optional filtering, pagination and sorting + operationId: searchLoa parameters: [] requestBody: content: application/json: schema: - $ref: "#/components/schemas/TagRequest" + $ref: "#/components/schemas/LoaSearchRequest" + examples: + SearchByNameWithType: + $ref: "#/components/examples/LoaSearchByNameWithType" + SearchByStateWithPartnerOrIbx: + $ref: "#/components/examples/LoaSearchStateWithPartnerOrIbx" required: true responses: - "201": - description: Successful Create operation + "200": + description: Successful operation content: application/json: schema: - $ref: "#/components/schemas/TagResponse" + $ref: "#/components/schemas/LoaSearchResponse" + examples: + example: + $ref: "#/components/examples/LoaSearchResponse" "400": description: Bad request content: application/json: schema: $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Loa_400" "401": - description: Unauthorized + description: Unauthorized request content: application/json: schema: $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Loa_401" "403": - description: Forbidden + description: Operation not allowed + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Loa_403" + "404": + description: Not found content: application/json: schema: $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Loa_404" "500": - description: Internal Server Error + description: Internal Server error content: application/json: schema: $ref: "#/components/schemas/ErrorList" -components: - schemas: - AgentTemplateGetAllResponse: - type: object - properties: - pagination: - $ref: "#/components/schemas/Pagination" - data: - type: array - description: Data returned from the API call. - items: - $ref: "#/components/schemas/AgentTemplates" - ErrorList: - type: array - description: List of Error Message - items: - $ref: "#/components/schemas/Error" - AgentTemplateId: - type: string - description: Agent Template UUID - format: uuid - example: 657400f8-d360-11e9-bb65-2a2ae2dbcce5 - AgentTemplates: - type: object - properties: - href: - type: string - description: Agent Template URI - format: uuid - example: c9b8e7a2-f3b1-4576-a4a9-1366a63df170 - type: - type: string - description: type - example: ANO_AGENT_TEMPLATE - uuid: - type: string - description: Equinix-assigned access point identifier - format: uuid - example: c9b8e7a2-f3b1-4576-a4a9-1366a63df170 - name: - maxLength: 50 - minLength: 3 - type: string - description: Equinix-provided agent template name - description: - type: string - description: Equinix-provided agent template description - state: - type: string - description: Agent state - enum: - - PROVISIONING - - PROVISIONED - - REPROVISIONING - - DEPROVISIONING - - DEPROVISIONED - - FAILED - enabled: - type: boolean - description: Equinix-provided agent template enabled status - agentDefinition: - $ref: "#/components/schemas/AgentDefinition" - changeLog: - $ref: "#/components/schemas/Changelog" - description: Agent Template object - AgentGetAllResponse: - type: object - properties: - pagination: - $ref: "#/components/schemas/Pagination" - data: - type: array - description: Data returned from the API call. - items: - $ref: "#/components/schemas/Agents" - AgentPostRequest: - required: - - agentTemplate - - name - - project - - type - type: object - properties: - type: - type: string - example: ANO_AGENT - name: - maxLength: 50 - minLength: 3 - type: string - description: Customer-provided agent name - description: - maxLength: 500 - minLength: 0 - type: string - description: Customer-provided agent description - enabled: - type: boolean - description: Customer-provided agent enabled status - project: - $ref: "#/components/schemas/Project" - agentTemplate: - $ref: "#/components/schemas/AgentTemplate" - configuration: - $ref: "#/components/schemas/Configuration" - description: Create Agent - AgentTemplate: - type: object - properties: - uuid: - type: string - description: Agent Template Uuid - Configuration: - type: object - properties: - prompt: - type: string - description: Agent configuration prompt to be used for agent specification - Agents: - type: object - properties: - href: - type: string - description: Agent URI - format: uri - readOnly: true - example: https://api.equinix.com/fabric/v4/agents/3c9b8e7a2-f3b1-4576-a4a9-1366a63df170 - type: - type: string - description: type - example: ANO_AGENT - uuid: - type: string - description: Equinix-assigned access point identifier - format: uuid - example: c9b8e7a2-f3b1-4576-a4a9-1366a63df170 - name: - type: string - description: Customer-provided agent name - description: - type: string - description: Customer-provided agent description - state: - type: string - description: Agent state - enum: - - PROVISIONING - - PROVISIONED - - REPROVISIONING - - DEPROVISIONING - - DEPROVISIONED - - FAILED - enabled: - type: boolean - description: Customer-provided agent enabled status - project: - $ref: "#/components/schemas/Project" - agentTemplate: - $ref: "#/components/schemas/AgentTemplate" - configuration: - $ref: "#/components/schemas/Configuration" - changeLog: - $ref: "#/components/schemas/Changelog" - description: Agent object - AgentId: - type: string - description: Agent UUID - format: uuid - example: 557400f8-d360-11e9-bb65-2a2ae2dbcce4 - AgentPatchRequest: - required: - - op - - path - - value - type: object - properties: - path: - type: string - description: path inside document leading to updated parameters for /name, /description, /enabled, and /configration/prompt - example: /name - op: - type: string - description: Handy shortcut for operation name - example: replace - value: - description: new value for updated parameter - description: Update Agent - AgentGetActivities: - type: object - properties: - pagination: - $ref: "#/components/schemas/Pagination" - data: - type: array - description: Data returned from the API call. - items: - $ref: "#/components/schemas/AgentActivities" - CloudEventAssetType: - type: string - enum: - - ports - - connections - - routers - - metros - - serviceTokens - - networks - - projects - - organizations - - timeServices - - companyProfiles - AssetId: - type: string - description: Asset UUID - format: uuid - example: 757400f8-d360-11e9-bb65-2a2ae2dbcce6 - StartDateTime: - type: string - description: Start date and time - format: date-time - example: 2024-07-11T18:06:21Z - EndDateTime: - type: string + examples: + example: + $ref: "#/components/examples/Loa_500" + "/fabric/v4/loas/{loaId}/actions/search": + post: + tags: + - Loas + summary: Search Loa Actions + description: The API provides capability to get list of user's Loa Actions using search criteria, including optional filtering, pagination and sorting + operationId: searchLoaAction + parameters: + - name: loaId + in: path + description: Loa UUID + required: true + schema: + $ref: "#/components/schemas/LoaId" + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/LoaActionSearchRequest" + examples: + ActionTypeSearch: + $ref: "#/components/examples/LoaActionSearchByActionType" + required: true + responses: + "200": + description: Successful Operation + content: + application/json: + schema: + $ref: "#/components/schemas/LoaActionSearchResponse" + examples: + LoaActionSearchExample: + $ref: "#/components/examples/LoaSearchActionResponse" + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Loa_Action_400" + "401": + description: Unauthorized request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Loa_401" + "403": + description: Operation not allowed + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Loa_403" + "404": + description: Not found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Loa_Action_404" + "500": + description: Internal Server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Loa_500" + "/fabric/v4/loas/{loaId}/consumers": + get: + tags: + - Loas + summary: Get Loa Consumers + description: The API provides capability to get Loa consumers by Loa ID + operationId: getLoaConsumersByLoaId + parameters: + - name: loaId + in: path + description: Loa UUID + required: true + schema: + $ref: "#/components/schemas/LoaId" + responses: + "200": + description: Successful Operation + content: + application/json: + schema: + $ref: "#/components/schemas/LoaConsumersResponse" + examples: + LoaConsumersExample: + $ref: "#/components/examples/LoaConsumersResponse" + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Loa_400" + "401": + description: Unauthorized request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Loa_401" + "403": + description: Operation not allowed + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Loa_403" + "404": + description: Not found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Loa_404" + "500": + description: Internal Server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Loa_500" + "/fabric/v4/loas/{loaId}/notes": + get: + tags: + - Loas + summary: Get Loa Notes + description: The API provides capability to get Loa notes by Loa ID + operationId: getLoaNotesByUuid + parameters: + - name: loaId + in: path + description: Loa UUID + required: true + schema: + $ref: "#/components/schemas/LoaId" + responses: + "200": + description: Successful Operation + content: + application/json: + schema: + $ref: "#/components/schemas/LoaNotesResponse" + examples: + GetLoaNotesExample: + $ref: "#/components/examples/LoaNotesResponse" + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Loa_400" + "401": + description: Unauthorized request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Loa_401" + "403": + description: Operation not allowed + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Loa_403" + "404": + description: Not found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Loa_404" + "500": + description: Internal Server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Loa_500" + post: + tags: + - Loas + summary: Create Loa Note + description: The API provides capability to create Loa note by Loa ID + operationId: createLoaNoteByLoaId + parameters: + - name: loaId + in: path + description: Loa UUID + required: true + schema: + $ref: "#/components/schemas/LoaId" + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/CreateLoaNote" + examples: + LoaNoteRequest: + $ref: "#/components/examples/LoaNoteRequest" + required: true + responses: + "201": + description: Created + content: + application/json: + schema: + $ref: "#/components/schemas/LoaNoteDetails" + examples: + CreateLoaNoteExample: + $ref: "#/components/examples/CreateLoaNoteResponse" + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Loa_400" + "401": + description: Unauthorized request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Loa_401" + "403": + description: Operation not allowed + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Loa_403" + "404": + description: Not found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Loa_404" + "500": + description: Internal Server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Loa_500" + /fabric/v4/tags: + get: + tags: + - Tags + summary: List Tags + description: Get all Tags + operationId: listTags + parameters: + - name: type + in: query + description: Filter by tag type + required: false + schema: + type: array + items: + type: string + - name: offset + in: query + description: Offset for pagination + required: false + schema: + type: integer + format: int32 + default: 0 + - name: limit + in: query + description: Limit for pagination + required: false + schema: + maximum: 100 + type: integer + format: int32 + default: 20 + responses: + "200": + description: Successful List operation + content: + application/json: + schema: + $ref: "#/components/schemas/TagListResponse" + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + "500": + description: Internal Server Error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + post: + tags: + - Tags + summary: Create Tag + description: Create Tag for Equinix Fabric™. + operationId: createTag + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/TagRequest" + required: true + responses: + "202": + description: Successfully created tag and pending for approval + content: + application/json: + schema: + $ref: "#/components/schemas/TagResponse" + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + "500": + description: Internal Server Error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + /fabric/v4/tags/{uuid}: + get: + tags: + - Tags + summary: Get Tag + description: Get Tag by UUID + operationId: getTagByUuid + parameters: + - name: uuid + in: path + description: UUID of the Tag + required: true + schema: + type: string + format: uuid + responses: + "200": + description: Successful Get operation + content: + application/json: + schema: + $ref: "#/components/schemas/TagResponse" + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + "404": + description: Not Found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + "500": + description: Internal Server Error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + /fabric/v4/appDomains: + post: + tags: + - Application Domains + summary: Create App Domain + description: This API provides capability to create user's App Domain + operationId: createAppDomain + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/AppDomainPostRequest" + examples: + CreateAppDomain: + $ref: "#/components/examples/AppDomainCreate" + required: true + responses: + "202": + description: App Domain object + content: + application/json: + schema: + $ref: "#/components/schemas/AppDomain" + examples: + AppDomainResponse: + $ref: "#/components/examples/AppDomainPostResponseExample" + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + InvalidName: + $ref: "#/components/examples/AppDomain_400_InvalidName" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppDomain_401" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppDomain_403" + "415": + description: Unsupported Media Type + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppDomain_415" + "500": + description: Internal server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppDomain_500" + "/fabric/v4/appDomains/{appDomainId}": + get: + tags: + - Application Domains + summary: Get App Domain + description: This API provides capability to retrieve user's App Domain + operationId: getAppDomainByUuid + parameters: + - name: appDomainId + in: path + description: App Domain UUID + required: true + schema: + $ref: "#/components/schemas/AppDomainId" + responses: + "200": + description: App Domain object + content: + application/json: + schema: + $ref: "#/components/schemas/AppDomain" + examples: + AppDomainResponse: + $ref: "#/components/examples/AppDomainGetResponseExample" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppDomain_401" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppDomain_403" + "404": + description: Not Found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppDomain_404" + "500": + description: Internal server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppDomain_500" + delete: + tags: + - Application Domains + summary: Delete App Domain + description: This API provides capability to delete user's App Domain + operationId: deleteAppDomainByUuid + parameters: + - name: appDomainId + in: path + description: App Domain UUID + required: true + schema: + $ref: "#/components/schemas/AppDomainId" + responses: + "202": + description: App Domain object + content: + application/json: + schema: + $ref: "#/components/schemas/AppDomain" + examples: + AppDomainResponse: + $ref: "#/components/examples/AppDomainDeleteResponseExample" + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppDomain_400_InvalidState" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppDomain_401" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppDomain_403" + "404": + description: Not Found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppDomain_404" + "500": + description: Internal server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppDomain_500" + patch: + tags: + - Application Domains + summary: Update App Domain + description: This API provides capability to update user's App Domain + operationId: updateAppDomainByUuid + parameters: + - name: appDomainId + in: path + description: App Domain UUID + required: true + schema: + $ref: "#/components/schemas/AppDomainId" + requestBody: + content: + application/json-patch+json: + schema: + $ref: "#/components/schemas/AppDomainUpdateRequest" + examples: + UpdateDescription: + $ref: "#/components/examples/AppDomainUpdateDescription" + required: true + responses: + "202": + description: App Domain object + content: + application/json: + schema: + $ref: "#/components/schemas/AppDomain" + examples: + AppDomainResponse: + $ref: "#/components/examples/AppDomainPatchResponseExample" + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppDomain_400_InvalidOperation" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/401" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppDomain_403" + "404": + description: Not Found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppDomain_404" + "415": + description: Unsupported Media Type + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppDomain_415" + "500": + description: Internal server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppDomain_500" + /fabric/v4/appDomains/search: + post: + tags: + - Application Domains + summary: Search App Domains + description: The API provides capability to get list of user's App Domains using search criteria, including optional filtering, pagination and sorting + operationId: searchAppDomains + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/AppDomainSearchRequest" + examples: + SearchFilterByStatus: + $ref: "#/components/examples/AppDomainSearchFilterByStatus" + SearchFilterByName: + $ref: "#/components/examples/AppDomainSearchFilterByName" + SearchFilterOrAnd: + $ref: "#/components/examples/AppDomainSearchFilterOrAnd" + required: true + responses: + "200": + description: Successful operation + content: + application/json: + schema: + $ref: "#/components/schemas/AppDomainSearchResponse" + examples: + Example: + $ref: "#/components/examples/AppDomainSearchExample" + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppDomain_400_InvalidSorting" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppDomain_401" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppDomain_403" + "415": + description: Unsupported Media Type + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppDomain_415" + "500": + description: Internal server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppDomain_500" + "/fabric/v4/appDomains/{appDomainId}/appLinks": + get: + tags: + - Application Domains + summary: Get attached App Links for App Domain + description: This API provides capability to retrieve App Links attached to an App Domain. + operationId: getAttachedAppLinksByAppDomainId + parameters: + - name: appDomainId + in: path + description: App Domain UUID + required: true + schema: + $ref: "#/components/schemas/AppDomainId" + - name: offset + in: query + description: offset + required: false + schema: + type: integer + example: 1 + - name: limit + in: query + description: number of records to fetch + required: false + schema: + type: integer + example: 10 + - name: state + in: query + description: Filter attached App Links by one or more lifecycle states. + required: false + style: form + explode: false + schema: + $ref: "#/components/schemas/AttachedAppLinkState" + - name: order + in: query + description: Sort order for attached App Links. + required: false + schema: + $ref: "#/components/schemas/AttachedAppLinkOrder" + - name: style + in: query + description: Detail level of the response. + required: false + schema: + $ref: "#/components/schemas/Style" + responses: + "200": + description: Successful operation + content: + application/json: + schema: + $ref: "#/components/schemas/AppDomainAttachedAppLinks" + examples: + Example: + $ref: "#/components/examples/AppDomainAttachedAppLinksGetResponseExample" + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppDomain_400_InvalidSorting" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppDomain_401" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppDomain_403" + "404": + description: Not Found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppDomain_404" + "500": + description: Internal server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppDomain_500" + /fabric/v4/appLinks: + post: + tags: + - Application Links + summary: Create App Link + description: This API provides capability to create user's App Link + operationId: createAppLink + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/AppLinkPostRequest" + examples: + CreateAppLink: + $ref: "#/components/examples/AppLinkCreate" + required: true + responses: + "202": + description: App Link object + content: + application/json: + schema: + $ref: "#/components/schemas/AppLink" + examples: + AppLinkResponse: + $ref: "#/components/examples/AppLinkPostResponseExample" + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + InvalidName: + $ref: "#/components/examples/AppLink_400_InvalidName" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_401" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_403" + "415": + description: Unsupported Media Type + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_415" + "500": + description: Internal server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_500" + "/fabric/v4/appLinks/{appLinkId}": + get: + tags: + - Application Links + summary: Get App Link + description: This API provides capability to retrieve user's App Link + operationId: getAppLinkByUuid + parameters: + - name: appLinkId + in: path + description: App Link UUID + required: true + schema: + $ref: "#/components/schemas/AppLinkId" + responses: + "200": + description: App Link object + content: + application/json: + schema: + $ref: "#/components/schemas/AppLink" + examples: + AppLinkResponse: + $ref: "#/components/examples/AppLinkGetResponseExample" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_401" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_403" + "404": + description: Not Found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_404" + "500": + description: Internal server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_500" + delete: + tags: + - Application Links + summary: Delete App Link + description: This API provides capability to delete user's App Link + operationId: deleteAppLinkByUuid + parameters: + - name: appLinkId + in: path + description: App Link UUID + required: true + schema: + $ref: "#/components/schemas/AppLinkId" + responses: + "202": + description: App Link object + content: + application/json: + schema: + $ref: "#/components/schemas/AppLink" + examples: + AppLinkResponse: + $ref: "#/components/examples/AppLinkDeleteResponseExample" + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_400_InvalidState" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_401" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_403" + "404": + description: Not Found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_404" + "500": + description: Internal server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_500" + patch: + tags: + - Application Links + summary: Update App Link + description: This API provides capability to update user's App Link + operationId: updateAppLinkByUuid + parameters: + - name: appLinkId + in: path + description: App Link UUID + required: true + schema: + $ref: "#/components/schemas/AppLinkId" + requestBody: + content: + application/json-patch+json: + schema: + $ref: "#/components/schemas/AppLinkUpdateRequest" + examples: + UpdateName: + $ref: "#/components/examples/AppLinkUpdateName" + required: true + responses: + "202": + description: App Link object + content: + application/json: + schema: + $ref: "#/components/schemas/AppLink" + examples: + AppLinkResponse: + $ref: "#/components/examples/AppLinkPatchResponseExample" + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_400_InvalidOperation" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/401" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_403" + "404": + description: Not Found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_404" + "415": + description: Unsupported Media Type + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_415" + "500": + description: Internal server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_500" + /fabric/v4/appLinks/search: + post: + tags: + - Application Links + summary: Search App Links + description: The API provides capability to get list of user's App Links using search criteria, including optional filtering, pagination and sorting + operationId: searchAppLinks + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/AppLinkSearchRequest" + examples: + SearchFilterByStatus: + $ref: "#/components/examples/AppLinkSearchFilterByStatus" + SearchFilterByName: + $ref: "#/components/examples/AppLinkSearchFilterByName" + SearchFilterOrAnd: + $ref: "#/components/examples/AppLinkSearchFilterOrAnd" + required: true + responses: + "200": + description: Successful operation + content: + application/json: + schema: + $ref: "#/components/schemas/AppLinkSearchResponse" + examples: + Example: + $ref: "#/components/examples/AppLinkSearchExample" + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_400_InvalidSorting" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_401" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_403" + "415": + description: Unsupported Media Type + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_415" + "500": + description: Internal server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_500" + "/fabric/v4/appLinks/{appLinkId}/appDomains/{appDomainId}": + get: + tags: + - Application Links + summary: Get attached App Domain for App Link + description: This API provides ability to retrieve an App Domain attached to an App Link. + operationId: getAttachedAppDomainByUuid + parameters: + - name: appLinkId + in: path + description: App Link UUID + required: true + schema: + $ref: "#/components/schemas/AppLinkId" + - name: appDomainId + in: path + description: App Domain UUID + required: true + schema: + $ref: "#/components/schemas/AppDomainId" + responses: + "200": + description: Attached App Domain object + content: + application/json: + schema: + $ref: "#/components/schemas/AppLinkAppDomainAttachment" + examples: + AppLinkDomainResponse: + $ref: "#/components/examples/AppLinkAttachDomainResponse" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_401" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_403" + "404": + description: Not Found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_404" + "500": + description: Internal server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_500" + put: + tags: + - Application Links + summary: Attach App Domain to App Link + description: This API provides ability to attach the user's App Domain to App Link. + operationId: attachAppDomainToAppLink + parameters: + - name: appLinkId + in: path + description: App Link UUID + required: true + schema: + $ref: "#/components/schemas/AppLinkId" + - name: appDomainId + in: path + description: App Domain UUID + required: true + schema: + $ref: "#/components/schemas/AppDomainId" + responses: + "202": + description: Attach App Domain object + content: + application/json: + schema: + $ref: "#/components/schemas/AppLinkAppDomainAttachment" + examples: + AppLinkAttachDomainResponse: + $ref: "#/components/examples/AppLinkAttachDomainAttachResponse" + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_400_InvalidAttachState" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_401" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_403" + "404": + description: Not Found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_404" + "500": + description: Internal server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_500" + delete: + tags: + - Application Links + summary: Detach App Domain from App Link + description: This API provides ability to detach App Domain from App Link + operationId: detachAppDomainFromAppLink + parameters: + - name: appLinkId + in: path + description: App Link UUID + required: true + schema: + $ref: "#/components/schemas/AppLinkId" + - name: appDomainId + in: path + description: App Domain UUID + required: true + schema: + $ref: "#/components/schemas/AppDomainId" + responses: + "202": + description: Detach App Domain object + content: + application/json: + schema: + $ref: "#/components/schemas/AppLinkAppDomainAttachment" + examples: + AppLinkDetachDomainResponse: + $ref: "#/components/examples/AppLinkAttachDomainDetachResponse" + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_400_InvalidAttachState" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_401" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_403" + "404": + description: Not Found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_404" + "500": + description: Internal server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_500" + "/fabric/v4/appLinks/{appLinkId}/appDomains/search": + post: + tags: + - Application Links + summary: Search attached App Domain to App Link + description: The API provides capability to get list of user's attached App Domains using search criteria, including optional filtering, pagination and sorting + operationId: searchAttachedAppDomains + parameters: + - name: appLinkId + in: path + description: App Link UUID + required: true + schema: + $ref: "#/components/schemas/AppLinkId" + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/AppLinkAttachDomainSearchRequest" + examples: + SearchAttachedDomainFilterByStatus: + $ref: "#/components/examples/AppLinkAttachDomainSearchFilterByStatus" + SearchAttachedDomainFilterOrAnd: + $ref: "#/components/examples/AppLinkAttachDomainSearchFilterOrAnd" + required: true + responses: + "200": + description: Successful operation + content: + application/json: + schema: + $ref: "#/components/schemas/AppLinkAttachDomainSearchResponse" + examples: + Example: + $ref: "#/components/examples/AppLinkAttachDomainSearchExample" + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_400_InvalidSorting" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_401" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_403" + "415": + description: Unsupported Media Type + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_415" + "500": + description: Internal server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_500" + "/fabric/v4/appLinks/{appLinkId}/appDomains": + get: + tags: + - Application Links + summary: Get attached App Domains for App Link + description: This API provides capability to retrieve App Domains attached to an App Link. + operationId: getAttachedAppDomainsByAppLinkId + parameters: + - name: appLinkId + in: path + description: App Link UUID + required: true + schema: + $ref: "#/components/schemas/AppLinkId" + - name: offset + in: query + description: offset + required: false + schema: + type: integer + example: 1 + - name: limit + in: query + description: number of records to fetch + required: false + schema: + type: integer + example: 10 + - name: attachmentStatus + in: query + description: Filter attached App Domains by one or more attachment lifecycle states. + required: false + style: form + explode: false + schema: + $ref: "#/components/schemas/AttachedAppDomainAttachmentStatus" + - name: order + in: query + description: Sort order for attached App Domains. + required: false + schema: + $ref: "#/components/schemas/AttachedAppDomainOrder" + - name: style + in: query + description: Detail level of the response. + required: false + schema: + $ref: "#/components/schemas/Style" + responses: + "200": + description: Successful operation + content: + application/json: + schema: + $ref: "#/components/schemas/AppLinkAttachedAppDomains" + examples: + Example: + $ref: "#/components/examples/AppLinkAttachDomainGetExample" + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_400_InvalidSorting" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_401" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_403" + "404": + description: Not Found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_404" + "500": + description: Internal server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_500" + "/fabric/v4/appLinks/{appLinkId}/appServices/{appServiceId}": + get: + tags: + - Application Links + summary: Get attached App Service for App Link + description: This API provides ability to retrieve an App Service attached to an App Link. + operationId: getAttachedAppServiceByUuid + parameters: + - name: appLinkId + in: path + description: App Link UUID + required: true + schema: + $ref: "#/components/schemas/AppLinkId" + - name: appServiceId + in: path + description: App Service UUID + required: true + schema: + $ref: "#/components/schemas/AppServiceId" + responses: + "200": + description: Attached App Service object + content: + application/json: + schema: + $ref: "#/components/schemas/AppLinkAppServiceAttachment" + examples: + AppLinkResponse: + $ref: "#/components/examples/AppLinkAttachServiceResponse" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_401" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_403" + "404": + description: Not Found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_404" + "500": + description: Internal server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_500" + put: + tags: + - Application Links + summary: Attach App Service to App Link + description: This API provides ability to attach the user's App Service to App Link. + operationId: attachAppServiceToAppLink + parameters: + - name: appLinkId + in: path + description: App Link UUID + required: true + schema: + $ref: "#/components/schemas/AppLinkId" + - name: appServiceId + in: path + description: App Service UUID + required: true + schema: + $ref: "#/components/schemas/AppServiceId" + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/AppLinkAttachServiceRequest" + examples: + AttachAppLinkToService: + $ref: "#/components/examples/AppLinkAttachService" + required: true + responses: + "202": + description: Attach App Service object + content: + application/json: + schema: + $ref: "#/components/schemas/AppLinkAppServiceAttachment" + examples: + AppLinkResponse: + $ref: "#/components/examples/AppLinkAttachServiceAttachResponse" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_401" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_403" + "404": + description: Not Found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_404" + "500": + description: Internal server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_500" + delete: + tags: + - Application Links + summary: Detach App Service from App Link + description: This API provides ability to detach App Service from App Link + operationId: detachAppServiceFromAppLink + parameters: + - name: appLinkId + in: path + description: App Link UUID + required: true + schema: + $ref: "#/components/schemas/AppLinkId" + - name: appServiceId + in: path + description: App Service UUID + required: true + schema: + $ref: "#/components/schemas/AppServiceId" + responses: + "202": + description: Detach App Service object + content: + application/json: + schema: + $ref: "#/components/schemas/AppLinkAppServiceAttachment" + examples: + AppLinkResponse: + $ref: "#/components/examples/AppLinkAttachServiceDetachResponse" + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_400_InvalidState" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_401" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_403" + "404": + description: Not Found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_404" + "500": + description: Internal server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_500" + patch: + tags: + - Application Links + summary: Update App Service attachment to App Link + description: This API provides ability to update the App Service attachment to App Link. + operationId: updateAppServiceAttachmentToAppLink + parameters: + - name: appLinkId + in: path + description: App Link UUID + required: true + schema: + $ref: "#/components/schemas/AppLinkId" + - name: appServiceId + in: path + description: App Service UUID + required: true + schema: + $ref: "#/components/schemas/AppServiceId" + requestBody: + content: + application/json-patch+json: + schema: + $ref: "#/components/schemas/AppLinkAttachServiceUpdateRequest" + examples: + UpdateDestinationIp: + $ref: "#/components/examples/AppLinkAttachServicePatchDestinationIp" + required: true + responses: + "202": + description: Update App Service attachment object + content: + application/json: + schema: + $ref: "#/components/schemas/AppLinkAppServiceAttachment" + examples: + AppLinkResponse: + $ref: "#/components/examples/AppLinkAttachServicePatchResponse" + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_400_InvalidOperation" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/401" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_403" + "404": + description: Not Found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_404" + "415": + description: Unsupported Media Type + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_415" + "500": + description: Internal server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_500" + "/fabric/v4/appLinks/{appLinkId}/appServices/search": + post: + tags: + - Application Links + summary: Search attached App Service to App Link + description: The API provides capability to get list of user's attached App Services using search criteria, including optional filtering, pagination and sorting + operationId: searchAttachedAppServices + parameters: + - name: appLinkId + in: path + description: App Link UUID + required: true + schema: + $ref: "#/components/schemas/AppLinkId" + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/AppLinkAttachServiceSearchRequest" + examples: + SearchAttachedServiceFilterByStatus: + $ref: "#/components/examples/AppLinkAttachServiceSearchFilterByStatus" + SearchAttachedServiceFilterOrAnd: + $ref: "#/components/examples/AppLinkAttachServiceSearchFilterOrAnd" + required: true + responses: + "200": + description: Successful operation + content: + application/json: + schema: + $ref: "#/components/schemas/AppLinkAttachServiceSearchResponse" + examples: + Example: + $ref: "#/components/examples/AppLinkAttachServiceSearchExample" + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_400_InvalidSorting" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_401" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_403" + "415": + description: Unsupported Media Type + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_415" + "500": + description: Internal server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_500" + "/fabric/v4/appLinks/{appLinkId}/appServices": + get: + tags: + - Application Links + summary: Get attached App Services for App Link + description: This API provides capability to retrieve App Services attached to an App Link. + operationId: getAttachedAppServicesByAppLinkId + parameters: + - name: appLinkId + in: path + description: App Link UUID + required: true + schema: + $ref: "#/components/schemas/AppLinkId" + - name: offset + in: query + description: offset + required: false + schema: + type: integer + example: 1 + - name: limit + in: query + description: number of records to fetch + required: false + schema: + type: integer + example: 10 + - name: attachmentStatus + in: query + description: Filter attached App Services by one or more attachment lifecycle states. + required: false + style: form + explode: false + schema: + $ref: "#/components/schemas/AttachedAppServiceAttachmentStatus" + - name: order + in: query + description: Sort order for attached App Services. + required: false + schema: + $ref: "#/components/schemas/AttachedAppServiceOrder" + - name: style + in: query + description: Detail level of the response. + required: false + schema: + $ref: "#/components/schemas/Style" + responses: + "200": + description: Successful operation + content: + application/json: + schema: + $ref: "#/components/schemas/AppLinkAttachedAppServices" + examples: + Example: + $ref: "#/components/examples/AppLinkAttachServiceGetExample" + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_400_InvalidSorting" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_401" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_403" + "404": + description: Not Found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_404" + "500": + description: Internal server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_500" + /fabric/v4/appServices: + post: + tags: + - Application Services + summary: Create App Service + description: This API provides capability to create user's App Service + operationId: createAppService + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/AppServicePostRequest" + examples: + CreateAppService: + $ref: "#/components/examples/AppServiceCreate" + required: true + responses: + "202": + description: App Service object + content: + application/json: + schema: + $ref: "#/components/schemas/AppService" + examples: + AppServiceResponse: + $ref: "#/components/examples/AppServicePostResponseExample" + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + InvalidName: + $ref: "#/components/examples/AppService_400_InvalidName" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppService_401" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppService_403" + "415": + description: Unsupported Media Type + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppService_415" + "500": + description: Internal server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppService_500" + "/fabric/v4/appServices/{appServiceId}": + get: + tags: + - Application Services + summary: Get App Service + description: This API provides capability to retrieve user's App Service + operationId: getAppServiceByUuid + parameters: + - name: appServiceId + in: path + description: App Service UUID + required: true + schema: + $ref: "#/components/schemas/AppServiceId" + responses: + "200": + description: App Service object + content: + application/json: + schema: + $ref: "#/components/schemas/AppService" + examples: + AppServiceResponse: + $ref: "#/components/examples/AppServiceGetResponseExample" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppService_401" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppService_403" + "404": + description: Not Found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppService_404" + "500": + description: Internal server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppService_500" + delete: + tags: + - Application Services + summary: Delete App Service + description: This API provides capability to delete user's App Service + operationId: deleteAppServiceByUuid + parameters: + - name: appServiceId + in: path + description: App Service UUID + required: true + schema: + $ref: "#/components/schemas/AppServiceId" + responses: + "202": + description: App Service object + content: + application/json: + schema: + $ref: "#/components/schemas/AppService" + examples: + AppServiceResponse: + $ref: "#/components/examples/AppServiceDeleteResponseExample" + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppService_400_InvalidState" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppService_401" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppService_403" + "404": + description: Not Found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppService_404" + "500": + description: Internal server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppService_500" + patch: + tags: + - Application Services + summary: Update App Service + description: This API provides capability to update user's App Service + operationId: updateAppServiceByUuid + parameters: + - name: appServiceId + in: path + description: App Service UUID + required: true + schema: + $ref: "#/components/schemas/AppServiceId" + requestBody: + content: + application/json-patch+json: + schema: + $ref: "#/components/schemas/AppServiceUpdateRequest" + examples: + UpdateName: + $ref: "#/components/examples/AppServiceUpdateName" + required: true + responses: + "202": + description: App Service object + content: + application/json: + schema: + $ref: "#/components/schemas/AppService" + examples: + AppServiceResponse: + $ref: "#/components/examples/AppServicePatchResponseExample" + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppService_400_InvalidOperation" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/401" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppService_403" + "404": + description: Not Found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppService_404" + "415": + description: Unsupported Media Type + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppService_415" + "500": + description: Internal server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppService_500" + /fabric/v4/appServices/search: + post: + tags: + - Application Services + summary: Search App Services + description: The API provides capability to get list of user's App Services using search criteria, including optional filtering, pagination and sorting + operationId: searchAppServices + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/AppServiceSearchRequest" + examples: + SearchFilterByStatus: + $ref: "#/components/examples/AppServiceSearchFilterByStatus" + SearchFilterByName: + $ref: "#/components/examples/AppServiceSearchFilterByName" + SearchFilterOrAnd: + $ref: "#/components/examples/AppServiceSearchFilterOrAnd" + required: true + responses: + "200": + description: Successful operation + content: + application/json: + schema: + $ref: "#/components/schemas/AppServiceSearchResponse" + examples: + Example: + $ref: "#/components/examples/AppServiceSearchExample" + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppService_400_InvalidSorting" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppService_401" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppService_403" + "415": + description: Unsupported Media Type + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppService_415" + "500": + description: Internal server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppService_500" + "/fabric/v4/appServices/{appServiceId}/appLinks": + get: + tags: + - Application Services + summary: Get attached App Links for App Service + description: This API provides capability to retrieve App Links attached to an App Service. + operationId: getAttachedAppLinksByAppServiceId + parameters: + - name: appServiceId + in: path + description: App Service UUID + required: true + schema: + $ref: "#/components/schemas/AppServiceId" + - name: offset + in: query + description: offset + required: false + schema: + type: integer + example: 1 + - name: limit + in: query + description: number of records to fetch + required: false + schema: + type: integer + example: 10 + - name: state + in: query + description: Filter attached App Links by one or more lifecycle states. + required: false + style: form + explode: false + schema: + $ref: "#/components/schemas/AttachedAppLinkState_1" + - name: order + in: query + description: Sort order for attached App Links. + required: false + schema: + $ref: "#/components/schemas/AttachedAppLinkOrder" + - name: style + in: query + description: Detail level of the response. + required: false + schema: + $ref: "#/components/schemas/Style" + responses: + "200": + description: Successful operation + content: + application/json: + schema: + $ref: "#/components/schemas/AppServiceAttachedAppLinks" + examples: + Example: + $ref: "#/components/examples/AppServiceAttachedAppLinksGetResponseExample" + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppService_400_InvalidSorting" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppService_401" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppService_403" + "404": + description: Not Found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppService_404" + "500": + description: Internal server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppService_500" + "/fabric/v4/appServices/{appServiceId}/appSubscriptions": + get: + tags: + - Application Services + summary: Get attached App Subscriptions for App Service + description: This API provides capability to retrieve App Subscriptions attached to an App Service. + operationId: getAttachedAppSubscriptionsByAppServiceId + parameters: + - name: appServiceId + in: path + description: App Service UUID + required: true + schema: + $ref: "#/components/schemas/AppServiceId" + - name: offset + in: query + description: offset + required: false + schema: + type: integer + example: 1 + - name: limit + in: query + description: number of records to fetch + required: false + schema: + type: integer + example: 10 + - name: state + in: query + description: Filter attached App Subscriptions by one or more lifecycle states. + required: false + style: form + explode: false + schema: + $ref: "#/components/schemas/AttachedAppSubscriptionState" + - name: order + in: query + description: Sort order for attached App Subscriptions. + required: false + schema: + $ref: "#/components/schemas/AttachedAppSubscriptionOrder" + - name: style + in: query + description: Detail level of the response. + required: false + schema: + $ref: "#/components/schemas/Style" + responses: + "200": + description: Successful operation + content: + application/json: + schema: + $ref: "#/components/schemas/AppServiceAttachedAppSubscriptions" + examples: + Example: + $ref: "#/components/examples/AppServiceAttachedAppSubscriptionsGetResponseExample" + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppService_400_InvalidSorting" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppService_401" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppService_403" + "404": + description: Not Found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppService_404" + "500": + description: Internal server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppService_500" + "/fabric/v4/appServices/{appServiceId}/appSubscriptions/search": + post: + tags: + - Application Services + summary: Search attached App Subscriptions + description: The API provides capability to get list of App Subscriptions attached to an App Service using search criteria. + operationId: searchAttachedAppSubscriptionsByAppServiceId + parameters: + - name: appServiceId + in: path + description: App Service UUID + required: true + schema: + $ref: "#/components/schemas/AppServiceId" + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/AppServiceAttachedAppSubscriptionSearchRequest" + required: true + responses: + "200": + description: Successful operation + content: + application/json: + schema: + $ref: "#/components/schemas/AppServiceAttachedAppSubscriptionSearchResponse" + examples: + Example: + $ref: "#/components/examples/AppServiceAttachedAppSubscriptionSearchExample" + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppService_400_InvalidSorting" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppService_401" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppService_403" + "415": + description: Unsupported Media Type + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppService_415" + "500": + description: Internal server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppService_500" + /fabric/v4/appSubscriptions: + post: + tags: + - Application Subscriptions + summary: Create App Subscription + description: This API provides capability to create user's App Subscription + operationId: createAppSubscription + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/AppSubscriptionPostRequest" + examples: + CreateAppSubscription: + $ref: "#/components/examples/AppSubscriptionCreate" + required: true + responses: + "202": + description: App Subscription object + content: + application/json: + schema: + $ref: "#/components/schemas/AppSubscription" + examples: + AppSubscriptionResponse: + $ref: "#/components/examples/AppSubscriptionPostResponseExample" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppSubscription_401" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppSubscription_403" + "415": + description: Unsupported Media Type + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppSubscription_415" + "500": + description: Internal server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppSubscription_500" + "/fabric/v4/appSubscriptions/{appSubscriptionId}": + get: + tags: + - Application Subscriptions + summary: Get App Subscription + description: This API provides capability to retrieve user's App Subscription + operationId: getAppSubscriptionByUuid + parameters: + - name: appSubscriptionId + in: path + description: App Subscription UUID + required: true + schema: + $ref: "#/components/schemas/AppSubscriptionId" + responses: + "200": + description: App Subscription object + content: + application/json: + schema: + $ref: "#/components/schemas/AppSubscription" + examples: + AppSubscriptionResponse: + $ref: "#/components/examples/AppSubscriptionGetResponseExample" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppSubscription_401" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppSubscription_403" + "404": + description: Not Found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppSubscription_404" + "500": + description: Internal server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppSubscription_500" + delete: + tags: + - Application Subscriptions + summary: Delete App Subscription + description: This API provides capability to delete user's App Subscription + operationId: deleteAppSubscriptionByUuid + parameters: + - name: appSubscriptionId + in: path + description: App Subscription UUID + required: true + schema: + $ref: "#/components/schemas/AppSubscriptionId" + responses: + "202": + description: App Subscription object + content: + application/json: + schema: + $ref: "#/components/schemas/AppSubscription" + examples: + AppSubscriptionResponse: + $ref: "#/components/examples/AppSubscriptionDeleteResponseExample" + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppSubscription_400_InvalidState" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppSubscription_401" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppSubscription_403" + "404": + description: Not Found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppSubscription_404" + "500": + description: Internal server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppSubscription_500" + patch: + tags: + - Application Subscriptions + summary: Update App Subscription + description: This API provides capability to update user's App Subscription + operationId: updateAppSubscriptionByUuid + parameters: + - name: appSubscriptionId + in: path + description: App Subscription UUID + required: true + schema: + $ref: "#/components/schemas/AppSubscriptionId" + requestBody: + content: + application/json-patch+json: + schema: + $ref: "#/components/schemas/AppSubscriptionUpdateRequest" + examples: + UpdateSourceIpSubnets: + $ref: "#/components/examples/AppSubscriptionUpdateSourceIpSubnets" + required: true + responses: + "202": + description: App Subscription object + content: + application/json: + schema: + $ref: "#/components/schemas/AppSubscription" + examples: + AppSubscriptionResponse: + $ref: "#/components/examples/AppSubscriptionPatchResponseExample" + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppSubscription_400_InvalidOperation" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/401" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppSubscription_403" + "404": + description: Not Found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppSubscription_404" + "415": + description: Unsupported Media Type + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppSubscription_415" + "500": + description: Internal server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppSubscription_500" + /fabric/v4/appSubscriptions/search: + post: + tags: + - Application Subscriptions + summary: Search App Subscriptions + description: The API provides capability to get list of user's App Subscriptions using search criteria, including optional filtering, pagination and sorting + operationId: searchAppSubscriptions + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/AppSubscriptionSearchRequest" + examples: + SearchFilterByStatus: + $ref: "#/components/examples/AppSubscriptionSearchFilterByStatus" + SearchFilterOrAnd: + $ref: "#/components/examples/AppSubscriptionSearchFilterOrAnd" + required: true + responses: + "200": + description: Successful operation + content: + application/json: + schema: + $ref: "#/components/schemas/AppSubscriptionSearchResponse" + examples: + Example: + $ref: "#/components/examples/AppSubscriptionSearchExample" + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppSubscription_400_InvalidSorting" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppSubscription_401" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppSubscription_403" + "415": + description: Unsupported Media Type + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppSubscription_415" + "500": + description: Internal server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppSubscription_500" + /fabric/v4/gateways: + post: + tags: + - Gateways + summary: Create Gateway + description: This API provides capability to create user's Gateways + operationId: createGateway + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/GatewayPostRequest" + examples: + CreateGateway: + $ref: "#/components/examples/GatewayCreate" + required: true + responses: + "202": + description: Gateway object + content: + application/json: + schema: + $ref: "#/components/schemas/Gateway" + examples: + GatewayResponse: + $ref: "#/components/examples/GatewayPostResponseExample" + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + InvalidName: + $ref: "#/components/examples/Gateway_400_InvalidName" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Gateway_401" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Gateway_403" + "415": + description: Unsupported Media Type + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Gateway_415" + "500": + description: Internal server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Gateway_500" + "/fabric/v4/gateways/{gatewayId}": + get: + tags: + - Gateways + summary: Get Gateway + description: This API provides capability to retrieve user's Gateways + operationId: getGatewayByUuid + parameters: + - name: gatewayId + in: path + description: Gateway UUID + required: true + schema: + $ref: "#/components/schemas/GatewayId" + responses: + "200": + description: Gateway object + content: + application/json: + schema: + $ref: "#/components/schemas/Gateway" + examples: + GatewayResponse: + $ref: "#/components/examples/GatewayGetResponseExample" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Gateway_401" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Gateway_403" + "404": + description: Not Found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Gateway_404" + "500": + description: Internal server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Gateway_500" + delete: + tags: + - Gateways + summary: Delete Gateway + description: This API provides capability to delete user's Gateways + operationId: deleteGatewayByUuid + parameters: + - name: gatewayId + in: path + description: Gateway UUID + required: true + schema: + $ref: "#/components/schemas/GatewayId" + responses: + "202": + description: Gateway object + content: + application/json: + schema: + $ref: "#/components/schemas/Gateway" + examples: + GatewayResponse: + $ref: "#/components/examples/GatewayDeleteResponseExample" + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Gateway_400_InvalidState" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Gateway_401" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Gateway_403" + "404": + description: Not Found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Gateway_404" + "500": + description: Internal server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Gateway_500" + patch: + tags: + - Gateways + summary: Update Gateway by ID + description: Update Gateway by Uuid + operationId: updateGatewayByUuid + parameters: + - name: gatewayId + in: path + description: Gateway UUID + required: true + schema: + $ref: "#/components/schemas/GatewayId" + requestBody: + content: + application/json-patch+json: + schema: + $ref: "#/components/schemas/GatewayUpdateRequest" + examples: + ConnectionUpdateNameRequest: + $ref: "#/components/examples/GatewayUpdateNameRequest" + ConnectionUpdateBandwidthRequest: + $ref: "#/components/examples/GatewayUpdateBandwidthRequest" + required: true + responses: + "202": + description: Gateway object + content: + application/json: + schema: + $ref: "#/components/schemas/Gateway" + examples: + GatewayResponse: + $ref: "#/components/examples/GatewayUpdateResponseExample" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Gateway_401" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Gateway_403" + "404": + description: Not Found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Gateway_404" + "500": + description: Internal server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Gateway_500" +components: + schemas: + ErrorList: + type: array + description: List of Error Message + items: + $ref: "#/components/schemas/Error" + CloudEventAssetType: + type: string + enum: + - ports + - connections + - routers + - metros + - serviceTokens + - networks + - projects + - organizations + - timeServices + - companyProfiles + AssetId: + type: string + description: Asset UUID + format: uuid + example: 757400f8-d360-11e9-bb65-2a2ae2dbcce6 + StartDateTime: + type: string + description: Start date and time + format: date-time + example: 2024-07-11T18:06:21Z + EndDateTime: + type: string description: End date and time format: date-time example: 2024-07-11T18:06:21Z @@ -15265,123 +19495,5061 @@ components: default: 0 Limit: type: integer - description: Pagination limit - example: 20 - default: 100 - GetCloudEventsByAssetResponse: + description: Pagination limit + example: 20 + default: 100 + GetCloudEventsByAssetResponse: + type: object + properties: + pagination: + $ref: "#/components/schemas/Pagination" + data: + type: array + description: Data returned from the API call. + items: + $ref: "#/components/schemas/CloudEvent" + CloudEventId: + type: string + description: Cloud Event UUID + format: uuid + example: 557400f8-d360-11e9-bb65-2a2ae2dbcce4 + CloudEvent: + type: object + properties: + spec: + type: string + description: Cloud Event Open Telemetry specification + readOnly: true + source: + type: string + description: Cloud Event source + id: + type: string + description: Cloud Event identifier + format: uuid + type: + type: string + description: Equinix supported event type + subject: + type: string + description: Cloud Event subject + time: + type: string + description: Cloud Event time the event occurred + format: date-time + dataschema: + type: string + description: Cloud Event dataschema reference + datacontenttype: + type: string + description: Cloud Event data content type + severitynumber: + type: string + description: Cloud Event severity number + severitytext: + type: string + description: Cloud Event severity text + equinixalert: + type: string + description: Equinix alert + equinixorganization: + type: string + description: Equinix organization identifier + equinixproject: + type: string + description: Equinix project identifier + authtype: + type: string + description: Cloud Event auth type + authid: + type: string + description: Cloud Event user identifier + traceparent: + type: string + description: Cloud Event traceparent + tracestate: + type: string + description: Cloud Event tracestate + data: + $ref: "#/components/schemas/CloudEventData" + description: Cloud Event object + CloudEventSearchRequest: + required: + - filter + type: object + properties: + filter: + $ref: "#/components/schemas/CloudEventFilters" + pagination: + $ref: "#/components/schemas/PaginationRequest" + description: Search requests containing criteria + CloudEventFilters: + type: object + properties: + and: + type: array + items: + $ref: "#/components/schemas/CloudEventFilter" + CloudEventFilter: + type: object + anyOf: + - $ref: "#/components/schemas/CloudEventSimpleExpression" + CloudEventSimpleExpression: + type: object + properties: + property: + type: string + description: | + Possible field names to use on filters: + * `/id` - Cloud Event identifier + * `/subject` - Cloud Event subject description + * `/type` - Cloud Event type + * `/time` - Time of Cloud Events + * `/equinixproject` - Equinix Project of Cloud Events + * `/equinixorganization` - Equinix Organization of Cloud Events + * `/equinixalert` - Equinix Alert Identifier for raise/clear Cloud Events + * `/severitytext` - cloud event severity text + * `/authid` - Equinix user key to identify the user that performed the action that triggered the Cloud Event + * `/authtype` - Equinix user type either user or system + example: /subject + operator: + type: string + description: | + Possible operators to use on filters: + * `=` - equal + * `!=` - not equal + * `>` - greater than + * `>=` - greater than or equal to + * `<` - less than + * `<=` - less than or equal to + * `BETWEEN` - between + * `IN` - in + * `LIKE` - like + * `ILIKE` - like case-insensitive + * `IS NULL` - is null + * `IS NOT NULL` - is not null + example: = + values: + type: array + items: + type: string + example: equinix.fabric.port.status.* + OperationalEventSearchRequest: + type: object + properties: + filter: + $ref: "#/components/schemas/OperationalEventFilters" + pagination: + $ref: "#/components/schemas/PaginationRequest" + description: Search requests containing criteria + OperationalEventFilters: + type: object + properties: + and: + type: array + items: + $ref: "#/components/schemas/OperationalEventFilter" + OperationalEventFilter: + type: object + anyOf: + - $ref: "#/components/schemas/OperationalEventSimpleExpression" + OperationalEventSimpleExpression: + type: object + properties: + property: + type: string + description: | + Possible field names to use on filters: + * `/subject` - Cloud Event subject description + example: /subject + operator: + type: string + description: | + Possible operators to use on filters: + * `=` - equal + * `IN` - in + example: = + values: + type: array + items: + type: string + SearchOperationalEventResponse: + type: object + properties: + pagination: + $ref: "#/components/schemas/Pagination" + data: + type: array + description: Data returned from the API call. + items: + $ref: "#/components/schemas/CloudEvent" + MetricAssetType: + type: string + enum: + - ports + - connections + - metros + Limit_1: + type: integer + description: Pagination limit + example: 20 + default: 20 + GetMetricsByAssetResponse: + type: object + properties: + pagination: + $ref: "#/components/schemas/Pagination" + data: + type: array + description: Data returned from the API call. + items: + $ref: "#/components/schemas/Metric" + PortUUID: + type: string + description: Port UUID + format: uuid + Value: + type: string + description: Which value to retrieve + example: last + GetMetricsByNameResponse: + type: object + properties: + pagination: + $ref: "#/components/schemas/Pagination" + data: + type: array + description: Data returned from the API call. + items: + $ref: "#/components/schemas/Metric" + MetricsSearchRequest: + required: + - filter + type: object + properties: + filter: + $ref: "#/components/schemas/MetricFilters" + pagination: + $ref: "#/components/schemas/PaginationRequest" + description: Search requests containing criteria + MetricFilters: + type: object + properties: + and: + type: array + items: + $ref: "#/components/schemas/MetricFilter" + MetricFilter: + type: object + anyOf: + - $ref: "#/components/schemas/MetricSimpleExpression" + MetricSimpleExpression: + type: object + properties: + property: + type: string + description: | + Possible field names to use on filters: + * `/subject` - Metric subject description (required and limited to 1 value) + * `/name` - Metric names (required) + * `/dataPoints/endDateTime` - Time of Metrics + * `/time` - Time of Metrics + * `/interval` - ISO-8601 duration format to specify the interval of metrics data points + * `/value` - specific data points of the metric to return (e.g. 'last' - for metros only) + example: /subject + operator: + type: string + description: | + Possible operators to use on filters: + * `=` - equal + * `>` - greater than + * `>=` - greater than or equal to + * `<` - less than + * `<=` - less than or equal to + * `BETWEEN` - between + * `IN` - in + example: = + values: + type: array + items: + type: string + example: equinix.fabric.port.bandwidth_rx.usage + ConnectionPostRequest: + required: + - aSide + - bandwidth + - name + - notifications + - type + - zSide + type: object + properties: + type: + $ref: "#/components/schemas/ConnectionType" + name: + type: string + description: Customer-provided connection name + order: + $ref: "#/components/schemas/Order" + notifications: + type: array + description: Preferences for notifications on connection configuration or status changes + items: + $ref: "#/components/schemas/SimplifiedNotification" + bandwidth: + maximum: 100000 + minimum: 0 + type: integer + description: Connection bandwidth in Mbps + geoScope: + $ref: "#/components/schemas/GeoScopeType" + redundancy: + $ref: "#/components/schemas/ConnectionRedundancy" + aSide: + $ref: "#/components/schemas/ConnectionSide" + zSide: + $ref: "#/components/schemas/ConnectionSide" + project: + $ref: "#/components/schemas/Project" + additionalInfo: + type: array + description: Connection additional information + items: + $ref: "#/components/schemas/ConnectionSideAdditionalInfo" + marketplaceSubscription: + $ref: "#/components/schemas/marketplaceSubscription" + endCustomer: + $ref: "#/components/schemas/EndCustomer" + description: Create connection post request + Connection: + required: + - aSide + - bandwidth + - name + - type + - zSide + type: object + properties: + href: + type: string + description: Connection URI + format: uri + readOnly: true + type: + $ref: "#/components/schemas/ConnectionType" + uuid: + type: string + description: Equinix-assigned connection identifier + name: + type: string + description: Customer-provided connection name + description: + type: string + description: Customer-provided connection description + state: + $ref: "#/components/schemas/ConnectionState" + change: + $ref: "#/components/schemas/Change" + operation: + $ref: "#/components/schemas/ConnectionOperation" + order: + $ref: "#/components/schemas/Order" + notifications: + type: array + description: Preferences for notifications on connection configuration or status changes + items: + $ref: "#/components/schemas/SimplifiedNotification" + account: + $ref: "#/components/schemas/SimplifiedAccount" + changeLog: + $ref: "#/components/schemas/Changelog" + bandwidth: + maximum: 10000 + minimum: 0 + type: integer + description: Connection bandwidth in Mbps + geoScope: + $ref: "#/components/schemas/GeoScopeType" + redundancy: + $ref: "#/components/schemas/ConnectionRedundancy" + isRemote: + type: boolean + description: Connection property derived from access point locations + direction: + $ref: "#/components/schemas/ConnectionDirection" + aSide: + $ref: "#/components/schemas/ConnectionSide" + zSide: + $ref: "#/components/schemas/ConnectionSide" + marketplaceSubscription: + $ref: "#/components/schemas/marketplaceSubscription" + additionalInfo: + type: array + description: Connection additional information + items: + $ref: "#/components/schemas/ConnectionSideAdditionalInfo" + project: + $ref: "#/components/schemas/Project" + description: Connection specification + ConnectionId: + type: string + description: Connection UUID + example: 557400f8-d360-11e9-bb65-2a2ae2dbcce4 + ConnectionDirection: + type: string + description: Connection directionality from the requester point of view + enum: + - INTERNAL + - INCOMING + - OUTGOING + VirtualCircuitId: + type: string + description: Virtual Circuit UUID + ConnectionUpdateRequest: + minItems: 1 + type: array + description: Connection Update Request + items: + $ref: "#/components/schemas/ConnectionChangeOperation" + ConnectionActionRequest: + required: + - type + type: object + properties: + type: + $ref: "#/components/schemas/Actions" + description: + type: string + description: Connection rejection reason detail + data: + $ref: "#/components/schemas/ConnectionAcceptanceData" + description: Connection action request + ConnectionAction: + required: + - data + - href + - type + - uuid + type: object + properties: + type: + $ref: "#/components/schemas/Actions" + href: + type: string + description: Connection action URI + format: uri + readOnly: true + uuid: + type: string + description: Equinix-assigned connection identifier + description: + type: string + description: Connection rejection reason detail + data: + $ref: "#/components/schemas/ConnectionAcceptanceData" + changeLog: + $ref: "#/components/schemas/Changelog" + description: Connection action + ConnectionRouteSearchRequest: + type: object + properties: + filter: + $ref: "#/components/schemas/ConnectionRouteEntryFilters" + pagination: + $ref: "#/components/schemas/PaginationRequest" + sort: + type: array + items: + $ref: "#/components/schemas/ConnectionRouteSortCriteria" + description: Search requests containing criteria + ConnectionRouteEntryFilters: + type: object + properties: + and: + maxItems: 8 + type: array + items: + $ref: "#/components/schemas/ConnectionRouteEntryFilter" + ConnectionRouteEntryFilter: + type: object + anyOf: + - $ref: "#/components/schemas/ConnectionRouteEntrySimpleExpression" + - $ref: "#/components/schemas/ConnectionRouteEntryOrFilter" + ConnectionRouteEntrySimpleExpression: + type: object + properties: + property: + type: string + description: | + Possible field names to use on filters: + * `/type` - Route table entry type + * `/state` - Route table entry state + * `/prefix` - Route table entry prefix + * `/nextHop` - Route table entry nextHop + * `/*` - all-category search + example: /type + operator: + type: string + description: | + Possible operators to use on filters: + * `=` - equal + * `!=` - not equal + * `>` - greater than + * `>=` - greater than or equal to + * `<` - less than + * `<=` - less than or equal to + * `[NOT] BETWEEN` - (not) between + * `[NOT] LIKE` - (not) like + * `[NOT] IN` - (not) in + * `~*` - case-insensitive like + example: = + values: + type: array + items: + type: string + example: IPv4_BGP_ROUTE + ConnectionRouteEntryOrFilter: + type: object + properties: + or: + maxItems: 3 + type: array + items: + $ref: "#/components/schemas/ConnectionRouteEntrySimpleExpression" + ConnectionRouteSortCriteria: + type: object + properties: + direction: + $ref: "#/components/schemas/ConnectionRouteEntrySortDirection" + property: + $ref: "#/components/schemas/ConnectionRouteEntrySortBy" + ConnectionRouteEntrySortDirection: + type: string + description: Sorting direction + default: DESC + enum: + - DESC + - ASC + ConnectionRouteEntrySortBy: + type: string + description: Possible field names to use on sorting + default: /changeLog/updatedDateTime + enum: + - /changeLog/createdDateTime + - /changeLog/updatedDateTime + - /med + - /connection/name + - /type + - /prefix + - /nextHop + ConnectionRouteTableEntrySearchResponse: + type: object + properties: + pagination: + $ref: "#/components/schemas/Pagination" + data: + type: array + description: Data returned from the API call. + items: + $ref: "#/components/schemas/ConnectionRouteTableEntry" + GetResponse: + type: object + properties: + pagination: + $ref: "#/components/schemas/Pagination" + data: + type: array + description: List of Routing Protocols + items: + $ref: "#/components/schemas/RoutingProtocolData" + RoutingProtocolBase: + required: + - type + type: object + properties: + type: + type: string + description: Routing protocol type + enum: + - BGP + - DIRECT + oneOf: + - $ref: "#/components/schemas/RoutingProtocolBGPType" + - $ref: "#/components/schemas/RoutingProtocolDirectType" + RoutingProtocolBGPType: + required: + - type + type: object + properties: + type: + type: string + description: Routing protocol type + enum: + - BGP + name: + type: string + example: My-BGP-route-1 + bgpIpv4: + $ref: "#/components/schemas/BGPConnectionIpv4" + bgpIpv6: + $ref: "#/components/schemas/BGPConnectionIpv6" + customerAsn: + type: integer + description: Customer asn + format: int64 + bgpAuthKey: + type: string + description: BGP authorization key + asOverrideEnabled: + type: boolean + description: Enable AS number override + bfd: + $ref: "#/components/schemas/RoutingProtocolBFD" + RoutingProtocolDirectType: + required: + - type + type: object + properties: + type: + type: string + description: Routing protocol type + enum: + - DIRECT + name: + type: string + example: My-direct-route-1 + directIpv4: + $ref: "#/components/schemas/DirectConnectionIpv4" + directIpv6: + $ref: "#/components/schemas/DirectConnectionIpv6" + RoutingProtocolData: + type: object + properties: + type: + type: string + description: Routing protocol type + enum: + - BGP + - DIRECT + oneOf: + - $ref: "#/components/schemas/RoutingProtocolBGPData" + - $ref: "#/components/schemas/RoutingProtocolDirectData" + ConnectionRoutingProtocolPostRequest: + type: object + properties: + data: + type: array + description: Connection routing protocol configuration + items: + $ref: "#/components/schemas/RoutingProtocolBase" + description: Create connection routing protocolpost request + RoutingProtocolId: + type: string + description: Routing Protocol UUID + format: uuid + example: 557400f8-d360-11e9-bb65-2a2ae2dbcce4 + ConnectionRoutingProtocolPatchRequest: + minItems: 1 + type: array + description: Patch connection routing protocol request + items: + $ref: "#/components/schemas/ConnectionChangeOperation" + BGPActionsBulkData: + type: object + properties: + pagination: + $ref: "#/components/schemas/Pagination" + data: + type: array + items: + $ref: "#/components/schemas/BGPActionData" + description: List of BGP Actions + BGPActionRequest: + required: + - type + type: object + properties: + type: + $ref: "#/components/schemas/BGPActions" + description: BGP action request + BGPActionData: + type: object + properties: + href: + type: string + description: Routing Protocol URI + format: uri + example: https://api.equinix.com/fabric/v4/connections/81331c52-04c0-4656-a4a7-18c52669348f/routingProtocols/69762051-85ed-4d13-b6b4-e32e93c672b5/actions + uuid: + type: string + description: Routing protocol identifier + format: uuid + example: c9b8e7a2-f3b1-4576-a4a9-1366a63df170 + type: + $ref: "#/components/schemas/BGPActions" + description: + type: string + description: BGP action description + state: + $ref: "#/components/schemas/BGPActionStates" + changelog: + $ref: "#/components/schemas/Changelog" + ActionId: + type: string + description: BGP Action UUID + format: uuid + example: 86534014-34b4-53f6-45d6-4b94a92d8623 + ChangeId: + type: string + description: Routing Protocol Change UUID + format: uuid + example: 6d500177-9404-41f2-99e8-2bf1a84d8db5 + RoutingProtocolChangeData: + type: object + properties: + status: + type: string + description: Current outcome of the change flow + enum: + - COMPLETED + - FAILED + - REQUESTED + createdBy: + type: string + description: Created by User Key + createdDateTime: + type: string + description: Set when change flow starts + format: date-time + updatedBy: + type: string + description: Updated by User Key + updatedDateTime: + type: string + description: Set when change object is updated + format: date-time + information: + type: string + description: Additional information + data: + $ref: "#/components/schemas/RoutingProtocolChangeOperation" + description: Current state of latest Routing Protocol change + allOf: + - $ref: "#/components/schemas/RoutingProtocolChange" + RoutingProtocolChangeDataResponse: + type: object + properties: + pagination: + $ref: "#/components/schemas/Pagination" + data: + type: array + items: + $ref: "#/components/schemas/RoutingProtocolChangeData" + description: List of network changes + ExchangeServiceResponse: + type: object + properties: + href: + type: string + description: Internet Exchange Service URI + example: https://api.equinix.com/fabric/v4/exchangeServices/a8ba52de-faae-43b5-b0b1-6904d37ee011 + uuid: + type: string + description: Internet Exchange Service identifier + format: uuid + example: a8ba52de-faae-43b5-b0b1-6904d37ee011 + type: + type: string + description: Internet Exchange Service Type + example: IX + default: IX + enum: + - IX + name: + type: string + description: Name + example: ix_exchange_service + bandwidth: + type: integer + description: bandwidth in Mbps + example: 400000 + description: + type: string + description: Description + example: ix_exchange_service + state: + type: string + description: State + example: PROVISIONING + enum: + - PROVISIONING + - PROVISIONING_FAILED + - PENDING_ACTIVATION + - ACTIVATING + - ACTIVATING_FAILED + - PROVISIONED + - REPROVISIONING + - REPROVISIONING_FAILED + - DEPROVISIONING + - DEPROVISIONED + - DEPROVISIONING_FAILED + location: + $ref: "#/components/schemas/SimplifiedLocation" + publicPeeringConnection: + $ref: "#/components/schemas/PublicPeeringConnectionResponse" + routingProtocol: + $ref: "#/components/schemas/RoutingProtocolResponse" + order: + $ref: "#/components/schemas/Order" + project: + $ref: "#/components/schemas/Project" + account: + $ref: "#/components/schemas/SimplifiedAccount" + notifications: + type: array + description: Preferences for notifications on Internet Exchange Service configuration or status changes + items: + $ref: "#/components/schemas/ExchangeServiceNotification" + changelog: + $ref: "#/components/schemas/PlatformChangelog" + ExchangeServiceId: + type: string + description: Internet Exchange Service UUID + format: uuid + example: a8ba52de-faae-43b5-b0b1-6904d37ee011 + ExchangeServiceSearchRequest: + type: object + properties: + filter: + $ref: "#/components/schemas/ExchangeServiceSearchExpression" + pagination: + $ref: "#/components/schemas/PaginationRequest" + sort: + type: array + items: + $ref: "#/components/schemas/ExchangeServiceSearchSortCriteria" + description: Search requests containing criteria + ExchangeServiceSearchExpression: + oneOf: + - $ref: "#/components/schemas/ExchangeServiceAndExpression" + - $ref: "#/components/schemas/ExchangeServiceOrExpression" + - $ref: "#/components/schemas/ExchangeServicePropertyExpression" + ExchangeServiceAndExpression: + required: + - and + type: object + properties: + and: + type: array + items: + $ref: "#/components/schemas/ExchangeServiceSearchExpression" + ExchangeServiceOrExpression: + required: + - or + type: object + properties: + or: + type: array + items: + $ref: "#/components/schemas/ExchangeServiceSearchExpression" + ExchangeServicePropertyExpression: + required: + - operator + - property + - values + type: object + properties: + property: + type: string + description: Possible field names to use on filters + enum: + - /project/projectId + operator: + type: string + enum: + - = + values: + maxItems: 1 + minItems: 1 + type: array + items: + type: string + ExchangeServiceSearchSortCriteria: + type: object + properties: + direction: + type: string + description: Sorting direction + default: DESC + enum: + - DESC + - ASC + property: + type: string + description: Possible field names to use on sorting + default: /changeLog/updatedDateTime + enum: + - /name + - /changeLog/createdDateTime + - /changeLog/updatedDateTime + ExchangeServiceSearchResponse: + type: object + properties: + pagination: + $ref: "#/components/schemas/Pagination" + sort: + type: array + items: + $ref: "#/components/schemas/ExchangeServiceSearchSortCriteria" + data: + type: array + items: + $ref: "#/components/schemas/ExchangeServiceResponse" + description: List of Internet Exchange Service + InternetAccessPostRequest: + required: + - account + - billing + - name + - project + - routingProtocol + - type + type: object + properties: + type: + $ref: "#/components/schemas/InternetAccessServiceType" + name: + type: string + description: The name of the EIA Service + bandwidth: + type: integer + description: Bandwidth of the service + bandwidthCommit: + type: integer + description: Minimum bandwidth commit for burst billing variant of the service + routingProtocol: + $ref: "#/components/schemas/InternetAccessRoutingProtocolRequest" + order: + $ref: "#/components/schemas/InternetAccessOrderRequest" + billing: + $ref: "#/components/schemas/InternetAccessPostRequest_billing" + project: + $ref: "#/components/schemas/Project" + account: + $ref: "#/components/schemas/InternetAccessAccount" + InternetAccessRoutingProtocolRequest: + required: + - customerRoutes + - type + type: object + properties: + type: + $ref: "#/components/schemas/InternetAccessRoutingProtocolType" + customerRoutes: + maxItems: 100 + minItems: 1 + type: array + items: + $ref: "#/components/schemas/InternetAccessCustomerRouteRequest" + discriminator: + propertyName: type + mapping: + BGP: "#/components/schemas/InternetAccessRoutingProtocolBgpRequest" + DIRECT: "#/components/schemas/InternetAccessRoutingProtocolDirectRequest" + STATIC: "#/components/schemas/InternetAccessRoutingProtocolStaticRequest" + InternetAccessCustomerRouteRequest: + required: + - ipBlock + type: object + properties: + ipBlock: + $ref: "#/components/schemas/InternetAccessIpBlockRequest" + InternetAccessIpBlockRequest: + required: + - uuid + type: object + properties: + uuid: + type: string + description: Unique identifier for the IP Block + format: uuid + InternetAccessRoutingProtocolBgpRequest: + allOf: + - $ref: "#/components/schemas/InternetAccessRoutingProtocolRequest" + - required: + - connections + - exportPolicy + type: object + properties: + connections: + maxItems: 2 + minItems: 1 + type: array + items: + $ref: "#/components/schemas/InternetAccessConnectionBgpRequest" + exportPolicy: + $ref: "#/components/schemas/InternetAccessExportPolicy" + asn: + $ref: "#/components/schemas/InternetAccessRoutingProtocolBgpRequest_asn" + customerAsn: + type: integer + description: Customer ASN. Valid range is 1-64495 or 65536-4199999999. + format: int64 + example: 16220 + deprecated: true + bgpAuthKey: + type: string + description: BGP authentication key + example: SecretKey + customerAsnRange: + $ref: "#/components/schemas/InternetAccessCustomerAsnRange" + InternetAccessConnectionBgpRequest: + required: + - uuid + type: object + properties: + uuid: + type: string + description: Unique identifier for the connection + format: uuid + InternetAccessRoutingProtocolDirectRequest: + allOf: + - $ref: "#/components/schemas/InternetAccessRoutingProtocolRequest" + - required: + - connections + type: object + properties: + connections: + maxItems: 2 + minItems: 1 + type: array + items: + $ref: "#/components/schemas/InternetAccessConnectionDirectRequest" + InternetAccessConnectionDirectRequest: + required: + - uuid + type: object + properties: + uuid: + type: string + description: Unique identifier for the connection + format: uuid + peeringIpv4: + $ref: "#/components/schemas/InternetAccessPeeringIpv4Request" + peeringIpv6: + $ref: "#/components/schemas/InternetAccessPeeringIpv6Request" + InternetAccessPeeringIpv4Request: + type: object + properties: + equinixPeerIp: + pattern: ^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$ + type: string + description: IPv4 address of the Equinix peering IP + equinixVrrpIp: + pattern: ^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$ + type: string + description: IPv4 address for Equinix VRRP IP + InternetAccessPeeringIpv6Request: + type: object + properties: + equinixPeerIp: + pattern: ^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$ + type: string + description: IPv6 address of the Equinix peering IP + equinixVrrpIp: + pattern: ^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$ + type: string + description: IPv6 address for Equinix VRRP IP + InternetAccessRoutingProtocolStaticRequest: + allOf: + - $ref: "#/components/schemas/InternetAccessRoutingProtocolRequest" + - required: + - connections + type: object + properties: + connections: + maxItems: 2 + minItems: 1 + type: array + items: + $ref: "#/components/schemas/InternetAccessConnectionStaticRequest" + InternetAccessConnectionStaticRequest: + required: + - uuid + type: object + properties: + uuid: + type: string + description: Unique identifier for the connection + format: uuid + InternetAccessOrderRequest: + type: object + properties: + purchaseOrderNumber: + type: string + description: Purchase order number + nullable: true + orderNumber: + type: string + description: Order Number + nullable: true + orderLine: + type: string + description: Order Line Number + nullable: true + InternetAccessService: + required: + - account + - billing + - change + - changeLog + - href + - name + - order + - project + - routingProtocol + - state + - type + - useCase + - uuid + type: object + properties: + href: + type: string + description: Service URL path + format: uri + example: https://api.equinix.com/fabric/v4/internetAccessServices/673c6e6c-2c36-4488-b3f1-47064357b5b4 + type: + $ref: "#/components/schemas/InternetAccessServiceType" + uuid: + type: string + description: Unique identifier for the EIA Service + format: uuid + name: + type: string + description: The name of the EIA Service + bandwidth: + type: integer + description: Bandwidth of the service + bandwidthCommit: + type: integer + description: Minimum bandwidth commit for burst billing variant of the service + state: + $ref: "#/components/schemas/InternetAccessServiceState" + change: + $ref: "#/components/schemas/InternetAccessChange" + locations: + type: array + description: List of locations associated with the service + items: + $ref: "#/components/schemas/InternetAccessLocation" + routingProtocol: + $ref: "#/components/schemas/InternetAccessRoutingProtocol" + billing: + $ref: "#/components/schemas/InternetAccessBilling" + account: + $ref: "#/components/schemas/InternetAccessAccount" + project: + $ref: "#/components/schemas/Project" + order: + $ref: "#/components/schemas/InternetAccessOrder" + changeLog: + $ref: "#/components/schemas/Changelog" + useCase: + $ref: "#/components/schemas/InternetAccessUseCase" + InternetAccessServiceType: + type: string + description: Type of the service, either single or dual internet access + enum: + - SINGLE_IA + - DUAL_IA + x-enum-varnames: + - SINGLE_IA + - DUAL_IA + InternetAccessServiceState: + type: string + description: Current state of the service + enum: + - PROVISIONING + - PROVISIONED + - FAILED + - DEPROVISIONING + - DEPROVISIONED + x-enum-varnames: + - PROVISIONING + - PROVISIONED + - FAILED + - DEPROVISIONING + - DEPROVISIONED + InternetAccessSearchRequest: + type: object + properties: + pagination: + $ref: "#/components/schemas/PaginationRequest" + filter: + $ref: "#/components/schemas/SearchExpression" + sort: + $ref: "#/components/schemas/SearchSort" + InternetAccessServices: + required: + - data + - pagination + - sort + type: object + properties: + pagination: + $ref: "#/components/schemas/Pagination" + sort: + $ref: "#/components/schemas/SearchSort" + data: + type: array + items: + $ref: "#/components/schemas/InternetAccessService" + InternetAccessPatchRequest: + maxItems: 100 + minItems: 1 + type: array + description: Only one replace operation allowed for '/bandwidth' path. + items: + $ref: "#/components/schemas/InternetAccessPatchOperationUpdate" + InternetAccessPatchOperationUpdate: + required: + - op + - path + type: object + properties: + op: + $ref: "#/components/schemas/InternetAccessPatchOperationUpdateAllowedOp" + path: + $ref: "#/components/schemas/InternetAccessPatchOperationUpdateAllowedPath" + value: + description: New value for updated parameter. Required for add and replace. + InternetAccessPatchOperationUpdateAllowedOp: + type: string + description: Allowed patch operations. + enum: + - replace + - add + - remove + InternetAccessPatchOperationUpdateAllowedPath: + pattern: ^(\/bandwidth|\/bandwidthCommit|\/routingProtocol\/customerRoutes(?:\[@\.ipBlock\.uuid=[A-Fa-f0-9-]+\])?|\/order\/purchaseOrderNumber)$ + type: string + description: Allowed patch paths for Internet Access update. + example: /bandwidth + InterconnectPostRequest: + required: + - account + - location + - name + - notifications + - package + - project + - type + type: object + properties: + type: + type: string + description: Interconnect type + example: XF_IC + enum: + - XF_IC + name: + maxLength: 24 + minLength: 1 + type: string + description: Customer-provided interconnect name + example: test ic sv + description: + maxLength: 50 + minLength: 1 + type: string + description: Customer-provided interconnect description + example: test interconnect + location: + $ref: "#/components/schemas/InterconnectLocationRequest" + package: + $ref: "#/components/schemas/InterconnectPackage" + order: + $ref: "#/components/schemas/Order" + account: + $ref: "#/components/schemas/SimplifiedAccount" + project: + $ref: "#/components/schemas/Project" + notifications: + type: array + description: Preferences for notifications on interconnect configuration or status changes + items: + $ref: "#/components/schemas/InterconnectNotification" + description: Create Interconnect request + InterconnectLocationRequest: + type: object + properties: + metroCode: + type: string + description: Metro code where the interconnect is created + example: SV + description: Interconnect location for create request + InterconnectNotification: + type: object + properties: + type: + type: string + description: Notification type + example: NOTIFICATIONS + enum: + - NOTIFICATIONS + emails: + type: array + description: Array of contact emails + items: + type: string + format: email + description: Interconnect notification preference + Interconnect: + type: object + properties: + href: + type: string + description: Interconnect URI + example: /fabric/v4/interconnects/34085b91-2ea3-4578-bc1f-bbd526b57885 + uuid: + type: string + description: Equinix-assigned interconnect identifier + format: uuid + example: 34085b91-2ea3-4578-bc1f-bbd526b57885 + type: + type: string + description: Interconnect type + example: XF_IC + enum: + - XF_IC + name: + type: string + description: Interconnect name + example: test ic sv + description: + type: string + description: Interconnect description + example: test interconnect + state: + $ref: "#/components/schemas/InterconnectState" + location: + $ref: "#/components/schemas/InterconnectLocation" + usedBandwidth: + minimum: 0 + type: integer + description: Interconnect used bandwidth in Mbps + example: 0 + package: + $ref: "#/components/schemas/InterconnectPackage" + router: + $ref: "#/components/schemas/InterconnectRouter" + order: + $ref: "#/components/schemas/Order" + account: + $ref: "#/components/schemas/SimplifiedAccount" + project: + $ref: "#/components/schemas/Project" + notifications: + type: array + description: Interconnect notification preferences + items: + $ref: "#/components/schemas/InterconnectNotification" + changeLog: + $ref: "#/components/schemas/Changelog" + description: Interconnect specification Beta + InterconnectState: + type: string + description: Interconnect lifecycle state + example: PROVISIONING + enum: + - PROVISIONING + - PROVISIONED + - DEPROVISIONING + - DEPROVISIONED + InterconnectLocation: + type: object + properties: + href: + type: string + description: Metro URI + example: /fabric/v4/metros/SV + metroCode: + type: string + description: Metro code where the interconnect is created + example: SV + description: Interconnect metro location + InterconnectRouter: + type: object + properties: + href: + type: string + description: Router URI + example: /fabric/v4/routers/24884a4e-bb47-403a-9426-a1b766305226 + type: + type: string + description: Router type + example: IC_ROUTER + enum: + - IC_ROUTER + uuid: + type: string + description: Router identifier + format: uuid + example: 24884a4e-bb47-403a-9426-a1b766305226 + description: Router associated with the interconnect Beta + InterconnectId: + type: string + description: Interconnect UUID + format: uuid + example: 34085b91-2ea3-4578-bc1f-bbd526b57885 + InterconnectSearchRequest: + type: object + properties: + filter: + $ref: "#/components/schemas/InterconnectFilter" + pagination: + $ref: "#/components/schemas/PaginationRequest" + sort: + type: array + items: + $ref: "#/components/schemas/InterconnectSortCriteria" + description: Search requests containing criteria + InterconnectFilter: + type: object + properties: + and: + $ref: "#/components/schemas/InterconnectSimpleExpression" + or: + $ref: "#/components/schemas/InterconnectSimpleExpression" + property: + $ref: "#/components/schemas/InterconnectSearchFieldName" + operator: + type: string + example: = + enum: + - = + - "!=" + - ">" + - ">=" + - < + - <= + - BETWEEN + - NOT BETWEEN + - LIKE + - NOT LIKE + - ILIKE + - NOT ILIKE + - IN + - NOT IN + values: + type: array + items: + type: string + example: PROVISIONED + InterconnectSimpleExpression: + type: array + items: + $ref: "#/components/schemas/InterconnectFilter" + InterconnectSearchFieldName: + type: string + description: Possible field names to use on filters + example: /state + enum: + - /uuid + - /type + - /name + - /state + - /description + - /location/metroCode + - /package/code + - /project/projectId + - /changeLog/createdDateTime + - /changeLog/updatedDateTime + - /changeLog/deletedDateTime + - /router/uuid + - /* + InterconnectSortCriteria: + type: object + properties: + direction: + $ref: "#/components/schemas/InterconnectSortDirection" + property: + $ref: "#/components/schemas/InterconnectSortBy" + InterconnectSortDirection: + type: string + description: Sorting direction + default: DESC + enum: + - DESC + - ASC + InterconnectSortBy: + type: string + description: Possible field names to use on sorting + default: /changeLog/updatedDateTime + enum: + - /changeLog/createdDateTime + - /changeLog/updatedDateTime + - /name + - /state + InterconnectSearchResponse: + type: object + properties: + pagination: + $ref: "#/components/schemas/Pagination" + sort: + type: array + items: + $ref: "#/components/schemas/InterconnectSortCriteriaResponse" + data: + type: array + items: + $ref: "#/components/schemas/Interconnect" + description: List of interconnects + AllInterconnectPackagesResponse: + required: + - data + type: object + properties: + pagination: + $ref: "#/components/schemas/Pagination" + data: + type: array + description: List of Interconnect Packages + items: + $ref: "#/components/schemas/InterconnectPackage" + description: Interconnect Packages response Beta + InterconnectPackage: + required: + - code + - type + type: object + properties: + href: + type: string + description: Interconnect Package URI + readOnly: true + type: + type: string + description: Interconnect Package Type + uuid: + type: string + description: Equinix-assigned Interconnect Package identifier + code: + type: string + description: Interconnect Package code (e.g. LAB, BASIC, STANDARD, PREMIUM) + description: + type: string + description: Interconnect Package description + routesMax: + type: integer + description: Maximum number of routes + bandwidthMax: + type: integer + description: Maximum bandwidth in Mbps + isRemote: + type: boolean + description: Authorization to connect remotely + description: Interconnect Package details Beta + SubmitIpBlockRequestBody: + required: + - project + - type + type: object + properties: + location: + $ref: "#/components/schemas/IpBlockLocation" + type: + $ref: "#/components/schemas/TypeOfIpBlockProduct" + project: + $ref: "#/components/schemas/IpBlockProjectRequest" + account: + $ref: "#/components/schemas/IpBlockAccount" + order: + $ref: "#/components/schemas/IpBlockOrderRequest" + regulations: + $ref: "#/components/schemas/IpBlockRegulations" + prefixLength: + $ref: "#/components/schemas/IpBlockPrefixLength" + prefix: + $ref: "#/components/schemas/IpBlockPrefix" + IpBlock: + required: + - changeLog + - href + - ownership + - prefixLength + - project + - state + - type + - uuid + type: object + properties: + uuid: + type: string + description: Unique identifier for the IP Block + format: uuid + href: + type: string + description: Resource URL path for the IP Block + example: /fabric/v4/ipBlocks/31fbdb3f-8def-410d-868b-ef920878affb + type: + $ref: "#/components/schemas/TypeOfIpBlockProduct" + state: + $ref: "#/components/schemas/IpBlockState" + ownership: + $ref: "#/components/schemas/IpBlockOwnership" + location: + $ref: "#/components/schemas/IpBlockLocation" + prefixLength: + $ref: "#/components/schemas/IpBlockPrefixLength" + prefix: + $ref: "#/components/schemas/IpBlockPrefix" + order: + $ref: "#/components/schemas/IpBlockOrderResponse" + account: + $ref: "#/components/schemas/IpBlockAccount" + project: + $ref: "#/components/schemas/IpBlockProject" + regulations: + $ref: "#/components/schemas/IpBlockRegulations" + assets: + type: array + description: Products using this IP Block + items: + $ref: "#/components/schemas/IpBlockAsset" + change: + $ref: "#/components/schemas/IpBlockChange" + changeLog: + $ref: "#/components/schemas/IpBlockChangeLog" + error: + $ref: "#/components/schemas/Error" + PatchIpBlockRequestBody: + maxItems: 1 + minItems: 1 + type: array + items: + $ref: "#/components/schemas/PatchIpBlockRequestBodyItem" + IpBlocksSearchRequestBody: + properties: + pagination: + $ref: "#/components/schemas/PaginationRequest" + filter: + $ref: "#/components/schemas/IpBlockFilter" + sort: + $ref: "#/components/schemas/SearchSort" + IpBlockFilter: + type: object + properties: + and: + type: array + items: + $ref: "#/components/schemas/IpBlockAndQuery" + IpBlockAndQuery: + required: + - operator + - property + - values + type: object + properties: + property: + type: string + operator: + type: string + enum: + - = + values: + type: array + items: + type: string + IpBlockSearchResponseBody: + required: + - data + - pagination + properties: + pagination: + $ref: "#/components/schemas/Pagination" + sort: + $ref: "#/components/schemas/SearchSort" + data: + type: array + items: + $ref: "#/components/schemas/IpBlock" + SearchRequest: + type: object + properties: + filter: + $ref: "#/components/schemas/Expression" + pagination: + $ref: "#/components/schemas/PaginationRequest" + sort: + type: array + items: + $ref: "#/components/schemas/SortCriteria" + description: Search requests containing criteria + Expression: + type: object + properties: + and: + $ref: "#/components/schemas/Expressions" + or: + $ref: "#/components/schemas/Expressions" + property: + $ref: "#/components/schemas/SearchFieldName" + operator: + type: string + enum: + - = + - "!=" + - ">" + - ">=" + - < + - <= + - LIKE + - ILKE + - IS NOT NULL + - IS NULL + - IN + - BETWEEN + values: + type: array + items: + type: string + Expressions: + type: array + items: + $ref: "#/components/schemas/Expression" + SearchFieldName: + type: string + description: Possible field names to use on filters + enum: + - /isRemote + - /name + - /uuid + - /type + - /geoScope + - /account/orgId + - /aSide/accessPoint/account/accountName + - /aSide/accessPoint/account/accountNumber + - /aSide/accessPoint/router/uuid + - /aSide/accessPoint/linkProtocol/vlanTagMin + - /aSide/accessPoint/linkProtocol/vlanTagMax + - /aSide/accessPoint/location/metroCode + - /aSide/accessPoint/location/metroName + - /aSide/accessPoint/name + - /aSide/accessPoint/port/uuid + - /aSide/accessPoint/port/name + - /aSide/accessPoint/type + - /aSide/accessPoint/virtualDevice/name + - /aSide/accessPoint/virtualDevice/uuid + - /aSide/serviceToken/uuid + - /bandwidth + - /change/status + - /changeLog/createdBy + - /changeLog/createdDateTime + - /changeLog/deletedBy + - /changeLog/deletedDateTime + - /changeLog/lastUpdatedBy + - /operation/equinixStatus + - /operation/providerStatus + - /operation/maintenanceStatus + - /operation/lockEnabled + - /project/projectId + - /redundancy/group + - /redundancy/priority + - /zSide/accessPoint/account/accountName + - /zSide/accessPoint/authenticationKey + - /zSide/accessPoint/linkProtocol/vlanTagMin + - /zSide/accessPoint/linkProtocol/vlanTagMax + - /zSide/accessPoint/location/metroCode + - /zSide/accessPoint/location/metroName + - /zSide/accessPoint/sellerRegion + - /zSide/accessPoint/name + - /zSide/accessPoint/port/uuid + - /zSide/accessPoint/network/uuid + - /zSide/accessPoint/port/name + - /zSide/accessPoint/profile/uuid + - /zSide/accessPoint/type + - /zSide/accessPoint/role + - /zSide/accessPoint/virtualDevice/name + - /zSide/accessPoint/virtualDevice/uuid + - /zSide/serviceToken/uuid + - /zSide/internetAccess/uuid + - /state + SortCriteria: + type: object + properties: + direction: + $ref: "#/components/schemas/SortDirection" + property: + $ref: "#/components/schemas/SortBy" + ConnectionSearchResponse: + type: object + properties: + pagination: + $ref: "#/components/schemas/Pagination" + sort: + type: array + items: + $ref: "#/components/schemas/SortCriteriaResponse" + data: + type: array + items: + $ref: "#/components/schemas/Connection" + description: List of connections + FilterBody: + type: object + properties: + filter: + $ref: "#/components/schemas/SearchExpression" + description: Search requests containing criteria + SearchExpression: + type: object + properties: + and: + $ref: "#/components/schemas/SearchExpressions" + or: + $ref: "#/components/schemas/SearchExpressions" + property: + type: string + operator: + type: string + enum: + - = + - "!=" + - ">" + - ">=" + - < + - <= + - BETWEEN + - NOT BETWEEN + - LIKE + - NOT LIKE + - IN + - NOT IN + - IS NOT NULL + - IS NULL + values: + type: array + items: + type: string + SearchExpressions: + type: array + items: + $ref: "#/components/schemas/SearchExpression" + PriceSearchResponse: + type: object + properties: + data: + type: array + items: + $ref: "#/components/schemas/Price" + pagination: + $ref: "#/components/schemas/Pagination" + PriceErrorList: + type: array + items: + $ref: "#/components/schemas/PriceError" + PriceError: + required: + - errorCode + - errorMessage + type: object + properties: + errorCode: + type: string + enum: + - EQ-3038010 + - EQ-3038022 + - EQ-3038030 + errorMessage: + type: string + enum: + - Validation failure + - Invalid value + - Internal Server Error + correlationId: + type: string + details: + type: string + help: + type: string + additionalInfo: + type: array + items: + $ref: "#/components/schemas/PriceError_additionalInfo" + description: Error with details + discriminator: + propertyName: errorCode + Statistics: + type: object + properties: + startDateTime: + type: string + description: Start and duration of the statistical analysis interval. + format: date-time + example: 2020-11-06T07:00:00Z + endDateTime: + type: string + description: End and duration of the statistical analysis interval. + format: date-time + example: 2020-11-06T07:00:00Z + viewPoint: + type: string + description: Point of view for connection metrics - aSide or zSide + enum: + - aSide + - zSide + bandwidthUtilization: + $ref: "#/components/schemas/BandwidthUtilization" + description: This API provides service-level traffic metrics so that you can view access and gather key information required to manage service subscription sizing and capacity. + BandwidthUtilization: + type: object + properties: + unit: + type: string + description: Aggregated data transfer capacity. Possible values- Mbps, megabits (1 million bits) per second; Gbps, gigabits (1 billion bits) per second. + enum: + - Mbps + metricInterval: + type: string + description: An interval formatted value, indicating the time-interval the metric objects within the response represent + inbound: + $ref: "#/components/schemas/Direction" + outbound: + $ref: "#/components/schemas/Direction" + description: Bandwidth utilization statistics (octet counters-based) + Direction: + type: object + properties: + max: + type: number + description: Max bandwidth within request time range, represented in units specified by response "units" field + format: float + mean: + type: number + description: Mean bandwidth within request time range, represented in units specified by response "units" field + format: float + metrics: + type: array + description: Bandwidth utilization statistics for a specified interval. + items: + $ref: "#/components/schemas/Metrics" + description: Directional statistics + Metrics: + type: object + properties: + intervalEndTimestamp: + type: string + description: Interval end timestamp + format: date-time + example: 2020-11-06T07:00:00Z + max: + type: number + description: Max bandwidth within statistics object time interval, represented in units specified by response "units" field + format: float + mean: + type: number + description: Mean bandwidth within statistics object time interval, represented in units specified by response "units" field + format: float + description: Bandwidth utilization statistics for a specified interval. + viewPoint: + type: string + description: viewPoint + enum: + - aSide + - zSide + ServiceProfiles: + type: object + properties: + data: + type: array + items: + $ref: "#/components/schemas/ServiceProfile" + pagination: + $ref: "#/components/schemas/Pagination" + description: Service Profiles + ServiceProfileRequest: + required: + - description + - name + - type + type: object + properties: + project: + $ref: "#/components/schemas/Project" + description: | + Service Profile is a software definition for a named provider service and it's network connectivity requirements. + This includes the basic marketing information and one + or more sets of access points (a set per each access point type) fulfilling the provider service. + allOf: + - $ref: "#/components/schemas/SimplifiedServiceProfile" + SimplifiedServiceProfile: + type: object + properties: + href: + type: string + description: Service Profile URI response attribute + format: uri + readOnly: true + type: + $ref: "#/components/schemas/ServiceProfileTypeEnum" + name: + maxLength: 50 + type: string + description: Customer-assigned service profile name + example: Sample Service Profile + uuid: + type: string + description: Equinix-assigned service profile identifier + format: uuid + description: + type: string + description: User-provided service description should be of maximum length 375 + example: offering connectivity to my-network + notifications: + type: array + description: Recipients of notifications on service profile change + items: + $ref: "#/components/schemas/SimplifiedNotification" + tags: + $ref: "#/components/schemas/Tags" + visibility: + $ref: "#/components/schemas/ServiceProfileVisibilityEnum" + allowedEmails: + type: array + items: + type: string + format: email + accessPointTypeConfigs: + minItems: 1 + type: array + items: + $ref: "#/components/schemas/ServiceProfileAccessPointType" + customFields: + type: array + items: + $ref: "#/components/schemas/CustomField" + marketingInfo: + $ref: "#/components/schemas/MarketingInfo" + ports: + type: array + items: + $ref: "#/components/schemas/ServiceProfileAccessPointCOLO" + virtualDevices: + type: array + items: + $ref: "#/components/schemas/ServiceProfileAccessPointVD" + metros: + type: array + description: Derived response attribute. + items: + $ref: "#/components/schemas/ServiceMetro" + environments: + type: array + description: Provider environments associated with this IC_PROFILE service profile. Beta + items: + $ref: "#/components/schemas/ProviderEnvironment" + selfProfile: + type: boolean + description: response attribute indicates whether the profile belongs to the same organization as the api-invoker. + readOnly: true + projectId: + type: string + lastMileConfig: + $ref: "#/components/schemas/ServiceProfileLastMileConfig" + description: | + Service Profile is a software definition for a named provider service and it's network connectivity requirements. + This includes the basic marketing information and one + or more sets of access points (a set per each access point type) fulfilling the provider service. + Tags: + type: array + items: + type: string + ServiceProfileAccessPointType: + type: object + description: Access Point Type + oneOf: + - $ref: "#/components/schemas/ServiceProfileAccessPointTypeCOLO" + - $ref: "#/components/schemas/ServiceProfileAccessPointTypeVD" + ServiceProfileAccessPointTypeCOLO: + required: + - type + type: object + properties: + uuid: + type: string + type: + $ref: "#/components/schemas/ServiceProfileAccessPointTypeEnum" + supportedBandwidths: + $ref: "#/components/schemas/Bandwidths" + allowRemoteConnections: + type: boolean + description: Setting to allow or prohibit remote connections to the service profile. + example: true + default: false + allowCustomBandwidth: + type: boolean + description: Setting to enable or disable the ability of the buyer to customize the bandwidth. + example: true + default: false + bandwidthAlertThreshold: + type: number + description: percentage of port bandwidth at which an allocation alert is generated - missing on wiki. + allowBandwidthAutoApproval: + type: boolean + description: Setting to enable or disable the ability of the buyer to change connection bandwidth without approval of the seller. + default: false + allowBandwidthUpgrade: + type: boolean + description: Availability of a bandwidth upgrade. The default is false. + linkProtocolConfig: + $ref: "#/components/schemas/ServiceProfileLinkProtocolConfig" + enableAutoGenerateServiceKey: + type: boolean + description: for verizon only. + connectionRedundancyRequired: + type: boolean + description: Mandate redundant connections + example: true + default: false + selectiveRedundancy: + type: boolean + description: Optional redundant connections + example: true + default: false + apiConfig: + $ref: "#/components/schemas/ApiConfig" + connectionLabel: + type: string + description: custom name for "Connection" + authenticationKey: + $ref: "#/components/schemas/AuthenticationKey" + metadata: + $ref: "#/components/schemas/ServiceProfileMetadata" + description: Colo Access Point Type + ServiceProfileAccessPointTypeEnum: + type: string + description: Access point type + enum: + - VD + - COLO + Bandwidths: + type: array + items: + $ref: "#/components/schemas/Bandwidth" + Bandwidth: + type: integer + description: speed in Mbps + example: 50 + ServiceProfileLinkProtocolConfig: + type: object + properties: + encapsulationStrategy: + type: string + description: was tagType - missing on wiki + enum: + - CTAGED + - BOTH + - NAMED + namedTags: + maxItems: 64 + type: array + items: + type: string + vlanCTagLabel: + type: string + description: was ctagLabel + reuseVlanSTag: + type: boolean + example: true + default: false + encapsulation: + type: string + description: Port encapsulation - Derived response attribute. Ignored on request payloads. + enum: + - QINQ + - DOT1Q + - UNTAGGED + description: Configuration for dot1q to qinq translation support + ApiConfig: + type: object + properties: + apiAvailable: + type: boolean + description: Setting indicating whether the API is available (true) or not (false). + example: true + default: false + integrationId: + type: string + equinixManagedPort: + type: boolean + description: Setting indicating that the port is managed by Equinix (true) or not (false). + example: true + default: false + equinixManagedVlan: + type: boolean + description: Setting indicating that the VLAN is managed by Equinix (true) or not (false). + example: true + default: false + allowOverSubscription: + type: boolean + description: | + Setting showing that oversubscription support is available (true) or not (false). The default is false. + Oversubscription is the sale of more than the available network bandwidth. This practice is common + and legitimate. After all, many customers use less bandwidth than they've purchased. + And network users don't consume bandwidth all at the same time. The leftover bandwidth can be sold to + other customers. When demand surges, operational and engineering resources can be shifted to + accommodate the load. + example: false + default: false + overSubscriptionLimit: + maximum: 20 + minimum: 1 + type: integer + description: A cap on oversubscription. + example: 1 + default: 1 + bandwidthFromApi: + type: boolean + default: false + description: Configuration for API based Integration for Service Profile + AuthenticationKey: + type: object + properties: + required: + type: boolean + example: true + default: false + label: + type: string + example: Service Key + description: + type: string + example: description for the authentication key + description: Authentication Key Support and Customization + ServiceProfileMetadata: + type: object + properties: + props: + type: string + regEx: + type: string + regExMsg: + type: string + vlanRangeMaxValue: + type: integer + vlanRangeMinValue: + type: integer + maxQinq: + type: string + maxDot1q: + type: integer + variableBilling: + type: boolean + globalOrganization: + type: string + limitAuthKeyConn: + type: boolean + allowSecondaryLocation: + type: boolean + redundantProfileId: + type: string + allowVcMigration: + type: boolean + connectionEditable: + type: boolean + releaseVlan: + type: boolean + maxConnectionsOnPort: + type: integer + portAssignmentStrategy: + type: string + eqxManagedPort: + type: boolean + connectionNameEditable: + type: boolean + description: Metadata. Response attribute. Ignored on request payload. + ServiceProfileAccessPointTypeVD: + required: + - type + type: object + properties: + uuid: + type: string + type: + $ref: "#/components/schemas/ServiceProfileAccessPointTypeEnum" + supportedBandwidths: + $ref: "#/components/schemas/Bandwidths" + allowRemoteConnections: + type: boolean + description: Allow remote connections to Service Profile + example: true + allowCustomBandwidth: + type: boolean + example: true + additionalProperties: false + description: VirtualDevice Access Point Type + CustomField: + required: + - dataType + - isRequired + - label + properties: + label: + type: string + example: Account Number + description: + type: string + example: Provide a valid account number + required: + type: boolean + example: true + dataType: + type: string + enum: + - STRING + - LIST + - NUMBER + options: + type: array + items: + type: string + captureInEmail: + type: boolean + description: capture this field as a part of email notification + description: Define Custom Attributes + MarketingInfo: + type: object + properties: + logo: + type: string + description: Logo file name + promotion: + type: boolean + description: Profile promotion on marketplace + processSteps: + maxItems: 3 + type: array + items: + $ref: "#/components/schemas/ProcessStep" + ProcessStep: + type: object + properties: + title: + type: string + description: Service profile custom step title + subTitle: + type: string + description: Service profile custom step sub title + description: + type: string + description: Service profile custom step description + description: Definition of customized step while making connection + ServiceProfileAccessPointCOLO: + required: + - type + - uuid + type: object + properties: + type: + type: string + enum: + - XF_PORT + - IX_PORT + uuid: + type: string + format: uuid + example: 94662143-e21b-4098-bfcf-e9416f47eae1 + location: + $ref: "#/components/schemas/SimplifiedLocation" + sellerRegion: + type: string + sellerRegionDescription: + type: string + crossConnectId: + type: string + description: Colo Access Point + ServiceProfileAccessPointVD: + required: + - type + - uuid + type: object + properties: + type: + type: string + enum: + - VD + uuid: + type: string + format: uuid + example: 94662143-e21b-4098-bfcf-e9416f47eae1 + location: + $ref: "#/components/schemas/SimplifiedLocation" + interfaceUuid: + type: string + format: uuid + example: 94662143-e21b-4098-bfcf-e9416f47eae1 + description: Virtual Device Point + ServiceMetro: + type: object + properties: + code: + type: string + description: metro code + name: + type: string + description: metro name + vcBandwidthMax: + type: integer + description: max VC speed supported in Mbps + ibxs: + type: array + items: + type: string + description: ibx codes + inTrail: + type: boolean + displayName: + type: string + description: service metro display name + sellerRegions: + type: object + additionalProperties: + type: string + ProviderEnvironment: + type: object + properties: + href: + type: string + description: Provider Environment URI + format: uri + readOnly: true + uuid: + type: string + description: Equinix-assigned provider environment identifier + format: uuid + type: + $ref: "#/components/schemas/ProviderEnvironmentTypeEnum" + name: + type: string + description: Provider environment name + example: US West 1 – Production + description: + type: string + description: Provider environment description + example: Primary production environment + region: + type: string + description: Cloud provider region identifier + example: us-west-1 + supportedBandwidths: + type: array + description: Supported bandwidths in Mbps + example: + - 1000 + - 10000 + - 100000 + items: + type: integer + metros: + type: array + description: Derived response attribute. + items: + $ref: "#/components/schemas/ServiceMetro" + supportedFeatures: + type: array + description: Supported Feature Types + example: + - FEATURE_TYPE_L3_BASE + items: + type: string + changeLog: + $ref: "#/components/schemas/Changelog" + description: Provider Environment associated with an IC_PROFILE service profile Beta + ProviderEnvironmentTypeEnum: + type: string + description: Provider environment type + enum: + - IC_ENV + ServiceProfileLastMileConfig: + type: object + properties: + apiIntegration: + $ref: "#/components/schemas/ServiceProfileLastMileApiIntegration" + productCatalogs: + type: array + description: Last-mile provider catalogs. + items: + $ref: "#/components/schemas/ServiceProfileLastMileProductCatalog" + description: Last-mile configuration for the service profile. + ServiceProfileLastMileApiIntegration: + type: object + properties: + siteValidationEnabled: + type: boolean + description: Whether site validation is enabled for the last-mile provider. + dataCenterLocationEnabled: + type: boolean + description: Whether data center location is enabled for the last-mile provider. + productOfferingEnabled: + type: boolean + description: Whether product offering is enabled for the last-mile provider. + poqEnabled: + type: boolean + description: Whether product qualification is enabled for the last-mile provider. + quoteEnabled: + type: boolean + description: Whether quote generation is enabled for the last-mile provider. + placeOrderEnabled: + type: boolean + description: Whether place order is enabled for the last-mile provider. + description: Last-mile API integration details. + ServiceProfileLastMileProductCatalog: + type: object + properties: + name: + type: string + description: Last-mile provider or catalog name. + example: att fiber + id: + type: string + description: Last-mile provider or catalog identifier. + example: fc1eb018-df0a-4ee8-8dd1-e6b8ad61178d + webUrl: + type: string + description: Last-mile catalog or provider website URL. + example: att.com/lastmile + deliveryDate: + $ref: "#/components/schemas/ServiceProfileLastMileDeliveryDateRange" + offerings: + type: array + description: Available last-mile offerings. + items: + $ref: "#/components/schemas/ServiceProfileLastMileOffering" + description: Last-mile provider catalog details. + ServiceProfileLastMileDeliveryDateRange: + type: object + properties: + unit: + type: string + description: Unit for this range is DAYS. + example: USD + min: + type: integer + description: Minimum value for the range. + example: 1 + max: + type: integer + description: Maximum value for the range. + example: 10 + description: Range details for delivery window. + ServiceProfileLastMileOffering: + type: object + properties: + bandwidth: + type: integer + description: Offered bandwidth in Mbps. + example: 10 + price: + $ref: "#/components/schemas/ServiceProfileLastMilePriceRange" + description: Last-mile offering details. + ServiceProfileLastMilePriceRange: + type: object + properties: + unit: + type: string + description: Unit for this range, such as USD or DAYS. + example: USD + min: + type: number + description: Minimum value for the range. + format: double + example: 10 + max: + type: number + description: Maximum value for the range. + format: double + example: 100 + description: Range details for price or delivery window. + ServiceProfile: + type: object + properties: + state: + $ref: "#/components/schemas/ServiceProfileStateEnum" + account: + description: Seller Account for Service Profile. + allOf: + - $ref: "#/components/schemas/SimplifiedAccount" + - type: object + project: + $ref: "#/components/schemas/Project" + change: + $ref: "#/components/schemas/ServiceProfileChange" + changeLog: + description: Seller Account for Service Profile. + allOf: + - $ref: "#/components/schemas/Changelog" + - type: object + description: | + Service Profile is a software definition for a named provider service and it's network connectivity requirements. + This includes the basic marketing information and one + or more sets of access points (a set per each access point type) fulfilling the provider service. + allOf: + - $ref: "#/components/schemas/SimplifiedServiceProfile" + ServiceProfileChange: + required: + - createdDateTime + - type + type: object + properties: + uuid: + type: string + description: Uniquely identifies a change + type: + type: string + description: Type of change + example: SERVICE_PROFILE_VISIBILITY_UPDATE + status: + type: string + description: Current outcome of the change flow + enum: + - APPROVED + - COMPLETED + - FAILED + - REJECTED + - REQUESTED + - SUBMITTED_FOR_APPROVAL + createdDateTime: + type: string + description: Set when change flow starts + format: date-time + example: 2020-11-06T07:00:00Z + updatedDateTime: + type: string + description: Set when change object is updated + format: date-time + example: 2020-11-06T07:00:00Z + information: + type: string + description: Additional information + data: + $ref: "#/components/schemas/ServiceProfileUpdateRequest" + description: Current state of latest service profile change + ServiceProfileSearchRequest: + type: object + properties: + filter: + $ref: "#/components/schemas/ServiceProfileFilter" + pagination: + $ref: "#/components/schemas/PaginationRequest" + sort: + type: array + items: + $ref: "#/components/schemas/ServiceProfileSortCriteria" + description: Search requests containing criteria + ServiceProfileFilter: + type: object + anyOf: + - $ref: "#/components/schemas/ServiceProfileSimpleExpression" + - $ref: "#/components/schemas/ServiceProfileAndFilter" + ServiceProfileSimpleExpression: + type: object + properties: + property: + type: string + description: | + Possible field names to use on filters: + * `/name` - Service Profile name + * `/uuid` - Service Profile uuid + * `/state` - Service Profile status + * `/metros/code` - Service Profile metro code + * `/visibility` - Service Profile package + * `/type` - Service Profile package + * `/project/projectId` - Service Profile project id + example: /name + operator: + type: string + description: | + Possible operators to use on filters: + * `=` - equal + example: = + values: + type: array + items: + type: string + example: ServiceProfile-1 + ServiceProfileAndFilter: + type: object + properties: + and: + type: array + items: + $ref: "#/components/schemas/ServiceProfileSimpleExpression" + ServiceProfileSortCriteria: + type: object + properties: + direction: + $ref: "#/components/schemas/ServiceProfileSortDirection" + property: + $ref: "#/components/schemas/ServiceProfileSortBy" + ServiceProfileSortDirection: + type: string + description: Sorting direction + default: DESC + enum: + - DESC + - ASC + ServiceProfileSortBy: + type: string + description: Possible field names to use on sorting + default: /changeLog/updatedDateTime + enum: + - /name + - /state + - /changeLog/createdDateTime + - /changeLog/updatedDateTime + ServiceProfileId: + type: string + description: Service Profile UUID + format: uuid + ServiceProfileUpdateRequest: + type: array + items: + $ref: "#/components/schemas/ServiceProfileUpdateOperation" + ServiceProfileUpdateOperation: + type: object + description: Service Profile Access Points + oneOf: + - $ref: "#/components/schemas/AddOperation" + - $ref: "#/components/schemas/RemoveOperation" + - $ref: "#/components/schemas/ReplaceOperation" + AddOperation: + required: + - op + - path + - value + type: object + properties: + op: + type: string + enum: + - add + path: + $ref: "#/components/schemas/Path" + value: + type: object + description: value to add + description: Add Sub-Resource to the existing model + Path: + type: string + description: A JSON Pointer path. + RemoveOperation: + required: + - op + - path + type: object + properties: + op: + type: string + enum: + - remove + path: + $ref: "#/components/schemas/Path" + description: Remove sub-resource from an existing model + ReplaceOperation: + required: + - op + - path + - value + type: object + properties: + op: + type: string + enum: + - replace + path: + $ref: "#/components/schemas/Path" + value: + type: object + description: value to replace with + description: Replace attribute value or sub-resource in the existing model + ServiceProfileActionRequest: + required: + - type + type: object + properties: + type: + type: string + description: "Action type. Example values: PROFILE_UPDATE_ACCEPTANCE, PROFILE_UPDATE_REJECTION" + example: PROFILE_UPDATE_ACCEPTANCE + description: + type: string + description: Action description + example: Approved to migrate to public + description: Service Profile Action Request + ServiceProfileActionResponse: + type: object + properties: + href: + type: string + description: Service Profile Action URI + format: uri + readOnly: true + type: + type: string + description: "Action type. Example values: PROFILE_UPDATE_ACCEPTANCE, PROFILE_UPDATE_REJECTION" + example: PROFILE_UPDATE_ACCEPTANCE + uuid: + type: string + description: Equinix-assigned action identifier + format: uuid + comments: + type: string + description: Action comments + example: Approved to migrate to public + changeLog: + $ref: "#/components/schemas/Changelog" + description: Service Profile Action Response + ProviderEnvironments: + type: object + properties: + data: + type: array + items: + $ref: "#/components/schemas/ProviderEnvironment" + pagination: + $ref: "#/components/schemas/Pagination" + description: Service Profile Provider Environments + EnvironmentId: + type: string + description: Provider Environment Reference + EnvironmentActionRequest: + required: + - keyDetails + - type + type: object + properties: + type: + $ref: "#/components/schemas/EnvironmentActionTypeEnum" + keyDetails: + $ref: "#/components/schemas/ActivationKeyDetails" + description: Request payload for environment action + EnvironmentActionTypeEnum: + type: string + description: Environment action type + example: VALIDATE_ACTIVATION_KEY + enum: + - VALIDATE_ACTIVATION_KEY + ActivationKeyDetails: + type: object + properties: + value: + type: string + description: Provider Encoded activation key + example: key_here + providerId: + type: string + description: AWS Connection identifier + accountId: + type: string + description: Account identifier + bandwidth: + type: integer + description: Bandwidth in Mbps + region: + type: string + description: Cloud provider region identifier + description: Activation Key Details Beta + EnvironmentActionResponse: + type: object + properties: + href: + type: string + description: Environment action URI + format: uri + readOnly: true + type: + $ref: "#/components/schemas/EnvironmentActionTypeEnum" + uuid: + type: string + description: Equinix-assigned action identifier + format: uuid + example: 3a58dd05-f46d-4b1d-a154-2e85c396ea62 + state: + $ref: "#/components/schemas/EnvironmentActionStateEnum" + keyDetails: + $ref: "#/components/schemas/ActivationKeyDetails" + changeLog: + $ref: "#/components/schemas/Changelog" + description: Response from environment action Beta + EnvironmentActionStateEnum: + type: string + description: Environment action state. ACTIVE - already used , INACTIVE - not used + example: ACTIVE + enum: + - ACTIVE + - INACTIVE + ServiceMetros: + type: object + properties: + data: + type: array + items: + $ref: "#/components/schemas/ServiceMetro" + pagination: + $ref: "#/components/schemas/Pagination" + description: Service Profile Metros + ServiceTokenUUID: + type: string + description: Service Token UUID + format: uuid + ServiceToken: + type: object + properties: + type: + $ref: "#/components/schemas/ServiceTokenType" + href: + type: string + description: An absolute URL that is the subject of the link's context. + format: uri + readOnly: true + expiry: + type: integer + deprecated: true + uuid: + type: string + description: Equinix-assigned service token identifier + format: uuid + issuerSide: + type: string + description: information about token side + deprecated: true + name: + type: string + description: Customer-provided service token name + description: + type: string + description: Customer-provided service token description + expirationDateTime: + type: string + description: Expiration date and time of the service token. + format: date-time + example: 2020-11-06T07:00:00Z + connection: + $ref: "#/components/schemas/ServiceTokenConnection" + state: + $ref: "#/components/schemas/ServiceTokenState" + notifications: + type: array + description: Service token related notifications + items: + $ref: "#/components/schemas/SimplifiedNotification" + account: + $ref: "#/components/schemas/SimplifiedAccount" + changelog: + $ref: "#/components/schemas/Changelog" + project: + $ref: "#/components/schemas/Project" + description: Create Service Tokens (v4) generates Equinix Fabric service tokens. These tokens authorize users to access protected resources and services. The tokens remove sensitive content from the environment, rather than just masking it, making the protected data impossible to unencrypt or decrypt. Resource owners can distribute the tokens to trusted partners and vendors, allowing selected third parties to work directly with Equinix network assets. + ServiceTokenUpdateRequest: + minItems: 1 + type: array + description: Service Token Update Request + items: + $ref: "#/components/schemas/ServiceTokenChangeOperation" + ServiceTokens: + type: object + properties: + data: + type: array + description: List of Service Tokens + items: + $ref: "#/components/schemas/ServiceToken" + pagination: + $ref: "#/components/schemas/Pagination" + description: Service tokens authorize a user to access protected resources and services available on the Equinix Fabric network. The owner of the resources can distribute service tokens to third-party users (trusted partners and vendors), allowing them to directly access and work with the resources on the network without involving the resource owners. + ServiceTokenActionRequest: + required: + - type + type: object + properties: + type: + $ref: "#/components/schemas/ServiceTokenActions" + description: Service Token action request + ServiceTokenSearchRequest: + type: object + properties: + filter: + $ref: "#/components/schemas/ServiceTokenSearchExpression" + pagination: + $ref: "#/components/schemas/PaginationRequest" + description: Search requests containing criteria + ServiceTokenSearchExpression: + type: object + properties: + and: + $ref: "#/components/schemas/ServiceTokenSearchExpressions" + or: + $ref: "#/components/schemas/ServiceTokenSearchExpressions" + property: + $ref: "#/components/schemas/ServiceTokenSearchFieldName" + operator: + type: string + enum: + - = + - "!=" + - LIKE + - ILIKE + - < + - ">" + - <= + - ">=" + - IN + - NOT IN + - BETWEEN + - NOT BETWEEN + values: + type: array + items: + type: string + ServiceTokenSearchExpressions: + type: array + items: + $ref: "#/components/schemas/ServiceTokenSearchExpression" + ServiceTokenSearchFieldName: + type: string + description: Possible field names to use on filters + enum: + - /uuid + - /state + - /name + - /project/projectId + - /type + - /expirationDateTime + - /changeLog/createdDateTime + - /changeLog/updatedDateTime + - /connection/aSide/accessPointSelectors/port/uuid + - /connection/zSide/accessPointSelectors/port/uuid + OpticalConnectPostRequest: + required: + - aSide + - bandwidth + - connectionDestinationType + - pathType + - type + - zSide + type: object + properties: + type: + type: string + description: OC - Optical Connect Type + example: OC + enum: + - OC + bandwidth: + type: integer + description: | + Connection bandwidth Mbps.
Available bandwidths depend on the IBX pair.
1000 - 1 Gbps.
10000 - 10 Gbps.
100000 - 100 Gbps.
+ example: 100000 + connectionDestinationType: + type: string + description: | + Where the Z-side terminates.
COLO - your own colocation space at another Equinix IBX.
BMMR - a Building Meet-Me Room.
REMOTE - another customer's colocation space at another Equinix IBX.
BMMR and REMOTE require a Letter of Authorization on the Z-side. + example: COLO + enum: + - COLO + - BMMR + - REMOTE + pathType: + type: string + description: | + Level of resilience for the connection.
UNPROTECTED - a single fiber path with no node redundancy.
PROTECTED - two diverse fiber paths between single nodes at each IBX.
DUAL_DIVERSE - two diverse fiber paths terminating on redundant nodes at both IBXs. + example: PROTECTED + enum: + - DUAL_DIVERSE + - PROTECTED + - UNPROTECTED + redundancy: + $ref: "#/components/schemas/OpticalConnectRedundancy" + aSide: + $ref: "#/components/schemas/OpticalConnectASideRequest" + zSide: + $ref: "#/components/schemas/OpticalConnectZSideRequest" + order: + $ref: "#/components/schemas/OpticalConnectOrder" + account: + $ref: "#/components/schemas/SimplifiedAccount" + notifications: + type: array + description: Contacts to notify about connection configuration and status changes + items: + $ref: "#/components/schemas/OpticalConnectNotification" + bmmrType: + type: string + description: | + BMMR infrastructure ownership type.
EQUINIX - Equinix-operated.
SELF - customer-operated.
Required only when connectionDestinationType is BMMR. + example: EQUINIX + enum: + - EQUINIX + - SELF + description: |- + Request to order a single connection. The A-side is always a patch panel + port in your own cage; the Z-side shape depends on + connectionDestinationType. + OpticalConnectResponse: + type: object + properties: + href: + type: string + description: URI of this Optical Connect resource. + format: uri + readOnly: true + example: https://api.equinix.com/fabric/v4/opticalConnects/06dbb0e3-e55d-4090-8aff-fc5654abaad0 + uuid: + type: string + description: Unique identifier of this Optical Connect. + format: uuid + readOnly: true + example: 06dbb0e3-e55d-4090-8aff-fc5654abaad0 + type: + type: string + description: | + Connection Type.
OC - Optical Connect. + example: OC + enum: + - OC + name: + type: string + description: | + Equinix-assigned name, derived from the account number and the two IBX locations. + readOnly: true + example: 123456-SV1-SV2-01 + state: + $ref: "#/components/schemas/OpticalConnectState" + bandwidth: + type: integer + description: Provisioned connection bandwidth in Mbps. + example: 10000 + connectionDestinationType: + type: string + description: | + Where the Z-side terminates.
COLO - your own colocation space at another Equinix IBX.
BMMR - a Building Meet-Me Room.
REMOTE - another customer's colocation space at another Equinix IBX.
+ enum: + - COLO + - BMMR + - REMOTE + pathType: + type: string + description: | + Level of resilience for the connection.
UNPROTECTED - a single fiber path with no node redundancy.
PROTECTED - two diverse fiber paths between single nodes at each IBX.
DUAL_DIVERSE - two diverse fiber paths terminating on redundant nodes at both IBXs. + enum: + - DUAL_DIVERSE + - PROTECTED + - UNPROTECTED + bmmrType: + type: string + description: | + BMMR infrastructure ownership type.
EQUINIX - Equinix-operated.
SELF - customer-operated.
Required only when connectionDestinationType is BMMR. + enum: + - EQUINIX + - SELF + redundancy: + $ref: "#/components/schemas/OpticalConnectRedundancy" + aSide: + $ref: "#/components/schemas/OpticalConnectASideResponse" + zSide: + $ref: "#/components/schemas/OpticalConnectZSideResponse" + order: + $ref: "#/components/schemas/OpticalConnectOrder" + account: + $ref: "#/components/schemas/SimplifiedAccount" + notifications: + type: array + description: Preferences for notifications on connection configuration or status changes + items: + $ref: "#/components/schemas/OpticalConnectNotification" + changeLog: + $ref: "#/components/schemas/Changelog" + description: |- + Optical Metro Connect connection with its current state and the resolved + physical termination points at both ends. + BulkOpticalConnectRequest: + type: object + properties: + data: + type: array + description: | + The two connections forming the diverse pair — one PRIMARY and one + SECONDARY. + items: + $ref: "#/components/schemas/OpticalConnectPostRequest" + description: Request to create a dual diverse pair of Optical Connect connections. + OpticalConnectBulk: + type: object + properties: + data: + type: array + items: + $ref: "#/components/schemas/OpticalConnectResponse" + description: Dual diverse pair Connection + OpticalConnectId: + type: string + description: Unique identifier of an Optical Connect. + format: uuid + example: 557400f8-d360-11e9-bb65-2a2ae2dbcce4 + OpticalConnectSearchRequest: + type: object + properties: + filter: + $ref: "#/components/schemas/OpticalConnectFilters" + pagination: + $ref: "#/components/schemas/PaginationRequest" + sort: + type: array + items: + $ref: "#/components/schemas/OpticalConnectSortCriteria" + description: |- + Search criteria for retrieving Optical Connects, with optional + filtering, pagination and sorting. + OpticalConnectFilters: + type: object + properties: + and: + maxItems: 8 + type: array + items: + $ref: "#/components/schemas/OpticalConnectFilter" + OpticalConnectFilter: + type: object + description: A single condition, or a group of conditions combined with logical OR. + anyOf: + - $ref: "#/components/schemas/OpticalConnectSimpleExpression" + - $ref: "#/components/schemas/OpticalConnectOrFilter" + OpticalConnectSimpleExpression: + type: object + properties: + property: + type: string + description: | + Possible field names to use on filters: + * `/name` - Connection name + * `/uuid` - Connection uuid + * `/type` - type + * `/state` - state + * `/bandwidth` - Bandwidth + example: /name + operator: + type: string + description: | + Possible operators to use on filters: + * `=` - equal + * `!=` - not equal + * `[NOT] BETWEEN` - (not) between + * `[NOT] LIKE` - (not) like + * `[NOT] IN` - (not) in + * `ILIKE` - case-insensitive like + example: = + values: + type: array + items: + type: string + example: 123456-SV1-SV2-01 + OpticalConnectOrFilter: + type: object + properties: + or: + maxItems: 3 + type: array + items: + $ref: "#/components/schemas/OpticalConnectSimpleExpression" + OpticalConnectSortCriteria: + type: object + properties: + direction: + $ref: "#/components/schemas/OpticalConnectSortDirection" + property: + $ref: "#/components/schemas/OpticalConnectSortBy" + description: Sorting to apply to search results. + OpticalConnectSortDirection: + type: string + description: | + Sorting direction.
ASC - ascending
DESC - descending + default: DESC + enum: + - DESC + - ASC + OpticalConnectSortBy: + type: string + description: Possible field names to use on sorting + default: /changeLog/updatedDateTime + enum: + - /name + - /uuid + - /state + - /type + - /bandwidth + - /aSide/location/ibxCode + - /zSide/location/ibxCode + - /changeLog/createdDateTime + - /changeLog/updatedDateTime + OpticalConnectServiceSearchResponse: + type: object + properties: + pagination: + $ref: "#/components/schemas/Pagination" + data: + type: array + description: Data returned from the API call. + items: + $ref: "#/components/schemas/OpticalConnectResponse" + Presence: + type: string + description: Presence + enum: + - MY_PORTS + MetroResponse: + type: object + properties: + pagination: + $ref: "#/components/schemas/Pagination" + data: + type: array + description: List of Fabric Metros. + items: + $ref: "#/components/schemas/Metro" + description: GET Metros retrieves all Equinix® Fabric™ metros, as well as latency data for each location.This performance data helps network planning engineers and administrators make strategic decisions about port locations and traffic routes. + Metro: + type: object + properties: + href: + type: string + description: The Canonical URL at which the resource resides. + type: + type: string + description: Indicator of a Fabric Metro + code: + type: string + description: Code Assigned to an Equinix IBX data center in a specified metropolitan area. + region: + type: string + description: Board geographic area in which the data center is located + name: + type: string + description: Name of the region in which the data center is located. + country: + type: string + description: Country code in which the data center is located. + equinixAsn: + type: integer + description: Autonomous system number (ASN) for a specified Fabric metro. The ASN is a unique identifier that carries the network routing protocol and exchanges that data with other internal systems via border gateway protocol. + format: int64 + localVCBandwidthMax: + type: integer + description: This field holds Max Connection speed with in the metro + format: int64 + geoCoordinates: + $ref: "#/components/schemas/GeoCoordinates" + connectedMetros: + type: array + items: + $ref: "#/components/schemas/ConnectedMetro" + services: + type: array + items: + $ref: "#/components/schemas/services" + geoScopes: + type: array + description: List of supported geographic boundaries of a Fabric Metro. + items: + $ref: "#/components/schemas/GeoScopeType" + geoZones: + type: array + description: List of supported geographic zones of a Fabric Metro. + items: + $ref: "#/components/schemas/GeoZone" + description: GET Metros retrieves all Equinix® Fabric™ metros, as well as latency data for each location.This performance data helps network planning engineers and administrators make strategic decisions about port locations and traffic routes. + GeoCoordinates: + type: object + properties: + latitude: + type: number + description: Latitude of a Fabric Metro + format: double + longitude: + type: number + description: Longitude of a Fabric Metro + format: double + description: Geographic location data of Fabric Metro + ConnectedMetro: + type: object + properties: + href: + type: string + description: The Canonical URL at which the resource resides. + code: + type: string + description: Code assigned to an Equinix International Business Exchange (IBX) data center in a specified metropolitan area. + avgLatency: + type: number + description: Average latency (in milliseconds[ms]) between two specified metros. + remoteVCBandwidthMax: + type: integer + description: This field holds the Max Connection speed with connected metros + format: int64 + description: Arrays of objects containing latency data for the specified metros + services: + type: object + properties: + type: + type: string + description: Type of Service + description: Arrays of objects containing type of services supported in the specified metros + GeoScopeType: + type: string + description: Geographic boundary types + enum: + - CANADA + - CONUS + - JAPAN + - UK + - AUSTRALIA + - BRAZIL + - SWITZERLAND + - EU + GeoZone: + type: object + properties: + code: + type: string + description: Code assigned to a geographic zone. + name: + type: string + description: Name of a geographic zone. + description: + type: string + description: Description of a geographic zone. + description: Geographic zone of a Fabric Metro + MetroErrorList: + type: array + items: + $ref: "#/components/schemas/MetroError" + MetroError: + required: + - errorCode + - errorMessage + type: object + properties: + errorCode: + type: string + enum: + - EQ-3036001 + - EQ-3036013 + - EQ-3036030 + - EQ-3036100 + errorMessage: + type: string + enum: + - Unauthorized + - Invalid Query Parameter + - Invalid Path Parameter + - Invalid Query or Path Parameter + - Internal Server Error + - Metro Not Found + correlationId: + type: string + details: + type: string + help: + type: string + additionalInfo: + type: array + items: + $ref: "#/components/schemas/PriceError_additionalInfo" + description: Error with details + discriminator: + propertyName: errorCode + MetroCode: + type: string + description: Metro Code + AllPortsResponse: + type: object + properties: + pagination: + $ref: "#/components/schemas/Pagination" + data: + type: array + description: GET All User Port Across Fabric Metros + items: + $ref: "#/components/schemas/Port" + description: GET All User Port Across Fabric Metros + Port: + type: object + properties: + href: + type: string + description: Equinix assigned response attribute for an absolute URL that is the subject of the link's context. + format: uri + readOnly: true + type: + $ref: "#/components/schemas/PortType" + uuid: + type: string + description: Equinix assigned response attribute for port identifier + format: uuid + name: + type: string + description: Equinix assigned response attribute for Port name + description: + type: string + description: Equinix assigned response attribute for Port description + physicalPortsSpeed: + minimum: 0 + type: integer + description: Physical Ports Speed in Mbps + connectionsCount: + minimum: 0 + type: integer + description: Equinix assigned response attribute for Connection count + physicalPortsType: + type: string + description: Physical Ports Type. 10GBASE_SMF and 400GBASE_LR4 are only used for IX ports + enum: + - 1000BASE_LX + - 10GBASE_LR + - 100GBASE_LR4 + - 10GBASE_ER + - 1000BASE_SX + - 10GBASE_SMF + - 400GBASE_LR4 + physicalPortsCount: + type: integer + connectivitySourceType: + type: string + description: Port connectivity type + enum: + - COLO + - BMMR + - REMOTE + bmmrType: + type: string + enum: + - SELF + - EQUINIX + project: + $ref: "#/components/schemas/Project" + state: + $ref: "#/components/schemas/PortState" + order: + $ref: "#/components/schemas/PortOrder" + operation: + allOf: + - $ref: "#/components/schemas/PortOperation" + account: + $ref: "#/components/schemas/SimplifiedAccount" + change: + $ref: "#/components/schemas/PortChange" + changeLog: + $ref: "#/components/schemas/Changelog" + serviceType: + type: string + description: Port service Type + deprecated: true + enum: + - EPL + - MSP + serviceCode: + $ref: "#/components/schemas/PortServiceCode" + bandwidth: + minimum: 0 + type: integer + description: Equinix assigned response attribute for Port bandwidth in Mbps + deprecated: true + availableBandwidth: + minimum: 0 + type: integer + description: Equinix assigned response attribute for Port available bandwidth in Mbps + usedBandwidth: + minimum: 0 + type: integer + description: Equinix assigned response attribute for Port used bandwidth in Mbps + location: + $ref: "#/components/schemas/SimplifiedLocation" + device: + $ref: "#/components/schemas/PortDevice" + interface: + $ref: "#/components/schemas/PortInterface" + demarcationPointIbx: + type: string + description: A-side/Equinix ibx + tetherIbx: + type: string + description: z-side/Equinix ibx + demarcationPoint: + $ref: "#/components/schemas/PortDemarcationPoint" + redundancy: + $ref: "#/components/schemas/PortRedundancy" + encapsulation: + $ref: "#/components/schemas/PortEncapsulation" + lagEnabled: + type: boolean + description: If LAG enabled + lag: + deprecated: true + allOf: + - $ref: "#/components/schemas/PortLag" + asn: + type: integer + description: Port ASN + package: + $ref: "#/components/schemas/Package" + settings: + $ref: "#/components/schemas/PortSettings" + physicalPortQuantity: + type: integer + description: Number of physical ports + notifications: + type: array + description: Notification preferences + items: + $ref: "#/components/schemas/PortNotification" + additionalInfo: + type: array + description: Port additional information + items: + $ref: "#/components/schemas/PortAdditionalInfo" + endCustomer: + $ref: "#/components/schemas/EndCustomer" + physicalPorts: + type: array + description: Physical ports that implement this port + items: + $ref: "#/components/schemas/PhysicalPort" + loas: + type: array + description: Port Loas + items: + $ref: "#/components/schemas/PortLoa" + marketplaceSubscription: + $ref: "#/components/schemas/marketplaceSubscription" + description: Port specification + PhysicalPort: + type: object + properties: + href: + type: string + description: Equinix assigned response attribute for an absolute URL that is the subject of the link's context. + format: uri + readOnly: true + type: + $ref: "#/components/schemas/PhysicalPortType" + id: + type: integer + description: Equinix assigned response attribute for Physical Port Id + deprecated: true + state: + $ref: "#/components/schemas/PortState" + account: + $ref: "#/components/schemas/SimplifiedAccount" + interfaceSpeed: + minimum: 0 + type: integer + description: Physical Port Speed in Mbps + interfaceType: + type: string + description: Physical Port Interface Type + uuid: + type: string + description: Equinix assigned response attribute for physical port identifier + format: uuid + tether: + $ref: "#/components/schemas/PortTether" + demarcationPoint: + $ref: "#/components/schemas/PortDemarcationPoint" + settings: + $ref: "#/components/schemas/PhysicalPortSettings" + interface: + $ref: "#/components/schemas/PortInterface" + notifications: + type: array + description: Notification preferences + items: + $ref: "#/components/schemas/PortNotification" + additionalInfo: + type: array + description: Physical Port additional information + items: + $ref: "#/components/schemas/PortAdditionalInfo" + order: + $ref: "#/components/schemas/PortOrder" + operation: + $ref: "#/components/schemas/PortOperation" + loas: + type: array + description: Port Loas + items: + $ref: "#/components/schemas/PortLoa" + description: Physical Port specification + PortRequest: + required: + - account + - connectivitySourceType + - encapsulation + - location + - physicalPortsSpeed + - physicalPortsType + - project + - type + type: object + properties: + type: + $ref: "#/components/schemas/PortType" + physicalPortsSpeed: + minimum: 0 + type: integer + description: Physical Ports Speed in Mbps + physicalPortsType: + type: string + description: Physical Ports Type. 10GBASE_SMF is only applicable for IX ports + enum: + - 1000BASE_LX + - 10GBASE_LR + - 100GBASE_LR4 + - 10GBASE_ER + - 1000BASE_SX + - 10GBASE_SMF + - 400GBASE_LR4 + physicalPortsCount: + type: integer + connectivitySourceType: + type: string + description: Port connectivity type + enum: + - COLO + - BMMR + - REMOTE + bmmrType: + type: string + description: BMMR Type is mandatory when connectivitySourceType is BMMR + enum: + - SELF + - EQUINIX + project: + $ref: "#/components/schemas/Project" + order: + $ref: "#/components/schemas/PortOrder" + account: + $ref: "#/components/schemas/SimplifiedAccountRequest" + serviceType: + type: string + description: Port service Type + deprecated: true + enum: + - EPL + - MSP + serviceCode: + $ref: "#/components/schemas/PortServiceCode" + bandwidth: + minimum: 0 + type: integer + description: Equinix assigned response attribute for Port bandwidth in Mbps + deprecated: true + location: + $ref: "#/components/schemas/SimplifiedLocationRequest" + demarcationPointIbx: + type: string + description: A-side/Equinix ibx + tetherIbx: + type: string + description: z-side/Equinix ibx + demarcationPoint: + $ref: "#/components/schemas/PortDemarcationPoint" + redundancy: + $ref: "#/components/schemas/PortRedundancy" + encapsulation: + $ref: "#/components/schemas/PortEncapsulation" + lagEnabled: + type: boolean + description: Indicates whether Link Aggregation Group (LAG) is enabled on this port + package: + $ref: "#/components/schemas/Package" + settings: + $ref: "#/components/schemas/PortSettings" + notifications: + type: array + description: Notification preferences + items: + $ref: "#/components/schemas/PortNotification" + physicalPorts: + type: array + description: Physical ports that implement this port + items: + $ref: "#/components/schemas/PhysicalPort" + loas: + type: array + description: Port Loas + items: + $ref: "#/components/schemas/PortLoa" + description: PortRequest is the Request Object for creating single and bulk fabric ports + BulkPhysicalPort: + type: object + properties: + data: + type: array + description: add physical ports to virtual port + items: + $ref: "#/components/schemas/PhysicalPort" + description: Add to Lag request + AllPhysicalPortsResponse: + type: object + properties: + pagination: + $ref: "#/components/schemas/Pagination" + data: + type: array + description: GET All Physical Ports + items: + $ref: "#/components/schemas/PhysicalPort" + description: GET All Physical Ports + PortUpdateRequest: + minItems: 1 + type: array + description: Port Update Request + items: + $ref: "#/components/schemas/PortChangeOperation" + Error: + required: + - errorCode + - errorMessage + type: object + properties: + errorCode: + pattern: ^EQ-\d{7}$ + type: string + errorMessage: + type: string + correlationId: + type: string + details: + type: string + help: + type: string + additionalInfo: + type: array + items: + $ref: "#/components/schemas/PriceError_additionalInfo" + description: Error Response with details + LinkProtocolGetResponse: + type: object + properties: + pagination: + $ref: "#/components/schemas/Pagination" + data: + type: array + items: + $ref: "#/components/schemas/LinkProtocolResponse" + description: List of Vlans + PortV4SearchRequest: + required: + - filter + type: object + properties: + filter: + $ref: "#/components/schemas/PortExpression" + pagination: + $ref: "#/components/schemas/PaginationRequest" + sort: + type: array + items: + $ref: "#/components/schemas/PortSortCriteria" + description: Search requests containing criteria + PortExpression: + type: object + properties: + and: + $ref: "#/components/schemas/PortExpressions" + or: + $ref: "#/components/schemas/PortExpressions" + property: + $ref: "#/components/schemas/PortSearchFieldName" + operator: + type: string + enum: + - = + - "!=" + - ">" + - ">=" + - < + - <= + - LIKE + - ILIKE + - IN + - NOT IN + - BETWEEN + values: + type: array + items: + type: string + description: | + Either use 'and' for AND operations, 'or' for OR operations, or specify 'property', 'operator', and 'values' for field filtering. Only one of these patterns should be used at a time. + PortExpressions: + type: array + items: + $ref: "#/components/schemas/PortExpression" + PortSearchFieldName: + type: string + description: Possible field names to use on filters + enum: + - /device/name + - /physicalPorts/tether/crossConnectId + - /physicalPorts/interface/name + - /state + - /project/projectId + - /uuid + - /name + - /account/orgId + - /account/accountNumber + - /location/metroCode + - /operation/maintenanceStatus + - /operation/lockEnabled + x-enum-deprecations: + /device/name: true + /physicalPorts/interface/name: true + PortSortCriteria: + type: object + properties: + direction: + $ref: "#/components/schemas/PortSortDirection" + property: + $ref: "#/components/schemas/PortSortBy" + AllPortPackagesResponse: + required: + - data + type: object + properties: + data: + type: array + description: List of Port Packages + items: + $ref: "#/components/schemas/PortPackage" + description: Port Packages response + GetAllConnectionRouteAggregationsResponse: + type: object + properties: + pagination: + $ref: "#/components/schemas/Pagination" + data: + type: array + description: List of Route Aggregations attached to a Connection + items: + $ref: "#/components/schemas/ConnectionRouteAggregationData" + RouteAggregationId: + type: string + description: Route Aggregations UUID + example: 695a8471-6595-4ac6-a2f4-b3d96ed3a59d + ConnectionRouteAggregationData: + type: object + properties: + href: + type: string + description: Route Aggregation URI + format: uri + example: https://api.equinix.com/fabric/v4/connections/81331c52-04c0-4656-a4a7-18c52669348f/routeAggregations/695a8471-6595-4ac6-a2f4-b3d96ed3a59d + type: + type: string + description: Route Aggregation type + enum: + - BGP_IPv4_PREFIX_AGGREGATION + uuid: + type: string + description: Route Aggregation identifier + format: uuid + example: 695a8471-6595-4ac6-a2f4-b3d96ed3a59d + attachmentStatus: + type: string + enum: + - ATTACHING + - ATTACHED + - DETACHED + - DETACHING + - FAILED + - PENDING_BGP_CONFIGURATION + changeLog: + $ref: "#/components/schemas/Changelog" + GetAllConnectionRouteFiltersResponse: + type: object + properties: + pagination: + $ref: "#/components/schemas/Pagination" + data: + type: array + description: List of Route Filters attached to a Connection + items: + $ref: "#/components/schemas/ConnectionRouteFilterData" + RouteFilterId: + type: string + description: Route Filters UUID + example: 695a8471-6595-4ac6-a2f4-b3d96ed3a59d + ConnectionRouteFilterData: + type: object + properties: + href: + type: string + description: Route filter URI + format: uri + example: https://api.equinix.com/fabric/v4/connections/81331c52-04c0-4656-a4a7-18c52669348f/routeFilters/695a8471-6595-4ac6-a2f4-b3d96ed3a59d + type: + type: string + description: Route filter type + enum: + - BGP_IPv4_PREFIX_FILTER + - BGP_IPv6_PREFIX_FILTER + uuid: + type: string + description: Route Filter identifier + format: uuid + example: 695a8471-6595-4ac6-a2f4-b3d96ed3a59d + attachmentStatus: + type: string + enum: + - ATTACHING + - ATTACHED + - DETACHED + - DETACHING + - FAILED + - PENDING_BGP_CONFIGURATION + direction: + type: string + enum: + - INBOUND + - OUTBOUND + changeLog: + $ref: "#/components/schemas/Changelog" + ConnectionRouteFiltersBase: + required: + - direction + type: object + properties: + direction: + type: string + description: Route Filter direction to attach to a connection + enum: + - INBOUND + - OUTBOUND + RouteFiltersBase: + required: + - name + - project + - type + type: object + properties: + type: + type: string + description: Route Filter type + enum: + - BGP_IPv4_PREFIX_FILTER + - BGP_IPv6_PREFIX_FILTER + name: + type: string + example: My-direct-route-1 + description: + type: string + description: Customer-provided connection description + project: + $ref: "#/components/schemas/Project" + RouteFiltersData: + type: object + properties: + href: + type: string + description: Route filter URI + format: uri + example: https://api.equinix.com/fabric/v4/routeFilters/695a8471-6595-4ac6-a2f4-b3d96ed3a59d + type: + type: string + description: Route Filter type + enum: + - BGP_IPv4_PREFIX_FILTER + - BGP_IPv6_PREFIX_FILTER + uuid: + type: string + description: Route filter identifier + format: uuid + example: 695a8471-6595-4ac6-a2f4-b3d96ed3a59d + name: + type: string + example: My-direct-route-1 + description: + type: string + description: Customer-provided connection description + state: + $ref: "#/components/schemas/RouteFilterState" + change: + $ref: "#/components/schemas/RouteFiltersChange" + notMatchedRuleAction: + type: string + enum: + - ALLOW + - DENY + connectionsCount: + type: integer + example: 0 + rulesCount: + type: integer + example: 0 + project: + $ref: "#/components/schemas/RouteFiltersData_project" + changelog: + $ref: "#/components/schemas/Changelog" + RouteFiltersPatchRequest: + minItems: 1 + type: array + description: Patch Route Filters request + items: + $ref: "#/components/schemas/RouteFiltersPatchRequestItem" + RouteFilterChangeDataResponse: + type: object + properties: + pagination: + $ref: "#/components/schemas/Pagination" + data: + type: array + items: + $ref: "#/components/schemas/RouteFilterChangeData" + description: List of route filter changes + ChangeId_1: + type: string + description: Route Filters Change UUID + format: uuid + example: 6d500177-9404-41f2-99e8-2bf1a84d8db5 + RouteFilterChangeData: + type: object + properties: + status: + type: string + description: Current outcome of the change flow + enum: + - COMPLETED + - FAILED + - REQUESTED + createdBy: + type: string + description: Created by user key + createdDateTime: + type: string + description: Set when change flow starts + format: date-time + updatedBy: + type: string + description: Updated by user key + updatedDateTime: + type: string + description: Set when change object is updated + format: date-time + information: + type: string + description: Additional information + data: + $ref: "#/components/schemas/RouteFiltersChangeOperation" + description: Current state of latest route filter change + allOf: + - $ref: "#/components/schemas/RouteFiltersChange" + GetRouteFilterGetConnectionsResponse: + type: object + properties: + pagination: + $ref: "#/components/schemas/Pagination" + data: + type: array + description: List of Connections using a Route Filter + items: + $ref: "#/components/schemas/RouteFilterConnectionsData" + RouteFiltersSearchRequest: + type: object + properties: + filter: + $ref: "#/components/schemas/SearchFilter" + pagination: + $ref: "#/components/schemas/PaginationRequest" + sort: + type: array + items: + $ref: "#/components/schemas/RouteFilterSortCriteria" + description: Search route filters + RouteFiltersSearchResponse: + type: object + properties: + pagination: + $ref: "#/components/schemas/Pagination" + data: + type: array + description: List of route filters + items: + $ref: "#/components/schemas/RouteFiltersData" + GetRouteFilterRulesResponse: + type: object + properties: + pagination: + $ref: "#/components/schemas/Pagination" + data: + type: array + description: List of Route Filter Rules + items: + $ref: "#/components/schemas/RouteFilterRulesData" + RouteFilterRulesBase: + required: + - prefix + type: object + properties: + name: + type: string + example: Private-subnet-filter + description: + type: string + description: Customer-provided Route Filter Rule description + prefix: + type: string + example: 192.168.0.0/24 + prefixMatch: + type: string + example: orlonger, exact + default: orlonger + RouteFilterRulesData: + type: object + properties: + href: + type: string + description: Route Filter Rules URI + format: uri + example: https://api.equinix.com/fabric/v4/routeFilters/695a8471-6595-4ac6-a2f4-b3d96ed3a59d/routeFilterRules/65b025ef-022b-4180-85cf-82cfc1ab655b + type: + type: string + description: Route filter type + enum: + - BGP_IPv4_PREFIX_FILTER_RULE + - BGP_IPv6_PREFIX_FILTER_RULE + uuid: + type: string + description: Route Filter Rule identifier + format: uuid + example: 65b025ef-022b-4180-85cf-82cfc1ab655b + name: + type: string + example: Private-subnet-filter-2 + description: + type: string + description: Customer-provided Route Filter Rule description + state: + $ref: "#/components/schemas/RouteFilterRuleState" + prefixMatch: + type: string + description: prefix matching operator + example: exact + default: orlonger + change: + $ref: "#/components/schemas/RouteFilterRulesChange" + action: + type: string + enum: + - PERMIT + - DENY + prefix: + type: string + example: 192.168.0.0/24 + changelog: + $ref: "#/components/schemas/Changelog" + RouteFilterRuleId: + type: string + description: Route Filter Rule UUID + example: 65b025ef-022b-4180-85cf-82cfc1ab655b + RouteFilterRulesPatchRequest: + minItems: 1 + type: array + description: Patch Route Filters Rule request + items: + $ref: "#/components/schemas/RouteFilterRulesPatchRequestItem" + RouteFilterRulesChangeDataResponse: + type: object + properties: + pagination: + $ref: "#/components/schemas/Pagination" + data: + type: array + items: + $ref: "#/components/schemas/RouteFilterRulesChangeData" + description: List of route filter rule changes + ChangeId_2: + type: string + description: Route Filter Rule Change UUID + format: uuid + example: 6d500177-9404-41f2-99e8-2bf1a84d8db5 + RouteFilterRulesChangeData: + type: object + properties: + status: + type: string + description: Current outcome of the change flow + enum: + - COMPLETED + - FAILED + - REQUESTED + createdBy: + type: string + description: Created by User Key + createdDateTime: + type: string + description: Set when change flow starts + format: date-time + updatedBy: + type: string + description: Updated by User Key + updatedDateTime: + type: string + description: Set when change object is updated + format: date-time + data: + $ref: "#/components/schemas/RouteFilterRulesChangeOperation" + description: Current state of latest route filter rules change + allOf: + - $ref: "#/components/schemas/RouteFilterRulesChange" + RouteFilterRulesPostRequest: + type: object + properties: + data: + type: array + description: Route Filter Rule configuration + items: + $ref: "#/components/schemas/RouteFilterRulesBase" + description: Create Route Filter Rule POST request + RouteFilterRulesSearchRequest: + type: object + properties: + filter: + $ref: "#/components/schemas/RouteFilterRulesFilter" + pagination: + $ref: "#/components/schemas/PaginationRequest" + sort: + type: array + items: + $ref: "#/components/schemas/RouteFilterRuleSortCriteria" + description: Search route filter rules + RouteFilterRulesFilter: + description: Top-level filter that can be either an AND expression or OR expression + anyOf: + - $ref: "#/components/schemas/RouteFilterRuleAndExpression" + - $ref: "#/components/schemas/RouteFilterRuleOrExpression" + RouteFilterRuleAndExpression: + type: object + properties: + and: + maxItems: 8 + minItems: 1 + type: array + items: + $ref: "#/components/schemas/RouteFilterRuleExpression" + description: AND expression containing multiple filter expressions + RouteFilterRuleExpression: + description: Filter expression that can be AND, OR, or a simple expression + anyOf: + - $ref: "#/components/schemas/RouteFilterRuleAndExpression" + - $ref: "#/components/schemas/RouteFilterRuleOrExpression" + - $ref: "#/components/schemas/RouteFilterRuleSimpleExpression" + RouteFilterRuleOrExpression: + type: object + properties: + or: + maxItems: 8 + minItems: 1 + type: array + items: + $ref: "#/components/schemas/RouteFilterRuleExpression" + description: OR expression containing multiple filter expressions + RouteFilterRuleSimpleExpression: + type: object + properties: + property: + type: string + description: | + Possible field names to use on filters: + * `/type` - Route Filter Rules Type + * `/name` - Route Filter Rules Name + * `/uuid` - Route Filter Rules uuid + * `/state` - Route Filter Rules status + * `/prefix` - Route Filter Rule Prefix + * `/prefixMatch` - Route Filter Rule Prefix Match + example: /name + operator: + type: string + description: | + Possible operators to use on filters: + * `=` - equal + * `!=` - not equal + * `[NOT] LIKE` - (not) like + * `[NOT] IN` - (not) in + * `ILIKE` - case-insensitive like + example: = + values: + maxItems: 8 + minItems: 1 + type: array + items: + type: string + example: Route_Filter_Rule_Demo + description: Simple filter expression with property, operator, and values + RouteFilterRuleSortCriteria: + type: object + properties: + direction: + $ref: "#/components/schemas/RouteFilterRuleSortDirection" + property: + $ref: "#/components/schemas/RouteFilterRuleSortBy" + RouteFilterRuleSortDirection: + type: string + description: Sorting direction + default: DESC + enum: + - DESC + - ASC + RouteFilterRuleSortBy: + type: string + description: Possible field names to use on sorting + default: /changeLog/updatedDateTime + enum: + - /type + - /uuid + - /name + - /state + - /prefix + - /prefixMatch + - /changeLog/createdDateTime + - /changeLog/updatedDateTime + RouteFilterRulesSearchResponse: + type: object + properties: + pagination: + $ref: "#/components/schemas/Pagination" + data: + type: array + description: List of route filter rules + items: + $ref: "#/components/schemas/RouteFilterRulesData" + RouteAggregationsBase: + required: + - name + - project + - type + type: object + properties: + type: + type: string + description: Route Aggregation type + enum: + - BGP_IPv4_PREFIX_AGGREGATION + - BGP_IPv6_PREFIX_AGGREGATION + name: + type: string + example: My-direct-route-1 + description: + type: string + description: Customer-provided connection description + project: + $ref: "#/components/schemas/Project" + RouteAggregationsData: + type: object + properties: + href: + type: string + description: Route Aggregation URI + format: uri + example: https://api.equinix.com/fabric/v4/routeAggregations/695a8471-6595-4ac6-a2f4-b3d96ed3a59d + type: + type: string + description: Route Aggregation type + enum: + - BGP_IPv4_PREFIX_AGGREGATION + - BGP_IPv6_PREFIX_AGGREGATION + uuid: + type: string + description: Route Aggregation identifier + format: uuid + example: 695a8471-6595-4ac6-a2f4-b3d96ed3a59d + name: + type: string + example: My-direct-route-1 + description: + type: string + description: Customer-provided connection description + state: + $ref: "#/components/schemas/RouteAggregationState" + change: + $ref: "#/components/schemas/RouteAggregationsChange" + connectionsCount: + type: integer + example: 0 + rulesCount: + type: integer + example: 0 + project: + $ref: "#/components/schemas/RouteAggregationsData_project" + changeLog: + $ref: "#/components/schemas/Changelog" + RouteAggregationsPatchRequest: + minItems: 1 + type: array + description: Patch Route Aggregations request + items: + $ref: "#/components/schemas/RouteAggregationsPatchRequestItem" + RouteAggregationChangeDataResponse: + type: object + properties: + pagination: + $ref: "#/components/schemas/Pagination" + data: + type: array + items: + $ref: "#/components/schemas/RouteAggregationChangeData" + description: List of Route Aggregation changes + ChangeId_3: + type: string + description: Route Aggregations Change UUID + format: uuid + example: 6d500177-9404-41f2-99e8-2bf1a84d8db5 + RouteAggregationChangeData: + type: object + properties: + status: + type: string + description: Current outcome of the change flow + enum: + - COMPLETED + - FAILED + - REQUESTED + createdBy: + type: string + description: Created by User Key + createdDateTime: + type: string + description: Set when change flow starts + format: date-time + updatedBy: + type: string + description: Updated by User Key + updatedDateTime: + type: string + description: Set when change object is updated + format: date-time + information: + type: string + description: Additional information + data: + $ref: "#/components/schemas/RouteAggregationsChangeOperation" + description: Current state of latest Route Aggregation change + allOf: + - $ref: "#/components/schemas/RouteAggregationsChange" + GetRouteAggregationGetConnectionsResponse: + type: object + properties: + pagination: + $ref: "#/components/schemas/Pagination" + data: + type: array + description: List of Connections using a Route Aggregation + items: + $ref: "#/components/schemas/RouteAggregationConnectionsData" + RouteAggregationsSearchRequest: + type: object + properties: + filter: + $ref: "#/components/schemas/SearchFilter" + pagination: + $ref: "#/components/schemas/PaginationRequest" + sort: + type: array + items: + $ref: "#/components/schemas/RouteAggregationSortCriteria" + description: Search route aggregations + RouteAggregationsSearchResponse: + type: object + properties: + pagination: + $ref: "#/components/schemas/Pagination" + data: + type: array + description: List of Route Aggregations + items: + $ref: "#/components/schemas/RouteAggregationsData" + GetRouteAggregationRulesResponse: + type: object + properties: + pagination: + $ref: "#/components/schemas/Pagination" + data: + type: array + description: List of Route Aggregation Rules + items: + $ref: "#/components/schemas/RouteAggregationRulesData" + RouteAggregationRulesBase: + required: + - prefix + type: object + properties: + name: + type: string + example: Private-subnet-Aggregation + description: + type: string + description: Customer-provided Route Aggregation Rule description + prefix: + type: string + example: 192.168.0.0/24 + RouteAggregationRulesData: + type: object + properties: + href: + type: string + description: Route Aggregation Rules URI + format: uri + example: https://api.equinix.com/fabric/v4/routeAggregations/695a8471-6595-4ac6-a2f4-b3d96ed3a59d/routeAggregationRules/65b025ef-022b-4180-85cf-82cfc1ab655b + type: + type: string + description: Route Aggregation type + enum: + - BGP_IPv4_PREFIX_AGGREGATION_RULE + uuid: + type: string + description: Route Aggregation Rule identifier + format: uuid + example: 65b025ef-022b-4180-85cf-82cfc1ab655b + name: + type: string + example: Private-subnet-aggregation-2 + description: + type: string + description: Customer-provided Route Aggregation Rule description + state: + $ref: "#/components/schemas/RouteAggregationRuleState" + change: + $ref: "#/components/schemas/RouteAggregationRulesChange" + prefix: + type: string + example: 192.168.0.0/24 + changeLog: + $ref: "#/components/schemas/Changelog" + RouteAggregationRuleId: + type: string + description: Route Aggregation Rule UUID + example: 65b025ef-022b-4180-85cf-82cfc1ab655b + RouteAggregationRulesPatchRequest: + minItems: 1 + type: array + description: Patch Route Aggregations Rule request + items: + $ref: "#/components/schemas/RouteAggregationRulesPatchRequestItem" + RouteAggregationRulesChangeDataResponse: type: object properties: pagination: $ref: "#/components/schemas/Pagination" data: type: array - description: Data returned from the API call. items: - $ref: "#/components/schemas/CloudEvent" - CloudEventId: + $ref: "#/components/schemas/RouteAggregationRulesChangeData" + description: List of Route Aggregation Rule changes + ChangeId_4: type: string - description: Cloud Event UUID + description: Route Aggregation Rule Change UUID format: uuid - example: 557400f8-d360-11e9-bb65-2a2ae2dbcce4 - CloudEvent: + example: 6d500177-9404-41f2-99e8-2bf1a84d8db5 + RouteAggregationRulesChangeData: type: object properties: - spec: - type: string - description: Cloud Event Open Telemetry specification - readOnly: true - source: + status: type: string - description: Cloud Event source - id: + description: Current outcome of the change flow + enum: + - COMPLETED + - FAILED + - REQUESTED + createdBy: type: string - description: Cloud Event identifier - format: uuid - type: + description: Created by User Key + createdDateTime: type: string - description: Equinix supported event type - subject: + description: Set when change flow starts + format: date-time + updatedBy: type: string - description: Cloud Event subject - time: + description: Updated by User Key + updatedDateTime: type: string - description: Cloud Event time the event occurred + description: Set when change object is updated format: date-time - dataschema: + data: + $ref: "#/components/schemas/RouteAggregationRulesChangeOperation" + description: Current state of latest Route Aggregation Rules change + allOf: + - $ref: "#/components/schemas/RouteAggregationRulesChange" + RouteAggregationRulesPostRequest: + type: object + properties: + data: + type: array + description: Route Aggregation Rule configuration + items: + $ref: "#/components/schemas/RouteAggregationRulesBase" + description: Create Route Aggregation Rule POST request + RouteAggregationRulesSearchRequest: + type: object + properties: + filter: + $ref: "#/components/schemas/RouteAggregationRulesFilter" + pagination: + $ref: "#/components/schemas/PaginationRequest" + sort: + type: array + items: + $ref: "#/components/schemas/RouteAggregationRuleSortCriteria" + description: Search route aggregation rules + RouteAggregationRulesFilter: + description: Top-level filter that can be either an AND expression or OR expression + anyOf: + - $ref: "#/components/schemas/RouteAggregationRuleAndExpression" + - $ref: "#/components/schemas/RouteAggregationRuleOrExpression" + RouteAggregationRuleAndExpression: + type: object + properties: + and: + maxItems: 8 + minItems: 1 + type: array + items: + $ref: "#/components/schemas/RouteAggregationRuleExpression" + description: AND expression containing multiple filter expressions + RouteAggregationRuleExpression: + description: Filter expression that can be AND, OR, or a simple expression + anyOf: + - $ref: "#/components/schemas/RouteAggregationRuleAndExpression" + - $ref: "#/components/schemas/RouteAggregationRuleOrExpression" + - $ref: "#/components/schemas/RouteAggregationRuleSimpleExpression" + RouteAggregationRuleOrExpression: + type: object + properties: + or: + maxItems: 8 + minItems: 1 + type: array + items: + $ref: "#/components/schemas/RouteAggregationRuleExpression" + description: OR expression containing multiple filter expressions + RouteAggregationRuleSimpleExpression: + type: object + properties: + property: type: string - description: Cloud Event dataschema reference - datacontenttype: + description: | + Possible field names to use on filters: + * `/type` - Route Aggregation Rules Type + * `/name` - Route Aggregation Rules Name + * `/uuid` - Route Aggregation Rules uuid + * `/state` - Route Aggregation Rules status + * `/prefix` - Route Aggregation Rule Prefix + example: /name + operator: type: string - description: Cloud Event data content type - severitynumber: + description: | + Possible operators to use on filters: + * `=` - equal + * `!=` - not equal + * `[NOT] LIKE` - (not) like + * `[NOT] IN` - (not) in + * `ILIKE` - case-insensitive like + example: = + values: + maxItems: 8 + minItems: 1 + type: array + items: + type: string + example: Route_Aggregation_Rule_Demo + description: Simple filter expression with property, operator, and values + RouteAggregationRuleSortCriteria: + type: object + properties: + direction: + $ref: "#/components/schemas/RouteAggregationRuleSortDirection" + property: + $ref: "#/components/schemas/RouteAggregationRuleSortBy" + RouteAggregationRuleSortDirection: + type: string + description: Sorting direction + default: DESC + enum: + - DESC + - ASC + RouteAggregationRuleSortBy: + type: string + description: Possible field names to use on sorting + default: /changeLog/updatedDateTime + enum: + - /type + - /uuid + - /name + - /state + - /prefix + - /changeLog/createdDateTime + - /changeLog/updatedDateTime + RouteAggregationRulesSearchResponse: + type: object + properties: + pagination: + $ref: "#/components/schemas/Pagination" + data: + type: array + description: List of route aggregation rules + items: + $ref: "#/components/schemas/RouteAggregationRulesData" + CloudRouterPostRequest: + required: + - location + - name + - notification + - package + - type + allOf: + - $ref: "#/components/schemas/CloudRouterPostRequestBase" + CloudRouterPostRequestBase: + type: object + properties: + type: type: string - description: Cloud Event severity number - severitytext: + enum: + - XF_ROUTER + name: type: string - description: Cloud Event severity text - equinixalert: + description: Customer-provided Cloud Router name + location: + $ref: "#/components/schemas/SimplifiedLocationWithoutIBX" + package: + $ref: "#/components/schemas/CloudRouterPostRequestPackage" + order: + $ref: "#/components/schemas/Order" + project: + $ref: "#/components/schemas/Project" + account: + $ref: "#/components/schemas/SimplifiedAccount" + notifications: + type: array + description: Preferences for notifications on connection configuration or status changes + items: + $ref: "#/components/schemas/SimplifiedNotification" + marketplaceSubscription: + $ref: "#/components/schemas/marketplaceSubscription" + description: Create Cloud Router + CloudRouter: + type: object + properties: + href: type: string - description: Equinix alert - equinixorganization: + description: Cloud Routers URI + format: uri + readOnly: true + example: https://api.equinix.com/fabric/v4/routers/3c9b8e7a2-f3b1-4576-a4a9-1366a63df170 + uuid: type: string - description: Equinix organization identifier - equinixproject: + description: Equinix-assigned access point identifier + format: uuid + example: c9b8e7a2-f3b1-4576-a4a9-1366a63df170 + name: type: string - description: Equinix project identifier - authtype: + description: Customer-provided Cloud Router name + format: string + example: test-fg-1 + state: + $ref: "#/components/schemas/CloudRouterAccessPointState" + equinixAsn: + type: integer + description: Equinix ASN + format: int64 + example: 30000 + connectionsCount: + minimum: 0 + type: integer + description: Number of connections associated with this Access point + marketplaceSubscription: + $ref: "#/components/schemas/marketplaceSubscription" + changeLog: + $ref: "#/components/schemas/Changelog" + change: + $ref: "#/components/schemas/CloudRouterChange" + description: Fabric Cloud Router object + allOf: + - $ref: "#/components/schemas/CloudRouterPostRequestBase" + RouterId: + type: string + description: Cloud Router UUID + format: uuid + example: 557400f8-d360-11e9-bb65-2a2ae2dbcce4 + CloudRouterReadResponse: + type: object + properties: + type: type: string - description: Cloud Event auth type - authid: + enum: + - IC_ROUTER + - XF_ROUTER + name: type: string - description: Cloud Event user identifier - traceparent: + description: Customer-provided Cloud Router name + location: + $ref: "#/components/schemas/SimplifiedLocationWithoutIBX" + package: + $ref: "#/components/schemas/CloudRouterPostRequestPackage" + order: + $ref: "#/components/schemas/Order" + project: + $ref: "#/components/schemas/Project" + account: + $ref: "#/components/schemas/SimplifiedAccount" + notifications: + type: array + description: Preferences for notifications on connection configuration or status changes + items: + $ref: "#/components/schemas/SimplifiedNotification" + href: type: string - description: Cloud Event traceparent - tracestate: + description: Cloud Routers URI + format: uri + readOnly: true + example: https://api.equinix.com/fabric/v4/routers/3c9b8e7a2-f3b1-4576-a4a9-1366a63df170 + uuid: type: string - description: Cloud Event tracestate + description: Equinix-assigned access point identifier + format: uuid + example: c9b8e7a2-f3b1-4576-a4a9-1366a63df170 + state: + $ref: "#/components/schemas/CloudRouterAccessPointState" + equinixAsn: + type: integer + description: Equinix ASN + format: int64 + example: 30000 + connectionsCount: + minimum: 0 + type: integer + description: Number of connections associated with this Access point + marketplaceSubscription: + $ref: "#/components/schemas/marketplaceSubscription" + changeLog: + $ref: "#/components/schemas/Changelog" + change: + $ref: "#/components/schemas/CloudRouterChange" + description: Fabric Cloud Router read response object + CloudRouterUpdateRequest: + minItems: 1 + type: array + description: Fabric Cloud Router Update Request + items: + $ref: "#/components/schemas/CloudRouterChangeOperation" + RouterId_1: + type: string + description: Router UUID + format: uuid + example: 557400f8-d360-11e9-bb65-2a2ae2dbcce4 + ActionState: + $ref: "#/components/schemas/CloudRouterActionState" + CloudRouterActionState: + type: string + description: Cloud router action state + enum: + - SUCCEEDED + - FAILED + - PENDING + CloudRouterActionsSearchResponse: + type: object + properties: + pagination: + $ref: "#/components/schemas/Pagination" data: - $ref: "#/components/schemas/CloudEventData" - description: Cloud Event object - CloudEventSearchRequest: + type: array + description: Data returned from the API call. + items: + $ref: "#/components/schemas/CloudRouterActionResponse" + CloudRouterActionRequest: required: - - filter + - type + type: object + properties: + type: + $ref: "#/components/schemas/CloudRouterActionType" + connection: + $ref: "#/components/schemas/RouterActionsConnection" + description: Cloud router action request + CloudRouterActionResponse: + required: + - changeLog + - state + - type + - uuid + type: object + properties: + type: + $ref: "#/components/schemas/CloudRouterActionType" + uuid: + type: string + format: uuid + example: 557400f8-d360-11e9-bb65-2a2ae2dbcce4 + description: + type: string + example: description + state: + $ref: "#/components/schemas/CloudRouterActionState" + changeLog: + $ref: "#/components/schemas/Changelog" + href: + type: string + example: https://api.equinix.com//fabric/v4/routers/a1c6b7fd-aead-410a-96b4-b1dfa1071700/actions/1e9414f1-763e-4c0a-86c6-0bc8336048d9 + connection: + $ref: "#/components/schemas/RouterActionsConnection" + router: + $ref: "#/components/schemas/RouterActionsRouter" + description: Cloud router actions response object + CloudRouterActionsSearchRequest: type: object properties: filter: - $ref: "#/components/schemas/CloudEventFilters" + $ref: "#/components/schemas/CloudRouterActionsSearchFilters" pagination: $ref: "#/components/schemas/PaginationRequest" + sort: + type: array + items: + $ref: "#/components/schemas/CloudRouterActionsSearchSortCriteria" description: Search requests containing criteria - CloudEventFilters: + CloudRouterActionsSearchFilters: type: object properties: and: + maxItems: 8 type: array items: - $ref: "#/components/schemas/CloudEventFilter" - CloudEventFilter: + $ref: "#/components/schemas/CloudRouterActionsSearchFilter" + CloudRouterActionsSearchFilter: type: object anyOf: - - $ref: "#/components/schemas/CloudEventSimpleExpression" - CloudEventSimpleExpression: + - $ref: "#/components/schemas/CloudRouterActionsSearchExpression" + - $ref: "#/components/schemas/CloudRouterActionsSearchOrFilter" + CloudRouterActionsSearchExpression: type: object properties: property: type: string description: | Possible field names to use on filters: - * `/id` - Cloud Event identifier - * `/subject` - Cloud Event subject description - * `/type` - Cloud Event type - * `/time` - Time of Cloud Events - * `/equinixproject` - Equinix Project of Cloud Events - * `/equinixorganization` - Equinix Organization of Cloud Events - * `/equinixalert` - Equinix Alert Identifier for raise/clear Cloud Events - * `/severitytext` - cloud event severity text - * `/authid` - Equinix user key to identify the user that performed the action that triggered the Cloud Event - * `/authtype` - Equinix user type either user or system - example: /subject + * `/type` - type of update + * `/state` - action state + * `/connection/uuid` - connection uuid associated + * `/*` - all-category search + example: /type operator: type: string description: | @@ -15392,308 +24560,244 @@ components: * `>=` - greater than or equal to * `<` - less than * `<=` - less than or equal to - * `BETWEEN` - between - * `IN` - in - * `LIKE` - like - * `ILIKE` - like case-insensitive - * `NOT IN` - not in - * `IS NULL` - is null - * `IS NOT NULL` - is not null + * `[NOT] BETWEEN` - (not) between + * `[NOT] LIKE` - (not) like + * `[NOT] IN` - (not) in + * `~*` - case-insensitive like example: = values: type: array items: type: string - example: equinix.fabric.port.status.* - MetricAssetType: + example: ROUTE_TABLE_ENTRY_UPDATE + CloudRouterActionsSearchOrFilter: + type: object + properties: + or: + maxItems: 3 + type: array + items: + $ref: "#/components/schemas/CloudRouterActionsSearchExpression" + CloudRouterActionsSearchSortCriteria: + type: object + properties: + direction: + $ref: "#/components/schemas/CloudRouterActionsSearchSortDirection" + property: + $ref: "#/components/schemas/CloudRouterActionsSearchSortBy" + CloudRouterActionsSearchSortDirection: type: string + description: Sorting direction + default: DESC enum: - - ports - - connections - - metros - Limit_1: - type: integer - description: Pagination limit - example: 20 - default: 20 - GetMetricsByAssetResponse: + - DESC + - ASC + CloudRouterActionsSearchSortBy: + type: string + description: Possible field names to use on sorting + default: /changeLog/updatedDateTime + enum: + - /changeLog/createdDateTime + - /changeLog/updatedDateTime + - /connection/name + - /type + ActionId_1: + type: string + description: Action UUID + format: uuid + example: 457400f8-d360-11e9-bb65-2a2ae2dbcced + GetAllCloudRouterCommands: type: object properties: pagination: $ref: "#/components/schemas/Pagination" data: type: array - description: Data returned from the API call. items: - $ref: "#/components/schemas/Metric" - Value: - type: string - description: Which value to retrieve - example: last - GetMetricsByNameResponse: + $ref: "#/components/schemas/CloudRouterCommand" + description: List of Fabric Cloud Router Command + CloudRouterCommandPostRequest: + required: + - project + - request + - type + type: object + properties: + type: + $ref: "#/components/schemas/CloudRouterCommandType" + name: + type: string + description: Customer-provided Cloud Router Command name + description: + type: string + description: Customer-provided Cloud Router Command description + project: + $ref: "#/components/schemas/Project" + request: + $ref: "#/components/schemas/CloudRouterCommandRequestPayload" + description: Execute Cloud Router Command Request + CloudRouterCommand: type: object properties: - pagination: - $ref: "#/components/schemas/Pagination" - data: - type: array - description: Data returned from the API call. - items: - $ref: "#/components/schemas/Metric" - MetricsSearchRequest: - required: - - filter + href: + type: string + example: https://api.equinix.com//fabric/v4/routers/a1c6b7fd-aead-410a-96b4-b1dfa1071700/commands/1e9414f1-763e-4c0a-86c6-0bc8336048d9 + type: + $ref: "#/components/schemas/CloudRouterCommandType" + uuid: + type: string + format: uuid + example: 557400f8-d360-11e9-bb65-2a2ae2dbcce4 + name: + type: string + description: Customer-provided Cloud Router name + format: string + example: test-fg-1 + description: + type: string + example: description + state: + $ref: "#/components/schemas/CloudRouterCommandState" + project: + $ref: "#/components/schemas/Project" + request: + $ref: "#/components/schemas/CloudRouterCommandRequestResponse" + response: + $ref: "#/components/schemas/CloudRouterCommandResponse" + changeLog: + $ref: "#/components/schemas/Changelog" + description: Get Fabric Cloud Router Command response object + CloudRouterCommandSearchRequest: type: object properties: filter: - $ref: "#/components/schemas/MetricFilters" + $ref: "#/components/schemas/CloudRouterCommandSearchFilters" pagination: $ref: "#/components/schemas/PaginationRequest" + sort: + type: array + items: + $ref: "#/components/schemas/CloudRouterCommandSearchSortCriteria" description: Search requests containing criteria - MetricFilters: + CloudRouterCommandSearchFilters: type: object properties: and: + maxItems: 8 type: array items: - $ref: "#/components/schemas/MetricFilter" - MetricFilter: + $ref: "#/components/schemas/CloudRouterCommandSearchFilter" + CloudRouterCommandSearchFilter: type: object anyOf: - - $ref: "#/components/schemas/MetricSimpleExpression" - MetricSimpleExpression: + - $ref: "#/components/schemas/CloudRouterCommandSearchExpression" + - $ref: "#/components/schemas/CloudRouterCommandSearchOrFilter" + CloudRouterCommandSearchExpression: type: object properties: property: type: string description: | Possible field names to use on filters: - * `/subject` - Metric subject description (required and limited to 1 value) - * `/name` - Metric names (required) - * `/dataPoints/endDateTime` - Time of Metrics - * `/time` - Time of Metrics - * `/interval` - ISO-8601 duration format to specify the interval of metrics data points - * `/value` - specific data points of the metric to return (e.g. 'last' - for metros only) - example: /subject + * `/type` - type of command + * `/name` - name of command + * `/state` - state of command + * `/request/destination` - destination of command request + * `/request/sourceConnection/uuid` - source connection uuid + * `/*` - all-category search + example: /state operator: type: string description: | Possible operators to use on filters: * `=` - equal + * `!=` - not equal * `>` - greater than * `>=` - greater than or equal to * `<` - less than * `<=` - less than or equal to - * `BETWEEN` - between - * `IN` - in + * `[NOT] BETWEEN` - (not) between + * `[NOT] LIKE` - (not) like + * `[NOT] IN` - (not) in + * `~*` - case-insensitive like example: = values: type: array items: type: string - example: equinix.fabric.port.bandwidth_rx.usage - ConnectionPostRequest: - required: - - aSide - - bandwidth - - name - - notifications - - type - - zSide + example: PING_COMMAND + CloudRouterCommandSearchOrFilter: type: object properties: - type: - $ref: "#/components/schemas/ConnectionType" - name: - type: string - description: Customer-provided connection name - order: - $ref: "#/components/schemas/Order" - notifications: - type: array - description: Preferences for notifications on connection configuration or status changes - items: - $ref: "#/components/schemas/SimplifiedNotification" - bandwidth: - maximum: 100000 - minimum: 0 - type: integer - description: Connection bandwidth in Mbps - geoScope: - $ref: "#/components/schemas/GeoScopeType" - redundancy: - $ref: "#/components/schemas/ConnectionRedundancy" - aSide: - $ref: "#/components/schemas/ConnectionSide" - zSide: - $ref: "#/components/schemas/ConnectionSide" - project: - $ref: "#/components/schemas/Project" - additionalInfo: + or: + maxItems: 3 type: array - description: Connection additional information items: - $ref: "#/components/schemas/ConnectionSideAdditionalInfo" - marketplaceSubscription: - $ref: "#/components/schemas/marketplaceSubscription" - endCustomer: - $ref: "#/components/schemas/EndCustomer" - description: Create connection post request - Connection: - required: - - aSide - - bandwidth - - name - - type - - zSide + $ref: "#/components/schemas/CloudRouterCommandSearchExpression" + CloudRouterCommandSearchSortCriteria: type: object properties: - href: - type: string - description: Connection URI - format: uri - readOnly: true - type: - $ref: "#/components/schemas/ConnectionType" - uuid: - type: string - description: Equinix-assigned connection identifier - name: - type: string - description: Customer-provided connection name - description: - type: string - description: Customer-provided connection description - state: - $ref: "#/components/schemas/ConnectionState" - change: - $ref: "#/components/schemas/Change" - operation: - $ref: "#/components/schemas/ConnectionOperation" - order: - $ref: "#/components/schemas/Order" - notifications: - type: array - description: Preferences for notifications on connection configuration or status changes - items: - $ref: "#/components/schemas/SimplifiedNotification" - account: - $ref: "#/components/schemas/SimplifiedAccount" - changeLog: - $ref: "#/components/schemas/Changelog" - bandwidth: - maximum: 10000 - minimum: 0 - type: integer - description: Connection bandwidth in Mbps - geoScope: - $ref: "#/components/schemas/GeoScopeType" - redundancy: - $ref: "#/components/schemas/ConnectionRedundancy" - isRemote: - type: boolean - description: Connection property derived from access point locations direction: - $ref: "#/components/schemas/ConnectionDirection" - aSide: - $ref: "#/components/schemas/ConnectionSide" - zSide: - $ref: "#/components/schemas/ConnectionSide" - marketplaceSubscription: - $ref: "#/components/schemas/marketplaceSubscription" - additionalInfo: - type: array - description: Connection additional information - items: - $ref: "#/components/schemas/ConnectionSideAdditionalInfo" - project: - $ref: "#/components/schemas/Project" - description: Connection specification - ConnectionId: - type: string - description: Connection UUID - example: 557400f8-d360-11e9-bb65-2a2ae2dbcce4 - ConnectionDirection: + $ref: "#/components/schemas/CloudRouterCommandSearchSortDirection" + property: + $ref: "#/components/schemas/CloudRouterCommandSearchSortBy" + CloudRouterCommandSearchSortDirection: type: string - description: Connection directionality from the requester point of view + description: Sorting direction + default: DESC enum: - - INTERNAL - - INCOMING - - OUTGOING - VirtualCircuitId: + - DESC + - ASC + CloudRouterCommandSearchSortBy: type: string - description: Virtual Circuit UUID - ConnectionUpdateRequest: - minItems: 1 - type: array - description: Connection Update Request - items: - $ref: "#/components/schemas/ConnectionChangeOperation" - ConnectionActionRequest: - required: - - type - type: object - properties: - type: - $ref: "#/components/schemas/Actions" - description: - type: string - description: Connection rejection reason detail - data: - $ref: "#/components/schemas/ConnectionAcceptanceData" - description: Connection action request - ConnectionAction: - required: - - data - - href - - type - - uuid + description: Possible field names to use on sorting + default: /changeLog/updatedDateTime + enum: + - /changeLog/createdDateTime + - /changeLog/updatedDateTime + - /name + - /type + CloudRouterCommandSearchResponse: type: object properties: - type: - $ref: "#/components/schemas/Actions" - href: - type: string - description: Connection action URI - format: uri - readOnly: true - uuid: - type: string - description: Equinix-assigned connection identifier - description: - type: string - description: Connection rejection reason detail + pagination: + $ref: "#/components/schemas/Pagination" data: - $ref: "#/components/schemas/ConnectionAcceptanceData" - changeLog: - $ref: "#/components/schemas/Changelog" - description: Connection action - ConnectionRouteSearchRequest: + type: array + description: Data returned from the API call. + items: + $ref: "#/components/schemas/CloudRouterCommand" + CommandId: + type: string + description: Command UUID + format: uuid + example: 37c10edc-ba2e-4240-a850-8a48f9c47d00 + RouteTableEntrySearchRequest: type: object properties: filter: - $ref: "#/components/schemas/ConnectionRouteEntryFilters" + $ref: "#/components/schemas/RouteTableEntryFilters" pagination: $ref: "#/components/schemas/PaginationRequest" sort: type: array items: - $ref: "#/components/schemas/ConnectionRouteSortCriteria" + $ref: "#/components/schemas/RouteTableEntrySortCriteria" description: Search requests containing criteria - ConnectionRouteEntryFilters: + RouteTableEntryFilters: type: object properties: and: maxItems: 8 type: array items: - $ref: "#/components/schemas/ConnectionRouteEntryFilter" - ConnectionRouteEntryFilter: + $ref: "#/components/schemas/RouteTableEntryFilter" + RouteTableEntryFilter: type: object anyOf: - - $ref: "#/components/schemas/ConnectionRouteEntrySimpleExpression" - - $ref: "#/components/schemas/ConnectionRouteEntryOrFilter" - ConnectionRouteEntrySimpleExpression: + - $ref: "#/components/schemas/RouteTableEntrySimpleExpression" + - $ref: "#/components/schemas/RouteTableEntryOrFilter" + RouteTableEntrySimpleExpression: type: object properties: property: @@ -15701,9 +24805,10 @@ components: description: | Possible field names to use on filters: * `/type` - Route table entry type - * `/state` - Route table entry state * `/prefix` - Route table entry prefix * `/nextHop` - Route table entry nextHop + * `/state` - Route table entry state + * `/MED` - Route table entry med * `/*` - all-category search example: /type operator: @@ -15726,41 +24831,41 @@ components: items: type: string example: IPv4_BGP_ROUTE - ConnectionRouteEntryOrFilter: + RouteTableEntryOrFilter: type: object properties: or: maxItems: 3 type: array items: - $ref: "#/components/schemas/ConnectionRouteEntrySimpleExpression" - ConnectionRouteSortCriteria: + $ref: "#/components/schemas/RouteTableEntrySimpleExpression" + RouteTableEntrySortCriteria: type: object properties: direction: - $ref: "#/components/schemas/ConnectionRouteEntrySortDirection" + $ref: "#/components/schemas/RouteTableEntrySortDirection" property: - $ref: "#/components/schemas/ConnectionRouteEntrySortBy" - ConnectionRouteEntrySortDirection: + $ref: "#/components/schemas/RouteTableEntrySortBy" + RouteTableEntrySortDirection: type: string description: Sorting direction + default: DESC enum: - DESC - ASC - default: DESC - ConnectionRouteEntrySortBy: + RouteTableEntrySortBy: type: string description: Possible field names to use on sorting + default: /changeLog/updatedDateTime enum: - /changeLog/createdDateTime - /changeLog/updatedDateTime - - /med - - /connection/name - - /type - /prefix - /nextHop - default: /changeLog/updatedDateTime - ConnectionRouteTableEntrySearchResponse: + - /connection/name + - /type + - /MED + RouteTableEntrySearchResponse: type: object properties: pagination: @@ -15769,675 +24874,552 @@ components: type: array description: Data returned from the API call. items: - $ref: "#/components/schemas/ConnectionRouteTableEntry" - GetResponse: + $ref: "#/components/schemas/RouteTableEntry" + ValidateRequest: + type: object + properties: + filter: + $ref: "#/components/schemas/ValidateRequest_filter" + description: Validate connection auth api key or vlan + ValidateSubnetResponse: + type: object + properties: + additionalInfo: + type: array + description: Additional information + items: + $ref: "#/components/schemas/ConnectionSideAdditionalInfo" + description: ValidateResponse + CloudRouterRouteFiltersSearchBase: type: object properties: + filter: + $ref: "#/components/schemas/CloudRouterRouteFiltersFilter" pagination: $ref: "#/components/schemas/Pagination" - data: + sort: + maxItems: 3 + minItems: 1 type: array - description: List of Routing Protocols items: - $ref: "#/components/schemas/RoutingProtocolData" - RoutingProtocolBase: - required: - - type + $ref: "#/components/schemas/RfAttachmentSortItem" + CloudRouterRouteFiltersFilter: + description: Top-level filter that can be either an AND expression or OR expression + anyOf: + - $ref: "#/components/schemas/CloudRouterRouteFilterAndExpression" + - $ref: "#/components/schemas/CloudRouterRouteFilterOrExpression" + CloudRouterRouteFilterAndExpression: type: object properties: - type: - type: string - description: Routing protocol type - enum: - - BGP - - DIRECT - oneOf: - - $ref: "#/components/schemas/RoutingProtocolBGPType" - - $ref: "#/components/schemas/RoutingProtocolDirectType" - RoutingProtocolBGPType: - required: - - type + and: + maxItems: 8 + minItems: 1 + type: array + items: + $ref: "#/components/schemas/CloudRouterRouteFilterExpression" + description: AND expression containing multiple filter expressions + CloudRouterRouteFilterExpression: + description: Filter expression that can be AND, OR, or a simple expression + anyOf: + - $ref: "#/components/schemas/CloudRouterRouteFilterAndExpression" + - $ref: "#/components/schemas/CloudRouterRouteFilterOrExpression" + - $ref: "#/components/schemas/CloudRouterRouteFilterSimpleExpression" + CloudRouterRouteFilterOrExpression: type: object properties: - type: - type: string - description: Routing protocol type - enum: - - BGP - name: - type: string - example: My-BGP-route-1 - bgpIpv4: - $ref: "#/components/schemas/BGPConnectionIpv4" - bgpIpv6: - $ref: "#/components/schemas/BGPConnectionIpv6" - customerAsn: - type: integer - description: Customer asn - format: int64 - bgpAuthKey: - type: string - description: BGP authorization key - asOverrideEnabled: - type: boolean - description: Enable AS number override - bfd: - $ref: "#/components/schemas/RoutingProtocolBFD" - RoutingProtocolDirectType: - required: - - type + or: + maxItems: 8 + minItems: 1 + type: array + items: + $ref: "#/components/schemas/CloudRouterRouteFilterExpression" + description: OR expression containing multiple filter expressions + CloudRouterRouteFilterSimpleExpression: type: object properties: - type: + property: type: string - description: Routing protocol type enum: - - DIRECT - name: + - /type + - /direction + - /attachmentStatus + - /changeLog/createdDateTime + - /changeLog/updatedDateTime + operator: type: string - example: My-direct-route-1 - directIpv4: - $ref: "#/components/schemas/DirectConnectionIpv4" - directIpv6: - $ref: "#/components/schemas/DirectConnectionIpv6" - RoutingProtocolData: + values: + maxItems: 8 + minItems: 1 + type: array + items: + type: string + RfAttachmentSortItem: type: object properties: - type: + property: type: string - description: Routing protocol type + description: Possible field names to use on sorting + default: /changeLog/updatedDateTime enum: - - BGP - - DIRECT - oneOf: - - $ref: "#/components/schemas/RoutingProtocolBGPData" - - $ref: "#/components/schemas/RoutingProtocolDirectData" - ConnectionRoutingProtocolPostRequest: + - /type + - /uuid + - /direction + - /attachmentStatus + - /changeLog/createdDateTime + - /changeLog/updatedDateTime + direction: + type: string + description: Sorting direction + default: DESC + enum: + - DESC + - ASC + CloudRouterRouteFiltersSearchResponse: type: object properties: + pagination: + $ref: "#/components/schemas/Pagination" data: type: array - description: Connection routing protocol configuration + description: List of route filter attachments for a given cloud router items: - $ref: "#/components/schemas/RoutingProtocolBase" - description: Create connection routing protocolpost request - RoutingProtocolId: - type: string - description: Routing Protocol UUID - format: uuid - example: 557400f8-d360-11e9-bb65-2a2ae2dbcce4 - ConnectionRoutingProtocolPatchRequest: - minItems: 1 - type: array - description: Patch connection routing protocol request - items: - $ref: "#/components/schemas/ConnectionChangeOperation" - BGPActionsBulkData: + $ref: "#/components/schemas/ConnectionRouteFilterData" + CloudRouterRouteAggregationsSearchBase: type: object properties: + filter: + $ref: "#/components/schemas/CloudRouterRouteAggregationsFilter" pagination: $ref: "#/components/schemas/Pagination" - data: + sort: + maxItems: 3 + minItems: 1 + type: array + items: + $ref: "#/components/schemas/RaAttachmentSortItem" + CloudRouterRouteAggregationsFilter: + description: Top-level filter that can be either an AND expression or OR expression + anyOf: + - $ref: "#/components/schemas/CloudRouterRouteAggregationAndExpression" + - $ref: "#/components/schemas/CloudRouterRouteAggregationOrExpression" + CloudRouterRouteAggregationAndExpression: + type: object + properties: + and: + maxItems: 8 + minItems: 1 type: array items: - $ref: "#/components/schemas/BGPActionData" - description: List of BGP Actions - BGPActionRequest: - required: - - type + $ref: "#/components/schemas/CloudRouterRouteAggregationExpression" + description: AND expression containing multiple filter expressions + CloudRouterRouteAggregationExpression: + description: Filter expression that can be AND, OR, or a simple expression + anyOf: + - $ref: "#/components/schemas/CloudRouterRouteAggregationAndExpression" + - $ref: "#/components/schemas/CloudRouterRouteAggregationOrExpression" + - $ref: "#/components/schemas/CloudRouterRouteAggregationSimpleExpression" + CloudRouterRouteAggregationOrExpression: type: object properties: - type: - $ref: "#/components/schemas/BGPActions" - description: BGP action request - BGPActionData: + or: + maxItems: 8 + minItems: 1 + type: array + items: + $ref: "#/components/schemas/CloudRouterRouteAggregationExpression" + description: OR expression containing multiple filter expressions + CloudRouterRouteAggregationSimpleExpression: type: object properties: - href: - type: string - description: Routing Protocol URI - format: uri - example: https://api.equinix.com/fabric/v4/connections/81331c52-04c0-4656-a4a7-18c52669348f/routingProtocols/69762051-85ed-4d13-b6b4-e32e93c672b5/actions - uuid: + property: type: string - description: Routing protocol identifier - format: uuid - example: c9b8e7a2-f3b1-4576-a4a9-1366a63df170 - type: - $ref: "#/components/schemas/BGPActions" - description: + enum: + - /type + - /attachmentStatus + - /changeLog/createdDateTime + - /changeLog/updatedDateTime + operator: type: string - description: BGP action description - state: - $ref: "#/components/schemas/BGPActionStates" - changelog: - $ref: "#/components/schemas/Changelog" - ActionId: - type: string - description: BGP Action UUID - format: uuid - example: 86534014-34b4-53f6-45d6-4b94a92d8623 - ChangeId: - type: string - description: Routing Protocol Change UUID - format: uuid - example: 6d500177-9404-41f2-99e8-2bf1a84d8db5 - RoutingProtocolChangeData: + values: + type: array + items: + type: string + RaAttachmentSortItem: type: object properties: - status: + property: type: string - description: Current outcome of the change flow + description: Possible field names to use on sorting + default: /changeLog/updatedDateTime enum: - - COMPLETED - - FAILED - - REQUESTED - createdBy: - type: string - description: Created by User Key - createdDateTime: - type: string - description: Set when change flow starts - format: date-time - updatedBy: - type: string - description: Updated by User Key - updatedDateTime: - type: string - description: Set when change object is updated - format: date-time - information: + - /type + - /uuid + - /attachmentStatus + - /changeLog/createdDateTime + - /changeLog/updatedDateTime + direction: type: string - description: Additional information - data: - $ref: "#/components/schemas/RoutingProtocolChangeOperation" - description: Current state of latest Routing Protocol change - allOf: - - $ref: "#/components/schemas/RoutingProtocolChange" - RoutingProtocolChangeDataResponse: + description: Sorting direction + default: DESC + enum: + - DESC + - ASC + CloudRouterRouteAggregationsSearchResponse: type: object properties: pagination: $ref: "#/components/schemas/Pagination" data: type: array + description: List of route aggregation attachments for a given cloud router items: - $ref: "#/components/schemas/RoutingProtocolChangeData" - description: List of network changes - InternetAccessPostRequest: - required: - - account - - billing - - name - - project - - routingProtocol - - type - type: object - properties: - type: - $ref: "#/components/schemas/InternetAccessServiceType" - name: - type: string - description: The name of the EIA Service - bandwidth: - type: integer - description: Bandwidth of the service - bandwidthCommit: - type: integer - description: Minimum bandwidth commit for burst billing variant of the service - routingProtocol: - $ref: "#/components/schemas/InternetAccessRoutingProtocolRequest" - order: - $ref: "#/components/schemas/InternetAccessOrderRequest" - billing: - $ref: "#/components/schemas/InternetAccessPostRequest_billing" - project: - $ref: "#/components/schemas/Project" - account: - $ref: "#/components/schemas/InternetAccessAccount" - InternetAccessRoutingProtocolRequest: - required: - - customerRoutes - - type + $ref: "#/components/schemas/ConnectionRouteAggregationData" + CloudRouterSearchRequest: type: object properties: - type: - $ref: "#/components/schemas/InternetAccessRoutingProtocolType" - customerRoutes: - maxItems: 100 - minItems: 1 + filter: + $ref: "#/components/schemas/CloudRouterFilters" + pagination: + $ref: "#/components/schemas/PaginationRequest" + sort: type: array items: - $ref: "#/components/schemas/InternetAccessCustomerRouteRequest" - discriminator: - propertyName: type - mapping: - BGP: "#/components/schemas/InternetAccessRoutingProtocolBgpRequest" - DIRECT: "#/components/schemas/InternetAccessRoutingProtocolDirectRequest" - STATIC: "#/components/schemas/InternetAccessRoutingProtocolStaticRequest" - InternetAccessCustomerRouteRequest: - required: - - ipBlock + $ref: "#/components/schemas/CloudRouterSortCriteria" + description: Search requests containing criteria + CloudRouterFilters: type: object properties: - ipBlock: - $ref: "#/components/schemas/InternetAccessIpBlockRequest" - InternetAccessIpBlockRequest: - required: - - uuid + and: + maxItems: 8 + type: array + items: + $ref: "#/components/schemas/CloudRouterFilter" + CloudRouterFilter: type: object - properties: - uuid: - type: string - description: Unique identifier for the IP Block - format: uuid - InternetAccessRoutingProtocolBgpRequest: - allOf: - - $ref: "#/components/schemas/InternetAccessRoutingProtocolRequest" - - required: - - connections - - exportPolicy - type: object - properties: - connections: - maxItems: 2 - minItems: 1 - type: array - items: - $ref: "#/components/schemas/InternetAccessConnectionBgpRequest" - exportPolicy: - $ref: "#/components/schemas/InternetAccessExportPolicy" - customerAsn: - type: integer - description: Customer ASN. Valid range is 1-64495 or 65536-4199999999. - format: int64 - example: 16220 - bgpAuthKey: - type: string - description: BGP authentication key - example: SecretKey - customerAsnRange: - $ref: "#/components/schemas/InternetAccessCustomerAsnRange" - InternetAccessConnectionBgpRequest: - required: - - uuid + anyOf: + - $ref: "#/components/schemas/CloudRouterSimpleExpression" + - $ref: "#/components/schemas/CloudRouterOrFilter" + CloudRouterSimpleExpression: type: object properties: - uuid: + property: type: string - description: Unique identifier for the connection - format: uuid - InternetAccessRoutingProtocolDirectRequest: - allOf: - - $ref: "#/components/schemas/InternetAccessRoutingProtocolRequest" - - required: - - connections - type: object - properties: - connections: - maxItems: 2 - minItems: 1 - type: array - items: - $ref: "#/components/schemas/InternetAccessConnectionDirectRequest" - InternetAccessConnectionDirectRequest: - required: - - uuid - type: object - properties: - uuid: + description: | + Possible field names to use on filters: + * `/project/projectId` - project id (mandatory) + * `/name` - Fabric Cloud Router name + * `/uuid` - Fabric Cloud Router uuid + * `/state` - Fabric Cloud Router status + * `/location/metroCode` - Fabric Cloud Router metro code + * `/location/metroName` - Fabric Cloud Router metro name + * `/package/code` - Fabric Cloud Router package + * `/type` - Fabric Cloud Router type + * `/connectionsCount` - Fabric Cloud Router attached connections count + * `/changeLog/createdDateTime` - Fabric Cloud Router creation timestamp + * `/changeLog/updatedDateTime` - Fabric Cloud Router last updated timestamp + * `/changeLog/deletedDateTime` - Fabric Cloud Router deletion timestamp + * `/*` - all-category search + example: /name + operator: type: string - description: Unique identifier for the connection - format: uuid - peeringIpv4: - $ref: "#/components/schemas/InternetAccessPeeringIpv4Request" - peeringIpv6: - $ref: "#/components/schemas/InternetAccessPeeringIpv6Request" - InternetAccessPeeringIpv4Request: + description: | + Possible operators to use on filters: + * `=` - equal + * `!=` - not equal + * `>` - greater than + * `>=` - greater than or equal to + * `<` - less than + * `<=` - less than or equal to + * `[NOT] BETWEEN` - (not) between + * `[NOT] LIKE` - (not) like + * `[NOT] IN` - (not) in + * `ILIKE` - case-insensitive like + example: = + values: + type: array + items: + type: string + example: FabricCloudRouter-1 + CloudRouterOrFilter: type: object properties: - equinixPeerIp: - pattern: ^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$ - type: string - description: IPv4 address of the Equinix peering IP - equinixVrrpIp: - pattern: ^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$ - type: string - description: IPv4 address for Equinix VRRP IP - InternetAccessPeeringIpv6Request: + or: + maxItems: 3 + type: array + items: + $ref: "#/components/schemas/CloudRouterSimpleExpression" + CloudRouterSortCriteria: type: object properties: - equinixPeerIp: - pattern: ^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$ - type: string - description: IPv6 address of the Equinix peering IP - equinixVrrpIp: - pattern: ^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$ - type: string - description: IPv6 address for Equinix VRRP IP - InternetAccessRoutingProtocolStaticRequest: - allOf: - - $ref: "#/components/schemas/InternetAccessRoutingProtocolRequest" - - required: - - connections - type: object - properties: - connections: - maxItems: 2 - minItems: 1 - type: array - items: - $ref: "#/components/schemas/InternetAccessConnectionStaticRequest" - InternetAccessConnectionStaticRequest: - required: - - uuid + direction: + $ref: "#/components/schemas/CloudRouterSortDirection" + property: + $ref: "#/components/schemas/CloudRouterSortBy" + CloudRouterSortDirection: + type: string + description: Sorting direction + default: DESC + enum: + - DESC + - ASC + CloudRouterSortBy: + type: string + description: Possible field names to use on sorting + default: /changeLog/updatedDateTime + enum: + - /name + - /uuid + - /state + - /location/metroCode + - /location/metroName + - /package/code + - /type + - /connectionsCount + - /changeLog/createdDateTime + - /changeLog/updatedDateTime + - /changeLog/deletedDateTime + - /order/termLength + SearchResponse: type: object properties: - uuid: - type: string - description: Unique identifier for the connection - format: uuid - InternetAccessOrderRequest: + pagination: + $ref: "#/components/schemas/Pagination" + data: + type: array + description: Data returned from the API call. + items: + $ref: "#/components/schemas/CloudRouterReadResponse" + PackageResponse: type: object properties: - purchaseOrderNumber: - type: string - description: Purchase order number - nullable: true - orderNumber: - type: string - description: Order Number - nullable: true - orderLine: - type: string - description: Order Line Number - nullable: true - InternetAccessService: - required: - - account - - billing - - change - - changeLog - - href - - name - - order - - project - - routingProtocol - - state - - type - - useCase - - uuid + pagination: + $ref: "#/components/schemas/Pagination" + data: + type: array + description: Data returned from the API call. + items: + $ref: "#/components/schemas/CloudRouterPackage" + RouterPackageCode: + type: string + description: Router package code + enum: + - LAB + - BASIC + - STANDARD + - ADVANCED + - PREMIUM + CloudRouterPackage: type: object properties: href: type: string - description: Service URL path + description: Cloud Router package URI format: uri - example: https://api.equinix.com/fabric/v4/internetAccessServices/673c6e6c-2c36-4488-b3f1-47064357b5b4 + readOnly: true + example: https://api.equinix.com/fabric/v4/routerPackages/LAB type: - $ref: "#/components/schemas/InternetAccessServiceType" - uuid: type: string - description: Unique identifier for the EIA Service - format: uuid - name: + description: Type of Router package + example: ROUTER_PACKAGE + enum: + - ROUTER_PACKAGE + code: + $ref: "#/components/schemas/code" + description: type: string - description: The name of the EIA Service - bandwidth: + description: Fabric Cloud Router Package description + totalIPv4RoutesMax: + minimum: 0 type: integer - description: Bandwidth of the service - bandwidthCommit: + description: Cloud Router package BGP IPv4 routes limit + example: 50 + totalIPv6RoutesMax: + minimum: 0 type: integer - description: Minimum bandwidth commit for burst billing variant of the service - state: - $ref: "#/components/schemas/InternetAccessServiceState" - change: - $ref: "#/components/schemas/InternetAccessChange" - locations: - type: array - description: List of locations associated with the service - items: - $ref: "#/components/schemas/InternetAccessLocation" - routingProtocol: - $ref: "#/components/schemas/InternetAccessRoutingProtocol" - billing: - $ref: "#/components/schemas/InternetAccessBilling" - account: - $ref: "#/components/schemas/InternetAccessAccount" - project: - $ref: "#/components/schemas/Project" - order: - $ref: "#/components/schemas/InternetAccessOrder" + description: Cloud Router package BGP IPv6 routes limit + example: 50 + routeFilterSupported: + type: boolean + description: CloudRouter package route filter support + vcCountMax: + minimum: 0 + type: integer + description: CloudRouter package Max Connection limit + example: 10 + crCountMax: + minimum: 0 + type: integer + description: CloudRouter package Max CloudRouter limit + example: 3 + vcBandwidthMax: + minimum: 0 + type: integer + description: CloudRouter package Max Bandwidth limit + example: 50 changeLog: - $ref: "#/components/schemas/Changelog" - useCase: - $ref: "#/components/schemas/InternetAccessUseCase" - InternetAccessServiceType: - type: string - description: Type of the service, either single or dual internet access - enum: - - SINGLE_IA - - DUAL_IA - x-enum-varnames: - - SINGLE_IA - - DUAL_IA - InternetAccessServiceState: - type: string - description: Current state of the service - enum: - - PROVISIONING - - PROVISIONED - - FAILED - - DEPROVISIONING - - DEPROVISIONED - x-enum-varnames: - - PROVISIONING - - PROVISIONED - - FAILED - - DEPROVISIONING - - DEPROVISIONED - InternetAccessSearchRequest: + $ref: "#/components/schemas/PackageChangeLog" + description: Fabric Cloud Router Package + HealthResponse: type: object properties: - pagination: - $ref: "#/components/schemas/PaginationRequest" - filter: - $ref: "#/components/schemas/SearchExpression" - sort: - $ref: "#/components/schemas/SearchSort" - InternetAccessServices: - required: - - data - - pagination - - sort + href: + type: string + description: The Canonical URL at which the resource resides. + version: + type: string + description: Indicator of a version + release: + type: string + description: release details. + state: + type: string + description: status of a service + apiServices: + $ref: "#/components/schemas/ApiServices" + description: GET Services Health + ConnectionResponse: type: object properties: - pagination: - $ref: "#/components/schemas/Pagination" - sort: - $ref: "#/components/schemas/SearchSort" + additionalInfo: + type: array + description: Additional information + items: + $ref: "#/components/schemas/ConnectionSideAdditionalInfo" data: type: array + description: Connection response data items: - $ref: "#/components/schemas/InternetAccessService" - InternetAccessPatchRequest: - maxItems: 100 - minItems: 1 - type: array - description: Only one replace operation allowed for '/bandwidth' path. - items: - $ref: "#/components/schemas/InternetAccessPatchOperationUpdate" - InternetAccessPatchOperationUpdate: + $ref: "#/components/schemas/ValidateConnectionResponse" + description: ValidateResponse + Pagination: required: - - op - - path + - limit + - total type: object properties: - op: - $ref: "#/components/schemas/InternetAccessPatchOperationUpdateAllowedOp" - path: - $ref: "#/components/schemas/InternetAccessPatchOperationUpdateAllowedPath" - value: - description: New value for updated parameter. Required for add and replace. - InternetAccessPatchOperationUpdateAllowedOp: - type: string - description: Allowed patch operations. - enum: - - replace - - add - - remove - InternetAccessPatchOperationUpdateAllowedPath: - pattern: ^(\/bandwidth|\/bandwidthCommit|\/routingProtocol\/customerRoutes(?:\[@\.ipBlock\.uuid=[A-Fa-f0-9-]+\])?|\/order\/purchaseOrderNumber)$ - type: string - description: Allowed patch paths for Internet Access update. - example: /bandwidth - SubmitIpBlockRequestBody: + offset: + minimum: 0 + type: integer + description: Index of the first item returned in the response. The default is 0. + default: 0 + limit: + minimum: 0 + type: integer + description: Maximum number of search results returned per page. Number must be between 1 and 100, and the default is 20. + default: 20 + total: + minimum: 0 + type: integer + description: Total number of elements returned. + next: + type: string + description: URL relative to the next item in the response. + previous: + type: string + description: URL relative to the previous item in the response. + description: Pagination response information + NetworkPostRequest: required: - - project + - name + - notifications + - scope - type type: object properties: - location: - $ref: "#/components/schemas/IpBlockLocation" type: - $ref: "#/components/schemas/TypeOfIpBlockProduct" - project: - $ref: "#/components/schemas/IpBlockProjectRequest" - account: - $ref: "#/components/schemas/IpBlockAccount" - order: - $ref: "#/components/schemas/IpBlockOrderRequest" - regulations: - $ref: "#/components/schemas/IpBlockRegulations" - prefixLength: - $ref: "#/components/schemas/IpBlockPrefixLength" - prefix: - $ref: "#/components/schemas/IpBlockPrefix" - IpBlock: - required: - - changeLog - - href - - ownership - - prefixLength - - project - - state - - type - - uuid - type: object - properties: - uuid: - type: string - description: Unique identifier for the Ip Block - format: uuid - href: + $ref: "#/components/schemas/NetworkType" + name: type: string - description: Resource URL path for the Ip Block - example: /fabric/v4/ipBlocks/31fbdb3f-8def-410d-868b-ef920878affb - type: - $ref: "#/components/schemas/TypeOfIpBlockProduct" - state: - $ref: "#/components/schemas/IpBlockState" - ownership: - $ref: "#/components/schemas/IpBlockOwnership" + description: Customer-provided network name + scope: + $ref: "#/components/schemas/NetworkScope" location: - $ref: "#/components/schemas/IpBlockLocation" - prefixLength: - $ref: "#/components/schemas/IpBlockPrefixLength" - prefix: - $ref: "#/components/schemas/IpBlockPrefix" - order: - $ref: "#/components/schemas/IpBlockOrderResponse" - account: - $ref: "#/components/schemas/IpBlockAccount" + $ref: "#/components/schemas/SimplifiedLocation" project: - $ref: "#/components/schemas/IpBlockProject" - regulations: - $ref: "#/components/schemas/IpBlockRegulations" - assets: + $ref: "#/components/schemas/Project" + notifications: type: array - description: Products using this Ip Block + description: Preferences for notifications on network configuration or status changes items: - $ref: "#/components/schemas/IpBlockAsset" - change: - $ref: "#/components/schemas/IpBlockChange" - changeLog: - $ref: "#/components/schemas/IpBlockChangeLog" - error: - $ref: "#/components/schemas/Error" - PatchIpBlockRequestBody: - maxItems: 1 + $ref: "#/components/schemas/SimplifiedNotification" + description: Create Network + Network: + type: object + description: Network specification + allOf: + - required: + - changeLog + - href + - state + - uuid + type: object + properties: + href: + type: string + description: Network URI + format: uri + readOnly: true + example: https://api.equinix.com/fabric/v4/networks/92dc376a-a932-43aa-a6a2-c806dedbd784 + uuid: + type: string + description: Equinix-assigned network identifier + format: uuid + example: 92dc376a-a932-43aa-a6a2-c806dedbd784 + state: + $ref: "#/components/schemas/NetworkState" + connectionsCount: + type: number + description: number of connections created on the network + account: + $ref: "#/components/schemas/SimplifiedAccount" + change: + $ref: "#/components/schemas/SimplifiedNetworkChange" + operation: + $ref: "#/components/schemas/NetworkOperation" + changeLog: + $ref: "#/components/schemas/Changelog" + links: + type: array + description: Network sub-resources links + readOnly: true + items: + $ref: "#/components/schemas/Link" + - $ref: "#/components/schemas/NetworkPostRequest" + NetworkId: + type: string + description: Network UUID + format: uuid + example: 557400f8-d360-11e9-bb65-2a2ae2dbcce4 + NetworkUpdateRequest: minItems: 1 type: array + description: Fabric Network Update Request items: - $ref: "#/components/schemas/PatchIpBlockRequestBodyItem" - IpBlocksSearchRequestBody: - properties: - pagination: - $ref: "#/components/schemas/PaginationRequest" - filter: - $ref: "#/components/schemas/IpBlockFilter" - sort: - $ref: "#/components/schemas/SearchSort" - IpBlockFilter: - type: object - properties: - and: - type: array - items: - $ref: "#/components/schemas/IpBlockAndQuery" - IpBlockAndQuery: - required: - - operator - - property - - values - type: object - properties: - property: - type: string - operator: - type: string - enum: - - = - values: - type: array - items: - type: string - IpBlockSearchResponseBody: - required: - - data - - pagination - properties: - pagination: - $ref: "#/components/schemas/Pagination" - sort: - $ref: "#/components/schemas/SearchSort" - data: - type: array - items: - $ref: "#/components/schemas/IpBlock" - SearchRequest: + $ref: "#/components/schemas/NetworkChangeOperation" + NetworkSearchRequest: type: object properties: filter: - $ref: "#/components/schemas/Expression" + $ref: "#/components/schemas/NetworkFilter" pagination: $ref: "#/components/schemas/PaginationRequest" sort: type: array items: - $ref: "#/components/schemas/SortCriteria" + $ref: "#/components/schemas/NetworkSortCriteria" description: Search requests containing criteria - Expression: + NetworkFilter: type: object properties: and: - $ref: "#/components/schemas/Expressions" + $ref: "#/components/schemas/NetworkSimpleExpression" or: - $ref: "#/components/schemas/Expressions" + $ref: "#/components/schemas/NetworkSimpleExpression" property: - $ref: "#/components/schemas/SearchFieldName" + $ref: "#/components/schemas/NetworkSearchFieldName" operator: type: string + example: = enum: - = - "!=" @@ -16445,83 +25427,71 @@ components: - ">=" - < - <= + - BETWEEN + - NOT BETWEEN - LIKE - - ILKE - - IS NOT NULL - - IS NULL + - NOT LIKE + - ILIKE + - NOT ILIKE - IN - - BETWEEN + - NOT IN values: type: array items: type: string - Expressions: + example: Network-1 + NetworkSimpleExpression: type: array items: - $ref: "#/components/schemas/Expression" - SearchFieldName: + $ref: "#/components/schemas/NetworkFilter" + NetworkSearchFieldName: type: string description: Possible field names to use on filters + example: /name enum: - - /isRemote - /name - /uuid + - /scope - /type - - /geoScope + - /state + - /operation/equinixStatus + - /location/region + - /location/metroCode + - /connectionsCount + - /project/projectId + - /account/globalCustId - /account/orgId - - /aSide/accessPoint/account/accountName - - /aSide/accessPoint/account/accountNumber - - /aSide/accessPoint/router/uuid - - /aSide/accessPoint/linkProtocol/vlanTagMin - - /aSide/accessPoint/linkProtocol/vlanTagMax - - /aSide/accessPoint/location/metroCode - - /aSide/accessPoint/location/metroName - - /aSide/accessPoint/name - - /aSide/accessPoint/port/uuid - - /aSide/accessPoint/port/name - - /aSide/accessPoint/type - - /aSide/accessPoint/virtualDevice/name - - /aSide/accessPoint/virtualDevice/uuid - - /aSide/serviceToken/uuid - - /bandwidth - - /change/status - - /changeLog/createdBy - /changeLog/createdDateTime - - /changeLog/deletedBy + - /changeLog/updatedDateTime - /changeLog/deletedDateTime - - /changeLog/lastUpdatedBy - - /operation/equinixStatus - - /operation/providerStatus - - /project/projectId - - /redundancy/group - - /redundancy/priority - - /zSide/accessPoint/account/accountName - - /zSide/accessPoint/authenticationKey - - /zSide/accessPoint/linkProtocol/vlanTagMin - - /zSide/accessPoint/linkProtocol/vlanTagMax - - /zSide/accessPoint/location/metroCode - - /zSide/accessPoint/location/metroName - - /zSide/accessPoint/sellerRegion - - /zSide/accessPoint/name - - /zSide/accessPoint/port/uuid - - /zSide/accessPoint/network/uuid - - /zSide/accessPoint/port/name - - /zSide/accessPoint/profile/uuid - - /zSide/accessPoint/type - - /zSide/accessPoint/role - - /zSide/accessPoint/virtualDevice/name - - /zSide/accessPoint/virtualDevice/uuid - - /zSide/serviceToken/uuid - - /zSide/internetAccess/uuid - - /state - SortCriteria: + - /* + NetworkSortCriteria: type: object properties: direction: - $ref: "#/components/schemas/SortDirection" + $ref: "#/components/schemas/NetworkSortDirection" property: - $ref: "#/components/schemas/SortBy" - ConnectionSearchResponse: + $ref: "#/components/schemas/NetworkSortBy" + NetworkSortDirection: + type: string + description: Sorting direction + default: DESC + enum: + - DESC + - ASC + NetworkSortBy: + type: string + description: Possible field names to use on sorting + default: /changeLog/updatedDateTime + enum: + - /name + - /uuid + - /scope + - /operation/equinixStatus + - /location/region + - /changeLog/createdDateTime + - /changeLog/updatedDateTime + NetworkSearchResponse: type: object properties: pagination: @@ -16529,3061 +25499,2810 @@ components: sort: type: array items: - $ref: "#/components/schemas/SortCriteriaResponse" - data: - type: array - items: - $ref: "#/components/schemas/Connection" - description: List of connections - FilterBody: - type: object - properties: - filter: - $ref: "#/components/schemas/SearchExpression" - description: Search requests containing criteria - SearchExpression: - type: object - properties: - and: - $ref: "#/components/schemas/SearchExpressions" - or: - $ref: "#/components/schemas/SearchExpressions" - property: - type: string - operator: - type: string - enum: - - = - - "!=" - - ">" - - ">=" - - < - - <= - - BETWEEN - - NOT BETWEEN - - LIKE - - NOT LIKE - - IN - - NOT IN - - IS NOT NULL - - IS NULL - values: - type: array - items: - type: string - SearchExpressions: - type: array - items: - $ref: "#/components/schemas/SearchExpression" - PriceSearchResponse: - type: object - properties: + $ref: "#/components/schemas/NetworkSortCriteriaResponse" data: type: array items: - $ref: "#/components/schemas/Price" - pagination: - $ref: "#/components/schemas/Pagination" - PriceErrorList: - type: array - items: - $ref: "#/components/schemas/PriceError" - PriceError: - required: - - errorCode - - errorMessage - type: object - properties: - errorCode: - type: string - enum: - - EQ-3038010 - - EQ-3038022 - - EQ-3038030 - errorMessage: - type: string - enum: - - Validation failure - - Invalid value - - Internal Server Error - correlationId: - type: string - details: - type: string - help: - type: string - additionalInfo: - type: array - items: - $ref: "#/components/schemas/PriceError_additionalInfo" - description: Error with details - discriminator: - propertyName: errorCode - PortUUID: - type: string - description: Port UUID - format: uuid - Statistics: - type: object - properties: - startDateTime: - type: string - description: Start and duration of the statistical analysis interval. - format: date-time - example: 2020-11-06T07:00:00Z - endDateTime: - type: string - description: End and duration of the statistical analysis interval. - format: date-time - example: 2020-11-06T07:00:00Z - viewPoint: - type: string - description: Point of view for connection metrics - aSide or zSide - enum: - - aSide - - zSide - bandwidthUtilization: - $ref: "#/components/schemas/BandwidthUtilization" - description: This API provides service-level traffic metrics so that you can view access and gather key information required to manage service subscription sizing and capacity. - BandwidthUtilization: + $ref: "#/components/schemas/Network" + description: List of networks + NetworkConnections: type: object properties: - unit: - type: string - description: Aggregated data transfer capacity. Possible values- Mbps, megabits (1 million bits) per second; Gbps, gigabits (1 billion bits) per second. - enum: - - Mbps - metricInterval: - type: string - description: An interval formatted value, indicating the time-interval the metric objects within the response represent - inbound: - $ref: "#/components/schemas/Direction" - outbound: - $ref: "#/components/schemas/Direction" - description: Bandwidth utilization statistics (octet counters-based) - Direction: + pagination: + $ref: "#/components/schemas/Pagination" + data: + type: array + items: + $ref: "#/components/schemas/Connection" + description: List of network changes + NetworkChangeResponse: type: object properties: - max: - type: number - description: Max bandwidth within request time range, represented in units specified by response "units" field - format: float - mean: - type: number - description: Mean bandwidth within request time range, represented in units specified by response "units" field - format: float - metrics: + pagination: + $ref: "#/components/schemas/Pagination" + data: type: array - description: Bandwidth utilization statistics for a specified interval. items: - $ref: "#/components/schemas/Metrics" - description: Directional statistics - Metrics: + $ref: "#/components/schemas/NetworkChange" + description: List of network changes + ChangeId_5: + type: string + description: Network Change UUID + format: uuid + example: 6d500177-9404-41f2-99e8-2bf1a84d8db5 + NetworkChange: type: object properties: - intervalEndTimestamp: + href: type: string - description: Interval end timestamp + description: Network URI + format: uri + readOnly: true + example: https://api.equinix.com/fabric/v4/networks/2a4fb415-5a7f-436f-bae6-02f5e403deec/changes/4b17da68-3d6b-436d-9c8f-2105f3b950d9 + uuid: + type: string + description: Uniquely identifies a change + format: uuid + example: 4b17da68-3d6b-436d-9c8f-2105f3b950d9 + type: + $ref: "#/components/schemas/NetworkChangeType" + status: + $ref: "#/components/schemas/NetworkChangeStatus" + createdDateTime: + type: string + description: Set when change flow starts + format: date-time + example: 2020-11-06T07:00:00Z + updatedDateTime: + type: string + description: Set when change object is updated format: date-time example: 2020-11-06T07:00:00Z - max: - type: number - description: Max bandwidth within statistics object time interval, represented in units specified by response "units" field - format: float - mean: - type: number - description: Mean bandwidth within statistics object time interval, represented in units specified by response "units" field - format: float - description: Bandwidth utilization statistics for a specified interval. - viewPoint: - type: string - description: viewPoint - enum: - - aSide - - zSide - ServiceProfiles: - type: object - properties: data: type: array items: - $ref: "#/components/schemas/ServiceProfile" - pagination: - $ref: "#/components/schemas/Pagination" - description: Service Profiles - ServiceProfileRequest: + $ref: "#/components/schemas/NetworkChangeOperation" + description: Current state of latest network change + precisionTimeServiceRequest: + title: precisionTimeServiceRequest required: - - description + - connections + - ipv4 - name + - package - type type: object properties: + type: + type: string + description: Precision Time Service Type refers to the corresponding Protocol. + enum: + - NTP + - PTP + name: + type: string + description: Precision Time Service name. + package: + $ref: "#/components/schemas/precisionTimePackageRequest" + connections: + type: array + items: + $ref: "#/components/schemas/virtualConnectionUuid" + ipv4: + $ref: "#/components/schemas/ipv4" + ntpAdvancedConfiguration: + $ref: "#/components/schemas/ntpAdvanceConfiguration" + ptpAdvancedConfiguration: + $ref: "#/components/schemas/ptpAdvanceConfiguration" project: $ref: "#/components/schemas/Project" - description: | - Service Profile is a software definition for a named provider service and it's network connectivity requirements. - This includes the basic marketing information and one - or more sets of access points (a set per each access point type) fulfilling the provider service. - allOf: - - $ref: "#/components/schemas/SimplifiedServiceProfile" - SimplifiedServiceProfile: + order: + $ref: "#/components/schemas/precisionTimeOrder" + description: Create Precision Time Service Request Schema. + precisionTimeServiceResponse: + title: precisionTimeServiceResponse + required: + - href + - package + - state + - type + - uuid type: object properties: href: type: string - description: Service Profile URI response attribute + description: Precision Time Service URI. format: uri - readOnly: true type: - $ref: "#/components/schemas/ServiceProfileTypeEnum" + type: string + description: Precision Time Service type refers to the corresponding protocol. + enum: + - NTP + - PTP name: - maxLength: 50 type: string - description: Customer-assigned service profile name - example: Sample Service Profile + description: Precision Time Service Name. uuid: type: string - description: Equinix-assigned service profile identifier + description: Precision Time Service UUID. format: uuid - description: + state: type: string - description: User-provided service description should be of maximum length 375 - example: offering connectivity to my-network - notifications: - type: array - description: Recipients of notifications on service profile change - items: - $ref: "#/components/schemas/SimplifiedNotification" - tags: - $ref: "#/components/schemas/Tags" - visibility: - $ref: "#/components/schemas/ServiceProfileVisibilityEnum" - allowedEmails: - type: array - items: - type: string - format: email - accessPointTypeConfigs: + description: Precision Time Service Status. + enum: + - CANCELLED + - CANCELLING + - CONFIGURING + - CONFIGURING_FAILED + - DRAFT + - DEPROVISIONING + - DEPROVISIONING_FAILED + - DEPROVISIONED + - PROVISIONED + - PROVISIONING + - PROVISIONING_FAILED + - REPROVISIONING + - REPROVISIONING_FAILED + operation: + $ref: "#/components/schemas/timeServiceOperation" + package: + $ref: "#/components/schemas/precisionTimePackagePostResponse" + connections: + maxItems: 2 minItems: 1 + uniqueItems: true type: array + description: Fabric Connections associated with Precision Time Service. items: - $ref: "#/components/schemas/ServiceProfileAccessPointType" - customFields: - type: array - items: - $ref: "#/components/schemas/CustomField" - marketingInfo: - $ref: "#/components/schemas/MarketingInfo" - ports: - type: array - items: - $ref: "#/components/schemas/ServiceProfileAccessPointCOLO" - virtualDevices: - type: array - items: - $ref: "#/components/schemas/ServiceProfileAccessPointVD" - metros: - type: array - description: Derived response attribute. - items: - $ref: "#/components/schemas/ServiceMetro" - environments: - type: array - description: Provider environments associated with this IC_PROFILE service profile. - items: - $ref: "#/components/schemas/ProviderEnvironment" - selfProfile: - type: boolean - description: response attribute indicates whether the profile belongs to the same organization as the api-invoker. - projectId: - type: string - lastMileConfig: - $ref: "#/components/schemas/ServiceProfileLastMileConfig" - description: | - Service Profile is a software definition for a named provider service and it's network connectivity requirements. - This includes the basic marketing information and one - or more sets of access points (a set per each access point type) fulfilling the provider service. - Tags: - type: array - items: - type: string - ServiceProfileAccessPointType: - type: object - description: Access Point Type - oneOf: - - $ref: "#/components/schemas/ServiceProfileAccessPointTypeCOLO" - - $ref: "#/components/schemas/ServiceProfileAccessPointTypeVD" - ServiceProfileAccessPointTypeCOLO: - required: - - type - type: object - properties: - uuid: - type: string - type: - $ref: "#/components/schemas/ServiceProfileAccessPointTypeEnum" - supportedBandwidths: - $ref: "#/components/schemas/Bandwidths" - allowRemoteConnections: - type: boolean - description: Setting to allow or prohibit remote connections to the service profile. - example: true - default: false - allowCustomBandwidth: - type: boolean - description: Setting to enable or disable the ability of the buyer to customize the bandwidth. - example: true - default: false - bandwidthAlertThreshold: - type: number - description: percentage of port bandwidth at which an allocation alert is generated - missing on wiki. - allowBandwidthAutoApproval: - type: boolean - description: Setting to enable or disable the ability of the buyer to change connection bandwidth without approval of the seller. - default: false - allowBandwidthUpgrade: - type: boolean - description: Availability of a bandwidth upgrade. The default is false. - linkProtocolConfig: - $ref: "#/components/schemas/ServiceProfileLinkProtocolConfig" - enableAutoGenerateServiceKey: - type: boolean - description: for verizon only. - connectionRedundancyRequired: - type: boolean - description: Mandate redundant connections - example: true - default: false - selectiveRedundancy: - type: boolean - description: Optional redundant connections - example: true - default: false - apiConfig: - $ref: "#/components/schemas/ApiConfig" - connectionLabel: - type: string - description: custom name for "Connection" - authenticationKey: - $ref: "#/components/schemas/AuthenticationKey" - metadata: - $ref: "#/components/schemas/ServiceProfileMetadata" - description: Colo Access Point Type - ServiceProfileAccessPointTypeEnum: + $ref: "#/components/schemas/virtualConnectionTimeServiceResponse" + ipv4: + $ref: "#/components/schemas/ipv4" + ntpAdvancedConfiguration: + $ref: "#/components/schemas/ntpAdvanceConfiguration" + ptpAdvancedConfiguration: + $ref: "#/components/schemas/ptpAdvanceConfiguration" + project: + $ref: "#/components/schemas/Project" + account: + $ref: "#/components/schemas/SimplifiedAccount" + order: + $ref: "#/components/schemas/precisionTimeOrder" + pricing: + $ref: "#/components/schemas/precisionTimePrice" + changeLog: + $ref: "#/components/schemas/Changelog" + description: Precision Time Service Response Schema. + ServiceId: type: string - description: Access point type - enum: - - VD - - COLO - Bandwidths: - type: array - items: - $ref: "#/components/schemas/Bandwidth" - Bandwidth: - type: integer - description: speed in Mbps - example: 50 - ServiceProfileLinkProtocolConfig: + description: Precision Time Service UUID + format: uuid + example: 557400f8-d360-11e9-bb65-2a2ae2dbcce4 + precisionTimeChangeOperation: + required: + - op + - path + - value type: object properties: - encapsulationStrategy: + op: type: string - description: was tagType - missing on wiki + description: Handy shortcut for operation name enum: - - CTAGED - - BOTH - - NAMED - namedTags: - maxItems: 64 - type: array - items: - type: string - vlanCTagLabel: - type: string - description: was ctagLabel - reuseVlanSTag: - type: boolean - example: true - default: false - encapsulation: + - replace + - add + - remove + path: type: string - description: Port encapsulation - Derived response attribute. Ignored on request payloads. + description: path inside document leading to updated parameter enum: - - QINQ - - DOT1Q - - UNTAGGED - description: Configuration for dot1q to qinq translation support - ApiConfig: + - /name + - /package/code + - /ipv4 + - /ntpAdvancedConfiguration + - /ptpAdvancedConfiguration + value: + type: object + description: new value for updated parameter + description: Fabric Precision Timing change operation data + TimeServicesSearchRequest: type: object properties: - apiAvailable: - type: boolean - description: Setting indicating whether the API is available (true) or not (false). - example: true - default: false - integrationId: - type: string - equinixManagedPort: - type: boolean - description: Setting indicating that the port is managed by Equinix (true) or not (false). - example: true - default: false - equinixManagedVlan: - type: boolean - description: Setting indicating that the VLAN is managed by Equinix (true) or not (false). - example: true - default: false - allowOverSubscription: - type: boolean - description: | - Setting showing that oversubscription support is available (true) or not (false). The default is false. - Oversubscription is the sale of more than the available network bandwidth. This practice is common - and legitimate. After all, many customers use less bandwidth than they've purchased. - And network users don't consume bandwidth all at the same time. The leftover bandwidth can be sold to - other customers. When demand surges, operational and engineering resources can be shifted to - accommodate the load. - example: false - default: false - overSubscriptionLimit: - maximum: 20 - minimum: 1 - type: integer - description: A cap on oversubscription. - example: 1 - default: 1 - bandwidthFromApi: - type: boolean - default: false - description: Configuration for API based Integration for Service Profile - AuthenticationKey: + filter: + $ref: "#/components/schemas/TimeServiceFilters" + pagination: + $ref: "#/components/schemas/PaginationRequest" + sort: + type: array + items: + $ref: "#/components/schemas/TimeServiceSortCriteria" + description: Search requests containing criteria + TimeServiceFilters: type: object properties: - required: - type: boolean - example: true - default: false - label: - type: string - example: Service Key - description: - type: string - example: description for the authentication key - description: Authentication Key Support and Customization - ServiceProfileMetadata: + and: + maxItems: 8 + type: array + items: + $ref: "#/components/schemas/TimeServiceFilter" + TimeServiceFilter: type: object - properties: - props: - type: string - regEx: - type: string - regExMsg: - type: string - vlanRangeMaxValue: - type: integer - vlanRangeMinValue: - type: integer - maxQinq: - type: string - maxDot1q: - type: integer - variableBilling: - type: boolean - globalOrganization: - type: string - limitAuthKeyConn: - type: boolean - allowSecondaryLocation: - type: boolean - redundantProfileId: - type: string - allowVcMigration: - type: boolean - connectionEditable: - type: boolean - releaseVlan: - type: boolean - maxConnectionsOnPort: - type: integer - portAssignmentStrategy: - type: string - eqxManagedPort: - type: boolean - connectionNameEditable: - type: boolean - description: Metadata. Response attribute. Ignored on request payload. - ServiceProfileAccessPointTypeVD: - required: - - type + anyOf: + - $ref: "#/components/schemas/TimeServiceSimpleExpression" + - $ref: "#/components/schemas/TimeServiceOrFilter" + TimeServiceSimpleExpression: type: object properties: - uuid: - type: string - type: - $ref: "#/components/schemas/ServiceProfileAccessPointTypeEnum" - supportedBandwidths: - $ref: "#/components/schemas/Bandwidths" - allowRemoteConnections: - type: boolean - description: Allow remote connections to Service Profile - example: true - allowCustomBandwidth: - type: boolean - example: true - additionalProperties: false - description: VirtualDevice Access Point Type - CustomField: - required: - - dataType - - isRequired - - label - properties: - label: - type: string - example: Account Number - description: - type: string - example: Provide a valid account number - required: - type: boolean - example: true - dataType: + property: type: string - enum: - - STRING - - LIST - - NUMBER - options: + description: | + Possible field names to use on filters: + * `/project/projectId` - project id (mandatory) + * `/name` - Precision Time Service name + * `/uuid` - Precision Time Service uuid + * `/type` - Precision Time Service protocol + * `/state` - Precision Time Service status + * `/account/accountNumber` - Precision Time Service account number + * `/package/code` - Precision Time Service package + * `/*` - all-category search + example: /name + operator: + type: string + description: | + Possible operators to use on filters: + * `=` - equal + * `!=` - not equal + * `[NOT] BETWEEN` - (not) between + * `[NOT] LIKE` - (not) like + * `[NOT] IN` - (not) in + * `ILIKE` - case-insensitive like + example: = + values: type: array items: type: string - captureInEmail: - type: boolean - description: capture this field as a part of email notification - description: Define Custom Attributes - MarketingInfo: + example: FabricPrecisionTimeService-1 + TimeServiceOrFilter: type: object properties: - logo: - type: string - description: Logo file name - promotion: - type: boolean - description: Profile promotion on marketplace - processSteps: + or: maxItems: 3 type: array items: - $ref: "#/components/schemas/ProcessStep" - ProcessStep: + $ref: "#/components/schemas/TimeServiceSimpleExpression" + TimeServiceSortCriteria: type: object properties: - title: - type: string - description: Service profile custom step title - subTitle: - type: string - description: Service profile custom step sub title - description: - type: string - description: Service profile custom step description - description: Definition of customized step while making connection - ServiceProfileAccessPointCOLO: - required: - - type - - uuid + direction: + $ref: "#/components/schemas/TimeServiceSortDirection" + property: + $ref: "#/components/schemas/TimeServiceSortBy" + TimeServiceSortDirection: + type: string + description: Sorting direction + default: DESC + enum: + - DESC + - ASC + TimeServiceSortBy: + type: string + description: Possible field names to use on sorting + default: /changeLog/updatedDateTime + enum: + - /name + - /uuid + - /state + - /type + - /package/code + - /changeLog/createdDateTime + - /changeLog/updatedDateTime + ServiceSearchResponse: type: object properties: - type: - type: string - enum: - - XF_PORT - - IX_PORT - - XF_INTERCONNECT_PORT - uuid: - type: string - format: uuid - example: 94662143-e21b-4098-bfcf-e9416f47eae1 - location: - $ref: "#/components/schemas/SimplifiedLocation" - sellerRegion: - type: string - sellerRegionDescription: - type: string - crossConnectId: - type: string - description: Colo Access Point - ServiceProfileAccessPointVD: + pagination: + $ref: "#/components/schemas/Pagination" + data: + type: array + description: Data returned from the API call. + items: + $ref: "#/components/schemas/precisionTimeServiceResponse" + precisionTimeServiceConnectionsResponse: + title: precisionTimeServiceConnectionResponse + type: object + properties: + pagination: + $ref: "#/components/schemas/Pagination" + data: + type: array + description: Data returned from the API call + items: + $ref: "#/components/schemas/connectionLink" + description: EPT service instance's L2 connections + precisionTimeServicePackagesResponse: + title: precisionTimeServicePackagesResponse + type: object + properties: + pagination: + $ref: "#/components/schemas/Pagination" + data: + type: array + description: Data returned from the API call + items: + $ref: "#/components/schemas/precisionTimePackageResponse" + description: Precision Packages + precisionTimePackageResponse: + title: precisionTimePackageRespose required: + - bandwidth + - code - type - - uuid type: object properties: + href: + type: string + format: uri type: type: string enum: - - VD - uuid: - type: string - format: uuid - example: 94662143-e21b-4098-bfcf-e9416f47eae1 - location: - $ref: "#/components/schemas/SimplifiedLocation" - interfaceUuid: - type: string - format: uuid - example: 94662143-e21b-4098-bfcf-e9416f47eae1 - description: Virtual Device Point - ServiceMetro: - type: object - properties: + - TIME_SERVICE_PACKAGE code: type: string - description: metro code - name: - type: string - description: metro name - vcBandwidthMax: + enum: + - NTP_STANDARD + - NTP_ENTERPRISE + - PTP_STANDARD + - PTP_ENTERPRISE + bandwidth: type: integer - description: max VC speed supported in Mbps - ibxs: - type: array - items: - type: string - description: ibx codes - inTrail: + description: Connection bandwidth in Mbps. + example: 10 + clientsPerSecondMax: + minimum: 0 + type: integer + description: Max. number of clients that can be synchronized per second at a packet rate of 1 per second. + example: 100 + redundancySupported: type: boolean - displayName: + description: Is Redundant virtual connection supported for the package code. + example: false + multiSubnetSupported: + type: boolean + description: Is Multiple subnet supported for the package code. + example: true + accuracySlaUnit: type: string - description: service metro display name - sellerRegions: - type: object - additionalProperties: - type: string - ProviderEnvironment: + description: Accuracy SLA unit. + example: microseconds + accuracySla: + type: integer + description: Accuracy SLA for the package code, -1 value denotes the accuracySla is not published. + example: 50 + accuracySlaMin: + minimum: 1 + type: integer + description: Typical minimum Accuracy for the package code. + example: 1 + accuracySlaMax: + minimum: 1 + type: integer + description: Typical maximum Accuracy for the package code. + example: 10 + changelog: + $ref: "#/components/schemas/Changelog" + description: EPT Service Package Information + example: + href: https://api.equinix.com/fabric/v4/timeServicePackage/NTP_STANDARD + type: TIME_SERVICE_PACKAGE + code: NTP_STANDARD + bandwidth: 10 + accuracySlaUnit: microseconds + accuracySla: 50 + accuracySlaMin: 1 + accuracySlaMax: 10 + clientsPerSecondMax: 100 + redundancySupported: true + multiSubnetSupported: true + changeLog: + createdDateTime: 2023-05-16T07:50:49.749Z + updatedDateTime: 2023-05-17T07:50:49.749Z + SubscriptionId: + type: string + description: Subscription Id + format: uuid + example: 557400f8-d360-11e9-bb65-2a2ae2dbcce4 + SubscriptionResponse: + required: + - entitlements + - marketplace + - state type: object properties: href: type: string - description: Provider Environment URI + description: Subscription URL format: uri - readOnly: true uuid: type: string - description: Equinix-assigned provider environment identifier + description: Unique identifier of the Subscription format: uuid - type: - $ref: "#/components/schemas/ProviderEnvironmentTypeEnum" - name: + state: + $ref: "#/components/schemas/SubscriptionState" + marketplace: type: string - description: Provider environment name - example: US West 1 – Production - description: + description: Marketplace Type + enum: + - AWS + - GCP + - AZURE + - REDHAT + offerType: type: string - description: Provider environment description - example: Primary production environment - region: + description: Marketplace Offer Type + enum: + - PUBLIC + - PRIVATE_OFFER + isAutoRenew: + type: boolean + description: Is Auto Renewal Enabled + example: true + offerId: type: string - description: Cloud provider region identifier - example: us-west-1 - supportedBandwidths: + description: Marketplace Offer Id + trial: + $ref: "#/components/schemas/SubscriptionTrial" + metroCodes: type: array - description: Supported bandwidths in Mbps - example: - - 1000 - - 10000 - - 100000 + description: List of available metro items: - type: integer - changeLog: + type: string + entitlements: + type: array + description: List of entitlements associated with the subscription + items: + $ref: "#/components/schemas/SubscriptionEntitlementResponse" + changelog: $ref: "#/components/schemas/Changelog" - description: Provider Environment associated with an IC_PROFILE service profile - ProviderEnvironmentTypeEnum: + description: Subscription Response + SubscriptionState: type: string - description: Provider environment type + description: Subscription State enum: - - IC_ENV - ServiceProfileLastMileConfig: - type: object - properties: - address: - $ref: "#/components/schemas/ServiceProfileLastMileAddress" - productCatalogs: - type: array - description: Last-mile provider catalogs. - items: - $ref: "#/components/schemas/ServiceProfileLastMileProductCatalog" - notifications: - type: array - description: Contact details for notifications related to last-mile provisioning and ordering. - items: - $ref: "#/components/schemas/ServiceProfileLastMileNotification" - description: Last-mile configuration for the service profile. - ServiceProfileLastMileAddress: + - ACTIVE + - EXPIRED + - CANCELLED + - GRACE_PERIOD + SubscriptionTrial: type: object properties: - require: + enabled: type: boolean - description: Whether the address is required for provisioning and ordering. - dataType: - type: string - description: Expected format of the address. - description: - type: string - description: Additional information about the address requirement. - description: Last-mile provisioning address. - ServiceProfileLastMileProductCatalog: - type: object - properties: - name: - type: string - description: Last-mile provider or catalog name. - example: att fiber - webUrl: + description: Free Trial Enabled + expiryDateTime: type: string - description: Last-mile catalog or provider website URL. - example: att.com/lastmile - deliveryDate: - $ref: "#/components/schemas/ServiceProfileLastMileDeliveryDateRange" - offerings: - type: array - description: Available last-mile offerings. - items: - $ref: "#/components/schemas/ServiceProfileLastMileOffering" - description: Last-mile provider catalog details. - ServiceProfileLastMileDeliveryDateRange: + description: Free Trial Expiry Date + format: date-time + description: Free Trial Subscription + SubscriptionEntitlementResponse: type: object properties: - unit: + uuid: type: string - description: Unit for this range is DAYS. - example: USD - min: + description: Subscription Entitlement Id + format: uuid + quantityEntitled: + minimum: 0 type: integer - description: Minimum value for the range. - example: 1 - max: + description: Quantity entitled for the subscription + quantityConsumed: + minimum: 0 type: integer - description: Maximum value for the range. - example: 10 - description: Range details for delivery window. - ServiceProfileLastMileOffering: + description: Quantity consumed from the entitlement + quantityAvailable: + minimum: 0 + type: integer + description: Quantity available from the entitlement + asset: + $ref: "#/components/schemas/SubscriptionAsset" + description: Subscription entitlement + SubscriptionAsset: type: object properties: + type: + type: string + description: Type of the subscription asset ( XF_ROUTER ,IP_VC, IPWAN_VC ) + package: + $ref: "#/components/schemas/SubscriptionRouterPackageType" bandwidth: type: integer - description: Offered bandwidth in Mbps. - example: 10 - price: - $ref: "#/components/schemas/ServiceProfileLastMilePriceRange" - description: Last-mile offering details. - ServiceProfileLastMilePriceRange: + description: Bandwidth of the asset in Mbps + description: Asset information + SubscriptionRouterPackageType: type: object properties: - unit: + code: type: string - description: Unit for this range, such as USD or DAYS. - example: USD - min: - type: number - description: Minimum value for the range. - format: double - example: 10 - max: - type: number - description: Maximum value for the range. - format: double - example: 100 - description: Range details for price or delivery window. - ServiceProfileLastMileNotification: + description: Cloud Router package code + description: Cloud Router Package Type + GetAllStreamResponse: type: object properties: - dataType: - type: string - description: Expected format of the contact information, such as email or phone number. - label: - type: string - description: Type of contact information, such as ordering or technical support. - required: - type: boolean - description: Whether this contact information is required for provisioning and ordering. - description: Last-mile notification contact details. - ServiceProfile: + pagination: + $ref: "#/components/schemas/Pagination" + data: + type: array + description: Data returned from the API call. + items: + $ref: "#/components/schemas/Stream" + StreamPostRequest: + required: + - name + - project + - type type: object properties: - state: - $ref: "#/components/schemas/ServiceProfileStateEnum" - account: - description: Seller Account for Service Profile. - allOf: - - $ref: "#/components/schemas/SimplifiedAccount" - - type: object + type: + type: string + enum: + - TELEMETRY_STREAM + name: + type: string + description: Customer-provided stream name + description: + type: string + description: Customer-provided stream description project: $ref: "#/components/schemas/Project" - change: - $ref: "#/components/schemas/ServiceProfileChange" - changeLog: - description: Seller Account for Service Profile. - allOf: - - $ref: "#/components/schemas/Changelog" - - type: object - description: | - Service Profile is a software definition for a named provider service and it's network connectivity requirements. - This includes the basic marketing information and one - or more sets of access points (a set per each access point type) fulfilling the provider service. - allOf: - - $ref: "#/components/schemas/SimplifiedServiceProfile" - ServiceProfileChange: - required: - - createdDateTime - - type + description: Create Stream + Stream: type: object properties: + href: + type: string + description: Stream URI + format: uri + readOnly: true + example: https://api.equinix.com/fabric/v4/streams/3c9b8e7a2-f3b1-4576-a4a9-1366a63df170 uuid: type: string - description: Uniquely identifies a change + description: Equinix-assigned access point identifier + format: uuid + example: c9b8e7a2-f3b1-4576-a4a9-1366a63df170 type: type: string - description: Type of change - example: SERVICE_PROFILE_VISIBILITY_UPDATE - status: - type: string - description: Current outcome of the change flow + description: type enum: - - APPROVED - - COMPLETED - - FAILED - - REJECTED - - REQUESTED - - SUBMITTED_FOR_APPROVAL - createdDateTime: - type: string - description: Set when change flow starts - format: date-time - example: 2020-11-06T07:00:00Z - updatedDateTime: + - TELEMETRY_STREAM + name: type: string - description: Set when change object is updated - format: date-time - example: 2020-11-06T07:00:00Z - information: + description: Customer-provided stream name + description: type: string - description: Additional information - data: - $ref: "#/components/schemas/JsonPatch_1" - description: Current state of latest service profile change - ServiceProfileSearchRequest: + description: Customer-provided stream description + project: + $ref: "#/components/schemas/Project" + state: + type: string + description: Stream provision state + enum: + - PROVISIONING + - PROVISIONED + - REPROVISIONING + - DEPROVISIONING + - DEPROVISIONED + - FAILED + assetsCount: + type: integer + description: Stream assets count + example: 1 + streamSubscriptionsCount: + type: integer + description: Stream subscriptions count + example: 2 + alertRulesCount: + type: integer + description: Stream alert rules count + example: 3 + changeLog: + $ref: "#/components/schemas/Changelog" + description: Stream object + StreamSearchRequest: type: object properties: filter: - $ref: "#/components/schemas/ServiceProfileFilter" + $ref: "#/components/schemas/StreamSearchFilters" pagination: $ref: "#/components/schemas/PaginationRequest" sort: type: array items: - $ref: "#/components/schemas/ServiceProfileSortCriteria" + $ref: "#/components/schemas/StreamSearchSortCriteria" description: Search requests containing criteria - ServiceProfileFilter: + StreamSearchFilters: + required: + - and + type: object + properties: + and: + maxItems: 10 + minItems: 1 + type: array + items: + $ref: "#/components/schemas/StreamSearchFilter" + StreamSearchFilter: type: object anyOf: - - $ref: "#/components/schemas/ServiceProfileSimpleExpression" - - $ref: "#/components/schemas/ServiceProfileAndFilter" - ServiceProfileSimpleExpression: + - $ref: "#/components/schemas/StreamSearchSimpleExpression" + - $ref: "#/components/schemas/StreamSearchOrFilter" + StreamSearchSimpleExpression: type: object properties: property: type: string description: | Possible field names to use on filters: - * `/name` - Service Profile name - * `/uuid` - Service Profile uuid - * `/state` - Service Profile status - * `/metros/code` - Service Profile metro code - * `/visibility` - Service Profile package - * `/type` - Service Profile package - * `/project/projectId` - Service Profile project id + * `/uuid` - Stream uuid + * `/name` - Stream name + * `/state` - Stream state (`DEPROVISIONED` returned only when explicitly requested) + * `/type` - Stream type + * `/description` - Stream description + * `/project/projectId` - Stream project id + * `/changeLog/createdDateTime` - Stream created date time + * `/changeLog/updatedDateTime` - Stream updated date time example: /name operator: type: string description: | Possible operators to use on filters: * `=` - equal + * `!=` - not equal + * `>` - greater than + * `>=` - greater than or equal to + * `<` - less than + * `<=` - less than or equal to + * `BETWEEN` - between + * `NOT BETWEEN` - not between + * `LIKE` - like + * `ILIKE` - like case-insensitive + * `IN` - in + * `NOT IN` - not in example: = values: + maxItems: 100 + minItems: 1 type: array items: type: string - example: ServiceProfile-1 - ServiceProfileAndFilter: + example: stream-dev-01 + StreamSearchOrFilter: type: object properties: - and: + or: + maxItems: 10 type: array items: - $ref: "#/components/schemas/ServiceProfileSimpleExpression" - ServiceProfileSortCriteria: + $ref: "#/components/schemas/StreamSearchSimpleExpression" + StreamSearchSortCriteria: + required: + - direction + - property type: object properties: direction: - $ref: "#/components/schemas/ServiceProfileSortDirection" + $ref: "#/components/schemas/StreamSearchSortDirection" property: - $ref: "#/components/schemas/ServiceProfileSortBy" - ServiceProfileSortDirection: + $ref: "#/components/schemas/StreamSearchSortBy" + StreamSearchSortDirection: type: string description: Sorting direction + default: DESC enum: - DESC - ASC - default: DESC - ServiceProfileSortBy: + StreamSearchSortBy: type: string description: Possible field names to use on sorting + default: /changeLog/createdDateTime enum: - - /name - - /state - /changeLog/createdDateTime - /changeLog/updatedDateTime - default: /changeLog/updatedDateTime - ServiceProfileId: - type: string - description: Service Profile UUID - format: uuid - JsonPatch_1: - type: array - items: - $ref: "#/components/schemas/JsonPatchOperation" - JsonPatchOperation: - type: object - description: Service Profile Access Points - oneOf: - - $ref: "#/components/schemas/AddOperation" - - $ref: "#/components/schemas/RemoveOperation" - - $ref: "#/components/schemas/ReplaceOperation" - AddOperation: - required: - - op - - path - - value - type: object - properties: - op: - $ref: "#/components/schemas/OpEnum" - path: - $ref: "#/components/schemas/Path" - value: - type: object - description: value to add - description: Add Sub-Resource to the existing model - OpEnum: - type: string - description: the operation to be performed - enum: - - add - - remove - - replace - Path: - type: string - description: A JSON Pointer path. - RemoveOperation: - required: - - op - - path - type: object - properties: - op: - $ref: "#/components/schemas/OpEnum" - path: - $ref: "#/components/schemas/Path" - description: Remove sub-resource from an existing model - ReplaceOperation: - required: - - op - - path - - value - type: object - properties: - op: - $ref: "#/components/schemas/OpEnum" - path: - $ref: "#/components/schemas/Path" - value: - type: object - description: value to replace with - description: Replace attribute value or sub-resource in the existing model - ServiceProfileActionRequest: - required: - - type - type: object - properties: - type: - type: string - description: "Action type. Example values: PROFILE_UPDATE_ACCEPTANCE, PROFILE_UPDATE_REJECTION" - example: PROFILE_UPDATE_ACCEPTANCE - description: - type: string - description: Action description - example: Approved to migrate to public - description: Service Profile Action Request - ServiceProfileActionResponse: - type: object - properties: - href: - type: string - description: Service Profile Action URI - format: uri - readOnly: true - type: - type: string - description: "Action type. Example values: PROFILE_UPDATE_ACCEPTANCE, PROFILE_UPDATE_REJECTION" - example: PROFILE_UPDATE_ACCEPTANCE - uuid: - type: string - description: Equinix-assigned action identifier - format: uuid - comments: - type: string - description: Action comments - example: Approved to migrate to public - changeLog: - $ref: "#/components/schemas/Changelog" - description: Service Profile Action Response - ServiceMetros: + SearchStreamResponse: type: object properties: + pagination: + $ref: "#/components/schemas/Pagination" data: type: array + description: Data returned from the API call. items: - $ref: "#/components/schemas/ServiceMetro" - pagination: - $ref: "#/components/schemas/Pagination" - description: Service Profile Metros - ServiceTokenUUID: + $ref: "#/components/schemas/Stream" + StreamId: type: string - description: Service Token UUID + description: Stream UUID format: uuid - ServiceToken: + example: 657400f8-d360-11e9-bb65-2a2ae2dbcce5 + StreamPutRequest: + required: + - name type: object properties: - type: - $ref: "#/components/schemas/ServiceTokenType" - href: - type: string - description: An absolute URL that is the subject of the link's context. - format: uri - readOnly: true - expiry: - type: integer - deprecated: true - uuid: - type: string - description: Equinix-assigned service token identifier - format: uuid - issuerSide: - type: string - description: information about token side - deprecated: true name: type: string - description: Customer-provided service token name + description: Customer-provided stream name description: type: string - description: Customer-provided service token description - expirationDateTime: - type: string - description: Expiration date and time of the service token. - format: date-time - example: 2020-11-06T07:00:00Z - connection: - $ref: "#/components/schemas/ServiceTokenConnection" - state: - $ref: "#/components/schemas/ServiceTokenState" - notifications: - type: array - description: Service token related notifications - items: - $ref: "#/components/schemas/SimplifiedNotification" - account: - $ref: "#/components/schemas/SimplifiedAccount" - changelog: - $ref: "#/components/schemas/Changelog" - project: - $ref: "#/components/schemas/Project" - description: Create Service Tokens (v4) generates Equinix Fabric service tokens. These tokens authorize users to access protected resources and services. The tokens remove sensitive content from the environment, rather than just masking it, making the protected data impossible to unencrypt or decrypt. Resource owners can distribute the tokens to trusted partners and vendors, allowing selected third parties to work directly with Equinix network assets. - ServiceTokenUpdateRequest: - minItems: 1 - type: array - description: Service Token Update Request - items: - $ref: "#/components/schemas/ServiceTokenChangeOperation" - ServiceTokens: - type: object - properties: - data: - type: array - description: List of Service Tokens - items: - $ref: "#/components/schemas/ServiceToken" - pagination: - $ref: "#/components/schemas/Pagination" - description: Service tokens authorize a user to access protected resources and services available on the Equinix Fabric network. The owner of the resources can distribute service tokens to third-party users (trusted partners and vendors), allowing them to directly access and work with the resources on the network without involving the resource owners. - ServiceTokenActionRequest: - required: - - type - type: object - properties: - type: - $ref: "#/components/schemas/ServiceTokenActions" - description: Service Token action request - ServiceTokenSearchRequest: + description: Customer-provided stream description + description: Update Stream + StreamAssetSearchRequest: type: object properties: filter: - $ref: "#/components/schemas/ServiceTokenSearchExpression" + $ref: "#/components/schemas/StreamAssetFilters" pagination: $ref: "#/components/schemas/PaginationRequest" + sort: + type: array + items: + $ref: "#/components/schemas/StreamAssetSortCriteria" description: Search requests containing criteria - ServiceTokenSearchExpression: + StreamAssetFilters: type: object properties: and: - $ref: "#/components/schemas/ServiceTokenSearchExpressions" - or: - $ref: "#/components/schemas/ServiceTokenSearchExpressions" + maxItems: 8 + type: array + items: + $ref: "#/components/schemas/StreamAssetFilter" + StreamAssetFilter: + type: object + anyOf: + - $ref: "#/components/schemas/StreamAssetSimpleExpression" + - $ref: "#/components/schemas/StreamAssetOrFilter" + StreamAssetSimpleExpression: + type: object + properties: property: - $ref: "#/components/schemas/ServiceTokenSearchFieldName" + type: string + description: | + Possible field names to use on filters: + * `/uuid` - Asset uuid (`=` and `IN` only) + * `/streamUuid` - Stream uuid (`=` and `IN` only) + * `/attachmentStatus` - Asset attachment status (`=`, `IN`, and `NOT IN`) + example: /streamUuid operator: type: string - enum: - - = - - "!=" - - LIKE - - ILIKE - - < - - ">" - - <= - - ">=" - - IN - - NOT IN - - BETWEEN - - NOT BETWEEN + description: | + Possible operators to use on filters: + * `=` - equal + * `IN` - in + * `NOT IN` - not in + example: = values: + minItems: 1 type: array items: type: string - ServiceTokenSearchExpressions: - type: array - items: - $ref: "#/components/schemas/ServiceTokenSearchExpression" - ServiceTokenSearchFieldName: + example: 4719e319-65ae-4001-aabf-ca5f107b9b29 + StreamAssetOrFilter: + type: object + properties: + or: + maxItems: 3 + type: array + items: + $ref: "#/components/schemas/StreamAssetSimpleExpression" + StreamAssetSortCriteria: + required: + - direction + - property + type: object + properties: + direction: + $ref: "#/components/schemas/StreamAssetSortDirection" + property: + $ref: "#/components/schemas/StreamAssetSortBy" + StreamAssetSortDirection: type: string - description: Possible field names to use on filters + description: Sorting direction + default: DESC enum: - - /uuid - - /state - - /name - - /project/projectId - - /type - - /expirationDateTime - - /changeLog/createdDateTime - - /changeLog/updatedDateTime - - /connection/aSide/accessPointSelectors/port/uuid - - /connection/zSide/accessPointSelectors/port/uuid - Presence: + - DESC + - ASC + StreamAssetSortBy: type: string - description: Presence + description: Possible field names to use on sorting + default: /uuid enum: - - MY_PORTS - MetroResponse: + - /uuid + - /streamUuid + SearchStreamAssetResponse: type: object properties: pagination: $ref: "#/components/schemas/Pagination" data: type: array - description: List of Fabric Metros. + description: Data returned from the API call. items: - $ref: "#/components/schemas/Metro" - description: GET Metros retrieves all Equinix® Fabric™ metros, as well as latency data for each location.This performance data helps network planning engineers and administrators make strategic decisions about port locations and traffic routes. - Metro: + $ref: "#/components/schemas/StreamSearchAsset" + AssetId_1: + type: string + description: Stream Asset UUID + format: uuid + example: 757400f8-d360-11e9-bb65-2a2ae2dbcce6 + Asset: + type: string + enum: + - ports + - connections + - routers + - metros + - organizations + - projects + - networkEdgeDevices + - companyProfiles + StreamAsset: type: object properties: href: type: string - description: The Canonical URL at which the resource resides. - type: - type: string - description: Indicator of a Fabric Metro - code: - type: string - description: Code Assigned to an Equinix IBX data center in a specified metropolitan area. - region: + description: Stream Asset URI + format: uri + readOnly: true + uuid: type: string - description: Board geographic area in which the data center is located - name: + description: Equinix-assigned access point identifier + format: uuid + example: c9b8e7a2-f3b1-4576-a4a9-1366a63df170 + type: type: string - description: Name of the region in which the data center is located. - country: + description: Asset types + enum: + - XF_PORT + - IP_VC + - EVPLAN_VC + - EVPL_VC + - XF_METRO + - XF_ROUTER + - ORGANIZATION + - PROJECT + - DATA + - MGMT + - SSH + - FAB + - CTRL + metricsEnabled: + type: boolean + description: enable metric + example: false + attachmentStatus: type: string - description: Country code in which the data center is located. - equinixAsn: - type: integer - description: Autonomous system number (ASN) for a specified Fabric metro. The ASN is a unique identifier that carries the network routing protocol and exchanges that data with other internal systems via border gateway protocol. - format: int64 - localVCBandwidthMax: - type: integer - description: This field holds Max Connection speed with in the metro - format: int64 - geoCoordinates: - $ref: "#/components/schemas/GeoCoordinates" - connectedMetros: - type: array - items: - $ref: "#/components/schemas/ConnectedMetro" - services: - type: array - items: - $ref: "#/components/schemas/services" - geoScopes: - type: array - description: List of supported geographic boundaries of a Fabric Metro. - items: - $ref: "#/components/schemas/GeoScopeType" - geoZones: - type: array - description: List of supported geographic zones of a Fabric Metro. - items: - $ref: "#/components/schemas/GeoZone" - description: GET Metros retrieves all Equinix® Fabric™ metros, as well as latency data for each location.This performance data helps network planning engineers and administrators make strategic decisions about port locations and traffic routes. - GeoCoordinates: - type: object - properties: - latitude: - type: number - description: Latitude of a Fabric Metro - format: double - longitude: - type: number - description: Longitude of a Fabric Metro - format: double - description: Geographic location data of Fabric Metro - ConnectedMetro: + description: asset status + enum: + - ATTACHING + - ATTACHED + - DETACHED + - DETACHING + - FAILED + description: Stream object + StreamAssetPutRequest: type: object properties: - href: - type: string - description: The Canonical URL at which the resource resides. - code: - type: string - description: Code assigned to an Equinix International Business Exchange (IBX) data center in a specified metropolitan area. - avgLatency: - type: number - description: Average latency (in milliseconds[ms]) between two specified metros. - remoteVCBandwidthMax: - type: integer - description: This field holds the Max Connection speed with connected metros - format: int64 - description: Arrays of objects containing latency data for the specified metros - services: + metricsEnabled: + type: boolean + description: enable metric + example: false + default: false + description: Update Stream Asset + InterfaceId: + type: integer + description: Network Edge Device Interface identifier + format: int32 + example: 5 + GetAllStreamSubscriptionResponse: type: object properties: - type: - type: string - description: Type of Service - description: Arrays of objects containing type of services supported in the specified metros - GeoScopeType: - type: string - description: Geographic boundary types - enum: - - CANADA - - CONUS - - JAPAN - - UK - - AUSTRALIA - - BRAZIL - - SWITZERLAND - - EU - GeoZone: + pagination: + $ref: "#/components/schemas/Pagination" + data: + type: array + description: Data returned from the API call. + items: + $ref: "#/components/schemas/StreamSubscription" + StreamSubscriptionPostRequest: + required: + - name + - sink + - type type: object properties: - code: + type: type: string - description: Code assigned to a geographic zone. + enum: + - STREAM_SUBSCRIPTION name: type: string - description: Name of a geographic zone. + description: Customer-provided stream subscription name description: type: string - description: Description of a geographic zone. - description: Geographic zone of a Fabric Metro - MetroErrorList: - type: array - items: - $ref: "#/components/schemas/MetroError" - MetroError: - required: - - errorCode - - errorMessage + description: Customer-provided stream subscription description + enabled: + type: boolean + description: Stream subscription enabled status + example: true + default: true + metricSelector: + $ref: "#/components/schemas/StreamSubscriptionSelector" + eventSelector: + $ref: "#/components/schemas/StreamSubscriptionSelector" + sink: + $ref: "#/components/schemas/StreamSubscriptionSink" + description: Create Stream Subscription + StreamSubscriptionSelector: type: object properties: - errorCode: - type: string - enum: - - EQ-3036001 - - EQ-3036013 - - EQ-3036030 - - EQ-3036100 - errorMessage: - type: string - enum: - - Unauthorized - - Invalid Query Parameter - - Invalid Path Parameter - - Invalid Query or Path Parameter - - Internal Server Error - - Metro Not Found - correlationId: - type: string - details: - type: string - help: - type: string - additionalInfo: + include: + maxItems: 8 type: array items: - $ref: "#/components/schemas/PriceError_additionalInfo" - description: Error with details - discriminator: - propertyName: errorCode - MetroCode: - type: string - description: Metro Code - AllPortsResponse: - type: object - properties: - pagination: - $ref: "#/components/schemas/Pagination" - data: + $ref: "#/components/schemas/StreamSubscriptionSelectorExpression" + except: + maxItems: 8 type: array - description: GET All User Port Across Fabric Metros items: - $ref: "#/components/schemas/Port" - description: GET All User Port Across Fabric Metros - Port: + $ref: "#/components/schemas/StreamSubscriptionSelectorExpression" + StreamSubscriptionSelectorExpression: + type: string + description: | + Supported event or metric types to use on event and metric selectors: + * `*` - all events or metrics + * `equinix.fabric.port.*` - port events or metrics + * `equinix.fabric.connection.*` - connection events or metrics + * `equinix.fabric.router.*` - cloud router events + * `equinix.fabric.metro.*` - metro metrics + * `equinix.fabric.network.*` - network events + * `equinix.fabric.service_token.*` - service token events + * `equinix.network_edge.*` - network edge events + * `equinix.network_edge.acl.*` - network edge acl events + * `equinix.network_edge.device.*` - network edge device events + * `equinix.access_manager.*` - identity access manager events + * `equinix.access_manager.user.role.*` - identity access manager user role events + example: equinix.fabric.connection.* + StreamSubscriptionSink: + required: + - type type: object properties: - href: + uri: type: string - description: Equinix assigned response attribute for an absolute URL that is the subject of the link's context. - format: uri - readOnly: true + description: any publicly reachable http endpoint type: - $ref: "#/components/schemas/PortType" - uuid: - type: string - description: Equinix assigned response attribute for port identifier - format: uuid - name: - type: string - description: Equinix assigned response attribute for Port name - description: type: string - description: Equinix assigned response attribute for Port description - physicalPortsSpeed: - minimum: 0 + description: destination type + enum: + - DATADOG + - GOOGLE_PUBSUB + - PAGERDUTY + - SERVICENOW + - SLACK + - SPLUNK_HEC + - TEAMS + - WEBHOOK + batchEnabled: + type: boolean + description: batch mode on/off + example: false + batchSizeMax: type: integer - description: Physical Ports Speed in Mbps - connectionsCount: - minimum: 0 + description: maximum batch size + batchWaitTimeMax: type: integer - description: Equinix assigned response attribute for Connection count - physicalPortsType: + description: maximum batch waiting time + credential: + $ref: "#/components/schemas/StreamSubscriptionSinkCredential" + settings: + $ref: "#/components/schemas/StreamSubscriptionSinkSetting" + host: type: string - description: Physical Ports Type. 10GBASE_SMF and 400GBASE_LR4 are only used for IX ports - enum: - - 1000BASE_LX - - 10GBASE_LR - - 100GBASE_LR4 - - 10GBASE_ER - - 1000BASE_SX - - 10GBASE_SMF - - 400GBASE_LR4 - physicalPortsCount: - type: integer - connectivitySourceType: + description: sink host + description: Create Stream destination + StreamSubscriptionSinkCredential: + type: object + properties: + type: type: string - description: Port connectivity type + description: credential type enum: - - COLO - - BMMR - - REMOTE - bmmrType: + - ACCESS_TOKEN + - INTEGRATION_KEY + - API_KEY + - USERNAME_PASSWORD + accessToken: type: string - enum: - - SELF - - EQUINIX - project: - $ref: "#/components/schemas/Project" - state: - $ref: "#/components/schemas/PortState" - order: - $ref: "#/components/schemas/PortOrder" - operation: - allOf: - - $ref: "#/components/schemas/PortOperation" - account: - $ref: "#/components/schemas/SimplifiedAccount" - change: - $ref: "#/components/schemas/PortChange" - changeLog: - $ref: "#/components/schemas/Changelog" - serviceType: + description: passed as Authorization header value + integrationKey: type: string - description: Port service Type - deprecated: true - enum: - - EPL - - MSP - serviceCode: - $ref: "#/components/schemas/PortServiceCode" - bandwidth: - minimum: 0 - type: integer - description: Equinix assigned response attribute for Port bandwidth in Mbps - deprecated: true - availableBandwidth: - minimum: 0 - type: integer - description: Equinix assigned response attribute for Port available bandwidth in Mbps - usedBandwidth: - minimum: 0 - type: integer - description: Equinix assigned response attribute for Port used bandwidth in Mbps - location: - $ref: "#/components/schemas/SimplifiedLocation" - device: - $ref: "#/components/schemas/PortDevice" - interface: - $ref: "#/components/schemas/PortInterface" - demarcationPointIbx: + description: passed as Authorization header value + apiKey: type: string - description: A-side/Equinix ibx - tetherIbx: + description: passed as Authorization header value + username: type: string - description: z-side/Equinix ibx - demarcationPoint: - $ref: "#/components/schemas/PortDemarcationPoint" - redundancy: - $ref: "#/components/schemas/PortRedundancy" - encapsulation: - $ref: "#/components/schemas/PortEncapsulation" - lagEnabled: - type: boolean - description: If LAG enabled - lag: - deprecated: true - allOf: - - $ref: "#/components/schemas/PortLag" - asn: - type: integer - description: Port ASN - package: - $ref: "#/components/schemas/Package" - settings: - $ref: "#/components/schemas/PortSettings" - physicalPortQuantity: - type: integer - description: Number of physical ports - notifications: - type: array - description: Notification preferences - items: - $ref: "#/components/schemas/PortNotification" - additionalInfo: - type: array - description: Port additional information - items: - $ref: "#/components/schemas/PortAdditionalInfo" - endCustomer: - $ref: "#/components/schemas/EndCustomer" - physicalPorts: - type: array - description: Physical ports that implement this port - items: - $ref: "#/components/schemas/PhysicalPort" - loas: - type: array - description: Port Loas - items: - $ref: "#/components/schemas/PortLoa" - marketplaceSubscription: - $ref: "#/components/schemas/marketplaceSubscription" - description: Port specification - PhysicalPort: + description: passed as Authorization header value + password: + type: string + description: passed as Authorization header value + description: Stream subscription sink credentials + StreamSubscriptionSinkSetting: + type: object + properties: + eventIndex: + type: string + description: event index + metricIndex: + type: string + description: metric index + source: + type: string + description: source + applicationKey: + type: string + description: Application key + eventUri: + type: string + description: event uri + metricUri: + type: string + description: metric uri + format: + type: string + description: webhook message format + enum: + - CLOUDEVENT + - OPENTELEMETRY + default: CLOUDEVENT + description: Stream subscription sink settings + StreamSubscription: type: object properties: href: type: string - description: Equinix assigned response attribute for an absolute URL that is the subject of the link's context. + description: Stream Subscription URI format: uri readOnly: true - type: - $ref: "#/components/schemas/PhysicalPortType" - id: - type: integer - description: Equinix assigned response attribute for Physical Port Id - deprecated: true - state: - $ref: "#/components/schemas/PortState" - account: - $ref: "#/components/schemas/SimplifiedAccount" - interfaceSpeed: - minimum: 0 - type: integer - description: Physical Port Speed in Mbps - interfaceType: - type: string - description: Physical Port Interface Type + example: https://api.equinix.com/fabric/v4/streams/d684aa26-8276-48b7-bb42-a6d9def0a418/subscriptions/3c9b8e7a2-f3b1-4576-a4a9-1366a63df170 uuid: type: string - description: Equinix assigned response attribute for physical port identifier + description: Equinix-assigned access point identifier format: uuid - tether: - $ref: "#/components/schemas/PortTether" - demarcationPoint: - $ref: "#/components/schemas/PortDemarcationPoint" - settings: - $ref: "#/components/schemas/PhysicalPortSettings" - interface: - $ref: "#/components/schemas/PortInterface" - notifications: - type: array - description: Notification preferences - items: - $ref: "#/components/schemas/PortNotification" - additionalInfo: - type: array - description: Physical Port additional information - items: - $ref: "#/components/schemas/PortAdditionalInfo" - order: - $ref: "#/components/schemas/PortOrder" - operation: - $ref: "#/components/schemas/PortOperation" - loas: - type: array - description: Port Loas - items: - $ref: "#/components/schemas/PortLoa" - description: Physical Port specification - PortRequest: - required: - - account - - connectivitySourceType - - encapsulation - - location - - physicalPortsSpeed - - physicalPortsType - - project - - type - type: object - properties: + example: c9b8e7a2-f3b1-4576-a4a9-1366a63df170 type: - $ref: "#/components/schemas/PortType" - physicalPortsSpeed: - minimum: 0 - type: integer - description: Physical Ports Speed in Mbps - physicalPortsType: type: string - description: Physical Ports Type. 10GBASE_SMF is only applicable for IX ports + description: type enum: - - 1000BASE_LX - - 10GBASE_LR - - 100GBASE_LR4 - - 10GBASE_ER - - 1000BASE_SX - - 10GBASE_SMF - - 400GBASE_LR4 - physicalPortsCount: - type: integer - connectivitySourceType: + - STREAM_SUBSCRIPTION + name: type: string - description: Port connectivity type - enum: - - COLO - - BMMR - - REMOTE - bmmrType: + description: Customer-provided subscription name + description: type: string - description: BMMR Type is mandatory when connectivitySourceType is BMMR - enum: - - SELF - - EQUINIX - project: - $ref: "#/components/schemas/Project" - order: - $ref: "#/components/schemas/PortOrder" - account: - $ref: "#/components/schemas/SimplifiedAccountRequest" - serviceType: + description: Customer-provided subscription description + state: type: string - description: Port service Type - deprecated: true + description: Steam subscription provision state enum: - - EPL - - MSP - serviceCode: - $ref: "#/components/schemas/PortServiceCode" - bandwidth: - minimum: 0 - type: integer - description: Equinix assigned response attribute for Port bandwidth in Mbps - deprecated: true - location: - $ref: "#/components/schemas/SimplifiedLocationRequest" - demarcationPointIbx: - type: string - description: A-side/Equinix ibx - tetherIbx: - type: string - description: z-side/Equinix ibx - demarcationPoint: - $ref: "#/components/schemas/PortDemarcationPoint" - redundancy: - $ref: "#/components/schemas/PortRedundancy" - encapsulation: - $ref: "#/components/schemas/PortEncapsulation" - lagEnabled: + - PROVISIONING + - PROVISIONED + - REPROVISIONING + - DEPROVISIONING + - DEPROVISIONED + - FAILED + enabled: type: boolean - description: Indicates whether Link Aggregation Group (LAG) is enabled on this port - package: - $ref: "#/components/schemas/Package" - settings: - $ref: "#/components/schemas/PortSettings" - notifications: - type: array - description: Notification preferences - items: - $ref: "#/components/schemas/PortNotification" - physicalPorts: - type: array - description: Physical ports that implement this port - items: - $ref: "#/components/schemas/PhysicalPort" - loas: - type: array - description: Port Loas - items: - $ref: "#/components/schemas/PortLoa" - description: PortRequest is the Request Object for creating single and bulk fabric ports - BulkPortRequest: - type: object - properties: - data: - type: array - items: - $ref: "#/components/schemas/PortRequest" - description: Create bulk port request - BulkPhysicalPort: - type: object - properties: - data: - type: array - description: add physical ports to virtual port - items: - $ref: "#/components/schemas/PhysicalPort" - description: Add to Lag request - AllPhysicalPortsResponse: - type: object - properties: - pagination: - $ref: "#/components/schemas/Pagination" - data: - type: array - description: GET All Physical Ports - items: - $ref: "#/components/schemas/PhysicalPort" - description: GET All Physical Ports - PortUpdateRequest: - minItems: 1 - type: array - description: Port Update Request - items: - $ref: "#/components/schemas/PortChangeOperation" - Error: + description: Stream subscription enabled status + metricSelector: + $ref: "#/components/schemas/StreamSubscriptionSelector" + eventSelector: + $ref: "#/components/schemas/StreamSubscriptionSelector" + sink: + $ref: "#/components/schemas/StreamSubscriptionSinkResponse" + operation: + $ref: "#/components/schemas/StreamSubscriptionOperation" + changeLog: + $ref: "#/components/schemas/Changelog" + description: Stream Subscription object + StreamSubscriptionId: + type: string + description: Stream Subscription UUID + format: uuid + example: 557400f8-d360-11e9-bb65-2a2ae2dbcce4 + StreamSubscriptionPutRequest: required: - - errorCode - - errorMessage + - name + - sink + - type type: object properties: - errorCode: - pattern: ^EQ-\d{7}$ - type: string - errorMessage: - type: string - correlationId: + type: type: string - details: + enum: + - STREAM_SUBSCRIPTION + name: type: string - help: + description: Customer-provided stream subscription name + description: type: string - additionalInfo: - type: array - items: - $ref: "#/components/schemas/PriceError_additionalInfo" - description: Error Response with details - LinkProtocolGetResponse: - type: object - properties: - pagination: - $ref: "#/components/schemas/Pagination" - data: - type: array - items: - $ref: "#/components/schemas/LinkProtocolResponse" - description: List of Vlans - PortV4SearchRequest: + description: Customer-provided stream subscription description + enabled: + type: boolean + description: Stream subscription enabled status + example: true + filters: + $ref: "#/components/schemas/StreamSubscriptionFilter" + metricSelector: + $ref: "#/components/schemas/StreamSubscriptionSelector" + eventSelector: + $ref: "#/components/schemas/StreamSubscriptionSelector" + sink: + $ref: "#/components/schemas/StreamSubscriptionSink" + description: Update Stream Subscription + StreamSubscriptionSearchRequest: required: - filter type: object properties: filter: - $ref: "#/components/schemas/PortExpression" + $ref: "#/components/schemas/StreamSubscriptionSearchFilters" pagination: $ref: "#/components/schemas/PaginationRequest" sort: type: array items: - $ref: "#/components/schemas/PortSortCriteria" + $ref: "#/components/schemas/StreamSubscriptionSearchSortCriteria" description: Search requests containing criteria - PortExpression: + StreamSubscriptionSearchFilters: + required: + - and type: object properties: and: - $ref: "#/components/schemas/PortExpressions" - or: - $ref: "#/components/schemas/PortExpressions" + minItems: 1 + type: array + items: + $ref: "#/components/schemas/StreamSubscriptionSearchFilter" + StreamSubscriptionSearchFilter: + type: object + anyOf: + - $ref: "#/components/schemas/StreamSubscriptionSearchSimpleExpression" + - $ref: "#/components/schemas/StreamSubscriptionSearchOrFilter" + StreamSubscriptionSearchSimpleExpression: + type: object + properties: property: - $ref: "#/components/schemas/PortSearchFieldName" + type: string + description: | + Possible field names to use on filters: + * `/uuid` - Subscription uuid + * `/streamUuid` - Stream uuid the subscription belongs to + * `/state` - Subscription state (`DEPROVISIONED` returned only when explicitly requested) + * `/name` - Subscription name + * `/project/projectId` - Subscription project id + * `/description` - Subscription description + * `/changeLog/createdDateTime` - Subscription created date time + * `/changeLog/updatedDateTime` - Subscription updated date time + example: /streamUuid operator: type: string - enum: - - = + description: | + Possible operators to use on filters: + * `=` - equal + * `!=` - not equal + * `>` - greater than + * `>=` - greater than or equal to + * `<` - less than + * `<=` - less than or equal to + * `BETWEEN` - between + * `NOT BETWEEN` - not between + * `LIKE` - like + * `ILIKE` - like case-insensitive + * `IN` - in + * `NOT IN` - not in + example: = values: + minItems: 1 type: array items: type: string - description: | - Either use 'and' for AND operations, 'or' for OR operations, or specify 'property', 'operator', and 'values' for field filtering. Only one of these patterns should be used at a time. - PortExpressions: - type: array - items: - $ref: "#/components/schemas/PortExpression" - PortSearchFieldName: - type: string - description: Possible field names to use on filters - enum: - - /device/name - - /physicalPorts/tether/crossConnectId - - /physicalPorts/interface/name - - /state - - /project/projectId - - /uuid - - /name - - /account/orgId - - /account/accountNumber - - /location/metroCode - x-enum-deprecations: - /device/name: true - /physicalPorts/interface/name: true - PortSortCriteria: + example: 12f4d4a1-c7cb-4def-9f77-5ce93c19d999 + StreamSubscriptionSearchOrFilter: + type: object + properties: + or: + type: array + items: + $ref: "#/components/schemas/StreamSubscriptionSearchSimpleExpression" + StreamSubscriptionSearchSortCriteria: + required: + - direction + - property type: object properties: direction: - $ref: "#/components/schemas/PortSortDirection" + $ref: "#/components/schemas/StreamSubscriptionSearchSortDirection" property: - $ref: "#/components/schemas/PortSortBy" - AllPortPackagesResponse: - required: - - data + $ref: "#/components/schemas/StreamSubscriptionSearchSortBy" + StreamSubscriptionSearchSortDirection: + type: string + description: Sorting direction + default: DESC + enum: + - DESC + - ASC + StreamSubscriptionSearchSortBy: + type: string + description: Possible field names to use on sorting + default: /changeLog/createdDateTime + enum: + - /changeLog/createdDateTime + - /changeLog/updatedDateTime + SearchStreamSubscriptionResponse: type: object properties: + pagination: + $ref: "#/components/schemas/Pagination" data: type: array - description: List of Port Packages + description: Data returned from the API call. items: - $ref: "#/components/schemas/PortPackage" - description: Port Packages response - GetAllConnectionRouteAggregationsResponse: + $ref: "#/components/schemas/StreamSubscription" + GetAllStreamAlertRuleResponse: type: object properties: pagination: $ref: "#/components/schemas/Pagination" data: type: array - description: List of Route Aggregations attached to a Connection + description: Data returned from the API call. items: - $ref: "#/components/schemas/ConnectionRouteAggregationData" - RouteAggregationId: - type: string - description: Route Aggregations UUID - example: 695a8471-6595-4ac6-a2f4-b3d96ed3a59d - ConnectionRouteAggregationData: + $ref: "#/components/schemas/StreamAlertRule" + AlertRulePostRequest: + required: + - detectionMethod + - metricSelector + - name + - resourceSelector + - type type: object properties: - href: - type: string - description: Route Aggregation URI - format: uri - example: https://api.equinix.com/fabric/v4/connections/81331c52-04c0-4656-a4a7-18c52669348f/routeAggregations/695a8471-6595-4ac6-a2f4-b3d96ed3a59d type: type: string - description: Route Aggregation type enum: - - BGP_IPv4_PREFIX_AGGREGATION - uuid: + - METRIC_ALERT + name: type: string - description: Route Aggregation identifier - format: uuid - example: 695a8471-6595-4ac6-a2f4-b3d96ed3a59d - attachmentStatus: + description: Customer-provided stream name + description: type: string - enum: - - ATTACHING - - ATTACHED - - DETACHED - - DETACHING - - FAILED - - PENDING_BGP_CONFIGURATION - changeLog: - $ref: "#/components/schemas/Changelog" - GetAllConnectionRouteFiltersResponse: + description: Customer-provided stream description + enabled: + type: boolean + description: Stream alert rule enabled status + example: true + default: true + metricSelector: + $ref: "#/components/schemas/MetricSelector" + resourceSelector: + $ref: "#/components/schemas/ResourceSelector" + detectionMethod: + $ref: "#/components/schemas/DetectionMethod" + description: Create Stream Alert Rules + MetricSelector: + required: + - include type: object properties: - pagination: - $ref: "#/components/schemas/Pagination" - data: + include: type: array - description: List of Route Filters attached to a Connection + description: Stream alert rule filtered by metric name items: - $ref: "#/components/schemas/ConnectionRouteFilterData" - RouteFilterId: - type: string - description: Route Filters UUID - example: 695a8471-6595-4ac6-a2f4-b3d96ed3a59d - ConnectionRouteFilterData: - type: object - properties: - href: - type: string - description: Route filter URI - format: uri - example: https://api.equinix.com/fabric/v4/connections/81331c52-04c0-4656-a4a7-18c52669348f/routeFilters/695a8471-6595-4ac6-a2f4-b3d96ed3a59d - type: - type: string - description: Route filter type - enum: - - BGP_IPv4_PREFIX_FILTER - - BGP_IPv6_PREFIX_FILTER - uuid: - type: string - description: Route Filter identifier - format: uuid - example: 695a8471-6595-4ac6-a2f4-b3d96ed3a59d - attachmentStatus: - type: string - enum: - - ATTACHING - - ATTACHED - - DETACHED - - DETACHING - - FAILED - - PENDING_BGP_CONFIGURATION - direction: - type: string - enum: - - INBOUND - - OUTBOUND - changeLog: - $ref: "#/components/schemas/Changelog" - ConnectionRouteFiltersBase: + type: string + example: equinix.fabric.metro.sv_da.latency + ResourceSelector: required: - - direction + - include type: object properties: - direction: - type: string - description: Route Filter direction to attach to a connection - enum: - - INBOUND - - OUTBOUND - RouteFiltersBase: + include: + type: array + description: | + ### Supported metric names to use on filters with property /subject: + * `/fabric/v4/ports/` - port metrics + * `/fabric/v4/connections/` - connection metrics + * `/fabric/v4/metros/` - metro latency metrics + items: + type: string + DetectionMethod: required: - - name - - project - type type: object properties: type: type: string - description: Route Filter type + description: | + * THRESHOLD - Alert when a metric crosses a defined threshold by user. + * OUTLIER - Intelligent Alert that has an outlier behavior. This option is currently supported for metro latency metric. enum: - - BGP_IPv4_PREFIX_FILTER - - BGP_IPv6_PREFIX_FILTER - name: + - THRESHOLD + - OUTLIER + windowSize: type: string - example: My-direct-route-1 - description: + description: Stream alert rule metric window size + example: PT15M + operand: type: string - description: Customer-provided connection description - project: - $ref: "#/components/schemas/Project" - RouteFiltersData: + description: Stream alert rule metric operand + enum: + - ABOVE + - BELOW + warningThreshold: + type: string + description: Stream alert rule metric warning threshold + criticalThreshold: + type: string + description: Stream alert rule metric critical threshold + StreamAlertRule: type: object properties: href: type: string - description: Route filter URI + description: Stream Alert Rule URI format: uri - example: https://api.equinix.com/fabric/v4/routeFilters/695a8471-6595-4ac6-a2f4-b3d96ed3a59d - type: - type: string - description: Route Filter type - enum: - - BGP_IPv4_PREFIX_FILTER - - BGP_IPv6_PREFIX_FILTER + readOnly: true uuid: type: string - description: Route filter identifier + description: Equinix-assigned access point identifier format: uuid - example: 695a8471-6595-4ac6-a2f4-b3d96ed3a59d + example: c9b8e7a2-f3b1-4576-a4a9-1366a63df170 + type: + type: string + description: Stream subscription type + enum: + - METRIC_ALERT name: type: string - example: My-direct-route-1 + description: Customer-provided stream alert rule name description: type: string - description: Customer-provided connection description + description: Customer-provided stream alert rule description state: - $ref: "#/components/schemas/RouteFilterState" - change: - $ref: "#/components/schemas/RouteFiltersChange" - notMatchedRuleAction: type: string + description: Steam subscription provision state enum: - - ALLOW - - DENY - connectionsCount: - type: integer - example: 0 - rulesCount: - type: integer - example: 0 - project: - $ref: "#/components/schemas/RouteFiltersData_project" - changelog: + - ACTIVE + - INACTIVE + enabled: + type: boolean + description: Stream alert rule enabled status + default: true + metricSelector: + $ref: "#/components/schemas/MetricSelectorResponse" + resourceSelector: + $ref: "#/components/schemas/ResourceSelectorResponse" + detectionMethod: + $ref: "#/components/schemas/DetectionMethodResponse" + changeLog: $ref: "#/components/schemas/Changelog" - RouteFiltersPatchRequest: - minItems: 1 - type: array - description: Patch Route Filters request - items: - $ref: "#/components/schemas/RouteFiltersPatchRequestItem" - RouteFilterChangeDataResponse: - type: object - properties: - pagination: - $ref: "#/components/schemas/Pagination" - data: - type: array - items: - $ref: "#/components/schemas/RouteFilterChangeData" - description: List of route filter changes - ChangeId_1: + description: Stream object + AlertRuleId: type: string - description: Route Filters Change UUID + description: Stream Alert Rule UUID format: uuid - example: 6d500177-9404-41f2-99e8-2bf1a84d8db5 - RouteFilterChangeData: + example: 0bbcea48-1333-4ad5-a7ea-e4d58a5fbd15 + AlertRulePutRequest: + required: + - detectionMethod + - metricSelector + - name + - resourceSelector + - type type: object properties: - status: + name: + type: string + description: Customer-provided stream name + type: type: string - description: Current outcome of the change flow enum: - - COMPLETED - - FAILED - - REQUESTED - createdBy: + - METRIC_ALERT + description: type: string - description: Created by user key - createdDateTime: + description: Customer-provided stream description + enabled: + type: boolean + description: Stream alert rule enabled status + default: true + metricSelector: + $ref: "#/components/schemas/MetricSelector" + resourceSelector: + $ref: "#/components/schemas/ResourceSelector" + detectionMethod: + $ref: "#/components/schemas/DetectionMethod" + description: Create Stream Alert Rules + CompanyProfileRequest: + required: + - description + - name + - summary + - type + - webUrl + type: object + properties: + type: type: string - description: Set when change flow starts - format: date-time - updatedBy: + example: COMPANY_PROFILE + name: + maxLength: 50 + minLength: 1 type: string - description: Updated by user key - updatedDateTime: + example: Equinix + summary: + maxLength: 125 + minLength: 1 type: string - description: Set when change object is updated - format: date-time - information: + example: Global interconnection and data center company + description: + maxLength: 450 + minLength: 1 type: string - description: Additional information - data: - $ref: "#/components/schemas/RouteFiltersChangeOperation" - description: Current state of latest route filter change - allOf: - - $ref: "#/components/schemas/RouteFiltersChange" - GetRouteFilterGetConnectionsResponse: - type: object - properties: - pagination: - $ref: "#/components/schemas/Pagination" - data: - type: array - description: List of Connections using a Route Filter - items: - $ref: "#/components/schemas/RouteFilterConnectionsData" - RouteFiltersSearchRequest: - type: object - properties: - filter: - $ref: "#/components/schemas/SearchFilter" - pagination: - $ref: "#/components/schemas/PaginationRequest" - sort: - type: array - items: - $ref: "#/components/schemas/RouteFilterSortCriteria" - description: Search route filters - RouteFiltersSearchResponse: - type: object - properties: - pagination: - $ref: "#/components/schemas/Pagination" - data: + example: Equinix, Inc. connects the world's leading businesses to their customers, employees and partners inside the most interconnected data centers. + pointOfContacts: type: array - description: List of route filters + example: + - type: SUPPORT + contacts: + - name: Peter Griffin + role: Vice President of Sales + email: example1@example.com + - name: Taylor Swift + role: Director of Marketing + email: example2@example.com + - name: Darth Vader + role: Head of Engineering + email: example3@example.com items: - $ref: "#/components/schemas/RouteFiltersData" - GetRouteFilterRulesResponse: - type: object - properties: - pagination: - $ref: "#/components/schemas/Pagination" - data: + $ref: "#/components/schemas/CompanyProfileContact" + notifications: type: array - description: List of Route Filter Rules + example: + - type: NOTIFICATION + emails: + - example1@example.com + - example2@example.com items: - $ref: "#/components/schemas/RouteFilterRulesData" - RouteFilterRulesBase: - required: - - prefix - type: object - properties: - name: - type: string - example: Private-subnet-filter - description: + $ref: "#/components/schemas/SimplifiedNotification" + overview: type: string - description: Customer-provided Route Filter Rule description - prefix: + example: About Initech Corp

lorem ipsum

+ webUrl: type: string - example: 192.168.0.0/24 - prefixMatch: + example: https://www.equinix.com + contactUrl: type: string - example: orlonger, exact - default: orlonger - RouteFilterRulesData: + example: https://www.equinix.com/contact-us + CompanyProfileResponse: type: object properties: href: type: string - description: Route Filter Rules URI - format: uri - example: https://api.equinix.com/fabric/v4/routeFilters/695a8471-6595-4ac6-a2f4-b3d96ed3a59d/routeFilterRules/65b025ef-022b-4180-85cf-82cfc1ab655b - type: - type: string - description: Route filter type - enum: - - BGP_IPv4_PREFIX_FILTER_RULE - - BGP_IPv6_PREFIX_FILTER_RULE + example: https://api.equinix.com/fabric/v4/companyProfiles/123e4567-e89b-12d3-a456-426614174000 uuid: type: string - description: Route Filter Rule identifier - format: uuid - example: 65b025ef-022b-4180-85cf-82cfc1ab655b + example: 123e4567-e89b-12d3-a456-426614174000 + type: + type: string + example: COMPANY_PROFILE name: + maxLength: 50 + minLength: 1 type: string - example: Private-subnet-filter-2 + example: Equinix + summary: + maxLength: 125 + minLength: 1 + type: string + example: Global interconnection and data center company description: + maxLength: 450 + minLength: 1 type: string - description: Customer-provided Route Filter Rule description + example: Equinix, Inc. connects the world's leading businesses to their customers, employees and partners inside the most interconnected data centers. state: - $ref: "#/components/schemas/RouteFilterRuleState" - prefixMatch: + $ref: "#/components/schemas/CompanyProfileState" + account: + $ref: "#/components/schemas/CompanyProfileResponse_account" + metros: + type: array + example: + - href: https://api.equinix.com/fabric/v4/metros/SV + code: SV + name: Silicon Valley + items: + $ref: "#/components/schemas/CompanyMetro" + logo: + $ref: "#/components/schemas/CompanyLogo" + tags: + type: array + example: + - href: https://api.equinix.com/fabric/v4/tags/260af68b-42f0-4f2e-9c5c-2fbd44b4b387 + uuid: 260af68b-42f0-4f2e-9c5c-2fbd44b4b387 + type: RESOURCE_TAG + name: environment + displayName: Environment + items: + $ref: "#/components/schemas/TagResponse" + serviceProfiles: + type: array + example: + - href: https://api.equinix.com/fabric/v4/serviceProfiles/423af68b-42f0-4f2e-9c5c-2fbd44b4b387 + uuid: 423af68b-42f0-4f2e-9c5c-2fbd44b4b387 + items: + $ref: "#/components/schemas/CompanyServiceProfile" + privateServices: + type: array + example: + - href: https://api.equinix.com/fabric/v4/privateServices/460af68b-42f0-4f2e-9c5c-2fbd44b4b387 + uuid: 460af68b-42f0-4f2e-9c5c-2fbd44b4b387 + - href: https://api.equinix.com/fabric/v4/privateServices/8a5685a6-063d-41ac-9279-d32431e8d8f6 + uuid: 8a5685a6-063d-41ac-9279-d32431e8d8f6 + items: + $ref: "#/components/schemas/PrivateService" + pointOfContacts: + type: array + example: + - type: SUPPORT + contacts: + - name: Peter Griffin + role: Vice President of Sales + email: example1@example.com + - name: Taylor Swift + role: Director of Marketing + email: example2@example.com + - name: Darth Vader + role: Head of Engineering + email: example3@example.com + items: + $ref: "#/components/schemas/CompanyProfileContact" + notifications: + type: array + example: + - type: NOTIFICATION + emails: + - example1@example.com + - example2@example.com + items: + $ref: "#/components/schemas/SimplifiedNotification" + overview: type: string - description: prefix matching operator - example: exact - default: orlonger - change: - $ref: "#/components/schemas/RouteFilterRulesChange" - action: + example: About Initech Corp

lorem ipsum

+ webUrl: type: string - enum: - - PERMIT - - DENY - prefix: + example: https://www.equinix.com + contactUrl: type: string - example: 192.168.0.0/24 - changelog: + example: https://www.equinix.com/contact-us + change: + $ref: "#/components/schemas/CompanyProfileChange" + changeLog: $ref: "#/components/schemas/Changelog" - RouteFilterRuleId: - type: string - description: Route Filter Rule UUID - example: 65b025ef-022b-4180-85cf-82cfc1ab655b - RouteFilterRulesPatchRequest: - minItems: 1 - type: array - description: Patch Route Filters Rule request - items: - $ref: "#/components/schemas/RouteFilterRulesPatchRequestItem" - RouteFilterRulesChangeDataResponse: + CompanyProfileSearchRequest: type: object properties: + filter: + $ref: "#/components/schemas/CompanyProfileSearchFilters" pagination: $ref: "#/components/schemas/Pagination" - data: - type: array - items: - $ref: "#/components/schemas/RouteFilterRulesChangeData" - description: List of route filter rule changes - ChangeId_2: - type: string - description: Route Filter Rule Change UUID - format: uuid - example: 6d500177-9404-41f2-99e8-2bf1a84d8db5 - RouteFilterRulesChangeData: - type: object - properties: - status: - type: string - description: Current outcome of the change flow - enum: - - COMPLETED - - FAILED - - REQUESTED - createdBy: - type: string - description: Created by User Key - createdDateTime: - type: string - description: Set when change flow starts - format: date-time - updatedBy: - type: string - description: Updated by User Key - updatedDateTime: - type: string - description: Set when change object is updated - format: date-time - data: - $ref: "#/components/schemas/RouteFilterRulesChangeOperation" - description: Current state of latest route filter rules change - allOf: - - $ref: "#/components/schemas/RouteFilterRulesChange" - RouteFilterRulesPostRequest: - type: object - properties: - data: - type: array - description: Route Filter Rule configuration - items: - $ref: "#/components/schemas/RouteFilterRulesBase" - description: Create Route Filter Rule POST request - RouteFilterRulesSearchRequest: - type: object - properties: + sort: + $ref: "#/components/schemas/Sort" + example: filter: - $ref: "#/components/schemas/RouteFilterRulesFilter" + and: + - property: /state + operator: = + values: + - PROVISIONED + - or: + - property: /name + operator: ILIKE + values: + - equinix + - property: /tags/name + operator: = + values: + - environment pagination: - $ref: "#/components/schemas/PaginationRequest" + offset: 0 + limit: 20 + total: 0 sort: - type: array - items: - $ref: "#/components/schemas/RouteFilterRuleSortCriteria" - description: Search route filter rules - RouteFilterRulesFilter: - description: Top-level filter that can be either an AND expression or OR expression - anyOf: - - $ref: "#/components/schemas/RouteFilterRuleAndExpression" - - $ref: "#/components/schemas/RouteFilterRuleOrExpression" - RouteFilterRuleAndExpression: + property: /changeLog/updatedDateTime + direction: DESC + CompanyProfileSearchFilters: type: object properties: and: - maxItems: 8 - minItems: 1 type: array items: - $ref: "#/components/schemas/RouteFilterRuleExpression" - description: AND expression containing multiple filter expressions - RouteFilterRuleExpression: - description: Filter expression that can be AND, OR, or a simple expression - anyOf: - - $ref: "#/components/schemas/RouteFilterRuleAndExpression" - - $ref: "#/components/schemas/RouteFilterRuleOrExpression" - - $ref: "#/components/schemas/RouteFilterRuleSimpleExpression" - RouteFilterRuleOrExpression: + $ref: "#/components/schemas/CompanyProfileSearchFilter" + description: | + Filter criteria for company profile search. The `and` array combines conditions where all must match. Each item in `and` is either a simple expression (property/operator/values) or an `or` group. At most one `or` group is allowed per request. + CompanyProfileSearchFilter: type: object - properties: - or: - maxItems: 8 - minItems: 1 - type: array - items: - $ref: "#/components/schemas/RouteFilterRuleExpression" - description: OR expression containing multiple filter expressions - RouteFilterRuleSimpleExpression: + oneOf: + - $ref: "#/components/schemas/CompanyProfileSearchSimpleExpression" + - $ref: "#/components/schemas/CompanyProfileSearchOrFilter" + CompanyProfileSearchSimpleExpression: + required: + - operator + - property + - values type: object properties: property: - type: string description: | - Possible field names to use on filters: - * `/type` - Route Filter Rules Type - * `/name` - Route Filter Rules Name - * `/uuid` - Route Filter Rules uuid - * `/state` - Route Filter Rules status - * `/prefix` - Route Filter Rule Prefix - * `/prefixMatch` - Route Filter Rule Prefix Match - example: /name + Searchable field name. Properties are grouped by their supported operators: + String properties (support all operators): + * `/name` - Company profile name + * `/uuid` - Company profile UUID + * `/tags/name` - Tag name + * `/tags/uuid` - Tag UUID + * `/tags/displayName` - Tag display name + + Discrete value properties (only support `=`, `!=`, `IN`, `NOT IN`): + * `/state` - Company profile state (`PENDING`, `PROVISIONED`, `DEPROVISIONED`, `REJECTED`) + * `/metros/metroCode` - Metro code (e.g. `SV`, `NY`, `DC`) + * `/change/status` - Change status (`PENDING`, `COMPLETED`, `REJECTED`) — seller and admin users only + example: /state + allOf: + - $ref: "#/components/schemas/CompanyProfileSearchFieldName" operator: - type: string description: | - Possible operators to use on filters: - * `=` - equal - * `!=` - not equal - * `[NOT] LIKE` - (not) like - * `[NOT] IN` - (not) in - * `ILIKE` - case-insensitive like - example: = + Comparison operator. `LIKE`, `NOT LIKE`, `ILIKE`, and `NOT ILIKE` require exactly one value. All other operators accept one or more values. + * `=` - equal; equivalent to `IN` when multiple values are provided + * `!=` - not equal; equivalent to `NOT IN` when multiple values are provided + * `LIKE` - case-sensitive partial match (single value) + * `NOT LIKE` - case-sensitive partial non-match (single value) + * `ILIKE` - case-insensitive partial match (single value) + * `NOT ILIKE` - case-insensitive partial non-match (single value) + * `IN` - matches any of the provided values + * `NOT IN` - does not match any of the provided values + example: IN + allOf: + - $ref: "#/components/schemas/OperatorEnum" values: - maxItems: 8 minItems: 1 type: array + example: + - PROVISIONED + - PENDING items: type: string - example: Route_Filter_Rule_Demo - description: Simple filter expression with property, operator, and values - RouteFilterRuleSortCriteria: - type: object - properties: - direction: - $ref: "#/components/schemas/RouteFilterRuleSortDirection" - property: - $ref: "#/components/schemas/RouteFilterRuleSortBy" - RouteFilterRuleSortDirection: - type: string - description: Sorting direction - enum: - - DESC - - ASC - default: DESC - RouteFilterRuleSortBy: + CompanyProfileSearchFieldName: type: string - description: Possible field names to use on sorting + description: Searchable field names in company profile + example: /tags/name enum: - - /type - - /uuid - /name + - /uuid + - /tags/name + - /tags/uuid + - /tags/displayName - /state - - /prefix - - /prefixMatch - - /changeLog/createdDateTime - - /changeLog/updatedDateTime - default: /changeLog/updatedDateTime - RouteFilterRulesSearchResponse: + - /metros/metroCode + - /change/status + OperatorEnum: + type: string + description: Comparison operators for filtering + example: = + enum: + - = + - "!=" + - LIKE + - NOT LIKE + - ILIKE + - NOT ILIKE + - IN + - NOT IN + CompanyProfileSearchOrFilter: + required: + - or + type: object + properties: + or: + minItems: 1 + type: array + items: + $ref: "#/components/schemas/CompanyProfileSearchSimpleExpression" + description: | + Groups multiple simple expressions with OR logic. At most one `or` group is allowed within the top-level `and` array. + Sort: + type: object + properties: + property: + type: string + description: | + Property to sort by. Supported values: + * `/name` - Company profile name + * `/state` - Company profile state + * `/changeLog/updatedDateTime` - Date and time the profile was last updated + * `/changeLog/createdDateTime` - Date and time the profile was created + example: /changeLog/updatedDateTime + direction: + $ref: "#/components/schemas/CompanyProfileSortDirection" + CompanyProfileSearchResponse: + required: + - data + - pagination type: object properties: pagination: $ref: "#/components/schemas/Pagination" data: type: array - description: List of route filter rules items: - $ref: "#/components/schemas/RouteFilterRulesData" - RouteAggregationsBase: - required: - - name - - project - - type + $ref: "#/components/schemas/CompanyProfileResponse" + ServiceProfileListResponse: type: object properties: - type: - type: string - description: Route Aggregation type - enum: - - BGP_IPv4_PREFIX_AGGREGATION - - BGP_IPv6_PREFIX_AGGREGATION - name: - type: string - example: My-direct-route-1 - description: - type: string - description: Customer-provided connection description - project: - $ref: "#/components/schemas/Project" - RouteAggregationsData: + data: + type: array + description: List of service profiles + example: + - href: https://api.equinix.com/fabric/v4/serviceProfiles/423af68b-42f0-4f2e-9c5c-2fbd44b4b387 + uuid: 423af68b-42f0-4f2e-9c5c-2fbd44b4b387 + items: + $ref: "#/components/schemas/CompanyServiceProfile" + AttachServiceProfileResponse: + required: + - type + - uuid type: object properties: href: type: string - description: Route Aggregation URI - format: uri - example: https://api.equinix.com/fabric/v4/routeAggregations/695a8471-6595-4ac6-a2f4-b3d96ed3a59d + description: URL to the attached service profile + example: https://api.equinix.com/fabric/v4/serviceProfiles/423af68b-42f0-4f2e-9c5c-2fbd44b4b387 type: type: string - description: Route Aggregation type - enum: - - BGP_IPv4_PREFIX_AGGREGATION - - BGP_IPv6_PREFIX_AGGREGATION + description: Type of the service or attachment + example: SERVICE_PROFILE uuid: type: string - description: Route Aggregation identifier - format: uuid - example: 695a8471-6595-4ac6-a2f4-b3d96ed3a59d - name: - type: string - example: My-direct-route-1 - description: + description: Unique identifier for the service profile + example: 423af68b-42f0-4f2e-9c5c-2fbd44b4b387 + attachmentStatus: type: string - description: Customer-provided connection description - state: - $ref: "#/components/schemas/RouteAggregationState" - change: - $ref: "#/components/schemas/RouteAggregationsChange" - connectionsCount: - type: integer - example: 0 - rulesCount: - type: integer - example: 0 - project: - $ref: "#/components/schemas/RouteAggregationsData_project" - changeLog: - $ref: "#/components/schemas/Changelog" - RouteAggregationsPatchRequest: - minItems: 1 - type: array - description: Patch Route Aggregations request - items: - $ref: "#/components/schemas/RouteAggregationsPatchRequestItem" - RouteAggregationChangeDataResponse: + description: Status of the attachment operation + example: ATTACHED + TagListResponse: type: object properties: - pagination: - $ref: "#/components/schemas/Pagination" data: type: array items: - $ref: "#/components/schemas/RouteAggregationChangeData" - description: List of Route Aggregation changes - ChangeId_3: - type: string - description: Route Aggregations Change UUID - format: uuid - example: 6d500177-9404-41f2-99e8-2bf1a84d8db5 - RouteAggregationChangeData: + $ref: "#/components/schemas/TagResponse" + pagination: + $ref: "#/components/schemas/Pagination" + description: Equinix Fabric Tag List Response Object + TagResponse: type: object properties: - status: + href: type: string - description: Current outcome of the change flow - enum: - - COMPLETED - - FAILED - - REQUESTED - createdBy: + format: uri + example: https://api.equinix.com/fabric/v4/tags/18a127ad-9d0c-46e2-a66d-8ed85d1858b0 + uuid: type: string - description: Created by User Key - createdDateTime: + format: uuid + example: 18a127ad-9d0c-46e2-a66d-8ed85d1858b0 + type: type: string - description: Set when change flow starts - format: date-time - updatedBy: + example: PREDEFINED_TAG + name: type: string - description: Updated by User Key - updatedDateTime: + example: equinix.fabric.spotlight.ai.llm + displayName: type: string - description: Set when change object is updated - format: date-time - information: + example: LLM + state: type: string - description: Additional information - data: - $ref: "#/components/schemas/RouteAggregationsChangeOperation" - description: Current state of latest Route Aggregation change - allOf: - - $ref: "#/components/schemas/RouteAggregationsChange" - GetRouteAggregationGetConnectionsResponse: - type: object - properties: - pagination: - $ref: "#/components/schemas/Pagination" - data: + description: Status of the Tag request. Can be APPROVED, PENDING_APPROVAL, REJECT + example: PENDING_APPROVAL + enum: + - APPROVED + - PENDING_APPROVAL + - REJECTED + notifications: type: array - description: List of Connections using a Route Aggregation + example: + - type: NOTIFICATION + emails: + - example1@example.com + - example2@example.com items: - $ref: "#/components/schemas/RouteAggregationConnectionsData" - RouteAggregationsSearchRequest: + $ref: "#/components/schemas/SimplifiedNotification" + changeLog: + $ref: "#/components/schemas/Changelog" + description: Equinix Fabric Tag Response Object + AttachTagResponse: + required: + - type + - uuid type: object properties: - filter: - $ref: "#/components/schemas/SearchFilter" - pagination: - $ref: "#/components/schemas/PaginationRequest" - sort: - type: array - items: - $ref: "#/components/schemas/RouteAggregationSortCriteria" - description: Search route aggregations - RouteAggregationsSearchResponse: + href: + type: string + description: URL to the attached tag + example: https://api.equinix.com/fabric/v4/tags/260af68b-42f0-4f2e-9c5c-2fbd44b4b387 + type: + type: string + description: Type of the tag or attachment + example: TAG + uuid: + type: string + description: Unique identifier for the tag + example: 260af68b-42f0-4f2e-9c5c-2fbd44b4b387 + attachmentStatus: + type: string + description: Status of the attachment operation + example: ATTACHED + PrivateServiceListResponse: type: object properties: - pagination: - $ref: "#/components/schemas/Pagination" data: type: array - description: List of Route Aggregations + description: List of private services + example: + - href: https://api.equinix.com/fabric/v4/privateServices/460af68b-42f0-4f2e-9c5c-2fbd44b4b387 + uuid: 460af68b-42f0-4f2e-9c5c-2fbd44b4b387 items: - $ref: "#/components/schemas/RouteAggregationsData" - GetRouteAggregationRulesResponse: + $ref: "#/components/schemas/PrivateService" + AttachPrivateServiceResponse: + required: + - type + - uuid type: object properties: - pagination: - $ref: "#/components/schemas/Pagination" - data: - type: array - description: List of Route Aggregation Rules - items: - $ref: "#/components/schemas/RouteAggregationRulesData" - RouteAggregationRulesBase: + href: + type: string + description: URL to the attached private service + example: https://api.equinix.com/fabric/v4/privateServices/460af68b-42f0-4f2e-9c5c-2fbd44b4b387 + type: + type: string + description: Type of the private service or attachment + example: PRIVATE_SERVICE + uuid: + type: string + description: Unique identifier for the private service + example: 460af68b-42f0-4f2e-9c5c-2fbd44b4b387 + attachmentStatus: + type: string + description: Status of the attachment operation + example: ATTACHED + LogoRequest: required: - - prefix + - description + - logo + - name + - type type: object properties: + logo: + type: string + description: Logo image file + format: binary name: + maxLength: 24 + minLength: 1 type: string - example: Private-subnet-Aggregation + description: Name of the Logo + example: Equinix Logo description: + maxLength: 125 + minLength: 1 type: string - description: Customer-provided Route Aggregation Rule description - prefix: + description: Description of the logo + example: Company branding logo + type: type: string - example: 192.168.0.0/24 - RouteAggregationRulesData: + description: Type of logo + example: COMPANY_LOGO + description: Equinix Fabric Logo Request Object + LogoResponse: type: object properties: href: type: string - description: Route Aggregation Rules URI format: uri - example: https://api.equinix.com/fabric/v4/routeAggregations/695a8471-6595-4ac6-a2f4-b3d96ed3a59d/routeAggregationRules/65b025ef-022b-4180-85cf-82cfc1ab655b + example: https://api.equinix.com/fabric/v4/logos/18a127ad-9d0c-46e2-a66d-8ed85d1858b0 + uuid: + type: string + format: uuid + example: 18a127ad-9d0c-46e2-a66d-8ed85d1858b0 type: type: string - description: Route Aggregation type - enum: - - BGP_IPv4_PREFIX_AGGREGATION_RULE + description: Type of logo + example: COMPANY_LOGO + name: + type: string + example: Equinix Logo + description: + type: string + example: Company branding logo + status: + type: string + example: CREATED + extensionType: + type: string + example: .png + changelog: + $ref: "#/components/schemas/Changelog" + description: Equinix Fabric Logo Response Object + CreateLoa: + description: Create Loa + oneOf: + - $ref: "#/components/schemas/IssueLoa" + - $ref: "#/components/schemas/RequestLoa" + LoaResponse: + type: object + properties: + href: + type: string + description: URI of this LOA resource. + format: uri + example: https://api.equinix.com/fabric/v4/loas/29cc7878-54e3-4e1a-8651-87a61354bac2 uuid: type: string - description: Route Aggregation Rule identifier + description: Unique identifier of this LOA. format: uuid - example: 65b025ef-022b-4180-85cf-82cfc1ab655b + example: 29cc7878-54e3-4e1a-8651-87a61354bac2 + type: + $ref: "#/components/schemas/LoaType" name: type: string - example: Private-subnet-aggregation-2 + description: A short, descriptive name for this LOA + example: LOA-Equinix-SV1-2026 description: type: string - description: Customer-provided Route Aggregation Rule description + description: Additional context about this LOA + example: Authorization for patch panel port access to Equinix at SV1 + authorizedProductType: + $ref: "#/components/schemas/LoaProductType" state: - $ref: "#/components/schemas/RouteAggregationRuleState" - change: - $ref: "#/components/schemas/RouteAggregationRulesChange" - prefix: - type: string - example: 192.168.0.0/24 + $ref: "#/components/schemas/LoaState" + operation: + $ref: "#/components/schemas/LoaResponse_operation" + requestor: + $ref: "#/components/schemas/LoaRequestor" + issuer: + $ref: "#/components/schemas/LoaIssuer" + demarcationPoint: + $ref: "#/components/schemas/LoaDemarcationPoint" + location: + $ref: "#/components/schemas/LoaLocation" + expirationDateTime: + $ref: "#/components/schemas/LoaExpiration" changeLog: - $ref: "#/components/schemas/Changelog" - RouteAggregationRuleId: + $ref: "#/components/schemas/LoaChangelog" + description: Loa Response + LoaId: type: string - description: Route Aggregation Rule UUID - example: 65b025ef-022b-4180-85cf-82cfc1ab655b - RouteAggregationRulesPatchRequest: - minItems: 1 + description: Loa UUID + format: uuid + example: 29cc7878-54e3-4e1a-8651-87a61354bac2 + LoaUpdate: type: array - description: Patch Route Aggregations Rule request items: - $ref: "#/components/schemas/RouteAggregationRulesPatchRequestItem" - RouteAggregationRulesChangeDataResponse: + $ref: "#/components/schemas/LoaReplaceOperation" + LoaReplaceOperation: + required: + - op + - path + - value type: object properties: - pagination: - $ref: "#/components/schemas/Pagination" + op: + $ref: "#/components/schemas/LoaOpEnum" + path: + $ref: "#/components/schemas/LoaPath" + value: + type: object + description: New value for updated parameter + description: Replace attribute value or sub-resource in the existing model + LoaOpEnum: + type: string + description: Operation to be performed + enum: + - replace + - add + - remove + LoaPath: + type: string + description: | + ### A JSON Pointer path. + * `/name` - Name of the Loa + * `/description` - Description of the Loa + * `/requestor/email` - Email of the requestor contact + * `/requestor/orgName` - Organization name of the requestor + * `/issuer/email` - Email of the issuer contact + * `/issuer/orgName` - Organization name of the issuer + * `/demarcationPoint/patchPanelId` - Patch Panel Identifier + * `/demarcationPoint/patchPanelPortA` - Patch Panel Port A + * `/demarcationPoint/patchPanelPortB` - Patch Panel Port B + * `/demarcationPoint/connectorType` - Connector Type + * `/demarcationPoint/cageUniqueSpaceId` - Cage Unique Space Identifier + * `/expirationDateTime` - Expiration date and time of the Loa + * `/location/ibxCode` - IBX code of the Eligible location + LoaActionRequest: + title: AuthorizeLoa + required: + - type + type: object + properties: + type: + $ref: "#/components/schemas/LoaActionType" data: - type: array - items: - $ref: "#/components/schemas/RouteAggregationRulesChangeData" - description: List of Route Aggregation Rule changes - ChangeId_4: + $ref: "#/components/schemas/LoaActionData" + description: Action Request + LoaActionResponse: + type: object + properties: + href: + type: string + description: Action URI + format: uri + example: https://api.equinix.com/fabric/v4/loas/29cc7878-54e3-4e1a-8651-87a61354bac2/actions/30cc7878-54e3-4e1a-8651-87a61354bad4 + uuid: + type: string + description: Action Identifier + format: uuid + example: 30cc7878-54e3-4e1a-8651-87a61354bad4 + state: + $ref: "#/components/schemas/LoaActionState" + type: + $ref: "#/components/schemas/LoaActionType" + data: + $ref: "#/components/schemas/LoaActionData" + changeLog: + $ref: "#/components/schemas/LoaChangelog" + description: Action Response + ActionId_2: type: string - description: Route Aggregation Rule Change UUID + description: Action UUID format: uuid - example: 6d500177-9404-41f2-99e8-2bf1a84d8db5 - RouteAggregationRulesChangeData: + example: 30cc7878-54e3-4e1a-8651-87a61354bad4 + LoaSearchRequest: type: object properties: - status: + filter: + $ref: "#/components/schemas/LoaSearchFilters" + pagination: + $ref: "#/components/schemas/PaginationRequest" + sort: + type: array + items: + $ref: "#/components/schemas/LoaSortCriteria" + description: Search loas based on filter criteria + LoaSearchFilters: + type: object + properties: + and: + maxItems: 8 + type: array + items: + $ref: "#/components/schemas/LoaFilter" + LoaFilter: + type: object + anyOf: + - $ref: "#/components/schemas/LoaSimpleExpression" + - $ref: "#/components/schemas/LoaOrFilter" + LoaSimpleExpression: + type: object + properties: + property: + $ref: "#/components/schemas/LoaFieldName" + operator: type: string - description: Current outcome of the change flow + example: = enum: - - COMPLETED - - FAILED - - REQUESTED - createdBy: - type: string - description: Created by User Key - createdDateTime: - type: string - description: Set when change flow starts - format: date-time - updatedBy: + - = + - "!=" + - LIKE + - ILIKE + - BETWEEN + - NOT BETWEEN + - IN + - NOT IN + - ">" + - < + - ">=" + - <= + values: + type: array + example: + - Loa-2026 + items: + type: string + LoaFieldName: + type: string + description: Possible field names to use on filters + example: /name + enum: + - /uuid + - /state + - /type + - /name + - /authorizedProductType + - /expirationDateTime + - /requestor/email + - /requestor/orgId + - /requestor/orgName + - /issuer/email + - /issuer/orgId + - /issuer/orgName + - /demarcationPoint/patchPanelId + - /demarcationPoint/patchPanelPortA + - /demarcationPoint/patchPanelPortB + - /demarcationPoint/connectorType + - /demarcationPoint/cageUniqueSpaceId + - /location/ibxCode + - /changeLog/createdDateTime + - /changeLog/updatedDateTime + LoaOrFilter: + type: object + properties: + or: + type: array + items: + $ref: "#/components/schemas/LoaSimpleExpression" + LoaSortCriteria: + type: object + properties: + direction: type: string - description: Updated by User Key - updatedDateTime: + description: Sorting direction + default: DESC + enum: + - DESC + - ASC + property: type: string - description: Set when change object is updated - format: date-time - data: - $ref: "#/components/schemas/RouteAggregationRulesChangeOperation" - description: Current state of latest Route Aggregation Rules change - allOf: - - $ref: "#/components/schemas/RouteAggregationRulesChange" - RouteAggregationRulesPostRequest: + description: Possible field names to use on sorting + default: /changeLog/updatedDateTime + enum: + - /name + - /expirationDateTime + - /changeLog/createdDateTime + - /changeLog/updatedDateTime + LoaSearchResponse: type: object properties: + pagination: + $ref: "#/components/schemas/Pagination" + sort: + type: array + items: + $ref: "#/components/schemas/LoaSortCriteria" data: type: array - description: Route Aggregation Rule configuration items: - $ref: "#/components/schemas/RouteAggregationRulesBase" - description: Create Route Aggregation Rule POST request - RouteAggregationRulesSearchRequest: + $ref: "#/components/schemas/LoaResponse" + description: List of LOAs + LoaActionSearchRequest: type: object properties: filter: - $ref: "#/components/schemas/RouteAggregationRulesFilter" + $ref: "#/components/schemas/LoaActionSearchFilters" pagination: $ref: "#/components/schemas/PaginationRequest" sort: type: array items: - $ref: "#/components/schemas/RouteAggregationRuleSortCriteria" - description: Search route aggregation rules - RouteAggregationRulesFilter: - description: Top-level filter that can be either an AND expression or OR expression - anyOf: - - $ref: "#/components/schemas/RouteAggregationRuleAndExpression" - - $ref: "#/components/schemas/RouteAggregationRuleOrExpression" - RouteAggregationRuleAndExpression: + $ref: "#/components/schemas/LoaActionSortCriteria" + description: Search loa actions based on filter criteria + LoaActionSearchFilters: type: object properties: and: maxItems: 8 - minItems: 1 type: array items: - $ref: "#/components/schemas/RouteAggregationRuleExpression" - description: AND expression containing multiple filter expressions - RouteAggregationRuleExpression: - description: Filter expression that can be AND, OR, or a simple expression - anyOf: - - $ref: "#/components/schemas/RouteAggregationRuleAndExpression" - - $ref: "#/components/schemas/RouteAggregationRuleOrExpression" - - $ref: "#/components/schemas/RouteAggregationRuleSimpleExpression" - RouteAggregationRuleOrExpression: + $ref: "#/components/schemas/LoaActionFilter" + LoaActionFilter: type: object - properties: - or: - maxItems: 8 - minItems: 1 - type: array - items: - $ref: "#/components/schemas/RouteAggregationRuleExpression" - description: OR expression containing multiple filter expressions - RouteAggregationRuleSimpleExpression: + anyOf: + - $ref: "#/components/schemas/LoaActionSearchSimpleExpressions" + - $ref: "#/components/schemas/LoaActionOrFilter" + LoaActionSearchSimpleExpressions: type: object properties: property: - type: string - description: | - Possible field names to use on filters: - * `/type` - Route Aggregation Rules Type - * `/name` - Route Aggregation Rules Name - * `/uuid` - Route Aggregation Rules uuid - * `/state` - Route Aggregation Rules status - * `/prefix` - Route Aggregation Rule Prefix - example: /name + $ref: "#/components/schemas/LoaActionFieldName" operator: type: string - description: | - Possible operators to use on filters: - * `=` - equal - * `!=` - not equal - * `[NOT] LIKE` - (not) like - * `[NOT] IN` - (not) in - * `ILIKE` - case-insensitive like - example: = + enum: + - = + - "!=" + - LIKE + - ILIKE + - BETWEEN + - NOT BETWEEN + - IN + - NOT IN + - ">" + - < + - ">=" + - <= values: - maxItems: 8 - minItems: 1 type: array items: type: string - example: Route_Aggregation_Rule_Demo - description: Simple filter expression with property, operator, and values - RouteAggregationRuleSortCriteria: - type: object - properties: - direction: - $ref: "#/components/schemas/RouteAggregationRuleSortDirection" - property: - $ref: "#/components/schemas/RouteAggregationRuleSortBy" - RouteAggregationRuleSortDirection: - type: string - description: Sorting direction - enum: - - DESC - - ASC - default: DESC - RouteAggregationRuleSortBy: + example: LOA_ACCEPTANCE + LoaActionFieldName: type: string - description: Possible field names to use on sorting + description: Possible field names to use on filters enum: - /type - - /uuid - - /name - /state - - /prefix - - /changeLog/createdDateTime - - /changeLog/updatedDateTime - default: /changeLog/updatedDateTime - RouteAggregationRulesSearchResponse: + - /uuid + LoaActionOrFilter: type: object properties: - pagination: - $ref: "#/components/schemas/Pagination" - data: + or: type: array - description: List of route aggregation rules items: - $ref: "#/components/schemas/RouteAggregationRulesData" - CloudRouterPostRequest: - required: - - location - - name - - notification - - package - - type - allOf: - - $ref: "#/components/schemas/CloudRouterPostRequestBase" - CloudRouterPostRequestBase: + $ref: "#/components/schemas/LoaActionSearchSimpleExpressions" + LoaActionSortCriteria: type: object properties: - type: + direction: type: string + description: Sorting direction + default: DESC enum: - - XF_ROUTER - name: + - DESC + - ASC + property: type: string - description: Customer-provided Cloud Router name - location: - $ref: "#/components/schemas/SimplifiedLocationWithoutIBX" - package: - $ref: "#/components/schemas/CloudRouterPostRequestPackage" - order: - $ref: "#/components/schemas/Order" - project: - $ref: "#/components/schemas/Project" - account: - $ref: "#/components/schemas/SimplifiedAccount" - notifications: + description: Possible field names to use on sorting + default: /changeLog/createdDateTime + enum: + - /changeLog/createdDateTime + LoaActionSearchResponse: + type: object + properties: + pagination: + $ref: "#/components/schemas/Pagination" + sort: type: array - description: Preferences for notifications on connection configuration or status changes items: - $ref: "#/components/schemas/SimplifiedNotification" - marketplaceSubscription: - $ref: "#/components/schemas/marketplaceSubscription" - description: Create Cloud Router - CloudRouter: + $ref: "#/components/schemas/LoaActionSortCriteria" + data: + type: array + items: + $ref: "#/components/schemas/LoaActionResponse" + description: List of LOA Actions + LoaConsumersResponse: + type: object + properties: + pagination: + $ref: "#/components/schemas/Pagination" + data: + type: array + items: + $ref: "#/components/schemas/LoaConsumer" + description: List of Consumers associated with a LOA + LoaNotesResponse: + type: object + properties: + data: + type: array + items: + $ref: "#/components/schemas/LoaNoteDetails" + description: List of Loa note details + CreateLoaNote: + required: + - comments + type: object + properties: + comments: + maxLength: 4000 + minLength: 0 + type: string + description: | + The note content to add to this LOA. Notes are visible to both the issuer and requestor organizations. Use notes to communicate updates, clarifications, or additional context about the LOA. + example: LOA under review by our team. Expected response within 2 business days + description: Create Loa Note + LoaNoteDetails: type: object properties: + type: + type: string + description: | + Indicates which party added the note.
ISSUER — note was added by a user from the issuer organization.
REQUESTOR — note was added by a user from the requestor organization. + example: ISSUER + enum: + - ISSUER + - REQUESTOR href: type: string - description: Cloud Routers URI + description: URI to note resource. format: uri - readOnly: true - example: https://api.equinix.com/fabric/v4/routers/3c9b8e7a2-f3b1-4576-a4a9-1366a63df170 + example: https://api.equinix.com/fabric/v4/loas/b7e14c2d-93f8-4a61-8d5b-c29f71e4a306/notes/e41f485e-3094-42de-8797-0ef19a51df79 uuid: type: string - description: Equinix-assigned access point identifier + description: Unique identifier of this note. format: uuid - example: c9b8e7a2-f3b1-4576-a4a9-1366a63df170 - name: + example: e41f485e-3094-42de-8797-0ef19a51df79 + comments: type: string - description: Customer-provided Cloud Router name - format: string - example: test-fg-1 - state: - $ref: "#/components/schemas/CloudRouterAccessPointState" - equinixAsn: - type: integer - description: Equinix ASN - format: int64 - example: 30000 - connectionsCount: - minimum: 0 - type: integer - description: Number of connections associated with this Access point - marketplaceSubscription: - $ref: "#/components/schemas/marketplaceSubscription" - changeLog: - $ref: "#/components/schemas/Changelog" - change: - $ref: "#/components/schemas/CloudRouterChange" - description: Fabric Cloud Router object - allOf: - - $ref: "#/components/schemas/CloudRouterPostRequestBase" - RouterId: - type: string - description: Cloud Router UUID - format: uuid - example: 557400f8-d360-11e9-bb65-2a2ae2dbcce4 - CloudRouterUpdateRequest: - minItems: 1 - type: array - description: Fabric Cloud Router Update Request - items: - $ref: "#/components/schemas/CloudRouterChangeOperation" - RouterId_1: - type: string - description: Router UUID - format: uuid - example: 557400f8-d360-11e9-bb65-2a2ae2dbcce4 - ActionState: - $ref: "#/components/schemas/CloudRouterActionState" - CloudRouterActionState: - type: string - description: Cloud router action state - enum: - - SUCCEEDED - - FAILED - - PENDING - CloudRouterActionsSearchResponse: + description: Content of the note as submitted by the user. + example: LOA under review by our team. Expected response within 2 business days + createdDateTime: + type: string + description: Date and time when the note was created. + format: date-time + example: 2023-08-01T12:34:56Z + description: | + Represents a note added to a LOA by an authorized user from either the issuer or requestor organization + TagRequest: + required: + - displayName + - type type: object properties: - pagination: - $ref: "#/components/schemas/Pagination" - data: + type: + type: string + description: Type of tag + example: PREDEFINED_TAG + displayName: + maxLength: 24 + minLength: 1 + type: string + description: Display name of the Tag + example: LLM + notifications: type: array - description: Data returned from the API call. + example: + - type: NOTIFICATION + emails: + - example1@example.com + - example2@example.com items: - $ref: "#/components/schemas/CloudRouterActionResponse" - CloudRouterActionRequest: + $ref: "#/components/schemas/SimplifiedNotification" + description: Equinix Fabric Tag Request Object + AppDomainPostRequest: required: + - name + - project - type type: object properties: type: - $ref: "#/components/schemas/CloudRouterActionType" - connection: - $ref: "#/components/schemas/RouterActionsConnection" - description: Cloud router action request - CloudRouterActionResponse: + $ref: "#/components/schemas/AppDomainType" + name: + maxLength: 50 + minLength: 1 + type: string + description: Customer-provided App Domain name + format: string + example: atlassian.net + description: + type: string + description: Customer-provided App Domain description + format: string + example: Atlassian Domain + project: + $ref: "#/components/schemas/Project" + description: Create App Domain + AppDomain: required: - - changeLog - - state + - name + - project - type - - uuid type: object properties: + href: + type: string + description: Resource URI + format: uri + readOnly: true + example: https://api.equinix.com/fabric/v4/appDomains/20f3ef8e-d670-4236-86fa-bb0038adcfc3 + x-order: 1 type: - $ref: "#/components/schemas/CloudRouterActionType" + $ref: "#/components/schemas/AppDomainType" uuid: type: string + description: Equinix-assigned access point identifier format: uuid - example: 557400f8-d360-11e9-bb65-2a2ae2dbcce4 + example: 20f3ef8e-d670-4236-86fa-bb0038adcfc3 + x-order: 3 + name: + type: string + description: Customer-provided App Domain name + format: string + example: atlassian.net + x-order: 4 description: type: string - example: description + description: Customer-provided App Domain description + format: string + example: Atlassian Domain + x-order: 5 state: - $ref: "#/components/schemas/CloudRouterActionState" + $ref: "#/components/schemas/AppDomainState" + project: + $ref: "#/components/schemas/Project" changeLog: $ref: "#/components/schemas/Changelog" - href: - type: string - example: https://api.equinix.com//fabric/v4/routers/a1c6b7fd-aead-410a-96b4-b1dfa1071700/actions/1e9414f1-763e-4c0a-86c6-0bc8336048d9 - connection: - $ref: "#/components/schemas/RouterActionsConnection" - router: - $ref: "#/components/schemas/RouterActionsRouter" - description: Cloud router actions response object - CloudRouterActionsSearchRequest: + change: + $ref: "#/components/schemas/AppDomainChange" + description: App Domain object + AppDomainId: + type: string + description: App Domain UUID + format: uuid + example: 20f3ef8e-d670-4236-86fa-bb0038adcfc3 + AppDomainUpdateRequest: + maxItems: 1 + minItems: 1 + type: array + description: App Domain Update Request + items: + $ref: "#/components/schemas/AppDomainChangeOperation" + AppDomainSearchRequest: type: object properties: filter: - $ref: "#/components/schemas/CloudRouterActionsSearchFilters" + $ref: "#/components/schemas/AppDomainFilters" pagination: $ref: "#/components/schemas/PaginationRequest" sort: type: array items: - $ref: "#/components/schemas/CloudRouterActionsSearchSortCriteria" + $ref: "#/components/schemas/AppDomainSortCriteria" description: Search requests containing criteria - CloudRouterActionsSearchFilters: + AppDomainFilters: type: object properties: and: maxItems: 8 type: array items: - $ref: "#/components/schemas/CloudRouterActionsSearchFilter" - CloudRouterActionsSearchFilter: + $ref: "#/components/schemas/AppDomainFilter" + AppDomainFilter: type: object anyOf: - - $ref: "#/components/schemas/CloudRouterActionsSearchExpression" - - $ref: "#/components/schemas/CloudRouterActionsSearchOrFilter" - CloudRouterActionsSearchExpression: + - $ref: "#/components/schemas/AppDomainSimpleExpression" + - $ref: "#/components/schemas/AppDomainOrFilter" + AppDomainSimpleExpression: type: object properties: property: type: string description: | Possible field names to use on filters: - * `/type` - type of update - * `/state` - action state - * `/connection/uuid` - connection uuid associated - * `/*` - all-category search - example: /type + * `/project/projectId` - project id + * `/uuid` - App Domain uuid + * `/name` - App Domain name + * `/description` - App Domain description + * `/state` - App Domain status + * `/changeLog/createdDateTime` - App Domain creation timestamp + * `/changeLog/updatedDateTime` - App Domain last updated timestamp + * `/changeLog/deletedDateTime` - App Domain deletion timestamp + example: /name operator: type: string description: | Possible operators to use on filters: - * `=` - equal - * `!=` - not equal - * `>` - greater than - * `>=` - greater than or equal to - * `<` - less than - * `<=` - less than or equal to - * `[NOT] BETWEEN` - (not) between - * `[NOT] LIKE` - (not) like - * `[NOT] IN` - (not) in - * `~*` - case-insensitive like + * `=` - equal + * `!=` - not equal + * `>` - greater than + * `<` - less than + * `IN` - in + * `NOT IN` - not in + * `LIKE` - like + * `ILIKE` - case-insensitive like + * `BETWEEN` - between + * `NOT BETWEEN` - not between example: = values: type: array items: type: string - example: ROUTE_TABLE_ENTRY_UPDATE - CloudRouterActionsSearchOrFilter: + example: Gateway + AppDomainOrFilter: type: object properties: or: maxItems: 3 type: array items: - $ref: "#/components/schemas/CloudRouterActionsSearchExpression" - CloudRouterActionsSearchSortCriteria: + $ref: "#/components/schemas/AppDomainSimpleExpression" + AppDomainSortCriteria: type: object properties: direction: - $ref: "#/components/schemas/CloudRouterActionsSearchSortDirection" + $ref: "#/components/schemas/AppDomainSortDirection" property: - $ref: "#/components/schemas/CloudRouterActionsSearchSortBy" - CloudRouterActionsSearchSortDirection: + $ref: "#/components/schemas/AppDomainSortBy" + AppDomainSortDirection: type: string description: Sorting direction + default: DESC enum: - DESC - ASC - default: DESC - CloudRouterActionsSearchSortBy: + AppDomainSortBy: type: string - description: Possible field names to use on sorting - enum: - - /changeLog/createdDateTime - - /changeLog/updatedDateTime - - /connection/name - - /type + description: | + Possible field names to use on '400_InvalidSorting': + * `/name` - App Domain name + * `/uuid` - App Domain uuid + * `/state` - App Domain status + * `/changeLog/createdDateTime` - Date and time when change flow starts + * `/changeLog/updatedDateTime` - Date and time when change object is updated + format: string + example: /changeLog/updatedDateTime default: /changeLog/updatedDateTime - ActionId_1: + AppDomainSearchResponse: + type: object + properties: + pagination: + $ref: "#/components/schemas/Pagination" + data: + type: array + description: Data returned from the API call. + items: + $ref: "#/components/schemas/AppDomain" + AttachedAppLinkState: + type: array + description: Filter attached App Links by lifecycle state. + example: + - PROVISIONED + - PROVISIONING + items: + $ref: "#/components/schemas/AppLinkState" + AttachedAppLinkOrder: type: string - description: Action UUID - format: uuid - example: 457400f8-d360-11e9-bb65-2a2ae2dbcced - GetAllCloudRouterCommands: + description: Sort order for attached App Links. + example: DESC + default: DESC + enum: + - DESC + - ASC + Style: + type: string + description: Detail level of the response. + example: MEDIUM + default: MEDIUM + enum: + - MIN + - MEDIUM + - FULL + AppDomainAttachedAppLinks: type: object properties: pagination: $ref: "#/components/schemas/Pagination" data: type: array + description: Data returned from the API call. items: - $ref: "#/components/schemas/CloudRouterCommand" - description: List of Fabric Cloud Router Command - CloudRouterCommandPostRequest: + $ref: "#/components/schemas/AppDomainAttachedAppLink" + AppLinkPostRequest: required: + - bandwidth + - ipv4 + - name - project - - request + - router - type type: object properties: type: - $ref: "#/components/schemas/CloudRouterCommandType" + $ref: "#/components/schemas/AppLinkType" name: + maxLength: 50 + minLength: 1 type: string - description: Customer-provided Cloud Router Command name + description: Customer-provided App Link name + format: string + example: Atlassian App Link description: type: string - description: Customer-provided Cloud Router Command description + description: Customer-provided App Link description + format: string + example: Atlassian App Link in SV + router: + $ref: "#/components/schemas/AppLinkPostRequestRouter" + ipv4Address: + type: string + description: AppLink IP address + format: ipv4 + example: 192.168.10.1 + bandwidth: + type: integer + description: App Link aggregated data transfer capacity in Mbps + example: 1000 project: $ref: "#/components/schemas/Project" - request: - $ref: "#/components/schemas/CloudRouterCommandRequestPayload" - description: Execute Cloud Router Command Request - CloudRouterCommand: + description: Create App Link + AppLink: + required: + - bandwidth + - name + - project + - router + - type type: object properties: href: type: string - example: https://api.equinix.com//fabric/v4/routers/a1c6b7fd-aead-410a-96b4-b1dfa1071700/commands/1e9414f1-763e-4c0a-86c6-0bc8336048d9 + description: Resource URI + format: uri + readOnly: true + example: https://api.equinix.com/fabric/v4/appLinks/23cd19ab-d3bb-478b-9f25-bd12a3af1914 + x-order: 1 type: - $ref: "#/components/schemas/CloudRouterCommandType" + $ref: "#/components/schemas/AppLinkType" uuid: type: string + description: Equinix-assigned access point identifier format: uuid - example: 557400f8-d360-11e9-bb65-2a2ae2dbcce4 + example: 23cd19ab-d3bb-478b-9f25-bd12a3af1914 + x-order: 3 name: type: string - description: Customer-provided Cloud Router name + description: Customer-provided App Link name format: string - example: test-fg-1 + example: Atlassian App Link + x-order: 4 description: type: string - example: description + description: Customer-provided App Link description + format: string + example: Atlassian App Link in SV + x-order: 5 state: - $ref: "#/components/schemas/CloudRouterCommandState" + $ref: "#/components/schemas/AppLinkState" + router: + $ref: "#/components/schemas/AppLinkCloudRouter" + ipv4Address: + type: string + description: App Link IP address + format: ipv4 + example: 192.168.10.1 + x-order: 8 + bandwidth: + type: integer + description: App Link aggregated data transfer capacity in Mbps + example: 1000 + x-order: 9 project: $ref: "#/components/schemas/Project" - request: - $ref: "#/components/schemas/CloudRouterCommandRequestResponse" - response: - $ref: "#/components/schemas/CloudRouterCommandResponse" changeLog: $ref: "#/components/schemas/Changelog" - description: Get Fabric Cloud Router Command response object - CloudRouterCommandSearchRequest: + change: + $ref: "#/components/schemas/AppLinkChange" + description: App Link object + AppLinkId: + type: string + description: App Link UUID + format: uuid + example: 23cd19ab-d3bb-478b-9f25-bd12a3af1914 + AppLinkUpdateRequest: + maxItems: 1 + minItems: 1 + type: array + description: App Link Update Request + items: + $ref: "#/components/schemas/AppLinkChangeOperation" + AppLinkSearchRequest: type: object properties: filter: - $ref: "#/components/schemas/CloudRouterCommandSearchFilters" + $ref: "#/components/schemas/AppLinkFilters" pagination: $ref: "#/components/schemas/PaginationRequest" sort: type: array items: - $ref: "#/components/schemas/CloudRouterCommandSearchSortCriteria" + $ref: "#/components/schemas/AppLinkSortCriteria" description: Search requests containing criteria - CloudRouterCommandSearchFilters: + AppLinkFilters: type: object properties: and: maxItems: 8 type: array items: - $ref: "#/components/schemas/CloudRouterCommandSearchFilter" - CloudRouterCommandSearchFilter: + $ref: "#/components/schemas/AppLinkFilter" + AppLinkFilter: type: object anyOf: - - $ref: "#/components/schemas/CloudRouterCommandSearchExpression" - - $ref: "#/components/schemas/CloudRouterCommandSearchOrFilter" - CloudRouterCommandSearchExpression: + - $ref: "#/components/schemas/AppLinkSimpleExpression" + - $ref: "#/components/schemas/AppLinkOrFilter" + AppLinkSimpleExpression: type: object properties: property: type: string description: | Possible field names to use on filters: - * `/type` - type of command - * `/name` - name of command - * `/state` - state of command - * `/request/destination` - destination of command request - * `/request/sourceConnection/uuid` - source connection uuid - * `/*` - all-category search - example: /state + * `/project/projectId` - project id + * `/uuid` - App Link uuid + * `/name` - App Link name + * `/description` - App Link description + * `/state` - App Link status + * `/ipv4Address` - App Link ipv4 address + * `/bandwidth` - App Link bandwidth + * `/changeLog/createdDateTime` - App Link creation timestamp + * `/changeLog/updatedDateTime` - App Link last updated timestamp + * `/changeLog/deletedDateTime` - App Link deletion timestamp + example: /name operator: type: string description: | Possible operators to use on filters: - * `=` - equal - * `!=` - not equal - * `>` - greater than - * `>=` - greater than or equal to - * `<` - less than - * `<=` - less than or equal to - * `[NOT] BETWEEN` - (not) between - * `[NOT] LIKE` - (not) like - * `[NOT] IN` - (not) in - * `~*` - case-insensitive like + * `=` - equal + * `!=` - not equal + * `>` - greater than + * `<` - less than + * `IN` - in + * `NOT IN` - not in + * `LIKE` - like + * `ILIKE` - case-insensitive like + * `BETWEEN` - between + * `NOT BETWEEN` - not between example: = values: type: array items: type: string - example: PING_COMMAND - CloudRouterCommandSearchOrFilter: + example: Gateway + AppLinkOrFilter: type: object properties: or: maxItems: 3 type: array items: - $ref: "#/components/schemas/CloudRouterCommandSearchExpression" - CloudRouterCommandSearchSortCriteria: + $ref: "#/components/schemas/AppLinkSimpleExpression" + AppLinkSortCriteria: type: object properties: direction: - $ref: "#/components/schemas/CloudRouterCommandSearchSortDirection" + $ref: "#/components/schemas/AppLinkSortDirection" property: - $ref: "#/components/schemas/CloudRouterCommandSearchSortBy" - CloudRouterCommandSearchSortDirection: + $ref: "#/components/schemas/AppLinkSortBy" + AppLinkSortDirection: type: string description: Sorting direction + default: DESC enum: - DESC - ASC - default: DESC - CloudRouterCommandSearchSortBy: + AppLinkSortBy: type: string - description: Possible field names to use on sorting - enum: - - /changeLog/createdDateTime - - /changeLog/updatedDateTime - - /name - - /type + description: | + Possible field names to use on '400_InvalidSorting': + * `/name` - App Link name + * `/uuid` - App Link uuid + * `/state` - App Link status + * `/changeLog/createdDateTime` - Date and time when change flow starts + * `/changeLog/updatedDateTime` - Date and time when change object is updated + format: string + example: /changeLog/updatedDateTime default: /changeLog/updatedDateTime - CloudRouterCommandSearchResponse: + AppLinkSearchResponse: type: object properties: pagination: @@ -19592,106 +28311,120 @@ components: type: array description: Data returned from the API call. items: - $ref: "#/components/schemas/CloudRouterCommand" - CommandId: - type: string - description: Command UUID - format: uuid - example: 37c10edc-ba2e-4240-a850-8a48f9c47d00 - RouteTableEntrySearchRequest: + $ref: "#/components/schemas/AppLink" + AppLinkAppDomainAttachment: + required: + - uuid + type: object + properties: + href: + type: string + description: Resource URI + format: uri + readOnly: true + example: https://api.equinix.com/fabric/v4/appLinks/23cd19ab-d3bb-478b-9f25-bd12a3af1914/appDomains/20f3ef8e-d670-4236-86fa-bb0038adcfc3 + x-order: 1 + type: + $ref: "#/components/schemas/AppDomainType" + uuid: + type: string + description: Equinix-assigned access point identifier + format: uuid + example: 20f3ef8e-d670-4236-86fa-bb0038adcfc3 + x-order: 3 + name: + type: string + description: Customer-provided App Domain name + example: atlassian.net + x-order: 4 + attachmentStatus: + $ref: "#/components/schemas/AppLinkAttachState" + changeLog: + $ref: "#/components/schemas/Changelog" + description: App Link Attached App Domain object + AppLinkAttachDomainSearchRequest: type: object properties: filter: - $ref: "#/components/schemas/RouteTableEntryFilters" + $ref: "#/components/schemas/AppLinkAttachDomainFilters" pagination: $ref: "#/components/schemas/PaginationRequest" sort: type: array items: - $ref: "#/components/schemas/RouteTableEntrySortCriteria" + $ref: "#/components/schemas/AppLinkAttachDomainSortCriteria" description: Search requests containing criteria - RouteTableEntryFilters: + AppLinkAttachDomainFilters: type: object properties: and: maxItems: 8 type: array items: - $ref: "#/components/schemas/RouteTableEntryFilter" - RouteTableEntryFilter: + $ref: "#/components/schemas/AppLinkAttachDomainFilter" + AppLinkAttachDomainFilter: type: object anyOf: - - $ref: "#/components/schemas/RouteTableEntrySimpleExpression" - - $ref: "#/components/schemas/RouteTableEntryOrFilter" - RouteTableEntrySimpleExpression: + - $ref: "#/components/schemas/AppLinkAttachDomainSimpleExpression" + - $ref: "#/components/schemas/AppLinkAttachDomainOrFilter" + AppLinkAttachDomainSimpleExpression: type: object properties: property: type: string description: | Possible field names to use on filters: - * `/type` - Route table entry type - * `/prefix` - Route table entry prefix - * `/nextHop` - Route table entry nextHop - * `/state` - Route table entry state - * `/MED` - Route table entry med - * `/*` - all-category search - example: /type + * `/uuid` - App Domain attach to App Link uuid + * `/attachmentStatus` - App Domain attach to App Link status + example: /attachmentStatus operator: type: string description: | Possible operators to use on filters: - * `=` - equal - * `!=` - not equal - * `>` - greater than - * `>=` - greater than or equal to - * `<` - less than - * `<=` - less than or equal to - * `[NOT] BETWEEN` - (not) between - * `[NOT] LIKE` - (not) like - * `[NOT] IN` - (not) in - * `~*` - case-insensitive like + * `=` - equal + * `!=` - not equal + * `IN` - in + * `NOT IN` - not in example: = values: type: array items: type: string - example: IPv4_BGP_ROUTE - RouteTableEntryOrFilter: + example: Gateway + AppLinkAttachDomainOrFilter: type: object properties: or: maxItems: 3 type: array items: - $ref: "#/components/schemas/RouteTableEntrySimpleExpression" - RouteTableEntrySortCriteria: + $ref: "#/components/schemas/AppLinkAttachDomainSimpleExpression" + AppLinkAttachDomainSortCriteria: type: object properties: direction: - $ref: "#/components/schemas/RouteTableEntrySortDirection" + $ref: "#/components/schemas/AppLinkAttachDomainSortDirection" property: - $ref: "#/components/schemas/RouteTableEntrySortBy" - RouteTableEntrySortDirection: + $ref: "#/components/schemas/AppLinkAttachDomainSortBy" + AppLinkAttachDomainSortDirection: type: string description: Sorting direction + default: DESC enum: - DESC - ASC - default: DESC - RouteTableEntrySortBy: + AppLinkAttachDomainSortBy: type: string - description: Possible field names to use on sorting - enum: - - /changeLog/createdDateTime - - /changeLog/updatedDateTime - - /prefix - - /nextHop - - /connection/name - - /type - - /MED + description: | + Possible field names to use on '400_InvalidSorting': + * `/uuid` - App Domain attach to App Link uuid + * `/attachmentStatus` - App Domain attach to App Link status + * `/changeLog/createdDateTime` - Date and time when change flow starts + * `/changeLog/updatedDateTime` - Date and time when change object is updated + format: string + example: /changeLog/updatedDateTime default: /changeLog/updatedDateTime - RouteTableEntrySearchResponse: + AppLinkAttachDomainSearchResponse: type: object properties: pagination: @@ -19700,357 +28433,184 @@ components: type: array description: Data returned from the API call. items: - $ref: "#/components/schemas/RouteTableEntry" - ValidateRequest: - type: object - properties: - filter: - $ref: "#/components/schemas/ValidateRequest_filter" - description: Validate connection auth api key or vlan - ValidateSubnetResponse: - type: object - properties: - additionalInfo: - type: array - description: Additional information - items: - $ref: "#/components/schemas/ConnectionSideAdditionalInfo" - description: ValidateResponse - GatewayAttachmentListResponse: - required: - - data - - pagination + $ref: "#/components/schemas/AppLinkAppDomainAttachment" + AttachedAppDomainAttachmentStatus: + type: array + description: Filter attached App Domains by attachment lifecycle state. + example: + - ATTACHED + - ATTACHING + items: + $ref: "#/components/schemas/AppLinkAttachState" + AttachedAppDomainOrder: + type: string + description: Sort order for attached App Domains. + example: DESC + default: DESC + enum: + - DESC + - ASC + AppLinkAttachedAppDomains: type: object properties: pagination: $ref: "#/components/schemas/Pagination" data: type: array + description: Data returned from the API call. items: - $ref: "#/components/schemas/GatewayAttachmentResponse" - GatewayId: + $ref: "#/components/schemas/AppLinkAttachedAppDomain" + AppServiceId: type: string - description: Gateway UUID + description: App Service UUID format: uuid - example: 6658cc3b-18e0-437c-b972-62b51a419a1e - GatewayAttachmentResponse: + example: 557400f8-d360-11e9-bb65-2a2ae2dbcce4 + AppLinkAppServiceAttachment: + required: + - destinationIp + - geoScope + - uuid type: object properties: href: type: string + description: Resource URI format: uri + readOnly: true + example: https://api.equinix.com/fabric/v4/appLinks/23cd19ab-d3bb-478b-9f25-bd12a3af1914/appServices/5008a109-9d1c-485c-b0ba-de9736f283c2 + x-order: 1 type: - type: string - enum: - - VPN_GATEWAY + $ref: "#/components/schemas/AppServiceType" uuid: type: string + description: Equinix-assigned access point identifier format: uuid - attachmentStatus: + example: 5008a109-9d1c-485c-b0ba-de9736f283c2 + x-order: 3 + geoScope: type: string - enum: - - ATTACHING - - ATTACHED - - DETACHING - - DETACHED - - FAILED - errors: - type: array - items: - $ref: "#/components/schemas/Error" + description: Geo scope for the App Service + example: GLOBAL + x-order: 4 + destinationIp: + type: string + description: Target IP for forwarding API requests + format: ipv4 + example: 10.10.1.110 + x-order: 5 + attachmentStatus: + $ref: "#/components/schemas/AppLinkAttachState" changeLog: $ref: "#/components/schemas/Changelog" - description: Schema representing a Gateway attaching or detaching on a Cloud Router. This schema defines the structure of the response returned when a Gateway is attached or detached to a Cloud Router. - CloudRouterRouteFiltersSearchBase: - type: object - properties: - filter: - $ref: "#/components/schemas/CloudRouterRouteFiltersFilter" - pagination: - $ref: "#/components/schemas/Pagination" - sort: - maxItems: 3 - minItems: 1 - type: array - items: - $ref: "#/components/schemas/RfAttachmentSortItem" - CloudRouterRouteFiltersFilter: - description: Top-level filter that can be either an AND expression or OR expression - anyOf: - - $ref: "#/components/schemas/CloudRouterRouteFilterAndExpression" - - $ref: "#/components/schemas/CloudRouterRouteFilterOrExpression" - CloudRouterRouteFilterAndExpression: - type: object - properties: - and: - maxItems: 8 - minItems: 1 - type: array - items: - $ref: "#/components/schemas/CloudRouterRouteFilterExpression" - description: AND expression containing multiple filter expressions - CloudRouterRouteFilterExpression: - description: Filter expression that can be AND, OR, or a simple expression - anyOf: - - $ref: "#/components/schemas/CloudRouterRouteFilterAndExpression" - - $ref: "#/components/schemas/CloudRouterRouteFilterOrExpression" - - $ref: "#/components/schemas/CloudRouterRouteFilterSimpleExpression" - CloudRouterRouteFilterOrExpression: - type: object - properties: - or: - maxItems: 8 - minItems: 1 - type: array - items: - $ref: "#/components/schemas/CloudRouterRouteFilterExpression" - description: OR expression containing multiple filter expressions - CloudRouterRouteFilterSimpleExpression: - type: object - properties: - property: - type: string - enum: - - /type - - /direction - - /attachmentStatus - - /changeLog/createdDateTime - - /changeLog/updatedDateTime - operator: - type: string - values: - maxItems: 8 - minItems: 1 - type: array - items: - type: string - RfAttachmentSortItem: - type: object - properties: - property: - type: string - description: Possible field names to use on sorting - enum: - - /type - - /uuid - - /direction - - /attachmentStatus - - /changeLog/createdDateTime - - /changeLog/updatedDateTime - default: /changeLog/updatedDateTime - direction: - type: string - description: Sorting direction - enum: - - DESC - - ASC - default: DESC - CloudRouterRouteFiltersSearchResponse: - type: object - properties: - pagination: - $ref: "#/components/schemas/Pagination" - data: - type: array - description: List of route filter attachments for a given cloud router - items: - $ref: "#/components/schemas/ConnectionRouteFilterData" - CloudRouterRouteAggregationsSearchBase: - type: object - properties: - filter: - $ref: "#/components/schemas/CloudRouterRouteAggregationsFilter" - pagination: - $ref: "#/components/schemas/Pagination" - sort: - maxItems: 3 - minItems: 1 - type: array - items: - $ref: "#/components/schemas/RaAttachmentSortItem" - CloudRouterRouteAggregationsFilter: - description: Top-level filter that can be either an AND expression or OR expression - anyOf: - - $ref: "#/components/schemas/CloudRouterRouteAggregationAndExpression" - - $ref: "#/components/schemas/CloudRouterRouteAggregationOrExpression" - CloudRouterRouteAggregationAndExpression: - type: object - properties: - and: - maxItems: 8 - minItems: 1 - type: array - items: - $ref: "#/components/schemas/CloudRouterRouteAggregationExpression" - description: AND expression containing multiple filter expressions - CloudRouterRouteAggregationExpression: - description: Filter expression that can be AND, OR, or a simple expression - anyOf: - - $ref: "#/components/schemas/CloudRouterRouteAggregationAndExpression" - - $ref: "#/components/schemas/CloudRouterRouteAggregationOrExpression" - - $ref: "#/components/schemas/CloudRouterRouteAggregationSimpleExpression" - CloudRouterRouteAggregationOrExpression: - type: object - properties: - or: - maxItems: 8 - minItems: 1 - type: array - items: - $ref: "#/components/schemas/CloudRouterRouteAggregationExpression" - description: OR expression containing multiple filter expressions - CloudRouterRouteAggregationSimpleExpression: - type: object - properties: - property: - type: string - enum: - - /type - - /attachmentStatus - - /changeLog/createdDateTime - - /changeLog/updatedDateTime - operator: - type: string - values: - type: array - items: - type: string - RaAttachmentSortItem: - type: object - properties: - property: - type: string - description: Possible field names to use on sorting - enum: - - /type - - /uuid - - /attachmentStatus - - /changeLog/createdDateTime - - /changeLog/updatedDateTime - default: /changeLog/updatedDateTime - direction: - type: string - description: Sorting direction - enum: - - DESC - - ASC - default: DESC - CloudRouterRouteAggregationsSearchResponse: + change: + $ref: "#/components/schemas/AppLinkAppServiceAttachmentChange" + description: App Link Attached App Service object + AppLinkAttachServiceRequest: + required: + - destinationIp + - geoScope type: object properties: - pagination: - $ref: "#/components/schemas/Pagination" - data: - type: array - description: List of route aggregation attachments for a given cloud router - items: - $ref: "#/components/schemas/ConnectionRouteAggregationData" - CloudRouterSearchRequest: + geoScope: + type: string + description: Geo scope for the App Service + example: GLOBAL + destinationIp: + type: string + description: Target IP for forwarding API requests + format: ipv4 + example: 10.10.1.110 + description: Attach App Service to App Link + AppLinkAttachServiceUpdateRequest: + maxItems: 1 + minItems: 1 + type: array + description: App Service attachment Update Request + items: + $ref: "#/components/schemas/AppLinkAppServiceAttachmentChangeOperation" + AppLinkAttachServiceSearchRequest: type: object properties: filter: - $ref: "#/components/schemas/CloudRouterFilters" + $ref: "#/components/schemas/AppLinkAttachServiceFilters" pagination: $ref: "#/components/schemas/PaginationRequest" sort: type: array items: - $ref: "#/components/schemas/CloudRouterSortCriteria" + $ref: "#/components/schemas/AppLinkAttachServiceSortCriteria" description: Search requests containing criteria - CloudRouterFilters: + AppLinkAttachServiceFilters: type: object properties: and: maxItems: 8 type: array items: - $ref: "#/components/schemas/CloudRouterFilter" - CloudRouterFilter: + $ref: "#/components/schemas/AppLinkAttachServiceFilter" + AppLinkAttachServiceFilter: type: object anyOf: - - $ref: "#/components/schemas/CloudRouterSimpleExpression" - - $ref: "#/components/schemas/CloudRouterOrFilter" - CloudRouterSimpleExpression: + - $ref: "#/components/schemas/AppLinkAttachServiceSimpleExpression" + - $ref: "#/components/schemas/AppLinkAttachServiceOrFilter" + AppLinkAttachServiceSimpleExpression: type: object properties: property: type: string description: | Possible field names to use on filters: - * `/project/projectId` - project id (mandatory) - * `/name` - Fabric Cloud Router name - * `/uuid` - Fabric Cloud Router uuid - * `/state` - Fabric Cloud Router status - * `/location/metroCode` - Fabric Cloud Router metro code - * `/location/metroName` - Fabric Cloud Router metro name - * `/package/code` - Fabric Cloud Router package - * `/type` - Fabric Cloud Router type - * `/connectionsCount` - Fabric Cloud Router attached connections count - * `/changeLog/createdDateTime` - Fabric Cloud Router creation timestamp - * `/changeLog/updatedDateTime` - Fabric Cloud Router last updated timestamp - * `/changeLog/deletedDateTime` - Fabric Cloud Router deletion timestamp - * `/*` - all-category search - example: /name + * `/uuid` - App Service attach to App Link uuid + * `/attachmentStatus` - App Service attach to App Link status + example: /attachmentStatus operator: type: string description: | Possible operators to use on filters: - * `=` - equal - * `!=` - not equal - * `>` - greater than - * `>=` - greater than or equal to - * `<` - less than - * `<=` - less than or equal to - * `[NOT] BETWEEN` - (not) between - * `[NOT] LIKE` - (not) like - * `[NOT] IN` - (not) in - * `ILIKE` - case-insensitive like + * `=` - equal + * `!=` - not equal + * `IN` - in + * `NOT IN` - not in example: = values: type: array items: type: string - example: FabricCloudRouter-1 - CloudRouterOrFilter: + example: Gateway + AppLinkAttachServiceOrFilter: type: object properties: or: maxItems: 3 type: array items: - $ref: "#/components/schemas/CloudRouterSimpleExpression" - CloudRouterSortCriteria: + $ref: "#/components/schemas/AppLinkAttachServiceSimpleExpression" + AppLinkAttachServiceSortCriteria: type: object properties: direction: - $ref: "#/components/schemas/CloudRouterSortDirection" + $ref: "#/components/schemas/AppLinkAttachServiceSortDirection" property: - $ref: "#/components/schemas/CloudRouterSortBy" - CloudRouterSortDirection: + $ref: "#/components/schemas/AppLinkAttachServiceSortBy" + AppLinkAttachServiceSortDirection: type: string description: Sorting direction + default: DESC enum: - DESC - ASC - default: DESC - CloudRouterSortBy: + AppLinkAttachServiceSortBy: type: string - description: Possible field names to use on sorting - enum: - - /name - - /uuid - - /state - - /location/metroCode - - /location/metroName - - /package/code - - /type - - /connectionsCount - - /changeLog/createdDateTime - - /changeLog/updatedDateTime - - /changeLog/deletedDateTime - - /order/termLength + description: | + Possible field names to use on '400_InvalidSorting': + * `/uuid` - App Service attach to App Link uuid + * `/attachmentStatus` - App Service attach to App Link status + * `/changeLog/createdDateTime` - Date and time when change flow starts + * `/changeLog/updatedDateTime` - Date and time when change object is updated + format: string + example: /changeLog/updatedDateTime default: /changeLog/updatedDateTime - SearchResponse: + AppLinkAttachServiceSearchResponse: type: object properties: pagination: @@ -20059,8 +28619,24 @@ components: type: array description: Data returned from the API call. items: - $ref: "#/components/schemas/CloudRouter" - PackageResponse: + $ref: "#/components/schemas/AppLinkAppServiceAttachment" + AttachedAppServiceAttachmentStatus: + type: array + description: Filter attached App Services by attachment lifecycle state. + example: + - ATTACHED + - ATTACHING + items: + $ref: "#/components/schemas/AppLinkAttachState" + AttachedAppServiceOrder: + type: string + description: Sort order for attached App Services. + example: DESC + default: DESC + enum: + - DESC + - ASC + AppLinkAttachedAppServices: type: object properties: pagination: @@ -20069,604 +28645,506 @@ components: type: array description: Data returned from the API call. items: - $ref: "#/components/schemas/CloudRouterPackage" - RouterPackageCode: - type: string - description: Router package code - enum: - - LAB - - BASIC - - STANDARD - - ADVANCED - - PREMIUM - CloudRouterPackage: + $ref: "#/components/schemas/AppLinkAttachedAppService" + AppServicePostRequest: + required: + - endpoint + - name + - project + - type type: object properties: - href: - type: string - description: Cloud Router package URI - format: uri - readOnly: true - example: https://api.equinix.com/fabric/v4/routerPackages/LAB type: + $ref: "#/components/schemas/AppServiceType" + name: + maxLength: 50 + minLength: 1 type: string - description: Type of Router package - example: ROUTER_PACKAGE - enum: - - ROUTER_PACKAGE - code: - $ref: "#/components/schemas/code" + description: Customer-provided App Service name + format: string + example: Atlassian App Service description: type: string - description: Fabric Cloud Router Package description - totalIPv4RoutesMax: - minimum: 0 - type: integer - description: Cloud Router package BGP IPv4 routes limit - example: 50 - totalIPv6RoutesMax: - minimum: 0 - type: integer - description: Cloud Router package BGP IPv6 routes limit - example: 50 - routeFilterSupported: - type: boolean - description: CloudRouter package route filter support - vcCountMax: - minimum: 0 - type: integer - description: CloudRouter package Max Connection limit - example: 10 - crCountMax: - minimum: 0 - type: integer - description: CloudRouter package Max CloudRouter limit - example: 3 - vcBandwidthMax: - minimum: 0 - type: integer - description: CloudRouter package Max Bandwidth limit - example: 50 - changeLog: - $ref: "#/components/schemas/PackageChangeLog" - description: Fabric Cloud Router Package - HealthResponse: - type: object - properties: - href: - type: string - description: The Canonical URL at which the resource resides. - version: - type: string - description: Indicator of a version - release: - type: string - description: release details. - state: + description: Customer-provided App Service description + format: string + example: Atlassian App Service in SV + endpoint: type: string - description: status of a service - apiServices: - $ref: "#/components/schemas/ApiServices" - description: GET Services Health - ConnectionResponse: - type: object - properties: - additionalInfo: - type: array - description: Additional information - items: - $ref: "#/components/schemas/ConnectionSideAdditionalInfo" - data: + description: Accessible endpoint through this service + example: equinixjira.atlassian.net + sourceDomains: type: array - description: Connection response data + description: List of source domains from where traffic is allowed items: - $ref: "#/components/schemas/ValidateConnectionResponse" - description: ValidateResponse - Pagination: - required: - - limit - - total - type: object - properties: - offset: - minimum: 0 - type: integer - description: Index of the first item returned in the response. The default is 0. - default: 0 - limit: - minimum: 0 - type: integer - description: Maximum number of search results returned per page. Number must be between 1 and 100, and the default is 20. - default: 20 - total: - minimum: 0 - type: integer - description: Total number of elements returned. - next: - type: string - description: URL relative to the next item in the response. - previous: - type: string - description: URL relative to the previous item in the response. - description: Pagination response information - NetworkPostRequest: + type: string + example: equinix.com + project: + $ref: "#/components/schemas/Project" + description: Create App Service + AppService: required: - name - - notifications - - scope - type type: object properties: + href: + type: string + description: Resource URI + format: uri + readOnly: true + example: https://api.equinix.com/fabric/v4/appServices/5008a109-9d1c-485c-b0ba-de9736f283c2 + x-order: 1 type: - $ref: "#/components/schemas/NetworkType" + $ref: "#/components/schemas/AppServiceType" + uuid: + type: string + description: Equinix-assigned access point identifier + format: uuid + example: 5008a109-9d1c-485c-b0ba-de9736f283c2 + x-order: 3 name: type: string - description: Customer-provided network name - scope: - $ref: "#/components/schemas/NetworkScope" - location: - $ref: "#/components/schemas/SimplifiedLocation" - project: - $ref: "#/components/schemas/Project" - notifications: + description: Customer-provided App Service name + format: string + example: Atlassian App Service + x-order: 4 + description: + type: string + description: Customer-provided App Service description + format: string + example: Atlassian App Service in SV + x-order: 5 + state: + $ref: "#/components/schemas/AppServiceState" + endpoint: + type: string + description: Accessible endpoint through this service + example: equinixjira.atlassian.net + x-order: 7 + sourceDomains: type: array - description: Preferences for notifications on network configuration or status changes + description: List of source domains from where traffic is allowed items: - $ref: "#/components/schemas/SimplifiedNotification" - description: Create Network - Network: - type: object - description: Network specification - allOf: - - required: - - changeLog - - href - - state - - uuid - type: object - properties: - href: - type: string - description: Network URI - format: uri - readOnly: true - example: https://api.equinix.com/fabric/v4/networks/92dc376a-a932-43aa-a6a2-c806dedbd784 - uuid: - type: string - description: Equinix-assigned network identifier - format: uuid - example: 92dc376a-a932-43aa-a6a2-c806dedbd784 - state: - $ref: "#/components/schemas/NetworkState" - connectionsCount: - type: number - description: number of connections created on the network - account: - $ref: "#/components/schemas/SimplifiedAccount" - change: - $ref: "#/components/schemas/SimplifiedNetworkChange" - operation: - $ref: "#/components/schemas/NetworkOperation" - changeLog: - $ref: "#/components/schemas/Changelog" - links: - type: array - description: Network sub-resources links - readOnly: true - items: - $ref: "#/components/schemas/Link" - - $ref: "#/components/schemas/NetworkPostRequest" - NetworkId: - type: string - description: Network UUID - format: uuid - example: 557400f8-d360-11e9-bb65-2a2ae2dbcce4 - NetworkUpdateRequest: + type: string + example: equinix.com + x-order: 8 + account: + $ref: "#/components/schemas/SimplifiedAccount" + project: + $ref: "#/components/schemas/Project" + changeLog: + $ref: "#/components/schemas/Changelog" + change: + $ref: "#/components/schemas/AppServiceChange" + description: App Service object + AppServiceUpdateRequest: + maxItems: 1 minItems: 1 type: array - description: Fabric Network Update Request + description: App Service Update Request items: - $ref: "#/components/schemas/NetworkChangeOperation" - NetworkSearchRequest: + $ref: "#/components/schemas/AppServiceChangeOperation" + AppServiceSearchRequest: type: object properties: filter: - $ref: "#/components/schemas/NetworkFilter" + $ref: "#/components/schemas/AppServiceFilters" pagination: $ref: "#/components/schemas/PaginationRequest" sort: type: array items: - $ref: "#/components/schemas/NetworkSortCriteria" + $ref: "#/components/schemas/AppServiceSortCriteria" description: Search requests containing criteria - NetworkFilter: + AppServiceFilters: type: object properties: and: - $ref: "#/components/schemas/NetworkSimpleExpression" - or: - $ref: "#/components/schemas/NetworkSimpleExpression" + maxItems: 8 + type: array + items: + $ref: "#/components/schemas/AppServiceFilter" + AppServiceFilter: + type: object + anyOf: + - $ref: "#/components/schemas/AppServiceSimpleExpression" + - $ref: "#/components/schemas/AppServiceOrFilter" + AppServiceSimpleExpression: + type: object + properties: property: - $ref: "#/components/schemas/NetworkSearchFieldName" + type: string + description: | + Possible field names to use on filters: + * `/project/projectId` - project id + * `/uuid` - App Service uuid + * `/name` - App Service name + * `/description` - App Service description + * `/state` - App Service status + * `/endpoint` - App Service endpoint + * `/sourceDomains` - App Service source domains + * `/changeLog/createdDateTime` - App Service creation timestamp + * `/changeLog/updatedDateTime` - App Service last updated timestamp + * `/changeLog/deletedDateTime` - App Service deletion timestamp + example: /name operator: type: string + description: | + Possible operators to use on filters: + * `=` - equal + * `!=` - not equal + * `>` - greater than + * `<` - less than + * `IN` - in + * `NOT IN` - not in + * `LIKE` - like + * `ILIKE` - case-insensitive like + * `BETWEEN` - between + * `NOT BETWEEN` - not between example: = - enum: - - = - - "!=" - - ">" - - ">=" - - < - - <= - - BETWEEN - - NOT BETWEEN - - LIKE - - NOT LIKE - - ILIKE - - NOT ILIKE - - IN - - NOT IN values: type: array items: type: string - example: Network-1 - NetworkSimpleExpression: - type: array - items: - $ref: "#/components/schemas/NetworkFilter" - NetworkSearchFieldName: - type: string - description: Possible field names to use on filters - example: /name - enum: - - /name - - /uuid - - /scope - - /type - - /state - - /operation/equinixStatus - - /location/region - - /location/metroCode - - /connectionsCount - - /project/projectId - - /account/globalCustId - - /account/orgId - - /changeLog/createdDateTime - - /changeLog/updatedDateTime - - /changeLog/deletedDateTime - - /* - NetworkSortCriteria: + example: Gateway + AppServiceOrFilter: + type: object + properties: + or: + maxItems: 3 + type: array + items: + $ref: "#/components/schemas/AppServiceSimpleExpression" + AppServiceSortCriteria: type: object properties: direction: - $ref: "#/components/schemas/NetworkSortDirection" + $ref: "#/components/schemas/AppServiceSortDirection" property: - $ref: "#/components/schemas/NetworkSortBy" - NetworkSortDirection: + $ref: "#/components/schemas/AppServiceSortBy" + AppServiceSortDirection: type: string description: Sorting direction + default: DESC enum: - DESC - ASC - default: DESC - NetworkSortBy: + AppServiceSortBy: type: string - description: Possible field names to use on sorting - enum: - - /name - - /uuid - - /scope - - /operation/equinixStatus - - /location/region - - /changeLog/createdDateTime - - /changeLog/updatedDateTime + description: | + Possible field names to use on '400_InvalidSorting': + * `/name` - App Service name + * `/uuid` - App Service uuid + * `/state` - App Service status + * `/changeLog/createdDateTime` - Date and time when change flow starts + * `/changeLog/updatedDateTime` - Date and time when change object is updated + format: string + example: /changeLog/updatedDateTime default: /changeLog/updatedDateTime - NetworkSearchResponse: + AppServiceSearchResponse: type: object properties: pagination: $ref: "#/components/schemas/Pagination" - sort: - type: array - items: - $ref: "#/components/schemas/NetworkSortCriteriaResponse" data: type: array + description: Data returned from the API call. items: - $ref: "#/components/schemas/Network" - description: List of networks - NetworkConnections: + $ref: "#/components/schemas/AppService" + AttachedAppLinkState_1: + type: array + description: Filter attached App Links by lifecycle state. + example: + - PROVISIONED + - PROVISIONING + items: + $ref: "#/components/schemas/AppLinkState" + AppServiceAttachedAppLinks: type: object properties: pagination: $ref: "#/components/schemas/Pagination" data: type: array + description: Data returned from the API call. items: - $ref: "#/components/schemas/Connection" - description: List of network changes - NetworkChangeResponse: + $ref: "#/components/schemas/AppServiceAttachedAppLink" + AttachedAppSubscriptionState: + type: array + description: Filter attached App Subscriptions by lifecycle state. + example: + - PROVISIONED + - PROVISIONING + items: + $ref: "#/components/schemas/AppSubscriptionState" + AttachedAppSubscriptionOrder: + type: string + description: Sort order for attached App Subscriptions. + example: DESC + default: DESC + enum: + - DESC + - ASC + AppServiceAttachedAppSubscriptions: type: object properties: pagination: $ref: "#/components/schemas/Pagination" data: type: array + description: Data returned from the API call. items: - $ref: "#/components/schemas/NetworkChange" - description: List of network changes - ChangeId_5: - type: string - description: Network Change UUID - format: uuid - example: 6d500177-9404-41f2-99e8-2bf1a84d8db5 - NetworkChange: + $ref: "#/components/schemas/AppServiceAttachedAppSubscription" + AppServiceAttachedAppSubscriptionSearchRequest: type: object properties: - href: - type: string - description: Network URI - format: uri - readOnly: true - example: https://api.equinix.com/fabric/v4/networks/2a4fb415-5a7f-436f-bae6-02f5e403deec/changes/4b17da68-3d6b-436d-9c8f-2105f3b950d9 - uuid: - type: string - description: Uniquely identifies a change - format: uuid - example: 4b17da68-3d6b-436d-9c8f-2105f3b950d9 - type: - $ref: "#/components/schemas/NetworkChangeType" - status: - $ref: "#/components/schemas/NetworkChangeStatus" - createdDateTime: - type: string - description: Set when change flow starts - format: date-time - example: 2020-11-06T07:00:00Z - updatedDateTime: - type: string - description: Set when change object is updated - format: date-time - example: 2020-11-06T07:00:00Z - data: + filter: + $ref: "#/components/schemas/AppServiceAttachedAppSubscriptionFilters" + pagination: + $ref: "#/components/schemas/PaginationRequest" + sort: type: array items: - $ref: "#/components/schemas/NetworkChangeOperation" - description: Current state of latest network change - precisionTimeServiceRequest: - title: precisionTimeServiceRequest - required: - - connections - - ipv4 - - name - - package - - type + $ref: "#/components/schemas/AppServiceAttachedAppSubscriptionSortCriteria" + description: Search requests containing criteria + AppServiceAttachedAppSubscriptionFilters: type: object properties: - type: + and: + maxItems: 8 + type: array + items: + $ref: "#/components/schemas/AppServiceAttachedAppSubscriptionFilter" + AppServiceAttachedAppSubscriptionFilter: + type: object + anyOf: + - $ref: "#/components/schemas/AppServiceAttachedAppSubscriptionSimpleExpression" + - $ref: "#/components/schemas/AppServiceAttachedAppSubscriptionOrFilter" + AppServiceAttachedAppSubscriptionSimpleExpression: + type: object + properties: + property: type: string - description: Precision Time Service Type refers to the corresponding Protocol. - enum: - - NTP - - PTP - name: + description: | + Possible field names to use on filters: + * `/uuid` - App Subscription UUID + * `/state` - App Subscription lifecycle state + example: /state + operator: type: string - description: Precision Time Service name. - package: - $ref: "#/components/schemas/precisionTimePackageRequest" - connections: + description: | + Possible operators to use on filters: + * `=` - equal + * `!=` - not equal + * `IN` - in + * `NOT IN` - not in + example: IN + values: + type: array + items: + type: string + example: PROVISIONED + AppServiceAttachedAppSubscriptionOrFilter: + type: object + properties: + or: + maxItems: 3 + type: array + items: + $ref: "#/components/schemas/AppServiceAttachedAppSubscriptionSimpleExpression" + AppServiceAttachedAppSubscriptionSortCriteria: + type: object + properties: + direction: + $ref: "#/components/schemas/AppServiceAttachedAppSubscriptionSortDirection" + property: + $ref: "#/components/schemas/AppServiceAttachedAppSubscriptionSortBy" + AppServiceAttachedAppSubscriptionSortDirection: + type: string + description: Sorting direction + default: DESC + enum: + - DESC + - ASC + AppServiceAttachedAppSubscriptionSortBy: + type: string + description: | + Possible field names to use on '400_InvalidSorting': + * `/uuid` - App Subscription UUID + * `/state` - App Subscription lifecycle state + format: string + example: /uuid + default: /uuid + AppServiceAttachedAppSubscriptionSearchResponse: + type: object + properties: + pagination: + $ref: "#/components/schemas/Pagination" + data: type: array + description: Data returned from the API call. items: - $ref: "#/components/schemas/virtualConnectionUuid" - ipv4: - $ref: "#/components/schemas/ipv4" - ntpAdvancedConfiguration: - $ref: "#/components/schemas/ntpAdvanceConfiguration" - ptpAdvancedConfiguration: - $ref: "#/components/schemas/ptpAdvanceConfiguration" + $ref: "#/components/schemas/AppServiceAttachedAppSubscription" + AppSubscriptionPostRequest: + required: + - project + - type + type: object + properties: + type: + $ref: "#/components/schemas/AppSubscriptionType" + source: + $ref: "#/components/schemas/AppSubscriptionSourceRequest" + target: + $ref: "#/components/schemas/AppSubscriptionTargetRequest" project: $ref: "#/components/schemas/Project" - order: - $ref: "#/components/schemas/precisionTimeOrder" - description: Create Precision Time Service Request Schema. - precisionTimeServiceResponse: - title: precisionTimeServiceResponse + description: Create App Subscription + AppSubscription: required: - - href - - package - - state + - project + - source + - target - type - - uuid type: object properties: href: type: string - description: Precision Time Service URI. + description: Resource URI format: uri + readOnly: true + example: https://api.equinix.com/fabric/v4/appSubscriptions/20f3ef8e-d670-4236-86fa-bb0038adcfc3 + x-order: 1 type: - type: string - description: Precision Time Service type refers to the corresponding protocol. - enum: - - NTP - - PTP - name: - type: string - description: Precision Time Service Name. + $ref: "#/components/schemas/AppSubscriptionType" uuid: type: string - description: Precision Time Service UUID. + description: Equinix-assigned access point identifier format: uuid + example: 20f3ef8e-d670-4236-86fa-bb0038adcfc3 + x-order: 3 + source: + $ref: "#/components/schemas/AppSubscriptionSource" + target: + $ref: "#/components/schemas/AppSubscriptionTarget" state: - type: string - description: Precision Time Service Status. - enum: - - CANCELLED - - CANCELLING - - CONFIGURING - - CONFIGURING_FAILED - - DRAFT - - DEPROVISIONING - - DEPROVISIONING_FAILED - - DEPROVISIONED - - PROVISIONED - - PROVISIONING - - PROVISIONING_FAILED - - REPROVISIONING - - REPROVISIONING_FAILED - operation: - $ref: "#/components/schemas/timeServiceOperation" - package: - $ref: "#/components/schemas/precisionTimePackagePostResponse" - connections: - maxItems: 2 - minItems: 1 - uniqueItems: true - type: array - description: Fabric Connections associated with Precision Time Service. - items: - $ref: "#/components/schemas/virtualConnectionTimeServiceResponse" - ipv4: - $ref: "#/components/schemas/ipv4" - ntpAdvancedConfiguration: - $ref: "#/components/schemas/ntpAdvanceConfiguration" - ptpAdvancedConfiguration: - $ref: "#/components/schemas/ptpAdvanceConfiguration" + $ref: "#/components/schemas/AppSubscriptionState" project: $ref: "#/components/schemas/Project" - account: - $ref: "#/components/schemas/SimplifiedAccount" - order: - $ref: "#/components/schemas/precisionTimeOrder" - pricing: - $ref: "#/components/schemas/precisionTimePrice" changeLog: $ref: "#/components/schemas/Changelog" - description: Precision Time Service Response Schema. - ServiceId: + change: + $ref: "#/components/schemas/AppSubscriptionChange" + description: App Subscription object + AppSubscriptionId: type: string - description: Precision Time Service UUID + description: App Subscription UUID format: uuid - example: 557400f8-d360-11e9-bb65-2a2ae2dbcce4 - precisionTimeChangeOperation: - required: - - op - - path - - value - type: object - properties: - op: - type: string - description: Handy shortcut for operation name - enum: - - replace - - add - - remove - path: - type: string - description: path inside document leading to updated parameter - enum: - - /name - - /package/code - - /ipv4 - - /ntpAdvancedConfiguration - - /ptpAdvancedConfiguration - value: - type: object - description: new value for updated parameter - description: Fabric Precision Timing change operation data - TimeServicesSearchRequest: + example: 20f3ef8e-d670-4236-86fa-bb0038adcfc3 + AppSubscriptionUpdateRequest: + minItems: 1 + type: array + description: App Subscription Update Request + items: + $ref: "#/components/schemas/AppSubscriptionChangeOperation" + AppSubscriptionSearchRequest: type: object properties: filter: - $ref: "#/components/schemas/TimeServiceFilters" + $ref: "#/components/schemas/AppSubscriptionFilters" pagination: $ref: "#/components/schemas/PaginationRequest" sort: type: array items: - $ref: "#/components/schemas/TimeServiceSortCriteria" + $ref: "#/components/schemas/AppSubscriptionSortCriteria" description: Search requests containing criteria - TimeServiceFilters: + AppSubscriptionFilters: type: object properties: and: maxItems: 8 type: array items: - $ref: "#/components/schemas/TimeServiceFilter" - TimeServiceFilter: + $ref: "#/components/schemas/AppSubscriptionFilter" + AppSubscriptionFilter: type: object anyOf: - - $ref: "#/components/schemas/TimeServiceSimpleExpression" - - $ref: "#/components/schemas/TimeServiceOrFilter" - TimeServiceSimpleExpression: + - $ref: "#/components/schemas/AppSubscriptionSimpleExpression" + - $ref: "#/components/schemas/AppSubscriptionOrFilter" + AppSubscriptionSimpleExpression: type: object properties: property: type: string description: | Possible field names to use on filters: - * `/project/projectId` - project id (mandatory) - * `/name` - Precision Time Service name - * `/uuid` - Precision Time Service uuid - * `/type` - Precision Time Service protocol - * `/state` - Precision Time Service status - * `/account/accountNumber` - Precision Time Service account number - * `/package/code` - Precision Time Service package - * `/*` - all-category search + * `/project/projectId` - project id + * `/uuid` - App Subscription uuid + * `/state` - App Subscription status + * `/source/appLink/uuid` - Source App Link uuid + * `/source/ipSubnets` - Source App Link ip subnets + * `/target/appService/uuid` - Target App Service uuid + * `/target/geoScope` - Target App Service geo scope + * `/target/prioritization` - Target App Service prioritization + * `/changeLog/createdDateTime` - App Subscription creation timestamp + * `/changeLog/updatedDateTime` - App Subscription last updated timestamp + * `/changeLog/deletedDateTime` - App Subscription deletion timestamp example: /name operator: type: string description: | Possible operators to use on filters: - * `=` - equal - * `!=` - not equal - * `[NOT] BETWEEN` - (not) between - * `[NOT] LIKE` - (not) like - * `[NOT] IN` - (not) in - * `ILIKE` - case-insensitive like + * `=` - equal + * `!=` - not equal + * `>` - greater than + * `<` - less than + * `IN` - in + * `NOT IN` - not in + * `LIKE` - like + * `ILIKE` - case-insensitive like + * `BETWEEN` - between + * `NOT BETWEEN` - not between example: = values: type: array items: type: string - example: FabricPrecisionTimeService-1 - TimeServiceOrFilter: + example: Gateway + AppSubscriptionOrFilter: type: object properties: or: maxItems: 3 type: array items: - $ref: "#/components/schemas/TimeServiceSimpleExpression" - TimeServiceSortCriteria: + $ref: "#/components/schemas/AppSubscriptionSimpleExpression" + AppSubscriptionSortCriteria: type: object properties: direction: - $ref: "#/components/schemas/TimeServiceSortDirection" + $ref: "#/components/schemas/AppSubscriptionSortDirection" property: - $ref: "#/components/schemas/TimeServiceSortBy" - TimeServiceSortDirection: + $ref: "#/components/schemas/AppSubscriptionSortBy" + AppSubscriptionSortDirection: type: string description: Sorting direction + default: DESC enum: - DESC - ASC - default: DESC - TimeServiceSortBy: + AppSubscriptionSortBy: type: string - description: Possible field names to use on sorting - enum: - - /name - - /uuid - - /state - - /type - - /package/code - - /changeLog/createdDateTime - - /changeLog/updatedDateTime + description: | + Possible field names to use on '400_InvalidSorting': + * `/uuid` - App Subscription uuid + * `/state` - App Subscription status + * `/changeLog/createdDateTime` - Date and time when change flow starts + * `/changeLog/updatedDateTime` - Date and time when change object is updated + format: string + example: /changeLog/updatedDateTime default: /changeLog/updatedDateTime - ServiceSearchResponse: + AppSubscriptionSearchResponse: type: object properties: pagination: @@ -20675,1606 +29153,1741 @@ components: type: array description: Data returned from the API call. items: - $ref: "#/components/schemas/precisionTimeServiceResponse" - precisionTimeServiceConnectionsResponse: - title: precisionTimeServiceConnectionResponse - type: object - properties: - pagination: - $ref: "#/components/schemas/Pagination" - data: - type: array - description: Data returned from the API call - items: - $ref: "#/components/schemas/connectionLink" - description: EPT service instance's L2 connections - precisionTimeServicePackagesResponse: - title: precisionTimeServicePackagesResponse - type: object - properties: - pagination: - $ref: "#/components/schemas/Pagination" - data: - type: array - description: Data returned from the API call - items: - $ref: "#/components/schemas/precisionTimePackageResponse" - description: Precision Packages - precisionTimePackageResponse: - title: precisionTimePackageRespose + $ref: "#/components/schemas/AppSubscription" + GatewayPostRequest: required: + - account - bandwidth - - code + - localAsn + - name + - project + - router - type type: object properties: - href: - type: string - format: uri type: + $ref: "#/components/schemas/GatewayType" + name: + maxLength: 50 + minLength: 1 type: string - enum: - - TIME_SERVICE_PACKAGE - code: + description: Customer-provided Gateway name + format: string + example: test-gateway + description: type: string - enum: - - NTP_STANDARD - - NTP_ENTERPRISE - - PTP_STANDARD - - PTP_ENTERPRISE + description: Customer-provided Gateway description + format: string + example: test gateway description bandwidth: - type: integer - description: Connection bandwidth in Mbps. - example: 10 - clientsPerSecondMax: + maximum: 10000 minimum: 0 type: integer - description: Max. number of clients that can be synchronized per second at a packet rate of 1 per second. - example: 100 - redundancySupported: - type: boolean - description: Is Redundant virtual connection supported for the package code. - example: false - multiSubnetSupported: - type: boolean - description: Is Multiple subnet supported for the package code. - example: true - accuracySlaUnit: - type: string - description: Accuracy SLA unit. - example: microseconds - accuracySla: - type: integer - description: Accuracy SLA for the package code, -1 value denotes the accuracySla is not published. - example: 50 - accuracySlaMin: - minimum: 1 - type: integer - description: Typical minimum Accuracy for the package code. - example: 1 - accuracySlaMax: - minimum: 1 + description: Gateway bandwidth in Mbps + localAsn: type: integer - description: Typical maximum Accuracy for the package code. - example: 10 - changelog: - $ref: "#/components/schemas/Changelog" - description: EPT Service Package Information - example: - href: https://api.equinix.com/fabric/v4/timeServicePackage/NTP_STANDARD - type: TIME_SERVICE_PACKAGE - code: NTP_STANDARD - bandwidth: 10 - accuracySlaUnit: microseconds - accuracySla: 50 - accuracySlaMin: 1 - accuracySlaMax: 10 - clientsPerSecondMax: 100 - redundancySupported: true - multiSubnetSupported: true - changeLog: - createdDateTime: 2023-05-16T07:50:49.749Z - updatedDateTime: 2023-05-17T07:50:49.749Z - SubscriptionId: - type: string - description: Subscription Id - format: uuid - example: 557400f8-d360-11e9-bb65-2a2ae2dbcce4 - SubscriptionResponse: - required: - - entitlements - - marketplace - - state + description: Gateway local Autonomous System Number + router: + $ref: "#/components/schemas/Router" + haEnabled: + type: boolean + description: High availability enabled + default: false + account: + $ref: "#/components/schemas/SimplifiedAccount" + project: + $ref: "#/components/schemas/Project" + order: + $ref: "#/components/schemas/Order" + description: Create Gateway + Gateway: type: object properties: href: type: string - description: Subscription URL + description: Gateways URI format: uri + readOnly: true + example: https://api.equinix.com/fabric/v4/gateways/c93a9ca0-bb56-490b-8bce-4b2bdaeb4d46 + type: + $ref: "#/components/schemas/GatewayType" uuid: type: string - description: Unique identifier of the Subscription + description: Equinix-assigned access point identifier format: uuid - state: - $ref: "#/components/schemas/SubscriptionState" - marketplace: - type: string - description: Marketplace Type - enum: - - AWS - - GCP - - AZURE - - REDHAT - offerType: + example: c93a9ca0-bb56-490b-8bce-4b2bdaeb4d46 + name: type: string - description: Marketplace Offer Type - enum: - - PUBLIC - - PRIVATE_OFFER - isAutoRenew: - type: boolean - description: Is Auto Renewal Enabled - example: true - offerId: + description: Customer-provided Gateway name + format: string + example: test-gateway + description: type: string - description: Marketplace Offer Id - trial: - $ref: "#/components/schemas/SubscriptionTrial" - metroCodes: - type: array - description: List of available metro - items: - type: string - entitlements: - type: array - description: List of entitlements associated with the subscription - items: - $ref: "#/components/schemas/SubscriptionEntitlementResponse" - changelog: + description: Customer-provided Gateway description + format: string + example: test gateway description + state: + $ref: "#/components/schemas/GatewayState" + bandwidth: + maximum: 100000 + minimum: 0 + type: integer + description: Gateway bandwidth in Mbps + localAsn: + type: integer + description: Gateway local Autonomous System Number + router: + $ref: "#/components/schemas/Router" + ipv4: + $ref: "#/components/schemas/Gateway_ipv4" + project: + $ref: "#/components/schemas/Project" + account: + $ref: "#/components/schemas/Account" + order: + $ref: "#/components/schemas/Order" + changeLog: $ref: "#/components/schemas/Changelog" - description: Subscription Response - SubscriptionState: + description: Gateway object + GatewayId: type: string - description: Subscription State - enum: - - ACTIVE - - EXPIRED - - CANCELLED - - GRACE_PERIOD - SubscriptionTrial: + description: Gateway UUID + format: uuid + example: 6658cc3b-18e0-437c-b972-62b51a419a1e + GatewayUpdateRequest: + minItems: 1 + type: array + description: Gateway Update Request + items: + $ref: "#/components/schemas/GatewayChangeOperation" + Changelog: type: object properties: - enabled: - type: boolean - description: Free Trial Enabled - expiryDateTime: + createdBy: type: string - description: Free Trial Expiry Date + description: Created by User Key + example: johnsmith + createdByFullName: + type: string + description: Created by User Full Name + example: John Smith + createdByEmail: + type: string + description: Created by User Email Address + example: john.smith@example.com + createdDateTime: + type: string + description: Created by Date and Time format: date-time - description: Free Trial Subscription - SubscriptionEntitlementResponse: + example: 2020-11-06T07:00:00Z + updatedBy: + type: string + description: Updated by User Key + example: johnsmith + updatedByFullName: + type: string + description: Updated by User Full Name + example: John Smith + updatedByEmail: + type: string + description: Updated by User Email Address + example: john.smith@example.com + updatedDateTime: + type: string + description: Updated by Date and Time + format: date-time + example: 2020-11-06T07:00:00Z + deletedBy: + type: string + description: Deleted by User Key + example: johnsmith + deletedByFullName: + type: string + description: Deleted by User Full Name + example: John Smith + deletedByEmail: + type: string + description: Deleted by User Email Address + example: john.smith@example.com + deletedDateTime: + type: string + description: Deleted by Date and Time + format: date-time + example: 2020-11-06T07:00:00Z + description: Change log + PaginationRequest: type: object properties: - uuid: - type: string - description: Subscription Entitlement Id - format: uuid - quantityEntitled: - minimum: 0 - type: integer - description: Quantity entitled for the subscription - quantityConsumed: + offset: minimum: 0 type: integer - description: Quantity consumed from the entitlement - quantityAvailable: - minimum: 0 + description: Index of the first element. + default: 0 + limit: + minimum: 1 type: integer - description: Quantity available from the entitlement - asset: - $ref: "#/components/schemas/SubscriptionAsset" - description: Subscription entitlement - SubscriptionAsset: + description: Number of elements to be requested per page. Number must be between 1 and 100, and the default is 20. + default: 20 + description: Pagination request information + Project: + required: + - projectId type: object properties: - type: + projectId: type: string - description: Type of the subscription asset ( XF_ROUTER ,IP_VC, IPWAN_VC ) - package: - $ref: "#/components/schemas/SubscriptionRouterPackageType" - bandwidth: - type: integer - description: Bandwidth of the asset in Mbps - description: Asset information - SubscriptionRouterPackageType: + description: Subscriber-assigned project ID + example: 44f4c4f8-2f39-494e-838c-d8e640591be5 + SimplifiedLocation: type: object properties: - code: + metroHref: type: string - description: Cloud Router package code - description: Cloud Router Package Type - GetAllStreamResponse: + example: https://api.equinix.com/fabric/v4/metros/AM + region: + type: string + example: AMER, APAC, EMEA + metroName: + type: string + example: Amsterdam + metroCode: + type: string + example: AM + ibx: + type: string + example: AM1 + deprecated: true + CloudEventData: type: object properties: - pagination: - $ref: "#/components/schemas/Pagination" - data: - type: array - description: Data returned from the API call. - items: - $ref: "#/components/schemas/Stream" - StreamPostRequest: - required: - - name - - project - - type + message: + type: string + description: Cloud Event message + resource: + $ref: "#/components/schemas/ResourceData" + auth: + $ref: "#/components/schemas/AuthContext" + ResourceData: type: object properties: + href: + type: string + description: Cloud Event asset href + uuid: + type: string + description: Cloud Event asset uuid type: type: string - enum: - - TELEMETRY_STREAM + description: Cloud Event asset type name: type: string - description: Customer-provided stream name - description: + description: Cloud Event asset name + state: type: string - description: Customer-provided stream description - project: - $ref: "#/components/schemas/Project" - description: Create Stream - Stream: + description: Cloud Event asset state + operation: + $ref: "#/components/schemas/OperationalStatus" + OperationalStatus: type: object properties: - href: + operationalStatus: type: string - description: Stream URI - format: uri - readOnly: true - example: https://api.equinix.com/fabric/v4/streams/3c9b8e7a2-f3b1-4576-a4a9-1366a63df170 - uuid: + description: Operational status for the resource target of the event + AuthContext: + type: object + properties: + authtype: type: string - description: Equinix-assigned access point identifier - format: uuid - example: c9b8e7a2-f3b1-4576-a4a9-1366a63df170 - type: + description: Cloud Event auth type + enum: + - system + - user + authid: type: string - description: type + description: Cloud Event auth identifier enum: - - TELEMETRY_STREAM + - equinix + - userId name: type: string - description: Customer-provided stream name - description: - type: string - description: Customer-provided stream description - project: - $ref: "#/components/schemas/Project" - state: + description: Cloud Event username + email: type: string - description: Stream provision state - enum: - - PROVISIONING - - PROVISIONED - - REPROVISIONING - - DEPROVISIONING - - DEPROVISIONED - - FAILED - assetsCount: - type: integer - description: Stream assets count - example: 1 - streamSubscriptionsCount: - type: integer - description: Stream subscriptions count - example: 2 - alertRulesCount: - type: integer - description: Stream alert rules count - example: 3 - changeLog: - $ref: "#/components/schemas/Changelog" - description: Stream object - StreamId: - type: string - description: Stream UUID - format: uuid - example: 657400f8-d360-11e9-bb65-2a2ae2dbcce5 - StreamPutRequest: - required: - - name + description: Cloud Event email + Metric: type: object properties: + type: + type: string + description: Equinix supported metric type name: type: string - description: Customer-provided stream name - description: + description: Metric name + unit: type: string - description: Customer-provided stream description - description: Update Stream - StreamAssetSearchRequest: + description: Metric unit + interval: + type: string + description: Metric interval (set automatically based on search range) + resource: + $ref: "#/components/schemas/Metric_resource" + summary: + type: string + description: Metric summary + datapoints: + type: array + description: Metric data points + items: + $ref: "#/components/schemas/Metric_datapoints" + description: Metric object + maintenanceState: + type: string + description: Maintenance lifecycle state + example: SCHEDULED + enum: + - SCHEDULED + - IN_PROGRESS + - COMPLETED + - DEFERRED + SearchFilter: + description: Top-level filter that can be either an AND expression or OR expression + oneOf: + - $ref: "#/components/schemas/SearchAndExpression" + - $ref: "#/components/schemas/SearchOrExpression" + SearchAndExpression: required: - - filter + - and type: object properties: - filter: - $ref: "#/components/schemas/StreamAssetFilters" - pagination: - $ref: "#/components/schemas/PaginationRequest" - sort: + and: + maxItems: 8 + minItems: 1 type: array items: - $ref: "#/components/schemas/StreamAssetSortCriteria" - description: Search requests containing criteria - StreamAssetFilters: + $ref: "#/components/schemas/SearchFilterExpression" + SearchFilterExpression: + description: Filter expression that can be AND, OR, or a simple expression + oneOf: + - $ref: "#/components/schemas/SearchAndExpression" + - $ref: "#/components/schemas/SearchOrExpression" + - $ref: "#/components/schemas/SearchSimpleExpression" + SearchOrExpression: + required: + - or type: object properties: - and: + or: maxItems: 8 + minItems: 1 type: array items: - $ref: "#/components/schemas/StreamAssetFilter" - StreamAssetFilter: - type: object - anyOf: - - $ref: "#/components/schemas/StreamAssetSimpleExpression" - - $ref: "#/components/schemas/StreamAssetOrFilter" - StreamAssetSimpleExpression: + $ref: "#/components/schemas/SearchFilterExpression" + SearchSimpleExpression: + required: + - operator + - property + - values type: object properties: property: type: string - description: | - Possible field names to use on filters: - * `/uuid` - Asset uuid - * `/streamUuid` - Stream uuid - * `/projectId` - Asset projectId - * `/*` - all-category search - example: /name operator: type: string - description: | - Possible operators to use on filters: - * `=` - equal - * `!=` - not equal - * `>` - greater than - * `>=` - greater than or equal to - * `<` - less than - * `<=` - less than or equal to - * `[NOT] BETWEEN` - (not) between - * `[NOT] LIKE` - (not) like - * `[NOT] IN` - (not) in - * `ILIKE` - case-insensitive like example: = + enum: + - = + - "!=" + - IN + - NOT IN + - LIKE + - ILIKE + - BETWEEN + - ">" + - ">=" + - < + - <= values: + maxItems: 8 + minItems: 1 type: array items: type: string - example: FabricStreamAsset-1 - StreamAssetOrFilter: + description: Simple filter expression with property, operator, and values + ConnectionType: + type: string + description: Connection type + enum: + - EVPL_VC + - EPL_VC + - EC_VC + - IP_VC + - ACCESS_EPL_VC + - EIA_VC + - EVPLAN_VC + - EPLAN_VC + - EVPTREE_VC + - EPTREE_VC + - IPWAN_VC + - IA_VC + - MC_VC + - IX_VC + - GW_VC + - IPX_VC + Order: type: object properties: - or: - maxItems: 3 + purchaseOrderNumber: + type: string + description: Purchase order number + customerReferenceNumber: + type: string + description: Customer reference number + billingTier: + type: string + description: Billing tier for connection bandwidth + orderId: + type: string + description: Order Identification + orderNumber: + type: string + description: Order Reference Number + termLength: + maximum: 36 + minimum: 1 + type: integer + description: Term length in months, valid values are 1, 12, 24, 36 where 1 is the default value (for on-demand case). + default: 1 + contractedBandwidth: + type: integer + description: Contracted bandwidth + SimplifiedNotification: + required: + - emails + - type + type: object + properties: + type: + type: string + description: Notification Type + example: BANDWIDTH_ALERT + enum: + - NOTIFICATION + - BANDWIDTH_ALERT + - CONNECTION_APPROVAL + - PROFILE_LIFECYCLE + - ALL + - SALES_REP_NOTIFICATIONS + - TECHNICAL + - ORDERING + - QUOTE_NOTIFICATIONS + sendInterval: + type: string + emails: type: array + description: Array of contact emails items: - $ref: "#/components/schemas/StreamAssetSimpleExpression" - StreamAssetSortCriteria: + type: string + format: email + registeredUsers: + type: array + description: Array of registered users + items: + type: string + phone: + type: array + description: Array of contact phone numbers + items: + $ref: "#/components/schemas/Phone" + ConnectionRedundancy: type: object properties: - direction: - $ref: "#/components/schemas/StreamAssetSortDirection" - property: - $ref: "#/components/schemas/StreamAssetSortBy" - StreamAssetSortDirection: - type: string - description: Sorting direction - enum: - - DESC - - ASC - default: DESC - StreamAssetSortBy: - type: string - description: Possible field names to use on sorting - enum: - - /uuid - default: /uuid - GetAllStreamAssetResponse: + group: + type: string + description: Redundancy group identifier (UUID of primary connection) + priority: + $ref: "#/components/schemas/ConnectionPriority" + description: Connection redundancy configuration + ConnectionSide: type: object properties: - pagination: - $ref: "#/components/schemas/Pagination" - data: + serviceToken: + $ref: "#/components/schemas/ServiceToken" + accessPoint: + $ref: "#/components/schemas/AccessPoint" + additionalInfo: type: array - description: Data returned from the API call. + description: Any additional information, which is not part of connection metadata or configuration items: - $ref: "#/components/schemas/StreamAsset" - AssetId_1: - type: string - description: Stream Asset UUID - format: uuid - example: 757400f8-d360-11e9-bb65-2a2ae2dbcce6 - Asset: - type: string - enum: - - ports - - connections - - routers - - metros - - organizations - - projects - - networkEdgeDevices - - companyProfiles - StreamAsset: + $ref: "#/components/schemas/ConnectionSideAdditionalInfo" + description: Connection configuration object for each side of multi-segment connection + ConnectionSideAdditionalInfo: + type: object + properties: + key: + type: string + description: Key + value: + type: string + description: Value + description: Additional information + marketplaceSubscription: type: object properties: href: type: string - description: Stream Asset URI + description: Marketplace Subscription URI format: uri readOnly: true - uuid: - type: string - description: Equinix-assigned access point identifier - format: uuid - example: c9b8e7a2-f3b1-4576-a4a9-1366a63df170 + example: https://api.equinix.com/fabric/v4/marketplaceSubscriptions/20d32a80-0d61-4333-bc03-707b591ae2f5 type: type: string - description: Asset types + description: Marketplace Subscription type + example: AWS_MARKETPLACE_SUBSCRIPTION enum: - - XF_PORT - - IP_VC - - EVPLAN_VC - - EVPL_VC - - XF_METRO - - XF_ROUTER - - ORGANIZATION - - PROJECT - metricsEnabled: - type: boolean - description: enable metric - example: false - attachmentStatus: + - AWS_MARKETPLACE_SUBSCRIPTION + - GCP_MARKETPLACE_SUBSCRIPTION + - AZURE_MARKETPLACE_SUBSCRIPTION + uuid: type: string - description: asset status - enum: - - ATTACHING - - ATTACHED - - DETACHED - - DETACHING - - FAILED - description: Stream object - StreamAssetPutRequest: + description: Equinix-assigned Marketplace Subscription identifier + example: 20d32a80-0d61-4333-bc03-707b591ae2f5 + description: Equinix Fabric Entity for Marketplace Subscription + EndCustomer: type: object properties: - metricsEnabled: + isDisclosed: type: boolean - description: enable metric - example: false + description: Indicate if endCustomer info should be disclosed or not default: false - description: Update Stream Asset - GetAllStreamSubscriptionResponse: - type: object - properties: - pagination: - $ref: "#/components/schemas/Pagination" - data: - type: array - description: Data returned from the API call. - items: - $ref: "#/components/schemas/StreamSubscription" - StreamSubscriptionPostRequest: - required: - - name - - sink - - type - type: object - properties: - type: - type: string - enum: - - STREAM_SUBSCRIPTION name: type: string - description: Customer-provided stream subscription name - description: + mdmId: type: string - description: Customer-provided stream subscription description - enabled: - type: boolean - description: Stream subscription enabled status - example: true - default: true - metricSelector: - $ref: "#/components/schemas/StreamSubscriptionSelector" - eventSelector: - $ref: "#/components/schemas/StreamSubscriptionSelector" - sink: - $ref: "#/components/schemas/StreamSubscriptionSink" - description: Create Stream Subscription - StreamSubscriptionSelector: - type: object - properties: - include: - maxItems: 8 - type: array - items: - $ref: "#/components/schemas/StreamSubscriptionSelectorExpression" - except: - maxItems: 8 - type: array - items: - $ref: "#/components/schemas/StreamSubscriptionSelectorExpression" - StreamSubscriptionSelectorExpression: + ConnectionState: type: string - description: | - Supported event or metric types to use on event and metric selectors: - * `*` - all events or metrics - * `equinix.fabric.port.*` - port events or metrics - * `equinix.fabric.connection.*` - connection events or metrics - * `equinix.fabric.router.*` - cloud router events - * `equinix.fabric.metro.*` - metro metrics - * `equinix.fabric.network.*` - network events - * `equinix.fabric.service_token.*` - service token events - * `equinix.network_edge.*` - network edge events - * `equinix.network_edge.acl.*` - network edge acl events - * `equinix.network_edge.device.*` - network edge device events - * `equinix.access_manager.*` - identity access manager events - * `equinix.access_manager.user.role.*` - identity access manager user role events - example: equinix.fabric.connection.* - StreamSubscriptionSink: + description: Connection status + enum: + - ACTIVE + - CANCELLED + - DEPROVISIONED + - DEPROVISIONING + - DRAFT + - FAILED + - PENDING + - PROVISIONING + - "" + Change: required: + - createdDateTime - type type: object properties: - uri: + uuid: type: string - description: any publicly reachable http endpoint + description: Uniquely identifies a change type: type: string - description: destination type + description: Type of change enum: - - DATADOG - - GOOGLE_PUBSUB - - PAGERDUTY - - SERVICENOW - - SLACK - - SPLUNK_HEC - - TEAMS - - WEBHOOK - batchEnabled: - type: boolean - description: batch mode on/off - example: false - batchSizeMax: - type: integer - description: maximum batch size - batchWaitTimeMax: - type: integer - description: maximum batch waiting time - credential: - $ref: "#/components/schemas/StreamSubscriptionSinkCredential" - settings: - $ref: "#/components/schemas/StreamSubscriptionSinkSetting" - host: - type: string - description: sink host - description: Create Stream destination - StreamSubscriptionSinkCredential: - type: object - properties: - type: + - CONNECTION_CREATION + - CONNECTION_UPDATE + - CONNECTION_DELETION + - CONNECTION_PROVIDER_STATUS_REQUEST + status: type: string - description: credential type + description: Current outcome of the change flow enum: - - ACCESS_TOKEN - - INTEGRATION_KEY - - API_KEY - - USERNAME_PASSWORD - accessToken: + - APPROVED + - COMPLETED + - FAILED + - REJECTED + - REQUESTED + - SUBMITTED_FOR_APPROVAL + createdDateTime: type: string - description: passed as Authorization header value - integrationKey: + description: Set when change flow starts + format: date-time + example: 2020-11-06T07:00:00Z + updatedDateTime: type: string - description: passed as Authorization header value - apiKey: + description: Set when change object is updated + format: date-time + example: 2020-11-06T07:00:00Z + information: type: string - description: passed as Authorization header value - username: + description: Additional information + data: + $ref: "#/components/schemas/ConnectionChangeOperation" + description: Current state of latest connection change + ConnectionOperation: + type: object + properties: + providerStatus: + $ref: "#/components/schemas/ProviderStatus" + equinixStatus: + $ref: "#/components/schemas/EquinixStatus" + operationalStatus: type: string - description: passed as Authorization header value - password: + description: Connection operational status + enum: + - UP + - DOWN + errors: + type: array + items: + $ref: "#/components/schemas/Error" + opStatusChangedAt: type: string - description: passed as Authorization header value - description: Stream subscription sink credentials - StreamSubscriptionSinkSetting: + description: When connection transitioned into current operational status + format: date-time + example: 2020-11-06T07:00:00Z + maintenanceStatus: + $ref: "#/components/schemas/maintenanceState" + description: Connection type-specific operational data + SimplifiedAccount: type: object properties: - eventIndex: + accountNumber: + type: integer + description: Account number + format: int64 + accountName: type: string - description: event index - metricIndex: + description: Account name + orgId: + type: integer + description: Customer organization identifier + format: int64 + organizationName: type: string - description: metric index - source: + description: Customer organization name + globalOrgId: type: string - description: source - applicationKey: + description: Global organization identifier + globalOrganizationName: type: string - description: Application key - eventUri: + description: Global organization name + ucmId: type: string - description: event uri - metricUri: + description: Account ucmId + globalCustId: type: string - description: metric uri - format: + description: Account name + resellerAccountNumber: + type: integer + description: Reseller account number + format: int64 + resellerAccountName: type: string - description: webhook message format - enum: - - CLOUDEVENT - - OPENTELEMETRY - default: CLOUDEVENT - description: Stream subscription sink settings - StreamSubscription: + description: Reseller account name + resellerUcmId: + type: string + description: Reseller account ucmId + resellerOrgId: + type: integer + description: Reseller customer organization identifier + format: int64 + ConnectionChangeOperation: + required: + - op + - path + - value type: object properties: - href: + op: type: string - description: Stream Subscription URI - format: uri - readOnly: true - example: https://api.equinix.com/fabric/v4/streams/d684aa26-8276-48b7-bb42-a6d9def0a418/subscriptions/3c9b8e7a2-f3b1-4576-a4a9-1366a63df170 - uuid: + description: Handy shortcut for operation name + example: add + path: type: string - description: Equinix-assigned access point identifier - format: uuid - example: c9b8e7a2-f3b1-4576-a4a9-1366a63df170 + description: path inside document leading to updated parameter + example: /ipv6 + value: + type: object + description: new value for updated parameter + description: Connection change operation data + Actions: + type: string + description: Connection action type + enum: + - CONNECTION_CREATION_ACCEPTANCE + - CONNECTION_CREATION_REJECTION + - CONNECTION_UPDATE_ACCEPTANCE + - CONNECTION_UPDATE_REJECTION + - CONNECTION_DELETION_ACCEPTANCE + - CONNECTION_REJECTION_ACCEPTANCE + - CONNECTION_UPDATE_REQUEST + - MIGRATION_EVPL_VC + - CONNECTION_PROVIDER_STATUS_REQUEST + - CONNECTION_PROVIDER_BANDWIDTH_REQUEST + - ACCEPT_HOSTED_CONNECTION + - CANCEL_EVPL_VC_DRAFT_ORDERS + - CONNECTION_CREATION_RETRY + - CONNECTION_DELETION_RETRY + ConnectionAcceptanceData: + type: object + properties: + zSide: + $ref: "#/components/schemas/ConnectionSide" + providerBandwidth: + type: integer + description: Authorization key bandwidth in Mbps + readOnly: true + description: Connection acceptance data + ConnectionRouteTableEntry: + required: + - changeLog + - type + type: object + properties: type: + $ref: "#/components/schemas/RouteTableEntryType" + protocolType: + $ref: "#/components/schemas/RouteTableEntryProtocolType" + state: type: string - description: type + example: ACTIVE enum: - - STREAM_SUBSCRIPTION - name: - type: string - description: Customer-provided subscription name - description: + - ACTIVE + - INACTIVE + prefix: type: string - description: Customer-provided subscription description - state: + example: 192.168.10.0/24 + nextHop: type: string - description: Steam subscription provision state - enum: - - PROVISIONING - - PROVISIONED - - REPROVISIONING - - DEPROVISIONING - - DEPROVISIONED - - FAILED - enabled: - type: boolean - description: Stream subscription enabled status - metricSelector: - $ref: "#/components/schemas/StreamSubscriptionSelector" - eventSelector: - $ref: "#/components/schemas/StreamSubscriptionSelector" - sink: - $ref: "#/components/schemas/StreamSubscriptionSinkResponse" - operation: - $ref: "#/components/schemas/StreamSubscriptionOperation" + example: 10.10.10.5 + MED: + type: integer + example: 5 + localPreference: + type: integer + example: 200 + asPath: + type: array + items: + type: string + connection: + $ref: "#/components/schemas/ConnectionRouteTableEntry_connection" changeLog: $ref: "#/components/schemas/Changelog" - description: Stream Subscription object - StreamSubscriptionId: - type: string - description: Stream Subscription UUID - format: uuid - example: 557400f8-d360-11e9-bb65-2a2ae2dbcce4 - StreamSubscriptionPutRequest: + description: Advertised and received route table entry object + BGPConnectionIpv4: required: - - name - - sink - - type + - customerPeerIp + - enabled type: object properties: - type: - type: string - enum: - - STREAM_SUBSCRIPTION - name: + customerPeerIp: type: string - description: Customer-provided stream subscription name - description: + description: Customer side peering ip + example: 10.1.1.2 + equinixPeerIp: type: string - description: Customer-provided stream subscription description + description: Equinix side peering ip + example: 10.1.1.3 enabled: type: boolean - description: Stream subscription enabled status - example: true - filters: - $ref: "#/components/schemas/StreamSubscriptionFilter" - metricSelector: - $ref: "#/components/schemas/StreamSubscriptionSelector" - eventSelector: - $ref: "#/components/schemas/StreamSubscriptionSelector" - sink: - $ref: "#/components/schemas/StreamSubscriptionSink" - description: Update Stream Subscription - GetAllStreamAlertRuleResponse: - type: object - properties: - pagination: - $ref: "#/components/schemas/Pagination" - data: - type: array - description: Data returned from the API call. - items: - $ref: "#/components/schemas/StreamAlertRule" - AlertRulePostRequest: + description: Admin status for the BGP session + outboundASPrependCount: + type: integer + description: AS path prepend count + format: int64 + example: 3 + inboundMED: + type: integer + description: Inbound Multi Exit Discriminator attribute + format: int64 + example: 1000 + outboundMED: + type: integer + description: Outbound Multi Exit Discriminator attribute + format: int64 + example: 2000 + routesMax: + type: integer + description: Maximum learnt prefixes limit + format: int64 + example: 1000 + operation: + $ref: "#/components/schemas/BGPConnectionOperation" + BGPConnectionIpv6: required: - - detectionMethod - - metricSelector - - name - - resourceSelector - - type + - customerPeerIp + - enabled type: object properties: - type: - type: string - enum: - - METRIC_ALERT - name: + customerPeerIp: type: string - description: Customer-provided stream name - description: + description: Customer side peering ip + example: 2001:db8:c59b::1 + equinixPeerIp: type: string - description: Customer-provided stream description + description: Equinix side peering ip + example: 2001:db8:c59b::1 enabled: type: boolean - description: Stream alert rule enabled status - example: true - default: true - metricSelector: - $ref: "#/components/schemas/MetricSelector" - resourceSelector: - $ref: "#/components/schemas/ResourceSelector" - detectionMethod: - $ref: "#/components/schemas/DetectionMethod" - description: Create Stream Alert Rules - MetricSelector: + description: Admin status for the BGP session + outboundASPrependCount: + type: integer + description: AS path prepend count + format: int64 + example: 3 + inboundMED: + type: integer + description: Inbound Multi Exit Discriminator attribute + format: int64 + example: 1000 + outboundMED: + type: integer + description: Outbound Multi Exit Discriminator attribute + format: int64 + example: 2000 + routesMax: + type: integer + description: Maximum learnt prefixes limit + format: int64 + example: 1000 + operation: + $ref: "#/components/schemas/BGPConnectionOperation" + RoutingProtocolBFD: required: - - include + - enabled type: object properties: - include: - type: array - description: Stream alert rule filtered by metric name - items: - type: string - example: equinix.fabric.metro.sv_da.latency - ResourceSelector: - required: - - include + enabled: + type: boolean + interval: + type: string + example: "100" + DirectConnectionIpv4: type: object properties: - include: - type: array - description: | - ### Supported metric names to use on filters with property /subject: - * `/fabric/v4/ports/` - port metrics - * `/fabric/v4/connections/` - connection metrics - * `/fabric/v4/metros/` - metro latency metrics - items: - type: string - DetectionMethod: + equinixIfaceIp: + type: string + description: Equinix side Interface IP address + example: 192.168.100.0/30 + DirectConnectionIpv6: required: - - type + - equinixIfaceIp type: object properties: - type: - type: string - description: | - * THRESHOLD - Alert when a metric crosses a defined threshold by user. - * OUTLIER - Intelligent Alert that has an outlier behavior. This option is currently supported for metro latency metric. - enum: - - THRESHOLD - - OUTLIER - windowSize: + equinixIfaceIp: type: string - description: Stream alert rule metric window size - example: PT15M - operand: + description: Equinix side Interface IP address + example: 2001:db8:c59b::/1 + RoutingProtocolBGPData: + type: object + properties: + type: type: string - description: Stream alert rule metric operand + description: Routing protocol type enum: - - ABOVE - - BELOW - warningThreshold: + - BGP + name: type: string - description: Stream alert rule metric warning threshold - criticalThreshold: + example: My-BGP-route-1 + bgpIpv4: + $ref: "#/components/schemas/BGPConnectionIpv4" + bgpIpv6: + $ref: "#/components/schemas/BGPConnectionIpv6" + customerAsn: + type: integer + description: Customer asn + format: int64 + example: 65002 + equinixAsn: + type: integer + description: Equinix asn + format: int64 + example: 65002 + bgpAuthKey: type: string - description: Stream alert rule metric critical threshold - StreamAlertRule: - type: object - properties: + description: BGP authorization key + example: testAuthKey + asOverrideEnabled: + type: boolean + description: Enable AS number override + bfd: + $ref: "#/components/schemas/RoutingProtocolBFD" href: type: string - description: Stream Alert Rule URI + description: Routing Protocol URI format: uri - readOnly: true + example: https://api.equinix.com/fabric/v4/connections/81331c52-04c0-4656-a4a7-18c52669348f/routingProtocols/69762051-85ed-4d13-b6b4-e32e93c672b5 uuid: type: string - description: Equinix-assigned access point identifier + description: Routing protocol identifier format: uuid example: c9b8e7a2-f3b1-4576-a4a9-1366a63df170 + state: + type: string + enum: + - PROVISIONED + - DEPROVISIONED + - PROVISIONING + - DEPROVISIONING + - REPROVISIONING + - FAILED + operation: + $ref: "#/components/schemas/RoutingProtocolOperation" + change: + $ref: "#/components/schemas/RoutingProtocolChange" + changelog: + $ref: "#/components/schemas/Changelog" + project: + $ref: "#/components/schemas/RoutingProtocolProject" + connection: + $ref: "#/components/schemas/RoutingProtocolConnection" + RoutingProtocolDirectData: + type: object + properties: type: type: string - description: Stream subscription type + description: Routing protocol type enum: - - METRIC_ALERT + - DIRECT name: type: string - description: Customer-provided stream alert rule name - description: + example: My-direct-route-1 + directIpv4: + $ref: "#/components/schemas/DirectConnectionIpv4" + directIpv6: + $ref: "#/components/schemas/DirectConnectionIpv6" + href: type: string - description: Customer-provided stream alert rule description + description: Routing Protocol URI + format: uri + example: https://api.equinix.com/fabric/v4/connections/81331c52-04c0-4656-a4a7-18c52669348f/routingProtocols/69762051-85ed-4d13-b6b4-e32e93c672b5 + uuid: + type: string + description: Routing protocol identifier + format: uuid + example: c9b8e7a2-f3b1-4576-a4a9-1366a63df170 state: type: string - description: Steam subscription provision state enum: - - ACTIVE - - INACTIVE - enabled: - type: boolean - description: Stream alert rule enabled status - default: true - metricSelector: - $ref: "#/components/schemas/MetricSelectorResponse" - resourceSelector: - $ref: "#/components/schemas/ResourceSelectorResponse" - detectionMethod: - $ref: "#/components/schemas/DetectionMethodResponse" - changeLog: + - PROVISIONED + - DEPROVISIONED + - PROVISIONING + - DEPROVISIONING + - REPROVISIONING + - FAILED + operation: + $ref: "#/components/schemas/RoutingProtocolOperation" + change: + $ref: "#/components/schemas/RoutingProtocolChange" + changelog: $ref: "#/components/schemas/Changelog" - description: Stream object - AlertRuleId: + project: + $ref: "#/components/schemas/RoutingProtocolProject" + connection: + $ref: "#/components/schemas/RoutingProtocolConnection" + BGPActions: type: string - description: Stream Alert Rule UUID - format: uuid - example: 0bbcea48-1333-4ad5-a7ea-e4d58a5fbd15 - AlertRulePutRequest: + description: BGP action type + enum: + - CLEAR_BGPIPV4 + - CLEAR_BGPIPV6 + - CLEAR_BGPIPV4_INBOUND + - CLEAR_BGPIPV6_INBOUND + - RESET_BGPIPV4 + - RESET_BGPIPV6 + BGPActionStates: + type: string + description: BGP action state + enum: + - PENDING + - FAILED + - SUCCEEDED + RoutingProtocolChange: required: - - detectionMethod - - metricSelector - - name - - resourceSelector - type + - uuid type: object properties: - name: + uuid: type: string - description: Customer-provided stream name + description: Uniquely identifies a change type: type: string + description: Type of change enum: - - METRIC_ALERT - description: + - ROUTING_PROTOCOL_UPDATE + - ROUTING_PROTOCOL_CREATION + - ROUTING_PROTOCOL_DELETION + href: type: string - description: Customer-provided stream description - enabled: - type: boolean - description: Stream alert rule enabled status - default: true - metricSelector: - $ref: "#/components/schemas/MetricSelector" - resourceSelector: - $ref: "#/components/schemas/ResourceSelector" - detectionMethod: - $ref: "#/components/schemas/DetectionMethod" - description: Create Stream Alert Rules - CompanyProfileRequest: + description: Routing Protocol Change URI + format: uri + description: Current state of latest Routing Protocol change + RoutingProtocolChangeOperation: required: - - description - - name - - summary - - type + - op + - path + - value type: object properties: - type: - type: string - example: COMPANY_PROFILE - name: - maxLength: 50 - minLength: 1 + op: type: string - example: Equinix - summary: - maxLength: 125 - minLength: 1 + description: Handy shortcut for operation name + enum: + - add + - replace + - remove + path: type: string - example: Global interconnection and data center company - description: - maxLength: 450 - minLength: 1 + description: path inside document leading to updated parameter + example: / + value: + $ref: "#/components/schemas/RoutingProtocolBase" + description: Routing Protocol change operation data + ExchangeServiceNotification: + required: + - registeredUsers + - type + type: object + properties: + type: type: string - example: Equinix, Inc. connects the world's leading businesses to their customers, employees and partners inside the most interconnected data centers. - notifications: + description: Internet Exchange Service Notification Type + enum: + - NOTIFICATION + - TECHNICAL + - PEERING + - ESCALATION + - ORDERING + registeredUsers: type: array - example: - - type: CONTACT - emails: - - example@example.com - - type: NOTIFICATION - emails: - - example@example.com + description: Array of registered users items: - $ref: "#/components/schemas/Notification" - webUrl: - type: string - example: https://www.equinix.com - contactUrl: - type: string - example: https://www.equinix.com/contact-us - CompanyProfileResponse: + type: string + PublicPeeringConnectionResponse: type: object properties: + type: + type: string + description: Connection type IX_VC + format: enum + example: "[IX_VC]" href: type: string - example: https://api.equinix.com/fabric/v4/companyProfiles/123e4567-e89b-12d3-a456-426614174000 + description: URI + format: string + example: https://api.equinix.com/fabric/v4/connections/b44c6e6c-2c36-4488-b3f1-47064357b5b4 uuid: type: string - example: 123e4567-e89b-12d3-a456-426614174000 - type: + description: uuid + format: uuid + example: b44c6e6c-2c36-4488-b3f1-47064357b5b4 + RoutingProtocolResponse: + type: object + properties: + customerAsn: type: string - example: COMPANY_PROFILE - name: - maxLength: 50 - minLength: 1 + example: "1100" + macAddress: type: string - example: Equinix - summary: - maxLength: 125 - minLength: 1 + example: 00:11:22:33:44:55 + vlan: + type: integer + description: VLAN ID + format: int64 + example: 3292 + routeServerAsn: + type: integer + description: Equinix Route Server ASN + format: int64 + example: 1100 + bgpIpv4: + $ref: "#/components/schemas/ExchangeServiceResponseBgp" + bgpIpv6: + $ref: "#/components/schemas/ExchangeServiceResponseBgp" + routeCollector: + $ref: "#/components/schemas/RouteCollector" + PlatformChangelog: + type: object + properties: + createdBy: type: string - example: Global interconnection and data center company - description: - maxLength: 450 - minLength: 1 + description: Created by User Key + example: johnsmith + createdDateTime: type: string - example: Equinix, Inc. connects the world's leading businesses to their customers, employees and partners inside the most interconnected data centers. - state: - $ref: "#/components/schemas/CompanyProfileState" - account: - $ref: "#/components/schemas/CompanyProfileResponse_account" - metros: - type: array - example: - - href: https://api.equinix.com/fabric/v4/metros/SV - code: SV - name: Silicon Valley - items: - $ref: "#/components/schemas/CompanyMetro" - logo: - $ref: "#/components/schemas/CompanyLogo" - tags: - type: array - example: - - href: https://api.equinix.com/fabric/v4/tags/260af68b-42f0-4f2e-9c5c-2fbd44b4b387 - uuid: 260af68b-42f0-4f2e-9c5c-2fbd44b4b387 - items: - $ref: "#/components/schemas/TagResponse" - serviceProfiles: - type: array - example: - - href: https://api.equinix.com/fabric/v4/serviceProfiles/423af68b-42f0-4f2e-9c5c-2fbd44b4b387 - uuid: 423af68b-42f0-4f2e-9c5c-2fbd44b4b387 - items: - $ref: "#/components/schemas/CompanyServiceProfile" - privateServices: - type: array - example: - - href: https://api.equinix.com/fabric/v4/privateServices/460af68b-42f0-4f2e-9c5c-2fbd44b4b387 - uuid: 460af68b-42f0-4f2e-9c5c-2fbd44b4b387 - - href: https://api.equinix.com/fabric/v4/privateServices/8a5685a6-063d-41ac-9279-d32431e8d8f6 - uuid: 8a5685a6-063d-41ac-9279-d32431e8d8f6 - items: - $ref: "#/components/schemas/PrivateService" - notifications: - type: array - example: - - type: CONTACT - emails: - - example@example.com - - type: NOTIFICATION - emails: - - example@example.com - items: - $ref: "#/components/schemas/Notification" - webUrl: + description: Created by Date and Time + format: date-time + example: 2020-11-06T07:00:00Z + updatedBy: type: string - example: https://www.equinix.com - contactUrl: + description: Updated by User Key + example: johnsmith + updatedDateTime: type: string - example: https://www.equinix.com/contact-us - change: - $ref: "#/components/schemas/CompanyProfileChange" - changeLog: - $ref: "#/components/schemas/Changelog" - PatchOperation: + description: Updated by Date and Time + format: date-time + example: 2020-11-06T07:00:00Z + deletedBy: + type: string + description: Deleted by User Key + example: johnsmith + deletedDateTime: + type: string + description: Deleted by Date and Time + format: date-time + example: 2020-11-06T07:00:00Z + description: Change log + InternetAccessBillingType: + type: string + enum: + - FIXED + - USAGE_BASED + - BURST_BASED + x-enum-varnames: + - FIXED + - USAGE_BASED + - BURST_BASED + InternetAccessAccount: required: - - op - - path - - value + - accountNumber type: object properties: - op: - minLength: 1 + accountNumber: type: string - description: The operation to perform - example: replace - enum: - - replace - - add - - remove - x-enum-varnames: - - REPLACE - - ADD - - REMOVE - path: - minLength: 1 - pattern: ^/ + description: Account number + href: type: string - description: JSON Pointer path to the field to modify (e.g., /name, /description, /summary, /webUrl, /notifications) - example: /logo - value: - type: object - description: The value to update the field to - example: - uuid: 4cd19a0b-049c-4dfd-a626-ce25bf312495 - CompanyProfileSearchRequest: - type: object - properties: - filter: - $ref: "#/components/schemas/CompanyProfileSearchFilter" - pagination: - $ref: "#/components/schemas/Pagination" - sort: - $ref: "#/components/schemas/Sort" - CompanyProfileSearchFilter: - type: object - properties: - and: - type: array - items: - $ref: "#/components/schemas/CompanyProfileSearchFilter" - or: - type: array - items: - $ref: "#/components/schemas/CompanyProfileSearchFilter" - property: - $ref: "#/components/schemas/CompanyProfileSearchFieldName" - operator: - $ref: "#/components/schemas/OperatorEnum" - values: - type: array - description: Values to compare against - example: - - PENDING - - PROVISIONED - items: - type: string - CompanyProfileSearchFieldName: + description: Account URL path + format: uri + example: https://api.equinix.com/billing/v2/billingAccounts/accountNumber/57689234 + InternetAccessRoutingProtocolType: type: string - description: Searchable field names in company profile - example: /tags/name - OperatorEnum: + enum: + - BGP + - DIRECT + - STATIC + x-enum-varnames: + - BGP + - DIRECT + - STATIC + InternetAccessExportPolicy: type: string - description: Comparison operators for filtering - example: = - Sort: + description: Denotes which routes should be advertised to the internet + example: FULL + enum: + - FULL + - DEFAULT + - FULL_DEFAULT + - PARTIAL + x-enum-varnames: + - FULL + - DEFAULT + - FULL_DEFAULT + - PARTIAL + InternetAccessCustomerAsnRange: + type: string + description: Customer Autonomous System Number range. Based on the value a proper private ASN will be generated. + enum: + - BITS_16 + - BITS_32 + x-enum-varnames: + - BITS_16 + - BITS_32 + InternetAccessChange: + required: + - href type: object properties: - property: + href: type: string - description: Property to sort by((currently supports tags with filter syntax) - example: /tags/@name=equinix.fabric.spotlight.category.featured - direction: - $ref: "#/components/schemas/CompanyProfileSortDirection" - CompanyProfileSearchResponse: + description: URI of the change object + format: uri + InternetAccessLocation: required: - - data - - pagination + - ibx + - metroCode + - metroHref + - region type: object properties: - pagination: - $ref: "#/components/schemas/Pagination" - data: - type: array - items: - $ref: "#/components/schemas/CompanyProfileResponse" - CompanyProfileActionRequest: + metroHref: + type: string + description: Metro URL path for the linked resource + format: uri + example: https://api.equinix.com/fabric/v4/metros/WA + metroCode: + pattern: ^[A-Z]{2}$ + type: string + description: Code representing the metro + example: WA + region: + type: string + description: Geographic region + example: EMEA + enum: + - APAC + - EMEA + - AMER + ibx: + type: string + description: IBX data center code + example: WA1 + InternetAccessRoutingProtocol: required: + - connections + - customerRoutes - type type: object properties: type: - type: string - description: CompanyProfile Action Type - example: COMPANY_PROFILE_CREATION_ACCEPTANCE - comments: - type: string - description: Optional comments for the action - example: Approving company profile - ServiceProfileListResponse: - type: object - properties: - data: + $ref: "#/components/schemas/InternetAccessRoutingProtocolType" + customerRoutes: type: array - description: List of service profiles - example: - - href: https://api.equinix.com/fabric/v4/serviceProfiles/423af68b-42f0-4f2e-9c5c-2fbd44b4b387 - uuid: 423af68b-42f0-4f2e-9c5c-2fbd44b4b387 items: - $ref: "#/components/schemas/CompanyServiceProfile" - AttachServiceProfileResponse: + $ref: "#/components/schemas/InternetAccessCustomerRoute" + connections: + type: array + items: + $ref: "#/components/schemas/InternetAccessConnection" + discriminator: + propertyName: type + mapping: + BGP: "#/components/schemas/InternetAccessRoutingProtocolBgp" + DIRECT: "#/components/schemas/InternetAccessRoutingProtocolDirect" + STATIC: "#/components/schemas/InternetAccessRoutingProtocolStatic" + InternetAccessCustomerRoute: + type: object + properties: + ipBlock: + $ref: "#/components/schemas/InternetAccessIpBlock" + InternetAccessRoutingProtocolBgp: + allOf: + - $ref: "#/components/schemas/InternetAccessRoutingProtocol" + - required: + - customerAsnRange + - exportPolicy + type: object + properties: + exportPolicy: + $ref: "#/components/schemas/InternetAccessExportPolicy" + asn: + $ref: "#/components/schemas/InternetAccessRoutingProtocolBgp_asn" + customerAsn: + type: integer + description: Customer ASN. Valid range is 1-64495 or 131072-4199999999. Currently this option is only available for EIA over dedicated port. + format: int64 + example: 11111 + deprecated: true + bgpAuthKey: + type: string + description: BGP authentication key + example: SecretKey + customerAsnRange: + $ref: "#/components/schemas/InternetAccessCustomerAsnRange" + InternetAccessRoutingProtocolDirect: + allOf: + - $ref: "#/components/schemas/InternetAccessRoutingProtocol" + InternetAccessRoutingProtocolStatic: + allOf: + - $ref: "#/components/schemas/InternetAccessRoutingProtocol" + InternetAccessBilling: required: - type - - uuid type: object properties: - href: - type: string - description: URL to the attached service profile - example: https://api.equinix.com/fabric/v4/serviceProfiles/423af68b-42f0-4f2e-9c5c-2fbd44b4b387 type: + $ref: "#/components/schemas/InternetAccessBillingType" + enabled: + type: boolean + description: Indicates whether the billing is enabled + startDate: type: string - description: Type of the service or attachment - example: SERVICE_PROFILE - uuid: + description: The start date for the billing period + format: date-time + InternetAccessOrder: + allOf: + - $ref: "#/components/schemas/Order" + - type: object + properties: + href: + type: string + description: Order URI + format: uri + example: https://api.equinix.com/colocations/v2/orders/100200300 + InternetAccessUseCase: + type: string + enum: + - MAIN + - MANAGEMENT_ACCESS + x-enum-varnames: + - MAIN + - MANAGEMENT_ACCESS + SearchSort: + type: array + items: + $ref: "#/components/schemas/SearchSortItem" + SearchSortItem: + required: + - direction + - property + type: object + properties: + direction: type: string - description: Unique identifier for the service profile - example: 423af68b-42f0-4f2e-9c5c-2fbd44b4b387 - attachmentStatus: + example: ASC + enum: + - ASC + - DESC + property: type: string - description: Status of the attachment operation - example: ATTACHED - TagListResponse: + InterconnectSortCriteriaResponse: type: object properties: - data: - type: array - items: - $ref: "#/components/schemas/TagResponse" - pagination: - $ref: "#/components/schemas/Pagination" - description: Equinix Fabric Tag List Response Object - TagResponse: + direction: + $ref: "#/components/schemas/InterconnectSortDirectionResponse" + property: + $ref: "#/components/schemas/InterconnectSortByResponse" + IpBlockLocation: + required: + - metroCode type: object properties: - href: - type: string - format: uri - example: https://api.equinix.com/fabric/v4/tags/18a127ad-9d0c-46e2-a66d-8ed85d1858b0 - uuid: - type: string - format: uuid - example: 18a127ad-9d0c-46e2-a66d-8ed85d1858b0 - type: + metroHref: type: string - example: RESOURCE_TAG - name: + description: Metro URL path for the linked resource + example: https://api.equinix.com/fabric/v4/metros/WA + metroCode: + pattern: ^[A-Z]{2}$ type: string - example: environment - displayName: + example: WA + TypeOfIpBlockProduct: + type: string + enum: + - IPV4_IP_BLOCK + - IPV6_IP_BLOCK + x-enum-varnames: + - IPV4_IP_BLOCK + - IPV6_IP_BLOCK + IpBlockProjectRequest: + required: + - projectId + type: object + properties: + projectId: type: string - example: Environment - weight: - type: integer - example: 10000 - description: Equinix Fabric Tag Response Object - AttachTagResponse: + description: project id + IpBlockAccount: required: - - type - - uuid + - accountNumber type: object properties: - href: + accountNumber: type: string - description: URL to the attached tag - example: https://api.equinix.com/fabric/v4/tags/260af68b-42f0-4f2e-9c5c-2fbd44b4b387 - type: + description: account number + IpBlockOrderRequest: + type: object + properties: + purchaseOrderNumber: type: string - description: Type of the tag or attachment - example: TAG - uuid: + description: Purchase order number + nullable: true + orderNumber: type: string - description: Unique identifier for the tag - example: 260af68b-42f0-4f2e-9c5c-2fbd44b4b387 - attachmentStatus: + description: Order Number + nullable: true + orderLine: type: string - description: Status of the attachment operation - example: ATTACHED - PrivateServiceListResponse: + description: Order Line Number + nullable: true + IpBlockRegulations: + required: + - addressingPlans + - questions type: object properties: - data: + addressingPlans: type: array - description: List of private services - example: - - href: https://api.equinix.com/fabric/v4/privateServices/460af68b-42f0-4f2e-9c5c-2fbd44b4b387 - uuid: 460af68b-42f0-4f2e-9c5c-2fbd44b4b387 + description: List of addressing plans items: - $ref: "#/components/schemas/PrivateService" - AttachPrivateServiceResponse: + $ref: "#/components/schemas/IpBlockAddressingPlan" + questions: + $ref: "#/components/schemas/IpBlockRegulations_questions" + IpBlockAddressingPlan: required: - - type - - uuid + - purpose + - size type: object properties: - href: - type: string - description: URL to the attached private service - example: https://api.equinix.com/fabric/v4/privateServices/460af68b-42f0-4f2e-9c5c-2fbd44b4b387 - type: - type: string - description: Type of the private service or attachment - example: PRIVATE_SERVICE - uuid: - type: string - description: Unique identifier for the private service - example: 460af68b-42f0-4f2e-9c5c-2fbd44b4b387 - attachmentStatus: + purpose: type: string - description: Status of the attachment operation - example: ATTACHED - AttachLogoResponse: + description: purpose + size: + type: integer + description: size + format: int32 + IpBlockPrefixLength: + maximum: 128 + minimum: 1 + type: integer + description: IpBlockPrefix length + IpBlockPrefix: + type: string + description: CIDR prefix + IpBlockState: + type: string + description: Current state of the IP Block + enum: + - PENDING + - ACTIVE + - DELETING + - DELETED + - FAILED + IpBlockOwnership: + type: string + description: IpBlockOwnership of the IP Block + enum: + - EQUINIX + - CUSTOMER + IpBlockOrderResponse: required: - - type - - uuid + - href + - orderNumber type: object properties: href: type: string - description: URL to the attached logo - example: https://api.equinix.com/fabric/v4/companyProfiles/123e4567-e89b-12d3-a456-426614174000/logos/logo-uuid - type: - type: string - description: Type of the logo or attachment - example: COMPANY_LOGO - uuid: - type: string - description: Unique identifier for the logo - example: 789e0123-e89b-12d3-a456-426614174000 - attachmentStatus: - type: string - description: Status of the attachment operation - example: ATTACHED - extensionType: + description: Order URI + format: uri + example: https://api.equinix.com/colocations/v2/orders/1-34834234 + orderNumber: type: string - description: Extension type of logo - example: .png - LogoRequest: + description: Order number + IpBlockProject: required: - - description - - logo - - name - - type - type: object - properties: - logo: - type: string - description: Logo image file - format: binary - name: - maxLength: 24 - minLength: 1 - type: string - description: Name of the Logo - example: Equinix Logo - description: - maxLength: 125 - minLength: 1 - type: string - description: Description of the logo - example: Company branding logo - type: - type: string - description: Type of logo - example: COMPANY_LOGO - description: Equinix Fabric Logo Request Object - LogoResponse: + - projectId type: object properties: href: type: string + description: URI of the project format: uri - example: https://api.equinix.com/fabric/v4/logos/18a127ad-9d0c-46e2-a66d-8ed85d1858b0 - uuid: - type: string - format: uuid - example: 18a127ad-9d0c-46e2-a66d-8ed85d1858b0 - type: - type: string - description: Type of logo - example: COMPANY_LOGO - name: - type: string - example: Equinix Logo - description: - type: string - example: Company branding logo - status: - type: string - example: CREATED - extensionType: + projectId: type: string - example: .png - changelog: - $ref: "#/components/schemas/Changelog" - description: Equinix Fabric Logo Response Object - TagRequest: + description: project id + IpBlockAsset: required: - - displayName - - name + - href - type + - uuid type: object properties: type: + $ref: "#/components/schemas/IpBlockProductType" + uuid: type: string - description: Type of tag - example: RESOURCE_TAG - name: - minLength: 1 - type: string - description: Name of the Tag - displayName: - maxLength: 24 - minLength: 1 + description: Unique identifier for the asset + format: uuid + href: type: string - description: Display name of the Tag - description: Equinix Fabric Tag Request Object - AgentDefinition: + description: Resource URL path for the linked resource + example: https://api.equinix.com/fabric/v4/internetAccesses/fd8c5042-b553-4d5e-a2ac-c73bf6d4fd92 + IpBlockChange: + required: + - href type: object properties: - url: + href: type: string - description: Agent Template ReadMe (.md) Definition - Changelog: + description: URI of the IpBlockChange object + format: uri + IpBlockChangeLog: + required: + - createdDateTime type: object properties: - createdBy: - type: string - description: Created by User Key - example: johnsmith - createdByFullName: - type: string - description: Created by User Full Name - example: John Smith - createdByEmail: - type: string - description: Created by User Email Address - example: john.smith@example.com createdDateTime: type: string - description: Created by Date and Time format: date-time - example: 2020-11-06T07:00:00Z - updatedBy: - type: string - description: Updated by User Key - example: johnsmith - updatedByFullName: - type: string - description: Updated by User Full Name - example: John Smith - updatedByEmail: - type: string - description: Updated by User Email Address - example: john.smith@example.com updatedDateTime: type: string - description: Updated by Date and Time format: date-time - example: 2020-11-06T07:00:00Z - deletedBy: - type: string - description: Deleted by User Key - example: johnsmith - deletedByFullName: - type: string - description: Deleted by User Full Name - example: John Smith - deletedByEmail: - type: string - description: Deleted by User Email Address - example: john.smith@example.com deletedDateTime: type: string - description: Deleted by Date and Time format: date-time - example: 2020-11-06T07:00:00Z - description: Change log - Project: + PatchIpBlockRequestBodyItem: required: - - projectId - type: object - properties: - projectId: - type: string - description: Subscriber-assigned project ID - example: 44f4c4f8-2f39-494e-838c-d8e640591be5 - AgentActivities: + - op + - path type: object properties: - href: - type: string - description: Agent Activities URI - format: uuid - type: - type: string - description: type - example: AGENT_ACTIVITY - uuid: + op: type: string - description: Equinix-assigned agent operation identifier - format: uuid - readOnly: true - agent: - $ref: "#/components/schemas/Agent" - status: + description: operation + enum: + - add + - remove + path: type: string - description: Agent activities state COMPLETED, PENDING, PENDING_USER_INPUT, FAILED - example: COMPLETED - metadata: - $ref: "#/components/schemas/AgentActivities_metadata" - changeLog: - $ref: "#/components/schemas/Changelog" - description: Agent Activities object - CloudEventData: + description: path + value: + $ref: "#/components/schemas/PatchIpBlockRequestBodyItem_value" + SortDirection: + type: string + description: Sorting direction + default: DESC + enum: + - DESC + - ASC + SortBy: + type: string + description: Possible field names to use on sorting + default: /changeLog/updatedDateTime + enum: + - /name + - /direction + - /aSide/accessPoint/name + - /aSide/accessPoint/type + - /aSide/accessPoint/account/accountName + - /aSide/accessPoint/location/metroName + - /aSide/accessPoint/location/metroCode + - /aSide/accessPoint/linkProtocol/vlanCTag + - /aSide/accessPoint/linkProtocol/vlanSTag + - /zSide/accessPoint/name + - /zSide/accessPoint/type + - /zSide/accessPoint/role + - /zSide/accessPoint/account/accountName + - /zSide/accessPoint/location/metroName + - /zSide/accessPoint/location/metroCode + - /zSide/accessPoint/linkProtocol/vlanCTag + - /zSide/accessPoint/linkProtocol/vlanSTag + - /zSide/accessPoint/authenticationKey + - /bandwidth + - /geoScope + - /uuid + - /changeLog/createdDateTime + - /changeLog/updatedDateTime + - /operation/equinixStatus + - /operation/providerStatus + - /redundancy/priority + SortCriteriaResponse: type: object properties: - message: - type: string - description: Cloud Event message - resource: - $ref: "#/components/schemas/ResourceData" - auth: - $ref: "#/components/schemas/AuthContext" - ResourceData: + direction: + $ref: "#/components/schemas/SortDirection" + property: + $ref: "#/components/schemas/SortBy" + Price: type: object properties: href: type: string - description: Cloud Event asset href - uuid: - type: string - description: Cloud Event asset uuid + description: An absolute URL that returns specified pricing data + format: url type: + $ref: "#/components/schemas/ProductType" + code: type: string - description: Cloud Event asset type + description: Equinix-assigned product code name: type: string - description: Cloud Event asset name - state: + description: Full product name + description: type: string - description: Cloud Event asset state - operation: - $ref: "#/components/schemas/OperationalStatus" - OperationalStatus: - type: object - properties: - operationalStatus: + description: Product description + account: + $ref: "#/components/schemas/SimplifiedAccount" + charges: + type: array + items: + $ref: "#/components/schemas/PriceCharge" + currency: type: string - description: Operational status for the resource target of the event - AuthContext: + description: Product offering price currency + termLength: + type: integer + description: In months. No value or value of 1 means on-demand + enum: + - 1 + - 12 + - 24 + - 36 + catgory: + $ref: "#/components/schemas/PriceCategory" + connection: + $ref: "#/components/schemas/VirtualConnectionPrice" + ipBlock: + $ref: "#/components/schemas/IpBlockPrice" + router: + $ref: "#/components/schemas/FabricCloudRouterPrice" + port: + $ref: "#/components/schemas/VirtualPortPrice" + timeService: + $ref: "#/components/schemas/TimeServicePrice" + opticalConnect: + allOf: + - $ref: "#/components/schemas/OpticalConnectPrice" + ServiceProfileTypeEnum: + type: string + description: Service profile type + example: L2_PROFILE + enum: + - L2_PROFILE + - L3_PROFILE + - IA_PROFILE + - IX_PROFILE + - IC_PROFILE + - LMAAS_PROFILE + x-eqx-api-linter-skip-rules: + - 40 + ServiceProfileVisibilityEnum: + type: string + enum: + - PRIVATE + - PUBLIC + ServiceProfileStateEnum: + type: string + description: Equinix assigned state. + example: ACTIVE + enum: + - ACTIVE + - PENDING_APPROVAL + - DELETED + - REJECTED + ServiceTokenType: + type: string + description: Type of Service Token + enum: + - VC_TOKEN + - EPL_TOKEN + ServiceTokenConnection: type: object properties: - authtype: - type: string - description: Cloud Event auth type - enum: - - system - - user - authid: + type: type: string - description: Cloud Event auth identifier + description: Type of Connection enum: - - equinix - - userId - name: + - EVPL_VC + - EPL_VC + - EVPLAN_VC + - EPLAN_VC + - IPWAN_VC + - IP_VC + - EVPTREE_VC + - EPTREE_VC + href: type: string - description: Cloud Event username - email: + description: An absolute URL that is the subject of the link's context. + format: uri + readOnly: true + uuid: type: string - description: Cloud Event email - PaginationRequest: - type: object - properties: - offset: + description: Equinix-assigned connection identifier + format: uuid + allowRemoteConnection: + type: boolean + description: Authorization to connect remotely + default: false + allowCustomBandwidth: + type: boolean + description: Allow custom bandwidth value + default: false + bandwidthLimit: + maximum: 100000 minimum: 0 type: integer - description: Index of the first element. - default: 0 - limit: - minimum: 1 - type: integer - description: Number of elements to be requested per page. Number must be between 1 and 100, and the default is 20. - default: 20 - description: Pagination request information - Metric: - type: object - properties: - type: - type: string - description: Equinix supported metric type - name: - type: string - description: Metric name - unit: - type: string - description: Metric unit - interval: + description: Connection bandwidth limit in Mbps + supportedBandwidths: + type: array + description: List of permitted bandwidths. + items: + type: integer + aSide: + $ref: "#/components/schemas/ServiceTokenSide" + zSide: + $ref: "#/components/schemas/ServiceTokenSide" + description: Service Token Connection Type Information + ServiceTokenState: + type: string + description: Service token state + enum: + - ACTIVE + - INACTIVE + - EXPIRED + - DELETED + ServiceTokenChangeOperation: + required: + - op + - path + - value + type: object + properties: + op: type: string - description: Metric interval (set automatically based on search range) - resource: - $ref: "#/components/schemas/Metric_resource" - summary: + description: Handy shortcut for operation name + enum: + - replace + - add + - remove + path: type: string - description: Metric summary - datapoints: - type: array - description: Metric data points - items: - $ref: "#/components/schemas/Metric_datapoints" - description: Metric object - ConnectionType: + description: path inside document leading to updated parameter + example: /expirationDateTime + value: + type: object + description: new value for updated parameter + description: Service Token change operation data + ServiceTokenActions: type: string - description: Connection type + description: Service Token action type enum: - - EVPL_VC - - EPL_VC - - EC_VC - - IP_VC - - ACCESS_EPL_VC - - EIA_VC - - EVPLAN_VC - - EPLAN_VC - - EVPTREE_VC - - EPTREE_VC - - IPWAN_VC - - IA_VC - - MC_VC - - IX_VC - - IC_VC - Order: + - RESEND_EMAIL_NOTIFICATION + OpticalConnectRedundancy: type: object properties: - purchaseOrderNumber: + priority: type: string - description: Purchase order number - customerReferenceNumber: + description: | + Role within the diverse pair.
PRIMARY - first connection of the pair.
SECONDARY - the diverse connection on a separate path. + example: PRIMARY + enum: + - PRIMARY + - SECONDARY + group: type: string - description: Customer reference number - billingTier: + description: Redundancy group identifier + format: uuid + description: | + Optical Connect redundancy configuration.
Required only for DUAL_DIVERSE connection. + OpticalConnectASideRequest: + description: | + A-Side configuration. Always a patch panel port from your cage. + allOf: + - $ref: "#/components/schemas/OpticalConnectPatchPanelFields" + OpticalConnectZSideRequest: + description: | + Z-Side configuration.
For COLO, specify the destination patch panel and ports.
For BMMR and REMOTE, specify the location and Letter of Authorization. + allOf: + - $ref: "#/components/schemas/OpticalConnectPatchPanelFields" + - type: object + properties: + location: + $ref: "#/components/schemas/OpticalConnectLocation" + loa: + $ref: "#/components/schemas/OpticalConnectLOA" + OpticalConnectOrder: + type: object + properties: + purchaseOrderNumber: type: string - description: Billing tier for connection bandwidth - orderId: + description: Purchase order number reference. + example: PO-156576 + customerReferenceId: type: string - description: Order Identification + description: Your own reference for this connection. orderNumber: type: string - description: Order Reference Number - termLength: - maximum: 36 - minimum: 1 - type: integer - description: Term length in months, valid values are 1, 12, 24, 36 where 1 is the default value (for on-demand case). - default: 1 - contractedBandwidth: - type: integer - description: Contracted bandwidth - SimplifiedNotification: + description: Equinix order reference number. + example: 1-129105284100 + description: Ordering and billing reference details for this connection. + OpticalConnectNotification: required: - emails - type @@ -22282,112 +30895,140 @@ components: properties: type: type: string - description: Notification Type - example: BANDWIDTH_ALERT + description: | + Notification category.
NOTIFICATION - states and configuration updates.
ORDERING - order and fulfilment correspondence.
TECHNICAL - maintenance and technical advisories. + example: NOTIFICATION enum: - NOTIFICATION - - BANDWIDTH_ALERT - - CONNECTION_APPROVAL - - PROFILE_LIFECYCLE - - ALL - - SALES_REP_NOTIFICATIONS - - TECHNICAL - ORDERING - sendInterval: - type: string + - TECHNICAL emails: type: array - description: Array of contact emails + description: Email addresses to notify. items: type: string format: email registeredUsers: type: array - description: Array of registered users + description: Usernames of registered Equinix Portal users to notify. items: type: string - ConnectionRedundancy: - type: object - properties: - group: - type: string - description: Redundancy group identifier (UUID of primary connection) - priority: - $ref: "#/components/schemas/ConnectionPriority" - description: Connection redundancy configuration - ConnectionSide: - type: object - properties: - serviceToken: - $ref: "#/components/schemas/ServiceToken" - accessPoint: - $ref: "#/components/schemas/AccessPoint" - additionalInfo: - type: array - description: Any additional information, which is not part of connection metadata or configuration - items: - $ref: "#/components/schemas/ConnectionSideAdditionalInfo" - description: Connection configuration object for each side of multi-segment connection - ConnectionSideAdditionalInfo: + description: Notification preferences for this connection. + OpticalConnectState: + type: string + description: Optical Connect lifecycle states. + readOnly: true + example: PROVISIONED + enum: + - PROVISIONING + - PROVISIONED + - PROVISIONING_FAILED + - REPROVISIONING + - REPROVISIONING_FAILED + - DEPROVISIONING + - DEPROVISIONED + OpticalConnectASideResponse: + description: Originating end as provisioned, with the cage, cabinet and IBX location. + allOf: + - $ref: "#/components/schemas/OpticalConnectPatchPanelFields" + - type: object + properties: + cageUniqueSpaceId: + type: string + description: Unique identifier of the cage. + example: SV1:01:002174 + cabinetUniqueSpaceId: + type: string + description: Unique identifier of the cabinet. + example: Demarc + location: + $ref: "#/components/schemas/OpticalConnectLocation" + OpticalConnectZSideResponse: + description: Terminating end as provisioned, with the cage, cabinet and IBX location. + allOf: + - $ref: "#/components/schemas/OpticalConnectPatchPanelFields" + - type: object + properties: + cageUniqueSpaceId: + type: string + description: Unique identifier of the cage. + example: SV1:01:002174 + cabinetUniqueSpaceId: + type: string + description: Unique identifier of the cabinet. + example: Demarc + location: + $ref: "#/components/schemas/OpticalConnectLocation" + loa: + $ref: "#/components/schemas/OpticalConnectLOA" + PortType: + type: string + description: Type of Port + enum: + - XF_PORT + PortState: + type: string + description: Port lifecycle state + enum: + - PENDING + - PROVISIONING + - REPROVISIONING + - PENDING_CROSS_CONNECT + - PROVISIONED + - ACTIVE + - DEPROVISIONING + - DEPROVISIONED + - INACTIVE + - FAILED + - ADDED + - DELETED + - TO_BE_ADDED + - TO_BE_DELETED + PortOrder: type: object properties: - key: - type: string - description: Key - value: + purchaseOrder: + $ref: "#/components/schemas/PortOrderPurchaseOrder" + customerReferenceId: type: string - description: Value - description: Additional information - marketplaceSubscription: + description: Customer order reference Id + signature: + $ref: "#/components/schemas/PortOrderSignature" + PortOperation: type: object properties: - href: - type: string - description: Marketplace Subscription URI - format: uri - readOnly: true - example: https://api.equinix.com/fabric/v4/marketplaceSubscriptions/20d32a80-0d61-4333-bc03-707b591ae2f5 - type: + operationalStatus: type: string - description: Marketplace Subscription type - example: AWS_MARKETPLACE_SUBSCRIPTION + description: Availability of a given physical port. enum: - - AWS_MARKETPLACE_SUBSCRIPTION - - GCP_MARKETPLACE_SUBSCRIPTION - - AZURE_MARKETPLACE_SUBSCRIPTION - uuid: - type: string - description: Equinix-assigned Marketplace Subscription identifier - example: 20d32a80-0d61-4333-bc03-707b591ae2f5 - description: Equinix Fabric Entity for Marketplace Subscription - EndCustomer: - type: object - properties: - isDisclosed: - type: boolean - description: Indicate if endCustomer info should be disclosed or not - default: false - name: - type: string - mdmId: + - UP + - DOWN + - PARTIAL + connectionCount: + type: integer + description: Total number of connections. + format: int64 + evplVCCount: + type: integer + description: Total number of connections. + format: int64 + fgVCCount: + type: integer + description: Total number of connections. + format: int64 + accessVCCount: + type: integer + description: Total number of connections. + format: int64 + opStatusChangedAt: type: string - ConnectionState: - type: string - description: Connection status - enum: - - ACTIVE - - CANCELLED - - DEPROVISIONED - - DEPROVISIONING - - DRAFT - - FAILED - - PENDING - - PROVISIONING - - "" - Change: - required: - - createdDateTime - - type + description: Date and time at which port availability changed. + format: date-time + example: 2020-11-06T07:00:00Z + maintenanceStatus: + $ref: "#/components/schemas/maintenanceState" + description: Operational specifications for ports. + PortChange: type: object properties: uuid: @@ -22397,20 +31038,21 @@ components: type: string description: Type of change enum: - - CONNECTION_CREATION - - CONNECTION_UPDATE - - CONNECTION_DELETION - - CONNECTION_PROVIDER_STATUS_REQUEST + - PORT_CREATION + - PORT_UPDATE + - PORT_DELETION status: type: string description: Current outcome of the change flow enum: - - APPROVED - COMPLETED - FAILED - - REJECTED - REQUESTED - - SUBMITTED_FOR_APPROVAL + information: + type: string + description: Additional information + data: + $ref: "#/components/schemas/PortChangeOperation" createdDateTime: type: string description: Set when change flow starts @@ -22421,1047 +31063,746 @@ components: description: Set when change object is updated format: date-time example: 2020-11-06T07:00:00Z - information: - type: string - description: Additional information - data: - $ref: "#/components/schemas/ConnectionChangeOperation" - description: Current state of latest connection change - ConnectionOperation: - type: object - properties: - providerStatus: - $ref: "#/components/schemas/ProviderStatus" - equinixStatus: - $ref: "#/components/schemas/EquinixStatus" - operationalStatus: - type: string - description: Connection operational status - enum: - - UP - - DOWN - errors: - type: array - items: - $ref: "#/components/schemas/Error" - opStatusChangedAt: - type: string - description: When connection transitioned into current operational status - format: date-time - example: 2020-11-06T07:00:00Z - description: Connection type-specific operational data - SimplifiedAccount: - type: object - properties: - accountNumber: - type: integer - description: Account number - format: int64 - accountName: - type: string - description: Account name - orgId: - type: integer - description: Customer organization identifier - format: int64 - organizationName: - type: string - description: Customer organization name - globalOrgId: - type: string - description: Global organization identifier - globalOrganizationName: - type: string - description: Global organization name - ucmId: - type: string - description: Account ucmId - globalCustId: - type: string - description: Account name - resellerAccountNumber: - type: integer - description: Reseller account number - format: int64 - resellerAccountName: - type: string - description: Reseller account name - resellerUcmId: - type: string - description: Reseller account ucmId - resellerOrgId: - type: integer - description: Reseller customer organization identifier - format: int64 - ConnectionChangeOperation: - required: - - op - - path - - value - type: object - properties: - op: - type: string - description: Handy shortcut for operation name - example: add - path: - type: string - description: path inside document leading to updated parameter - example: /ipv6 - value: - type: object - description: new value for updated parameter - description: Connection change operation data - Actions: + description: Current state of latest port change + PortServiceCode: type: string - description: Connection action type + description: Identifies the service type associated with this port enum: - - CONNECTION_CREATION_ACCEPTANCE - - CONNECTION_CREATION_REJECTION - - CONNECTION_UPDATE_ACCEPTANCE - - CONNECTION_UPDATE_REJECTION - - CONNECTION_DELETION_ACCEPTANCE - - CONNECTION_REJECTION_ACCEPTANCE - - CONNECTION_UPDATE_REQUEST - - MIGRATION_EVPL_VC - - CONNECTION_PROVIDER_STATUS_REQUEST - - CONNECTION_PROVIDER_BANDWIDTH_REQUEST - - ACCEPT_HOSTED_CONNECTION - - CANCEL_EVPL_VC_DRAFT_ORDERS - - CONNECTION_CREATION_RETRY - - CONNECTION_DELETION_RETRY - ConnectionAcceptanceData: - type: object - properties: - zSide: - $ref: "#/components/schemas/ConnectionSide" - providerBandwidth: - type: integer - description: Authorization key bandwidth in Mbps - readOnly: true - description: Connection acceptance data - ConnectionRouteTableEntry: - required: - - changeLog - - type - type: object - properties: - type: - $ref: "#/components/schemas/RouteTableEntryType" - protocolType: - $ref: "#/components/schemas/RouteTableEntryProtocolType" - state: - type: string - example: ACTIVE - enum: - - ACTIVE - - INACTIVE - prefix: - type: string - example: 192.168.10.0/24 - nextHop: - type: string - example: 10.10.10.5 - MED: - type: integer - example: 5 - localPreference: - type: integer - example: 200 - asPath: - type: array - items: - type: string - connection: - $ref: "#/components/schemas/ConnectionRouteTableEntry_connection" - changeLog: - $ref: "#/components/schemas/Changelog" - description: Advertised and received route table entry object - BGPConnectionIpv4: - required: - - customerPeerIp - - enabled - type: object - properties: - customerPeerIp: - type: string - description: Customer side peering ip - example: 10.1.1.2 - equinixPeerIp: - type: string - description: Equinix side peering ip - example: 10.1.1.3 - enabled: - type: boolean - description: Admin status for the BGP session - outboundASPrependCount: - type: integer - description: AS path prepend count - format: int64 - example: 3 - inboundMED: - type: integer - description: Inbound Multi Exit Discriminator attribute - format: int64 - example: 1000 - outboundMED: - type: integer - description: Outbound Multi Exit Discriminator attribute - format: int64 - example: 2000 - routesMax: - type: integer - description: Maximum learnt prefixes limit - format: int64 - example: 1000 - operation: - $ref: "#/components/schemas/BGPConnectionOperation" - BGPConnectionIpv6: - required: - - customerPeerIp - - enabled + - CX + - IX + - IA + - MC + PortDevice: type: object properties: - customerPeerIp: - type: string - description: Customer side peering ip - example: 2001:db8:c59b::1 - equinixPeerIp: + name: type: string - description: Equinix side peering ip - example: 2001:db8:c59b::1 - enabled: - type: boolean - description: Admin status for the BGP session - outboundASPrependCount: - type: integer - description: AS path prepend count - format: int64 - example: 3 - inboundMED: - type: integer - description: Inbound Multi Exit Discriminator attribute - format: int64 - example: 1000 - outboundMED: - type: integer - description: Outbound Multi Exit Discriminator attribute - format: int64 - example: 2000 - routesMax: + description: Device name + deprecated: true + redundancy: + $ref: "#/components/schemas/PortDeviceRedundancy" + vcBandwidthMax: type: integer - description: Maximum learnt prefixes limit - format: int64 - example: 1000 - operation: - $ref: "#/components/schemas/BGPConnectionOperation" - RoutingProtocolBFD: - required: - - enabled + description: Maximum bandwidth allowed for connection. + format: int64 + description: Port device + PortInterface: type: object properties: - enabled: - type: boolean - interval: + type: type: string - example: "100" - DirectConnectionIpv4: + description: Port interface type + description: Port interface + PortDemarcationPoint: type: object properties: - equinixIfaceIp: + cabinetUniqueSpaceId: type: string - description: Equinix side Interface IP address - example: 192.168.100.0/30 - DirectConnectionIpv6: - required: - - equinixIfaceIp + description: Port cabinet unique space id + cageUniqueSpaceId: + type: string + description: Port cage unique space id + patchPanel: + type: string + description: Port patch panel + patchPanelName: + type: string + description: Port patch panel + deprecated: true + patchPanelPortA: + type: string + description: Port patch panel port A + patchPanelPortB: + type: string + description: Port patch panel port B + connectorType: + type: string + description: Port connector type + ibx: + type: string + description: Port ibx identifier + description: Customer physical Port + PortRedundancy: type: object properties: - equinixIfaceIp: + enabled: + type: boolean + description: Access point redundancy + group: type: string - description: Equinix side Interface IP address - example: 2001:db8:c59b::/1 - RoutingProtocolBGPData: + description: Port UUID of respective primary port + deprecated: true + priority: + $ref: "#/components/schemas/PortPriority" + description: Port redundancy configuration + PortEncapsulation: type: object properties: type: type: string - description: Routing protocol type + description: Port encapsulation protocol type enum: - - BGP - name: + - DOT1Q + - QINQ + - UNTAGGED + tagProtocolId: type: string - example: My-BGP-route-1 - bgpIpv4: - $ref: "#/components/schemas/BGPConnectionIpv4" - bgpIpv6: - $ref: "#/components/schemas/BGPConnectionIpv6" - customerAsn: - type: integer - description: Customer asn - format: int64 - example: 65002 - equinixAsn: - type: integer - description: Equinix asn - format: int64 - example: 65002 - bgpAuthKey: + description: Port encapsulation tag protocol identifier + description: Port encapsulation configuration + PortLag: + type: object + properties: + id: type: string - description: BGP authorization key - example: testAuthKey - asOverrideEnabled: + description: id + enabled: type: boolean - description: Enable AS number override - bfd: - $ref: "#/components/schemas/RoutingProtocolBFD" - href: - type: string - description: Routing Protocol URI - format: uri - example: https://api.equinix.com/fabric/v4/connections/81331c52-04c0-4656-a4a7-18c52669348f/routingProtocols/69762051-85ed-4d13-b6b4-e32e93c672b5 - uuid: + description: enabled + deprecated: true + name: type: string - description: Routing protocol identifier - format: uuid - example: c9b8e7a2-f3b1-4576-a4a9-1366a63df170 - state: + description: name + memberStatus: type: string - enum: - - PROVISIONED - - DEPROVISIONED - - PROVISIONING - - DEPROVISIONING - - REPROVISIONING - - FAILED - operation: - $ref: "#/components/schemas/RoutingProtocolOperation" - change: - $ref: "#/components/schemas/RoutingProtocolChange" - changelog: - $ref: "#/components/schemas/Changelog" - project: - $ref: "#/components/schemas/RoutingProtocolProject" - connection: - $ref: "#/components/schemas/RoutingProtocolConnection" - RoutingProtocolDirectData: + description: member status + description: Port Lag + Package: type: object properties: - type: + code: type: string - description: Routing protocol type + description: Type of Port Package enum: - - DIRECT - name: - type: string - example: My-direct-route-1 - directIpv4: - $ref: "#/components/schemas/DirectConnectionIpv4" - directIpv6: - $ref: "#/components/schemas/DirectConnectionIpv6" - href: - type: string - description: Routing Protocol URI - format: uri - example: https://api.equinix.com/fabric/v4/connections/81331c52-04c0-4656-a4a7-18c52669348f/routingProtocols/69762051-85ed-4d13-b6b4-e32e93c672b5 - uuid: - type: string - description: Routing protocol identifier - format: uuid - example: c9b8e7a2-f3b1-4576-a4a9-1366a63df170 - state: + - STANDARD + - UNLIMITED + - UNLIMITED_PLUS + description: Package settings for port + PortSettings: + type: object + properties: + buyout: + type: boolean + deprecated: true + viewPortPermission: + type: boolean + deprecated: true + placeVcOrderPermission: + type: boolean + deprecated: true + layer3Enabled: + type: boolean + deprecated: true + packageType: type: string + description: Type of Port Package + deprecated: true enum: - - PROVISIONED - - DEPROVISIONED - - PROVISIONING - - DEPROVISIONING - - REPROVISIONING - - FAILED - operation: - $ref: "#/components/schemas/RoutingProtocolOperation" - change: - $ref: "#/components/schemas/RoutingProtocolChange" - changelog: - $ref: "#/components/schemas/Changelog" - project: - $ref: "#/components/schemas/RoutingProtocolProject" - connection: - $ref: "#/components/schemas/RoutingProtocolConnection" - BGPActions: - type: string - description: BGP action type - enum: - - CLEAR_BGPIPV4 - - CLEAR_BGPIPV6 - - CLEAR_BGPIPV4_INBOUND - - CLEAR_BGPIPV6_INBOUND - - RESET_BGPIPV4 - - RESET_BGPIPV6 - BGPActionStates: - type: string - description: BGP action state - enum: - - PENDING - - FAILED - - SUCCEEDED - RoutingProtocolChange: + - STANDARD + - UNLIMITED + - UNLIMITED_PLUS + description: Port configuration settings + PortNotification: required: + - registeredUsers - type - - uuid type: object properties: - uuid: - type: string - description: Uniquely identifies a change type: type: string - description: Type of change + description: Notification Type enum: - - ROUTING_PROTOCOL_UPDATE - - ROUTING_PROTOCOL_CREATION - - ROUTING_PROTOCOL_DELETION - href: - type: string - description: Routing Protocol Change URI - format: uri - description: Current state of latest Routing Protocol change - RoutingProtocolChangeOperation: - required: - - op - - path - - value + - NOTIFICATION + - TECHNICAL + - PEERING + - ESCALATION + registeredUsers: + type: array + description: Array of registered users + items: + type: string + PortAdditionalInfo: type: object properties: - op: - type: string - description: Handy shortcut for operation name - enum: - - add - - replace - - remove - path: + key: type: string - description: path inside document leading to updated parameter - example: / + description: Key value: - $ref: "#/components/schemas/RoutingProtocolBase" - description: Routing Protocol change operation data - SimplifiedLocation: + type: string + description: Value + description: Additional information + PortLoa: type: object properties: - metroHref: + uuid: type: string - example: https://api.equinix.com/fabric/v4/metros/AM - region: + description: uuid + type: type: string - example: AMER, APAC, EMEA - metroName: + description: Loa type + example: DIGITAL_LOA + description: Port Loas + PhysicalPortType: + type: string + description: Type of Port + enum: + - XF_PHYSICAL_PORT + PortTether: + type: object + properties: + crossConnectId: type: string - example: Amsterdam - metroCode: + description: Port cross connect identifier + cabinetNumber: type: string - example: AM - ibx: + description: Port cabinet number + systemName: type: string - example: AM1 - deprecated: true - PlatformChangelog: - type: object - properties: - createdBy: + description: Port system name + patchPanel: type: string - description: Created by User Key - example: johnsmith - createdDateTime: + description: Port patch panel + patchPanelPortA: type: string - description: Created by Date and Time - format: date-time - example: 2020-11-06T07:00:00Z - updatedBy: + description: Port patch panel port A + patchPanelPortB: type: string - description: Updated by User Key - example: johnsmith - updatedDateTime: + description: Port patch panel port B + ibx: type: string - description: Updated by Date and Time - format: date-time - example: 2020-11-06T07:00:00Z - deletedBy: + description: z-side/Equinix IBX + description: Port physical connection + PhysicalPortSettings: + type: object + properties: + errorMessage: type: string - description: Deleted by User Key - example: johnsmith - deletedDateTime: + packageType: type: string - description: Deleted by Date and Time - format: date-time - example: 2020-11-06T07:00:00Z - description: Change log - InternetAccessBillingType: - type: string - enum: - - FIXED - - USAGE_BASED - - BURST_BASED - x-enum-varnames: - - FIXED - - USAGE_BASED - - BURST_BASED - InternetAccessAccount: + deprecated: true + description: Physical Port configuration settings + SimplifiedAccountRequest: required: - accountNumber type: object properties: accountNumber: - type: string + type: integer description: Account number - href: - type: string - description: Account URL path - format: uri - example: https://api.equinix.com/billing/v2/billingAccounts/accountNumber/57689234 - InternetAccessRoutingProtocolType: - type: string - enum: - - BGP - - DIRECT - - STATIC - x-enum-varnames: - - BGP - - DIRECT - - STATIC - InternetAccessExportPolicy: - type: string - description: Denotes which routes should be advertised to the internet - example: FULL - enum: - - FULL - - DEFAULT - - FULL_DEFAULT - - PARTIAL - x-enum-varnames: - - FULL - - DEFAULT - - FULL_DEFAULT - - PARTIAL - InternetAccessCustomerAsnRange: - type: string - description: Customer Autonomous System Number range. Based on the value a proper private ASN will be generated. - enum: - - BITS_16 - - BITS_32 - x-enum-varnames: - - BITS_16 - - BITS_32 - InternetAccessChange: + format: int64 + SimplifiedLocationRequest: required: - - href + - metroCode type: object properties: - href: + metroCode: type: string - description: URI of the change object - format: uri - InternetAccessLocation: + example: AM + PortChangeOperation: required: - - ibx - - metroCode - - metroHref - - region + - op + - path + - value type: object properties: - metroHref: + op: type: string - description: Metro URL path for the linked resource - format: uri - example: https://api.equinix.com/fabric/v4/metros/WA - metroCode: - pattern: ^[A-Z]{2}$ + description: Handy shortcut for operation name + example: replace + path: type: string - description: Code representing the metro - example: WA - region: + description: path inside document leading to updated parameter + example: /name + value: + type: object + description: new value for updated parameter + description: Port change operation data + LinkProtocolResponse: + type: object + properties: + href: type: string - description: Geographic region - example: EMEA - enum: - - APAC - - EMEA - - AMER - ibx: + description: LinkProtocol URI + format: uri + readOnly: true + uuid: type: string - description: IBX data center code - example: WA1 - InternetAccessRoutingProtocol: + description: Equinix-assigned network identifier + format: uuid + example: 92dc376a-a932-43aa-a6a2-c806dedbd784 + state: + $ref: "#/components/schemas/LinkProtocolState" + type: + $ref: "#/components/schemas/LinkProtocolRequestType" + vlanTag: + type: integer + example: 20 + vni: + type: integer + example: 20 + vlanTagMin: + type: integer + example: 20 + vlanTagMax: + type: integer + example: 200 + vlanSTag: + type: integer + example: 20 + vlanCTag: + type: integer + example: 20 + vlanCTagMin: + type: integer + example: 20 + vlanCTagMax: + type: integer + example: 200 + subInterface: + $ref: "#/components/schemas/SubInterface" + asset: + $ref: "#/components/schemas/LinkProtocolConnection" + serviceToken: + $ref: "#/components/schemas/LinkProtocolServiceToken" + changeLog: + $ref: "#/components/schemas/Changelog" + description: Link Protocol response + PortSortDirection: + type: string + description: Sorting direction + default: DESC + enum: + - DESC + - ASC + PortSortBy: + type: string + description: Possible field names to use on sorting + default: /device/name + enum: + - /device/name + - /name + - /state + - /location/metroName + - /demarcationPointIbx + - /device/redundancy/priority + - /lagEnabled + - /physicalPortsSpeed + - /encapsulation/type + - /physicalPorts/tether/crossConnectId + - /package/code + - /changeLog/updatedDateTime + - /changeLog/createdDateTime + - /bandwidth + - /serviceCode + PortPackage: required: - - connections - - customerRoutes + - code - type type: object properties: + href: + type: string + description: Port Package URI + readOnly: true type: - $ref: "#/components/schemas/InternetAccessRoutingProtocolType" - customerRoutes: + type: string + description: Port Package Type + enum: + - PORT_PACKAGE + code: + type: string + description: Port Package code + vcBandwidthMax: + type: integer + description: Maximum virtual connection bandwidth in Mbps + vcRemoteSupported: + type: boolean + description: Indicates if remote virtual connections are supported + supportedServiceTypes: type: array + description: List of supported service types items: - $ref: "#/components/schemas/InternetAccessCustomerRoute" - connections: + type: string + description: Port Package Service Type + enum: + - MSP + supportedSourceTypes: type: array + description: List of supported source types items: - $ref: "#/components/schemas/InternetAccessConnection" - discriminator: - propertyName: type - mapping: - BGP: "#/components/schemas/InternetAccessRoutingProtocolBgp" - DIRECT: "#/components/schemas/InternetAccessRoutingProtocolDirect" - STATIC: "#/components/schemas/InternetAccessRoutingProtocolStatic" - InternetAccessCustomerRoute: - type: object - properties: - ipBlock: - $ref: "#/components/schemas/InternetAccessIpBlock" - InternetAccessRoutingProtocolBgp: - allOf: - - $ref: "#/components/schemas/InternetAccessRoutingProtocol" - - required: - - customerAsnRange - - exportPolicy - type: object - properties: - exportPolicy: - $ref: "#/components/schemas/InternetAccessExportPolicy" - customerAsn: - type: integer - description: Customer ASN. Valid range is 1-64495 or 131072-4199999999. Currently this option is only available for EIA over dedicated port. - format: int64 - example: 11111 - bgpAuthKey: - type: string - description: BGP authentication key - example: SecretKey - customerAsnRange: - $ref: "#/components/schemas/InternetAccessCustomerAsnRange" - InternetAccessRoutingProtocolDirect: - allOf: - - $ref: "#/components/schemas/InternetAccessRoutingProtocol" - InternetAccessRoutingProtocolStatic: - allOf: - - $ref: "#/components/schemas/InternetAccessRoutingProtocol" - InternetAccessBilling: - required: - - type - type: object - properties: - type: - $ref: "#/components/schemas/InternetAccessBillingType" - enabled: - type: boolean - description: Indicates whether the billing is enabled - startDate: - type: string - description: The start date for the billing period - format: date-time - InternetAccessOrder: - allOf: - - $ref: "#/components/schemas/Order" - - type: object - properties: - href: - type: string - description: Order URI - format: uri - example: https://api.equinix.com/colocations/v2/orders/100200300 - InternetAccessUseCase: + $ref: "#/components/schemas/PortPackageSourceType" + supportedMetros: + type: array + description: List of supported metros + items: + type: string + description: Port Package details + RouteFilterState: type: string + description: Route Filter status enum: - - MAIN - - MANAGEMENT_ACCESS - x-enum-varnames: - - MAIN - - MANAGEMENT_ACCESS - SearchSort: - type: array - items: - $ref: "#/components/schemas/SearchSortItem" - SearchSortItem: + - PROVISIONING + - REPROVISIONING + - DEPROVISIONING + - PROVISIONED + - DEPROVISIONED + - NOT_PROVISIONED + - NOT_DEPROVISIONED + RouteFiltersChange: required: - - direction - - property + - type + - uuid type: object properties: - direction: + uuid: type: string - example: ASC + description: Uniquely identifies a change + type: + type: string + description: Type of change enum: - - ASC - - DESC - property: + - BGP_IPv4_PREFIX_FILTER_UPDATE + - BGP_IPv4_PREFIX_FILTER_CREATION + - BGP_IPv4_PREFIX_FILTER_DELETION + - BGP_IPv6_PREFIX_FILTER_UPDATE + - BGP_IPv6_PREFIX_FILTER_CREATION + - BGP_IPv6_PREFIX_FILTER_DELETION + href: type: string - IpBlockLocation: + description: Route filter change URI + format: uri + description: Current state of latest route filter change + RouteFiltersPatchRequestItem: required: - - metroCode + - op + - path + - value type: object properties: - metroHref: + op: type: string - description: Metro URL path for the linked resource - example: https://api.equinix.com/fabric/v4/metros/WA - metroCode: - pattern: ^[A-Z]{2}$ + description: Handy shortcut for operation name + example: replace + path: type: string - example: WA - TypeOfIpBlockProduct: - type: string - enum: - - IPV4_IP_BLOCK - - IPV6_IP_BLOCK - x-enum-varnames: - - IPV4_IP_BLOCK - - IPV6_IP_BLOCK - IpBlockProjectRequest: + description: path to change + example: /name + value: + type: object + description: new value for updated parameter + description: Route filter change operation data + RouteFiltersChangeOperation: required: - - projectId + - op + - path + - value type: object properties: - projectId: + op: type: string - description: project id - IpBlockAccount: - required: - - accountNumber - type: object - properties: - accountNumber: + description: Handy shortcut for operation name + enum: + - add + - replace + - remove + path: type: string - description: account number - IpBlockOrderRequest: + description: path inside document leading to updated parameter + example: / + value: + $ref: "#/components/schemas/RouteFiltersBase" + description: Route filter change operation data + RouteFilterConnectionsData: type: object properties: - purchaseOrderNumber: + href: type: string - description: Purchase order number - nullable: true - orderNumber: + description: Connection URI + format: uri + example: https://api.equinix.com/fabric/v4/connections/81331c52-04c0-4656-a4a7-18c52669348f + type: + $ref: "#/components/schemas/ConnectionType" + uuid: type: string - description: Order Number - nullable: true - orderLine: + description: Route filter identifier + format: uuid + example: 695a8471-6595-4ac6-a2f4-b3d96ed3a59d + name: type: string - description: Order Line Number - nullable: true - IpBlockRegulations: - required: - - addressingPlans - - questions - type: object - properties: - addressingPlans: - type: array - description: List of addressing plans - items: - $ref: "#/components/schemas/IpBlockAddressingPlan" - questions: - $ref: "#/components/schemas/IpBlockRegulations_questions" - IpBlockAddressingPlan: - required: - - purpose - - size + example: connection-1 + RouteFilterSortCriteria: type: object properties: - purpose: - type: string - description: purpose - size: - type: integer - description: size - format: int32 - IpBlockPrefixLength: - maximum: 128 - minimum: 1 - type: integer - description: IpBlockPrefix length - IpBlockPrefix: + direction: + $ref: "#/components/schemas/RouteFilterSortDirection" + property: + $ref: "#/components/schemas/RouteFilterSortBy" + RouteFilterSortDirection: type: string - description: CIDR prefix - IpBlockState: + description: Sorting direction + default: DESC + enum: + - DESC + - ASC + RouteFilterSortBy: type: string - description: Current state of the Ip Block + description: Possible field names to use on sorting + default: /changeLog/updatedDateTime enum: - - PENDING - - ACTIVE - - DELETING - - DELETED - - FAILED - IpBlockOwnership: + - /type + - /uuid + - /name + - /project/projectId + - /state + - /changeLog/createdDateTime + - /changeLog/updatedDateTime + - /changeLog/deletedDateTime + RouteFilterRuleState: type: string - description: IpBlockOwnership of the Ip Block + description: Route filter rule status enum: - - EQUINIX - - CUSTOMER - IpBlockOrderResponse: + - PROVISIONING + - REPROVISIONING + - DEPROVISIONING + - PROVISIONED + - DEPROVISIONED + - NOT_PROVISIONED + - NOT_DEPROVISIONED + RouteFilterRulesChange: required: - - href - - orderNumber + - type + - uuid type: object properties: + uuid: + type: string + description: Uniquely identifies a change + type: + type: string + description: Type of change + enum: + - BGP_IPv4_PREFIX_FILTER_RULE_UPDATE + - BGP_IPv4_PREFIX_FILTER_RULE_CREATION + - BGP_IPv4_PREFIX_FILTER_RULE_DELETION + - BGP_IPv6_PREFIX_FILTER_RULE_UPDATE + - BGP_IPv6_PREFIX_FILTER_RULE_CREATION + - BGP_IPv6_PREFIX_FILTER_RULE_DELETION href: type: string - description: Order URI + description: Route Filter Change URI format: uri - example: https://api.equinix.com/colocations/v2/orders/1-34834234 - orderNumber: + description: Current state of latest route filter rule change + RouteFilterRulesPatchRequestItem: + required: + - op + - path + - value + type: object + properties: + op: type: string - description: Order number - IpBlockProject: + description: Handy shortcut for operation name + example: replace + path: + type: string + description: path to change + example: /prefixMatch + value: + type: object + description: new value for updated parameter + description: Route filter rule change operation data + RouteFilterRulesChangeOperation: required: - - projectId + - op + - path + - value type: object properties: - href: + op: type: string - description: URI of the project - format: uri - projectId: + description: Handy shortcut for operation name + enum: + - add + - replace + - remove + path: type: string - description: project id - IpBlockAsset: + description: path inside document leading to updated parameter + example: / + value: + $ref: "#/components/schemas/RouteFilterRulesBase" + description: Route filter rule change operation data + RouteAggregationState: + type: string + description: Route Aggregation status + enum: + - PROVISIONING + - REPROVISIONING + - DEPROVISIONING + - PROVISIONED + - DEPROVISIONED + - NOT_PROVISIONED + - NOT_DEPROVISIONED + RouteAggregationsChange: required: - - href - type - uuid type: object properties: - type: - $ref: "#/components/schemas/IpBlockProductType" uuid: type: string - description: Unique identifier for the asset - format: uuid - href: + description: Uniquely identifies a change + type: type: string - description: Resource URL path for the linked resource - example: https://api.equinix.com/fabric/v4/internetAccesses/fd8c5042-b553-4d5e-a2ac-c73bf6d4fd92 - IpBlockChange: - required: - - href - type: object - properties: + description: Type of change + enum: + - BGP_IPv4_PREFIX_AGGREGATION_UPDATE + - BGP_IPv4_PREFIX_AGGREGATION_CREATION + - BGP_IPv4_PREFIX_AGGREGATION_DELETION + - BGP_IPv6_PREFIX_AGGREGATION_UPDATE + - BGP_IPv6_PREFIX_AGGREGATION_CREATION + - BGP_IPv6_PREFIX_AGGREGATION_DELETION href: type: string - description: URI of the IpBlockChange object + description: Route AGGREGATION Change URI format: uri - IpBlockChangeLog: + description: Current state of latest Route Aggregation change + RouteAggregationsPatchRequestItem: required: - - createdDateTime + - op + - path + - value type: object properties: - createdDateTime: - type: string - format: date-time - updatedDateTime: + op: type: string - format: date-time - deletedDateTime: + description: Handy shortcut for operation name + example: replace + path: type: string - format: date-time - PatchIpBlockRequestBodyItem: + description: path to change + example: /name + value: + type: object + description: new value for updated parameter + description: Route Aggregation change operation data + RouteAggregationsChangeOperation: required: - op - path + - value type: object properties: op: type: string - description: operation + description: Handy shortcut for operation name enum: - add + - replace - remove path: type: string - description: path + description: path inside document leading to updated parameter + example: / value: - $ref: "#/components/schemas/PatchIpBlockRequestBodyItem_value" - SortDirection: - type: string - description: Sorting direction - enum: - - DESC - - ASC - default: DESC - SortBy: - type: string - description: Possible field names to use on sorting - enum: - - /name - - /direction - - /aSide/accessPoint/name - - /aSide/accessPoint/type - - /aSide/accessPoint/account/accountName - - /aSide/accessPoint/location/metroName - - /aSide/accessPoint/location/metroCode - - /aSide/accessPoint/linkProtocol/vlanCTag - - /aSide/accessPoint/linkProtocol/vlanSTag - - /zSide/accessPoint/name - - /zSide/accessPoint/type - - /zSide/accessPoint/role - - /zSide/accessPoint/account/accountName - - /zSide/accessPoint/location/metroName - - /zSide/accessPoint/location/metroCode - - /zSide/accessPoint/linkProtocol/vlanCTag - - /zSide/accessPoint/linkProtocol/vlanSTag - - /zSide/accessPoint/authenticationKey - - /bandwidth - - /geoScope - - /uuid - - /changeLog/createdDateTime - - /changeLog/updatedDateTime - - /operation/equinixStatus - - /operation/providerStatus - - /redundancy/priority - default: /changeLog/updatedDateTime - SortCriteriaResponse: - type: object - properties: - direction: - $ref: "#/components/schemas/SortDirection" - property: - $ref: "#/components/schemas/SortBy" - Price: + $ref: "#/components/schemas/RouteAggregationsBase" + description: Route Aggregation change operation data + RouteAggregationConnectionsData: type: object properties: href: type: string - description: An absolute URL that returns specified pricing data - format: url + description: Connection URI + format: uri + example: https://api.equinix.com/fabric/v4/connections/81331c52-04c0-4656-a4a7-18c52669348f type: - $ref: "#/components/schemas/ProductType" - code: - type: string - description: Equinix-assigned product code - name: - type: string - description: Full product name - description: + $ref: "#/components/schemas/ConnectionType" + uuid: type: string - description: Product description - account: - $ref: "#/components/schemas/SimplifiedAccount" - charges: - type: array - items: - $ref: "#/components/schemas/PriceCharge" - currency: + description: Route Aggregation identifier + format: uuid + example: 695a8471-6595-4ac6-a2f4-b3d96ed3a59d + name: type: string - description: Product offering price currency - termLength: - type: integer - description: In months. No value or value of 1 means on-demand - enum: - - 1 - - 12 - - 24 - - 36 - catgory: - $ref: "#/components/schemas/PriceCategory" - connection: - $ref: "#/components/schemas/VirtualConnectionPrice" - ipBlock: - $ref: "#/components/schemas/IpBlockPrice" - router: - $ref: "#/components/schemas/FabricCloudRouterPrice" - port: - $ref: "#/components/schemas/VirtualPortPrice" - timeService: - $ref: "#/components/schemas/TimeServicePrice" - ServiceProfileTypeEnum: - type: string - description: Service profile type - example: L2_PROFILE - enum: - - L2_PROFILE - - L3_PROFILE - - IA_PROFILE - - IX_PROFILE - - IC_PROFILE - - LMAAS_PROFILE - x-eqx-api-linter-skip-rules: - - 40 - ServiceProfileVisibilityEnum: + example: connection-1 + RouteAggregationSortCriteria: + type: object + properties: + direction: + $ref: "#/components/schemas/RouteAggregationSortDirection" + property: + $ref: "#/components/schemas/RouteAggregationSortBy" + RouteAggregationSortDirection: type: string + description: Sorting direction enum: - - PRIVATE - - PUBLIC - ServiceProfileStateEnum: + - DESC + - ASC + default: DESC + RouteAggregationSortBy: type: string - description: Equinix assigned state. - example: ACTIVE + description: Possible field names to use on sorting enum: - - ACTIVE - - PENDING_APPROVAL - - DELETED - - REJECTED - ServiceTokenType: + - /type + - /uuid + - /name + - /project/projectId + - /state + - /changeLog/createdDateTime + - /changeLog/updatedDateTime + - /changeLog/deletedDateTime + default: /changeLog/updatedDateTime + RouteAggregationRuleState: type: string - description: Type of Service Token + description: Route Aggregation Rule status enum: - - VC_TOKEN - - EPL_TOKEN - ServiceTokenConnection: + - PROVISIONING + - REPROVISIONING + - DEPROVISIONING + - PROVISIONED + - DEPROVISIONED + - NOT_PROVISIONED + - NOT_DEPROVISIONED + RouteAggregationRulesChange: + required: + - type + - uuid type: object properties: + uuid: + type: string + description: Uniquely identifies a change type: type: string - description: Type of Connection + description: Type of change enum: - - EVPL_VC - - EPL_VC - - EVPLAN_VC - - EPLAN_VC - - IPWAN_VC - - IP_VC - - EVPTREE_VC - - EPTREE_VC + - BGP_IPv4_PREFIX_AGGREGATION_RULE_UPDATE + - BGP_IPv4_PREFIX_AGGREGATION_RULE_CREATION + - BGP_IPv4_PREFIX_AGGREGATION_RULE_DELETION href: type: string - description: An absolute URL that is the subject of the link's context. + description: Route Aggregation Change URI format: uri - readOnly: true - uuid: + description: Current state of latest Route Aggregation Rule change + RouteAggregationRulesPatchRequestItem: + required: + - op + - path + - value + type: object + properties: + op: type: string - description: Equinix-assigned connection identifier - format: uuid - allowRemoteConnection: - type: boolean - description: Authorization to connect remotely - default: false - allowCustomBandwidth: - type: boolean - description: Allow custom bandwidth value - default: false - bandwidthLimit: - maximum: 100000 - minimum: 0 - type: integer - description: Connection bandwidth limit in Mbps - supportedBandwidths: - type: array - description: List of permitted bandwidths. - items: - type: integer - aSide: - $ref: "#/components/schemas/ServiceTokenSide" - zSide: - $ref: "#/components/schemas/ServiceTokenSide" - description: Service Token Connection Type Information - ServiceTokenState: - type: string - description: Service token state - enum: - - ACTIVE - - INACTIVE - - EXPIRED - - DELETED - ServiceTokenChangeOperation: + description: Handy shortcut for operation name + example: replace + path: + type: string + description: path to change + example: /prefix + value: + type: object + description: new value for updated parameter + description: Route Aggregation Rule change operation data + RouteAggregationRulesChangeOperation: required: - op - path @@ -23472,88 +31813,76 @@ components: type: string description: Handy shortcut for operation name enum: - - replace - add + - replace - remove path: type: string description: path inside document leading to updated parameter - example: /expirationDateTime + example: / value: - type: object - description: new value for updated parameter - description: Service Token change operation data - ServiceTokenActions: - type: string - description: Service Token action type - enum: - - RESEND_EMAIL_NOTIFICATION - PortState: - type: string - description: Port lifecycle state - enum: - - PENDING - - PROVISIONING - - REPROVISIONING - - PENDING_CROSS_CONNECT - - PROVISIONED - - ACTIVE - - DEPROVISIONING - - DEPROVISIONED - - INACTIVE - - FAILED - - ADDED - - DELETED - - TO_BE_ADDED - - TO_BE_DELETED - PortType: - type: string - description: Type of Port - enum: - - XF_PORT - PortOrder: + $ref: "#/components/schemas/RouteAggregationRulesBase" + description: Route Aggregation Rule change operation data + SimplifiedLocationWithoutIBX: + required: + - metroCode type: object properties: - purchaseOrder: - $ref: "#/components/schemas/PortOrderPurchaseOrder" - customerReferenceId: + metroHref: type: string - description: Customer order reference Id - signature: - $ref: "#/components/schemas/PortOrderSignature" - PortOperation: + description: The Canonical URL at which the resource resides. + example: https://api.equinix.com/fabric/v4/metros/AM + region: + type: string + example: AMER, APAC, EMEA + metroName: + type: string + example: Amsterdam + metroCode: + type: string + example: AM + CloudRouterPostRequestPackage: + required: + - code type: object properties: - operationalStatus: + href: type: string - description: Availability of a given physical port. + description: Fabric Cloud Router URI + format: uri + example: https://api.equinix.com/fabric/v4/routerPackages/LAB + type: + type: string + description: Cloud Router package type + example: ROUTER_PACKAGE enum: - - UP - - DOWN - - PARTIAL - connectionCount: - type: integer - description: Total number of connections. - format: int64 - evplVCCount: - type: integer - description: Total number of connections. - format: int64 - fgVCCount: - type: integer - description: Total number of connections. - format: int64 - accessVCCount: - type: integer - description: Total number of connections. - format: int64 - opStatusChangedAt: + - ROUTER_PACKAGE + code: type: string - description: Date and time at which port availability changed. - format: date-time - example: 2020-11-06T07:00:00Z - description: Operational specifications for ports. - PortChange: + description: Cloud Router package code + example: LAB + enum: + - LAB + - BASIC + - STANDARD + - ADVANCED + - PREMIUM + description: Fabric Cloud Router Package Type + CloudRouterAccessPointState: + type: string + description: Access point lifecycle state + enum: + - PROVISIONED + - PROVISIONING + - DEPROVISIONING + - DEPROVISIONED + - REPROVISIONING + - NOT_PROVISIONED + - NOT_DEPROVISIONED + CloudRouterChange: + required: + - type + - updatedDateTime type: object properties: uuid: @@ -23563,9 +31892,7 @@ components: type: string description: Type of change enum: - - PORT_CREATION - - PORT_UPDATE - - PORT_DELETION + - ROUTER_UPDATE status: type: string description: Current outcome of the change flow @@ -23573,11 +31900,6 @@ components: - COMPLETED - FAILED - REQUESTED - information: - type: string - description: Additional information - data: - $ref: "#/components/schemas/PortChangeOperation" createdDateTime: type: string description: Set when change flow starts @@ -23588,241 +31910,353 @@ components: description: Set when change object is updated format: date-time example: 2020-11-06T07:00:00Z - description: Current state of latest port change - PortServiceCode: - type: string - description: Identifies the service type associated with this port - enum: - - CX - - IX - - IA - - MC - PortDevice: - type: object - properties: - name: - type: string - description: Device name - deprecated: true - redundancy: - $ref: "#/components/schemas/PortDeviceRedundancy" - vcBandwidthMax: - type: integer - description: Maximum bandwidth allowed for connection. - format: int64 - description: Port device - PortInterface: - type: object - properties: - type: + information: type: string - description: Port interface type - description: Port interface - PortDemarcationPoint: + description: Additional information + data: + type: array + items: + $ref: "#/components/schemas/CloudRouterChangeOperation" + description: Current state of latest CloudRouter change + CloudRouterChangeOperation: + required: + - op + - path + - value type: object properties: - cabinetUniqueSpaceId: - type: string - description: Port cabinet unique space id - cageUniqueSpaceId: - type: string - description: Port cage unique space id - patchPanel: - type: string - description: Port patch panel - patchPanelName: - type: string - description: Port patch panel - deprecated: true - patchPanelPortA: - type: string - description: Port patch panel port A - patchPanelPortB: - type: string - description: Port patch panel port B - connectorType: - type: string - description: Port connector type - ibx: + op: type: string - description: Port ibx identifier - description: Customer physical Port - PortRedundancy: - type: object - properties: - enabled: - type: boolean - description: Access point redundancy - group: + description: Handy shortcut for operation name + enum: + - replace + - add + - remove + path: type: string - description: Port UUID of respective primary port - deprecated: true - priority: - $ref: "#/components/schemas/PortPriority" - description: Port redundancy configuration - PortEncapsulation: + description: path inside document leading to updated parameter + value: + type: object + description: new value for updated parameter + description: Fabric Cloud Router change operation data + CloudRouterActionType: + type: string + description: Cloud router action type + enum: + - BGP_SESSION_STATUS_UPDATE + - ROUTE_TABLE_ENTRY_UPDATE + - RECEIVED_ROUTE_ENTRY_UPDATE + - ADVERTISED_ROUTE_ENTRY_UPDATE + RouterActionsConnection: type: object properties: - type: + uuid: type: string - description: Port encapsulation protocol type - enum: - - DOT1Q - - QINQ - - UNTAGGED - tagProtocolId: + description: Connection UUID + example: 557400f8-d360-11e9-bb65-2a2ae2dbcce4 + href: type: string - description: Port encapsulation tag protocol identifier - description: Port encapsulation configuration - PortLag: + example: https://api.equinix.com/fabric/v4/connections/557400f8-d360-11e9-bb65-2a2ae2dbcce4 + type: + $ref: "#/components/schemas/ConnectionType" + operation: + $ref: "#/components/schemas/Operation" + description: Connection object for router actions + RouterActionsRouter: type: object properties: - id: - type: string - description: id - enabled: - type: boolean - description: enabled - deprecated: true - name: + uuid: type: string - description: name - memberStatus: + description: Router UUID + example: a1c6b7fd-aead-410a-96b4-b1dfa1071700 + href: type: string - description: member status - description: Port Lag - Package: - type: object - properties: - code: + example: https://api.equinix.com/fabric/v4/routers/a1c6b7fd-aead-410a-96b4-b1dfa1071700 + type: type: string - description: Type of Port Package enum: - - STANDARD - - UNLIMITED - - UNLIMITED_PLUS - description: Package settings for port - PortSettings: + - XF_ROUTER + operation: + $ref: "#/components/schemas/Operation" + description: Router object for router actions + CloudRouterCommandType: + type: string + description: Fabric Cloud Router Command Type + example: PING_COMMAND + enum: + - PING_COMMAND + - TRACEROUTE_COMMAND + CloudRouterCommandRequestPayload: + required: + - destination + - sourceConnection type: object properties: - buyout: - type: boolean - deprecated: true - viewPortPermission: - type: boolean - deprecated: true - placeVcOrderPermission: - type: boolean - deprecated: true - layer3Enabled: - type: boolean - deprecated: true - packageType: + destination: + type: string + description: Fabric Cloud Router Ping or Traceroute Command Destination + example: 8.8.8.8 + sourceConnection: + $ref: "#/components/schemas/CloudRouterCommandRequestConnection" + timeout: + type: integer + description: | + Timeout in seconds for Fabric Cloud Router Command: + - For `PING_COMMAND`: Packet timeout duration. The default value is 5. + - For `TRACEROUTE_COMMAND`: Probe timeout duration. + The default value is 2 and it is not configurable. + example: 2 + dataBytes: + maximum: 9000 + minimum: 16 + type: integer + description: | + Ping Command DataBytes. + This field is only applicable for commands of type `PING_COMMAND`. + example: 100 + default: 64 + probes: + type: integer + description: | + Number of probes for Fabric Cloud Router Traceroute Command. + This field is only applicable for commands of type `TRACEROUTE_COMMAND` and is not configurable. + example: 3 + default: 3 + hopsMax: + maximum: 30 + type: integer + description: | + Maximum number of hops for the traceroute command. + This field is only applicable for commands of type `TRACEROUTE_COMMAND`. + example: 20 + default: 20 + description: Fabric Cloud Router Command Request + CloudRouterCommandState: + type: string + description: Fabric Cloud Router Command State + example: SUCCEEDED + enum: + - PENDING + - SUCCEEDED + - FAILED + - DELETED + CloudRouterCommandRequestResponse: + type: object + properties: + destination: type: string - description: Type of Port Package - deprecated: true - enum: - - STANDARD - - UNLIMITED - - UNLIMITED_PLUS - description: Port configuration settings - PortNotification: + description: Fabric Cloud Router Ping or Traceroute Command Destination + example: 8.8.8.8 + sourceConnection: + $ref: "#/components/schemas/CloudRouterCommandRequestConnection" + timeout: + type: integer + description: | + Timeout in seconds for Fabric Cloud Router Command: + - For `PING_COMMAND`: Packet timeout duration. The default value is 5. + - For `TRACEROUTE_COMMAND`: Probe timeout duration. + The default value is 2 and it is not configurable. + example: 2 + dataBytes: + maximum: 9000 + minimum: 16 + type: integer + description: | + Ping Command DataBytes. + This field is only applicable for commands of type `PING_COMMAND`. + example: 100 + default: 64 + interval: + type: integer + description: | + Time in milliseconds between sending each packet. + This field is only applicable for commands of type `PING_COMMAND`. + example: 1000 + default: 1000 + count: + type: integer + description: | + Total number of ping requests. + This field is only applicable for commands of type `PING_COMMAND`. + example: 5 + default: 5 + probes: + type: integer + description: | + Number of probes for Fabric Cloud Router Traceroute Command. + This field is only applicable for commands of type `TRACEROUTE_COMMAND` and is not configurable. + example: 3 + default: 3 + hopsMax: + maximum: 30 + type: integer + description: | + Maximum number of hops for the traceroute command. + This field is only applicable for commands of type `TRACEROUTE_COMMAND`. + example: 20 + default: 20 + description: Fabric Cloud Router Command Request + CloudRouterCommandResponse: + type: object + oneOf: + - $ref: "#/components/schemas/CloudRouterCommandPingResponse" + - $ref: "#/components/schemas/CloudRouterCommandTracerouteResponse" + RouteTableEntry: required: - - registeredUsers + - changeLog + - state - type type: object properties: type: + $ref: "#/components/schemas/RouteTableEntryType" + protocolType: + $ref: "#/components/schemas/RouteTableEntryProtocolType" + state: + $ref: "#/components/schemas/RouteTableEntryState" + prefix: type: string - description: Notification Type - enum: - - NOTIFICATION - - TECHNICAL - - PEERING - - ESCALATION - registeredUsers: + example: 192.168.10.0/24 + nextHop: + type: string + example: 10.10.10.5 + MED: + type: integer + example: 5 + localPreference: + type: integer + example: 200 + asPath: type: array - description: Array of registered users items: type: string - PortAdditionalInfo: + example: "20100" + connection: + $ref: "#/components/schemas/RouteTableEntry_connection" + changeLog: + $ref: "#/components/schemas/Changelog" + description: Route table entry object + code: + type: string + description: Cloud Router package code + example: LAB + enum: + - LAB + - BASIC + - STANDARD + - ADVANCED + - PREMIUM + PackageChangeLog: type: object properties: - key: + createdDateTime: type: string - description: Key - value: + format: date-time + example: 2020-11-06T07:00:00Z + updatedDateTime: type: string - description: Value - description: Additional information - PortLoa: + format: date-time + example: 2020-11-06T07:00:00Z + description: Cloud Router package change log + ApiServices: type: object properties: - uuid: + route: type: string - description: uuid - type: + description: service routes + status: type: string - description: Loa type - example: DIGITAL_LOA - description: Port Loas - PhysicalPortType: - type: string - description: Type of Port - enum: - - XF_PHYSICAL_PORT - PortTether: + description: service status + changedDateTime: + type: string + description: service status change date + description: Available services details + ValidateConnectionResponse: type: object properties: - crossConnectId: - type: string - description: Port cross connect identifier - cabinetNumber: - type: string - description: Port cabinet number - systemName: - type: string - description: Port system name - patchPanel: - type: string - description: Port patch panel - patchPanelPortA: - type: string - description: Port patch panel port A - patchPanelPortB: - type: string - description: Port patch panel port B - ibx: + uuid: type: string - description: z-side/Equinix IBX - description: Port physical connection - PhysicalPortSettings: + description: Equinix-assigned connection identifier + bandwidth: + maximum: 100000 + minimum: 0 + type: integer + description: Connection bandwidth in Mbps + redundancy: + $ref: "#/components/schemas/ConnectionRedundancy" + aSide: + $ref: "#/components/schemas/ConnectionSide" + zSide: + $ref: "#/components/schemas/ConnectionSide" + description: Validate Connection specification + NetworkType: + type: string + description: Network type + enum: + - EVPLAN + - EPLAN + - IPWAN + - EVPTREE + - EPTREE + NetworkScope: + type: string + description: Network scope + enum: + - REGIONAL + - GLOBAL + - LOCAL + NetworkState: + type: string + description: Network status + example: ACTIVE + enum: + - ACTIVE + - INACTIVE + - DELETED + SimplifiedNetworkChange: type: object properties: - errorMessage: + href: type: string - packageType: + description: Network URI + format: uri + readOnly: true + example: https://api.equinix.com/fabric/v4/networks/2a4fb415-5a7f-436f-bae6-02f5e403deec/changes/4b17da68-3d6b-436d-9c8f-2105f3b950d9 + uuid: type: string - deprecated: true - description: Physical Port configuration settings - SimplifiedAccountRequest: - required: - - accountNumber + description: Uniquely identifies a change + format: uuid + example: 4b17da68-3d6b-436d-9c8f-2105f3b950d9 + type: + $ref: "#/components/schemas/NetworkChangeType" + description: Current state of latest network change + NetworkOperation: type: object properties: - accountNumber: - type: integer - description: Account number - format: int64 - SimplifiedLocationRequest: - required: - - metroCode + equinixStatus: + $ref: "#/components/schemas/NetworkEquinixStatus" + description: Network operational data + Link: type: object properties: - metroCode: + href: type: string - example: AM - PortChangeOperation: + description: Resource URI + format: uri + readOnly: true + rel: + type: string + description: OperationId from Swagger hub spec + method: + type: string + description: Http method type + contentType: + type: string + description: Content type for the response + authenticate: + type: boolean + description: Authentication required or not + NetworkChangeOperation: required: - op - path @@ -23832,7 +32266,10 @@ components: op: type: string description: Handy shortcut for operation name - example: replace + enum: + - replace + - add + - remove path: type: string description: path inside document leading to updated parameter @@ -23840,1012 +32277,865 @@ components: value: type: object description: new value for updated parameter - description: Port change operation data - LinkProtocolResponse: + description: Network change operation data + NetworkSortCriteriaResponse: type: object properties: - href: - type: string - description: LinkProtocol URI - format: uri - readOnly: true - uuid: - type: string - description: Equinix-assigned network identifier - format: uuid - example: 92dc376a-a932-43aa-a6a2-c806dedbd784 - state: - $ref: "#/components/schemas/LinkProtocolState" - type: - $ref: "#/components/schemas/LinkProtocolRequestType" - vlanTag: - type: integer - example: 20 - vni: - type: integer - example: 20 - vlanTagMin: - type: integer - example: 20 - vlanTagMax: - type: integer - example: 200 - vlanSTag: - type: integer - example: 20 - vlanCTag: - type: integer - example: 20 - vlanCTagMin: - type: integer - example: 20 - vlanCTagMax: - type: integer - example: 200 - subInterface: - $ref: "#/components/schemas/SubInterface" - asset: - $ref: "#/components/schemas/LinkProtocolConnection" - serviceToken: - $ref: "#/components/schemas/LinkProtocolServiceToken" - changeLog: - $ref: "#/components/schemas/Changelog" - description: Link Protocol response - PortSortDirection: + direction: + $ref: "#/components/schemas/NetworkSortDirectionResponse" + property: + $ref: "#/components/schemas/NetworkSortByResponse" + NetworkChangeType: type: string - description: Sorting direction + description: Type of change enum: - - DESC - - ASC - default: DESC - PortSortBy: + - NETWORK_CREATION + - NETWORK_UPDATE + - NETWORK_DELETION + NetworkChangeStatus: type: string - description: Possible field names to use on sorting + description: Current outcome of the change flow enum: - - /device/name - - /name - - /state - - /location/metroName - - /demarcationPointIbx - - /device/redundancy/priority - - /lagEnabled - - /physicalPortsSpeed - - /encapsulation/type - - /physicalPorts/tether/crossConnectId - - /package/code - - /changeLog/updatedDateTime - - /changeLog/createdDateTime - - /bandwidth - - /serviceCode - default: /device/name - PortPackage: + - APPROVED + - COMPLETED + - FAILED + - REJECTED + - REQUESTED + - SUBMITTED_FOR_APPROVAL + precisionTimePackageRequest: + title: precisionTimePackageRequest required: - code - - type + type: object + properties: + code: + type: string + description: Precision Time Service Level + enum: + - NTP_STANDARD + - NTP_ENTERPRISE + - PTP_STANDARD + - PTP_ENTERPRISE + description: Precision Time Service Level Request + example: + code: NTP_STANDARD + virtualConnectionUuid: + title: fabricConnectionUuid + required: + - uuid type: object properties: href: type: string - description: Port Package URI + description: Connection URI + format: uri readOnly: true type: type: string - description: Port Package Type - enum: - - PORT_PACKAGE - code: + description: Connection Type + uuid: type: string - description: Port Package code - vcBandwidthMax: - type: integer - description: Maximum virtual connection bandwidth in Mbps - vcRemoteSupported: - type: boolean - description: Indicates if remote virtual connections are supported - supportedServiceTypes: - type: array - description: List of supported service types - items: - type: string - description: Port Package Service Type - enum: - - MSP - supportedSourceTypes: - type: array - description: List of supported source types - items: - $ref: "#/components/schemas/PortPackageSourceType" - supportedMetros: - type: array - description: List of supported metros - items: - type: string - description: Port Package details - RouteFilterState: - type: string - description: Route Filter status - enum: - - PROVISIONING - - REPROVISIONING - - DEPROVISIONING - - PROVISIONED - - DEPROVISIONED - - NOT_PROVISIONED - - NOT_DEPROVISIONED - RouteFiltersChange: + description: Connection UUID. + format: uuid + description: UUID of the Fabric Connection Instance + example: + uuid: 095be615-a8ad-4c33-8e9c-c7612fbf6c9f + ipv4: + title: ipv4 required: - - type - - uuid + - networkMask + - primary + - secondary + type: object + properties: + primary: + type: string + description: Primary Timing Server IP Address + format: ipv4 + secondary: + type: string + description: Secondary Timing Server IP Address + format: ipv4 + networkMask: + type: string + description: Network Mask + format: ipv4 + defaultGateway: + type: string + description: Gateway Interface IP address + format: ipv4 + description: EPT service network information + example: + primary: 10.0.0.1 + secondary: 10.0.0.2 + networkMask: 255.255.255.240 + defaultGateway: 10.0.0.3 + ntpAdvanceConfiguration: + type: array + description: NTP Advanced configuration - MD5 Authentication. + items: + $ref: "#/components/schemas/md5" + ptpAdvanceConfiguration: + type: object + properties: + timeScale: + type: string + description: Time Scale value, ARB denotes Arbitrary and PTP denotes Precision Time Protocol. + example: ARB + enum: + - ARB + - PTP + domain: + maximum: 127 + minimum: 0 + type: integer + description: The PTP domain value. + example: 0 + priority1: + maximum: 248 + minimum: 0 + type: integer + description: The priority1 value determines the best primary clock, Lower value indicates higher priority. + example: 128 + priority2: + maximum: 248 + minimum: 0 + type: integer + description: The priority2 value differentiates and prioritizes the primary clock to avoid confusion when priority1-value is the same for different primary clocks in a network. + example: 128 + logAnnounceInterval: + type: integer + description: Logarithmic value that controls the rate of PTP Announce packets from the PTP time server. Default is 1 (1 packet every 2 seconds), Unit packets/second. + example: 1 + enum: + - -3 + - -2 + - -1 + - 0 + - 1 + logSyncInterval: + type: integer + description: Logarithmic value that controls the rate of PTP Sync packets. Default is -4 (16 packets per second), Unit packets/second.. + example: -4 + enum: + - -5 + - -4 + - -3 + - -2 + - -1 + - 0 + - 1 + logDelayReqInterval: + type: integer + description: Logarithmic value that controls the rate of PTP DelayReq packets. Default is -4 (16 packets per second), Unit packets/second.. + example: -4 + enum: + - -5 + - -4 + - -3 + - -2 + - -1 + - 0 + - 1 + transportMode: + type: string + enum: + - MULTICAST + - UNICAST + - HYBRID + grantTime: + maximum: 7200 + minimum: 30 + type: integer + description: Unicast Grant Time in seconds. For Multicast and Hybrid transport modes, grant time defaults to 300 seconds. For Unicast mode, grant time can be between 30 to 7200. + example: 300 + description: PTP Advanced Configuration. + precisionTimeOrder: + title: precisionTimeOrder type: object properties: - uuid: + purchaseOrderNumber: type: string - description: Uniquely identifies a change - type: + description: Purchase order number + customerReferenceNumber: type: string - description: Type of change - enum: - - BGP_IPv4_PREFIX_FILTER_UPDATE - - BGP_IPv4_PREFIX_FILTER_CREATION - - BGP_IPv4_PREFIX_FILTER_DELETION - - BGP_IPv6_PREFIX_FILTER_UPDATE - - BGP_IPv6_PREFIX_FILTER_CREATION - - BGP_IPv6_PREFIX_FILTER_DELETION - href: + description: Customer reference number + orderNumber: type: string - description: Route filter change URI - format: uri - description: Current state of latest route filter change - RouteFiltersPatchRequestItem: - required: - - op - - path - - value + description: Order Reference Number + description: Precision Time Order + timeServiceOperation: type: object properties: - op: - type: string - description: Handy shortcut for operation name - example: replace - path: + operationalStatus: type: string - description: path to change - example: /name - value: - type: object - description: new value for updated parameter - description: Route filter change operation data - RouteFiltersChangeOperation: + description: time service operational status + enum: + - UP + - DOWN + - DEGRADED + description: time service operational data + precisionTimePackagePostResponse: + title: precisionTimePackagePostResponse required: - - op - - path - - value + - code type: object properties: - op: + href: type: string - description: Handy shortcut for operation name - enum: - - add - - replace - - remove - path: + format: uri + code: type: string - description: path inside document leading to updated parameter - example: / - value: - $ref: "#/components/schemas/RouteFiltersBase" - description: Route filter change operation data - RouteFilterConnectionsData: + enum: + - NTP_STANDARD + - NTP_ENTERPRISE + - PTP_STANDARD + - PTP_ENTERPRISE + example: + href: https://api.equinix.com/fabric/v4/timeServicePackage/NTP_STANDARD + code: NTP_STANDARD + virtualConnectionTimeServiceResponse: + title: fabricConnectionResponse type: object properties: href: type: string description: Connection URI format: uri - example: https://api.equinix.com/fabric/v4/connections/81331c52-04c0-4656-a4a7-18c52669348f + readOnly: true type: - $ref: "#/components/schemas/ConnectionType" + type: string + description: Connection Type. uuid: type: string - description: Route filter identifier + description: Connection UUID. format: uuid - example: 695a8471-6595-4ac6-a2f4-b3d96ed3a59d - name: - type: string - example: connection-1 - SearchFilter: - description: Top-level filter that can be either an AND expression or OR expression - oneOf: - - $ref: "#/components/schemas/SearchAndExpression" - - $ref: "#/components/schemas/SearchOrExpression" - SearchAndExpression: - required: - - and - type: object - properties: - and: - maxItems: 8 - minItems: 1 - type: array - items: - $ref: "#/components/schemas/SearchFilterExpression" - SearchFilterExpression: - description: Filter expression that can be AND, OR, or a simple expression - oneOf: - - $ref: "#/components/schemas/SearchAndExpression" - - $ref: "#/components/schemas/SearchOrExpression" - - $ref: "#/components/schemas/SearchSimpleExpression" - SearchOrExpression: - required: - - or + aSide: + $ref: "#/components/schemas/virtualConnectionSide" + zSide: + $ref: "#/components/schemas/virtualConnectionSide" + description: Fabric Connection Precision Time Service Response Object + precisionTimePrice: + title: precisionTimePrice type: object properties: - or: - maxItems: 8 - minItems: 1 + currency: + type: string + description: offering price currency + charges: type: array items: - $ref: "#/components/schemas/SearchFilterExpression" - SearchSimpleExpression: - required: - - operator - - property - - values + $ref: "#/components/schemas/PriceCharge" + description: Precision Time Price + connectionLink: type: object properties: - property: + href: type: string - operator: + format: uri + example: https://api.equinix.com/fabric/v4/timeServices/92dc376a-a932-43aa-a6a2-c806dedbd784/connections + type: type: string - example: = enum: - - = - - "!=" - - IN - - NOT IN - - LIKE - - ILIKE - - BETWEEN - - ">" - - ">=" - - < - - <= - values: - maxItems: 8 - minItems: 1 - type: array - items: - type: string - description: Simple filter expression with property, operator, and values - RouteFilterSortCriteria: + - EVPL_VC + uuid: + type: string + format: uuid + StreamSearchAsset: type: object properties: - direction: - $ref: "#/components/schemas/RouteFilterSortDirection" - property: - $ref: "#/components/schemas/RouteFilterSortBy" - RouteFilterSortDirection: - type: string - description: Sorting direction - enum: - - DESC - - ASC - default: DESC - RouteFilterSortBy: - type: string - description: Possible field names to use on sorting - enum: - - /type - - /uuid - - /name - - /project/projectId - - /state - - /changeLog/createdDateTime - - /changeLog/updatedDateTime - - /changeLog/deletedDateTime - default: /changeLog/updatedDateTime - RouteFilterRuleState: - type: string - description: Route filter rule status - enum: - - PROVISIONING - - REPROVISIONING - - DEPROVISIONING - - PROVISIONED - - DEPROVISIONED - - NOT_PROVISIONED - - NOT_DEPROVISIONED - RouteFilterRulesChange: - required: - - type - - uuid + href: + type: string + description: Stream Asset URI + format: uri + readOnly: true + uuid: + type: string + description: Equinix-assigned access point identifier + format: uuid + example: c9b8e7a2-f3b1-4576-a4a9-1366a63df170 + streamUuid: + type: string + description: Equinix-assigned access point identifier + format: uuid + example: d4b8e7a2-f3b1-4576-a4a9-1366a63df171 + type: + type: string + description: Asset type + example: XF_PORT + metricsEnabled: + type: boolean + description: enable metric + example: true + attachmentStatus: + type: string + description: asset status + enum: + - ATTACHING + - ATTACHED + - DETACHED + - DETACHING + - FAILED + projectId: + type: string + description: project ic + example: "123" + description: Stream object + StreamSubscriptionSinkResponse: type: object properties: - uuid: + uri: type: string - description: Uniquely identifies a change + description: any publicly reachable http endpoint type: type: string - description: Type of change + description: destination type enum: - - BGP_IPv4_PREFIX_FILTER_RULE_UPDATE - - BGP_IPv4_PREFIX_FILTER_RULE_CREATION - - BGP_IPv4_PREFIX_FILTER_RULE_DELETION - - BGP_IPv6_PREFIX_FILTER_RULE_UPDATE - - BGP_IPv6_PREFIX_FILTER_RULE_CREATION - - BGP_IPv6_PREFIX_FILTER_RULE_DELETION - href: + - DATADOG + - GOOGLE_PUBSUB + - PAGERDUTY + - SERVICENOW + - SLACK + - SPLUNK_HEC + - TEAMS + - WEBHOOK + batchEnabled: + type: boolean + description: batch mode on/off + example: false + batchSizeMax: + type: integer + description: maximum batch size + batchWaitTimeMax: + type: integer + description: maximum batch waiting time + credential: + $ref: "#/components/schemas/StreamSubscriptionSinkCredential" + settings: + $ref: "#/components/schemas/StreamSubscriptionSinkSetting" + host: type: string - description: Route Filter Change URI - format: uri - description: Current state of latest route filter rule change - RouteFilterRulesPatchRequestItem: - required: - - op - - path - - value + description: sink host + description: Create Stream destination + StreamSubscriptionOperation: type: object properties: - op: + eventsDeliveredCount: + type: integer + description: count of delivered events + metricsDeliveredCount: + type: integer + description: count of delivered metrics + alertsDeliveredCount: + type: integer + description: count of delivered alerts + lastSuccessfulDeliveryDateTime: type: string - description: Handy shortcut for operation name - example: replace - path: + description: last successful date time of delivered event, metric, or alert + format: date-time + suspendedDateTime: type: string - description: path to change - example: /prefixMatch - value: - type: object - description: new value for updated parameter - description: Route filter rule change operation data - RouteFilterRulesChangeOperation: - required: - - op - - path - - value + description: suspended date time of stream subscription delivery for event, metric, or alert + format: date-time + errors: + type: array + description: List of error information for stream subscription delivery + items: + $ref: "#/components/schemas/StreamSubscriptionOperationErrors" + description: Stream subscription operational information + StreamSubscriptionOperationErrors: type: object properties: - op: + errorCode: type: string - description: Handy shortcut for operation name - enum: - - add - - replace - - remove - path: + description: Equinix Observability error code + errorMessage: type: string - description: path inside document leading to updated parameter - example: / - value: - $ref: "#/components/schemas/RouteFilterRulesBase" - description: Route filter rule change operation data - RouteAggregationState: - type: string - description: Route Aggregation status - enum: - - PROVISIONING - - REPROVISIONING - - DEPROVISIONING - - PROVISIONED - - DEPROVISIONED - - NOT_PROVISIONED - - NOT_DEPROVISIONED - RouteAggregationsChange: - required: - - type - - uuid + description: Equinix Observability error message + dateTime: + type: string + description: Equinix Observability error date time + format: date-time + additionalInfo: + $ref: "#/components/schemas/StreamSubscriptionOperationAdditionalInfo" + description: Error information for stream subscription delivery + StreamSubscriptionOperationAdditionalInfo: type: object properties: - uuid: + property: type: string - description: Uniquely identifies a change - type: + description: Additional attribute for error information + statusCode: type: string - description: Type of change - enum: - - BGP_IPv4_PREFIX_AGGREGATION_UPDATE - - BGP_IPv4_PREFIX_AGGREGATION_CREATION - - BGP_IPv4_PREFIX_AGGREGATION_DELETION - - BGP_IPv6_PREFIX_AGGREGATION_UPDATE - - BGP_IPv6_PREFIX_AGGREGATION_CREATION - - BGP_IPv6_PREFIX_AGGREGATION_DELETION - href: + description: HTTP error status code response from sink type if error occurred + reason: type: string - description: Route AGGREGATION Change URI - format: uri - description: Current state of latest Route Aggregation change - RouteAggregationsPatchRequestItem: - required: - - op - - path - - value + description: HTTP error message response from sink type if error occurred + description: External error information from subscription sink + StreamSubscriptionFilter: type: object properties: - op: + and: + maxItems: 8 + type: array + items: + $ref: "#/components/schemas/StreamFilter" + StreamFilter: + type: object + anyOf: + - $ref: "#/components/schemas/StreamFilterSimpleExpression" + - $ref: "#/components/schemas/StreamFilterOrFilter" + StreamFilterSimpleExpression: + type: object + properties: + property: type: string - description: Handy shortcut for operation name - example: replace - path: + description: | + Possible field names to use on filters: + * `/subject` - subject + * `/type` - type + example: /type + operator: type: string - description: path to change - example: /name - value: - type: object - description: new value for updated parameter - description: Route Aggregation change operation data - RouteAggregationsChangeOperation: - required: - - op - - path - - value + description: | + Possible operators to use on filters: + * `=` - equal + * `in` - in + * `LIKE` - case-sensitive like + * `ILIKE` - case-insensitive like + example: = + values: + type: array + description: | + ### Supported event or metric names to use on filters with property /type: + * `*` - all events or metrics + * `equinix.fabric.port.*` - port events or metrics + * `equinix.fabric.connection.*` - connection events or metrics + * `equinix.fabric.router.*` - cloud router events + * `equinix.fabric.metro.*` - metro metrics + * `equinix.fabric.network.*` - network events + * `equinix.fabric.service_token.*` - service token events + * `equinix.network_edge.*` - network edge events + * `equinix.network_edge.acl.*` - network edge acl events + * `equinix.network_edge.device.*` - network edge device events + * `equinix.access_manager.*` - identity access manager events + * `equinix.access_manager.user.role.*` - identity access manager user role events + ### Supported event or metric names to use on filters with property /subject: + * `*` - all events or metrics + * `/fabric/v4/ports/` - port events or metrics + * `/fabric/v4/connections/` - connection events or metrics + * `/fabric/v4/routers/` - cloud router events + * `/fabric/v4/metros/` - metro metrics + * `/fabric/v4/networks/` - network events + * `/fabric/v4/tokens/` - service token events + * `/ne/v1/acl/` - network edge acl events + * `/ne/v1/devices/` - network edge device events + * `/am/v2/users//roleAssignments/` - identity access manager events + items: + type: string + StreamFilterOrFilter: + type: object + properties: + or: + maxItems: 3 + type: array + items: + $ref: "#/components/schemas/StreamFilterSimpleExpression" + MetricSelectorResponse: + type: object + properties: + include: + type: array + description: Stream alert rule filtered by metric name + items: + type: string + example: equinix.fabric.metro.sv_da.latency + ResourceSelectorResponse: type: object properties: - op: + include: + type: array + description: | + ### Supported metric names to use on filters with property /subject: + * `/fabric/v4/ports/` - port metrics + * `/fabric/v4/connections/` - connection metrics + * `/fabric/v4/metros/` - metro latency metrics + items: + type: string + DetectionMethodResponse: + type: object + properties: + type: type: string - description: Handy shortcut for operation name + description: | + * THRESHOLD - Alert when a metric crosses a defined threshold by user. + * OUTLIER - Intelligent Alert that has an outlier behavior. This option is currently supported for metro latency metric. enum: - - add - - replace - - remove - path: + - THRESHOLD + - OUTLIER + windowSize: type: string - description: path inside document leading to updated parameter - example: / - value: - $ref: "#/components/schemas/RouteAggregationsBase" - description: Route Aggregation change operation data - RouteAggregationConnectionsData: - type: object - properties: - href: + description: Stream alert rule metric window size + example: PT15M + operand: type: string - description: Connection URI - format: uri - example: https://api.equinix.com/fabric/v4/connections/81331c52-04c0-4656-a4a7-18c52669348f - type: - $ref: "#/components/schemas/ConnectionType" - uuid: + description: Stream alert rule metric operand + enum: + - ABOVE + - BELOW + warningThreshold: type: string - description: Route Aggregation identifier - format: uuid - example: 695a8471-6595-4ac6-a2f4-b3d96ed3a59d - name: + description: Stream alert rule metric warning threshold + criticalThreshold: type: string - example: connection-1 - RouteAggregationSortCriteria: - type: object - properties: - direction: - $ref: "#/components/schemas/RouteAggregationSortDirection" - property: - $ref: "#/components/schemas/RouteAggregationSortBy" - RouteAggregationSortDirection: - type: string - description: Sorting direction - enum: - - DESC - - ASC - default: DESC - RouteAggregationSortBy: - type: string - description: Possible field names to use on sorting - enum: - - /type - - /uuid - - /name - - /project/projectId - - /state - - /changeLog/createdDateTime - - /changeLog/updatedDateTime - - /changeLog/deletedDateTime - default: /changeLog/updatedDateTime - RouteAggregationRuleState: - type: string - description: Route Aggregation Rule status - enum: - - PROVISIONING - - REPROVISIONING - - DEPROVISIONING - - PROVISIONED - - DEPROVISIONED - - NOT_PROVISIONED - - NOT_DEPROVISIONED - RouteAggregationRulesChange: - required: - - type - - uuid + description: Stream alert rule metric critical threshold + CompanyProfileContact: type: object properties: - uuid: - type: string - description: Uniquely identifies a change type: type: string - description: Type of change + description: Contact Type + example: support enum: - - BGP_IPv4_PREFIX_AGGREGATION_RULE_UPDATE - - BGP_IPv4_PREFIX_AGGREGATION_RULE_CREATION - - BGP_IPv4_PREFIX_AGGREGATION_RULE_DELETION - href: - type: string - description: Route Aggregation Change URI - format: uri - description: Current state of latest Route Aggregation Rule change - RouteAggregationRulesPatchRequestItem: - required: - - op - - path - - value + - SUPPORT + contacts: + type: array + items: + $ref: "#/components/schemas/CompanyProfileContact_contacts" + CompanyProfileState: + type: string + description: Company Profile State + CompanyMetro: type: object properties: - op: + href: type: string - description: Handy shortcut for operation name - example: replace - path: + metroCode: type: string - description: path to change - example: /prefix - value: - type: object - description: new value for updated parameter - description: Route Aggregation Rule change operation data - RouteAggregationRulesChangeOperation: - required: - - op - - path - - value + CompanyLogo: type: object properties: - op: + href: type: string - description: Handy shortcut for operation name - enum: - - add - - replace - - remove - path: + uuid: type: string - description: path inside document leading to updated parameter - example: / - value: - $ref: "#/components/schemas/RouteAggregationRulesBase" - description: Route Aggregation Rule change operation data - SimplifiedLocationWithoutIBX: - required: - - metroCode + extensionType: + type: string + CompanyServiceProfile: type: object properties: - metroHref: - type: string - description: The Canonical URL at which the resource resides. - example: https://api.equinix.com/fabric/v4/metros/AM - region: - type: string - example: AMER, APAC, EMEA - metroName: + href: type: string - example: Amsterdam - metroCode: + uuid: type: string - example: AM - CloudRouterPostRequestPackage: - required: - - code + PrivateService: type: object properties: href: type: string - description: Fabric Cloud Router URI - format: uri - example: https://api.equinix.com/fabric/v4/routerPackages/LAB - type: - type: string - description: Cloud Router package type - example: ROUTER_PACKAGE - enum: - - ROUTER_PACKAGE - code: + uuid: type: string - description: Cloud Router package code - example: LAB - enum: - - LAB - - BASIC - - STANDARD - - ADVANCED - - PREMIUM - description: Fabric Cloud Router Package Type - CloudRouterAccessPointState: - type: string - description: Access point lifecycle state - enum: - - PROVISIONED - - PROVISIONING - - DEPROVISIONING - - DEPROVISIONED - - REPROVISIONING - - NOT_PROVISIONED - - NOT_DEPROVISIONED - CloudRouterChange: - required: - - type - - updatedDateTime + CompanyProfileChange: type: object properties: uuid: type: string - description: Uniquely identifies a change type: type: string - description: Type of change - enum: - - ROUTER_UPDATE status: type: string - description: Current outcome of the change flow - enum: - - COMPLETED - - FAILED - - REQUESTED createdDateTime: type: string - description: Set when change flow starts format: date-time - example: 2020-11-06T07:00:00Z updatedDateTime: type: string - description: Set when change object is updated format: date-time - example: 2020-11-06T07:00:00Z - information: - type: string - description: Additional information data: - type: array - items: - $ref: "#/components/schemas/CloudRouterChangeOperation" - description: Current state of latest CloudRouter change - CloudRouterChangeOperation: - required: - - op - - path - - value + $ref: "#/components/schemas/CompanyProfileChangeItem" + CompanyProfileSortDirection: + type: string + description: Sorting direction + default: ASC + enum: + - DESC + - ASC + IssueLoa: + title: IssueLoa type: object - properties: - op: - type: string - description: Handy shortcut for operation name - enum: - - replace - - add - - remove - path: - type: string - description: path inside document leading to updated parameter - value: + description: Issue Loa + allOf: + - $ref: "#/components/schemas/LoaRequest" + - required: + - demarcationPoint type: object - description: new value for updated parameter - description: Fabric Cloud Router change operation data - CloudRouterActionType: + properties: + expirationDateTime: + $ref: "#/components/schemas/LoaExpiration" + requestor: + $ref: "#/components/schemas/LoaRequestor" + demarcationPoint: + $ref: "#/components/schemas/LoaDemarcationPoint" + RequestLoa: + title: RequestLoa + description: Request Loa + allOf: + - $ref: "#/components/schemas/LoaRequest" + - required: + - location + type: object + properties: + issuer: + $ref: "#/components/schemas/LoaIssuer" + location: + $ref: "#/components/schemas/LoaLocation" + LoaType: type: string - description: Cloud router action type + description: | + Type of Letter of Authorization + example: PATCH_PANEL_PORT_LOA enum: - - BGP_SESSION_STATUS_UPDATE - - ROUTE_TABLE_ENTRY_UPDATE - - RECEIVED_ROUTE_ENTRY_UPDATE - - ADVERTISED_ROUTE_ENTRY_UPDATE - RouterActionsConnection: + - CAGE_LOA + - PATCH_PANEL_LOA + - PATCH_PANEL_PORT_LOA + LoaProductType: + type: string + description: | + Product type associated with this LOA.
XC - Cross Connect
XF_PORT - Fabric Port
VD - Network Edge + example: XC + enum: + - XC + - XF_PORT + - VD + LoaState: + type: string + description: Current lifecycle state of the LOA. + example: ACTIVE + enum: + - PENDING + - FAILED + - PENDING_AUTHORIZATION + - PENDING_ACCEPTANCE + - CANCELLED + - INACTIVE + - ACTIVE + - EXPIRED + LoaRequestor: type: object properties: - uuid: + email: type: string - description: Connection UUID - example: 557400f8-d360-11e9-bb65-2a2ae2dbcce4 - href: + description: Email address of the requestor contact. + format: email + example: user@org1.com + orgId: + type: integer + description: Organization ID of the requestor. + example: 9257 + orgName: type: string - example: https://api.equinix.com/fabric/v4/connections/557400f8-d360-11e9-bb65-2a2ae2dbcce4 - type: - $ref: "#/components/schemas/ConnectionType" - operation: - $ref: "#/components/schemas/Operation" - description: Connection object for router actions - RouterActionsRouter: + description: Organization name of the requestor. + example: ABC Inc. + description: Requestor + LoaIssuer: type: object properties: - uuid: - type: string - description: Router UUID - example: a1c6b7fd-aead-410a-96b4-b1dfa1071700 - href: + email: type: string - example: https://api.equinix.com/fabric/v4/routers/a1c6b7fd-aead-410a-96b4-b1dfa1071700 - type: + description: Email address of the issuer contact. + format: email + example: user@org1.com + orgId: + type: integer + description: Organization ID of the issuer. + example: 9257 + orgName: type: string - enum: - - XF_ROUTER - operation: - $ref: "#/components/schemas/Operation" - description: Router object for router actions - CloudRouterCommandType: - type: string - description: Fabric Cloud Router Command Type - example: PING_COMMAND - enum: - - PING_COMMAND - - TRACEROUTE_COMMAND - CloudRouterCommandRequestPayload: - required: - - destination - - sourceConnection + description: Organization name of the issuer. + example: ABC Inc. + description: Issuer + LoaDemarcationPoint: type: object properties: - destination: + cageUniqueSpaceId: type: string - description: Fabric Cloud Router Ping or Traceroute Command Destination - example: 8.8.8.8 - sourceConnection: - $ref: "#/components/schemas/CloudRouterCommandRequestConnection" - timeout: - type: integer - description: | - Timeout in seconds for Fabric Cloud Router Command: - - For `PING_COMMAND`: Packet timeout duration. The default value is 5. - - For `TRACEROUTE_COMMAND`: Probe timeout duration. - The default value is 2 and it is not configurable. - example: 2 - dataBytes: - maximum: 9000 - minimum: 16 - type: integer - description: | - Ping Command DataBytes. - This field is only applicable for commands of type `PING_COMMAND`. - example: 100 - default: 64 - probes: - type: integer - description: | - Number of probes for Fabric Cloud Router Traceroute Command. - This field is only applicable for commands of type `TRACEROUTE_COMMAND` and is not configurable. - example: 3 - default: 3 - hopsMax: - maximum: 30 - type: integer - description: | - Maximum number of hops for the traceroute command. - This field is only applicable for commands of type `TRACEROUTE_COMMAND`. - example: 20 - default: 20 - description: Fabric Cloud Router Command Request - CloudRouterCommandState: - type: string - description: Fabric Cloud Router Command State - example: SUCCEEDED - enum: - - PENDING - - SUCCEEDED - - FAILED - - DELETED - CloudRouterCommandRequestResponse: - type: object - properties: - destination: + description: Unique identifier of the Cage. + example: SV2:00:000000 + patchPanelId: type: string - description: Fabric Cloud Router Ping or Traceroute Command Destination - example: 8.8.8.8 - sourceConnection: - $ref: "#/components/schemas/CloudRouterCommandRequestConnection" - timeout: - type: integer - description: | - Timeout in seconds for Fabric Cloud Router Command: - - For `PING_COMMAND`: Packet timeout duration. The default value is 5. - - For `TRACEROUTE_COMMAND`: Probe timeout duration. - The default value is 2 and it is not configurable. - example: 2 - dataBytes: - maximum: 9000 - minimum: 16 - type: integer - description: | - Ping Command DataBytes. - This field is only applicable for commands of type `PING_COMMAND`. - example: 100 - default: 64 - interval: - type: integer - description: | - Time in milliseconds between sending each packet. - This field is only applicable for commands of type `PING_COMMAND`. - example: 1000 - default: 1000 - count: - type: integer description: | - Total number of ping requests. - This field is only applicable for commands of type `PING_COMMAND`. - example: 5 - default: 5 - probes: + Unique identifier of the Patch Panel. + example: CP:Demarc:1259684 + patchPanelPortA: type: integer description: | - Number of probes for Fabric Cloud Router Traceroute Command. - This field is only applicable for commands of type `TRACEROUTE_COMMAND` and is not configurable. - example: 3 - default: 3 - hopsMax: - maximum: 30 + Specify the desired port number.
When ports are not provided, next available ports will be used. + example: 23 + patchPanelPortB: type: integer description: | - Maximum number of hops for the traceroute command. - This field is only applicable for commands of type `TRACEROUTE_COMMAND`. - example: 20 - default: 20 - description: Fabric Cloud Router Command Request - CloudRouterCommandResponse: - type: object - oneOf: - - $ref: "#/components/schemas/CloudRouterCommandPingResponse" - - $ref: "#/components/schemas/CloudRouterCommandTracerouteResponse" - RouteTableEntry: - required: - - changeLog - - state - - type + Specify the desired port number.
When ports are not provided, next available ports will be used.
Required for Connector type FC and ST only. + example: 24 + connectorType: + $ref: "#/components/schemas/LoaPatchPanelConnectorType" + description: | + Specifies the demarcation point.
For CAGE_LOA - cageUniqueSpaceId is required.
For PATCH_PANEL_LOA - patchPanelId is required.
For PATCH_PANEL_PORT_LOA - patchPanelId, patchPanelPortA, patchPanelPortB + and connectorType is required. + LoaLocation: type: object properties: - type: - $ref: "#/components/schemas/RouteTableEntryType" - protocolType: - $ref: "#/components/schemas/RouteTableEntryProtocolType" - state: - $ref: "#/components/schemas/RouteTableEntryState" - prefix: - type: string - example: 192.168.10.0/24 - nextHop: + ibxCode: type: string - example: 10.10.10.5 - MED: - type: integer - example: 5 - localPreference: - type: integer - example: 200 - asPath: - type: array - items: - type: string - example: "20100" - connection: - $ref: "#/components/schemas/RouteTableEntry_connection" - changeLog: - $ref: "#/components/schemas/Changelog" - description: Route table entry object - code: + description: IBX Code + example: AM1 + description: Eligible location where LOA can be issued. + LoaExpiration: type: string - description: Cloud Router package code - example: LAB - enum: - - LAB - - BASIC - - STANDARD - - ADVANCED - - PREMIUM - PackageChangeLog: + description: | + Date and time when this LOA expires.
Default to 3 months from the creation date + format: date-time + example: 2026-11-06T07:00:00Z + LoaChangelog: type: object properties: - createdDateTime: + createdBy: type: string - format: date-time - example: 2020-11-06T07:00:00Z - updatedDateTime: + description: Created by User Key + example: johnsmith + createdByFullName: + type: string + description: Created by User Full Name + example: John Smith + createdByEmail: + type: string + description: Created by User Email Address + example: john.smith@example.com + createdDateTime: type: string + description: Created by Date and Time format: date-time example: 2020-11-06T07:00:00Z - description: Cloud Router package change log - ApiServices: - type: object - properties: - route: + updatedBy: type: string - description: service routes - status: + description: Updated by User Key + example: johnsmith + updatedByFullName: type: string - description: service status - changedDateTime: + description: Updated by User Full Name + example: John Smith + updatedByEmail: type: string - description: service status change date - description: Available services details - ValidateConnectionResponse: - type: object - properties: - uuid: + description: Updated by User Email Address + example: john.smith@example.com + updatedDateTime: type: string - description: Equinix-assigned connection identifier - bandwidth: - maximum: 100000 - minimum: 0 - type: integer - description: Connection bandwidth in Mbps - redundancy: - $ref: "#/components/schemas/ConnectionRedundancy" - aSide: - $ref: "#/components/schemas/ConnectionSide" - zSide: - $ref: "#/components/schemas/ConnectionSide" - description: Validate Connection specification - NetworkType: - type: string - description: Network type - enum: - - EVPLAN - - EPLAN - - IPWAN - - EVPTREE - - EPTREE - NetworkScope: + description: Updated by Date and Time + format: date-time + example: 2020-11-06T07:00:00Z + description: Change log + LoaActionType: type: string - description: Network scope + description: Action to perform on the LOA. + example: LOA_ISSUER_AUTHORIZATION enum: - - REGIONAL - - GLOBAL - - LOCAL - NetworkState: + - LOA_ISSUER_AUTHORIZATION + - LOA_REQUESTOR_ACCEPTANCE + - LOA_COPY_LINK + - LOA_SEND_EMAIL_NOTIFICATION + - LOA_CANCEL + LoaActionData: + type: object + properties: + demarcationPoint: + $ref: "#/components/schemas/LoaDemarcationPoint" + expirationDateTime: + $ref: "#/components/schemas/LoaExpiration" + portalUrl: + $ref: "#/components/schemas/LoaMagicLink" + description: | + Action Data.
For LOA_ISSUER_AUTHORIZATION — always required. + LoaActionState: type: string - description: Network status - example: ACTIVE + description: Action State enum: - - ACTIVE - - INACTIVE - - DELETED - SimplifiedNetworkChange: + - COMPLETED + - FAILED + - PENDING + LoaConsumer: type: object properties: href: type: string - description: Network URI + description: Consumer URI format: uri - readOnly: true - example: https://api.equinix.com/fabric/v4/networks/2a4fb415-5a7f-436f-bae6-02f5e403deec/changes/4b17da68-3d6b-436d-9c8f-2105f3b950d9 + example: https://api.equinix.com/fabric/v4/ports/29cc7878-54e3-4e1a-8651-87a61354bac2 uuid: type: string - description: Uniquely identifies a change + description: Consumer Identifier format: uuid - example: 4b17da68-3d6b-436d-9c8f-2105f3b950d9 + example: 30cc7878-54e3-4e1a-8651-87a61354bad4 type: - $ref: "#/components/schemas/NetworkChangeType" - description: Current state of latest network change - NetworkOperation: - type: object - properties: - equinixStatus: - $ref: "#/components/schemas/NetworkEquinixStatus" - description: Network operational data - Link: + $ref: "#/components/schemas/LoaProductType" + changeLog: + $ref: "#/components/schemas/LoaChangelog" + description: Associated consumer response + AppDomainType: + type: string + description: App Domain Type + example: APP_DOMAIN + default: APP_DOMAIN + enum: + - APP_DOMAIN + x-order: 2 + AppDomainState: + type: string + description: App Domain lifecycle state + format: string + example: PENDING_VERIFICATION + enum: + - PENDING_VERIFICATION + - PROVISIONING_FAILED + - PROVISIONED + - DEPROVISIONING + - DEPROVISIONING_FAILED + - DEPROVISIONED + x-order: 6 + AppDomainChange: + required: + - type + - updatedDateTime type: object properties: - href: + uuid: type: string - description: Resource URI - format: uri - readOnly: true - rel: + description: Uniquely identifies a change + type: type: string - description: OperationId from Swagger hub spec - method: + description: Type of change + enum: + - APP_DOMAIN_UPDATE + status: type: string - description: Http method type - contentType: + description: Current outcome of the change flow + enum: + - COMPLETED + - FAILED + - REQUESTED + createdDateTime: type: string - description: Content type for the response - authenticate: - type: boolean - description: Authentication required or not - NetworkChangeOperation: + description: Set when change flow starts + format: date-time + example: 2026-06-29T07:00:00Z + updatedDateTime: + type: string + description: Set when change object is updated + format: date-time + example: 2026-06-29T07:15:00Z + data: + type: array + items: + $ref: "#/components/schemas/AppDomainChangeOperation" + description: Current state of latest AppDomain change + AppDomainChangeOperation: required: - op - path @@ -24862,604 +33152,783 @@ components: path: type: string description: path inside document leading to updated parameter - example: /name + enum: + - /description value: type: object description: new value for updated parameter - description: Network change operation data - NetworkSortCriteriaResponse: - type: object - properties: - direction: - $ref: "#/components/schemas/NetworkSortDirectionResponse" - property: - $ref: "#/components/schemas/NetworkSortByResponse" - NetworkChangeType: - type: string - description: Type of change - enum: - - NETWORK_CREATION - - NETWORK_UPDATE - - NETWORK_DELETION - NetworkChangeStatus: + x-go-type: json.RawMessage + description: App Domain change operation data + AppLinkState: type: string - description: Current outcome of the change flow + description: App Link lifecycle state + format: string + example: PROVISIONING enum: - - APPROVED - - COMPLETED - - FAILED - - REJECTED - - REQUESTED - - SUBMITTED_FOR_APPROVAL - precisionTimePackageRequest: - title: precisionTimePackageRequest + - PROVISIONING + - PROVISIONING_FAILED + - PROVISIONED + - DEPROVISIONING + - DEPROVISIONING_FAILED + - DEPROVISIONED + - REPROVISIONING + x-order: 6 + AppDomainAttachedAppLink: required: - - code + - type + - uuid type: object properties: - code: + href: type: string - description: Precision Time Service Level - enum: - - NTP_STANDARD - - NTP_ENTERPRISE - - PTP_STANDARD - - PTP_ENTERPRISE - description: Precision Time Service Level Request - example: - code: NTP_STANDARD - virtualConnectionUuid: - title: fabricConnectionUuid + description: Resource URI + format: uri + readOnly: true + example: https://api.equinix.com/fabric/v4/appDomains/20f3ef8e-d670-4236-86fa-bb0038adcfc3/appLinks/23cd19ab-d3bb-478b-9f25-bd12a3af1914 + x-order: 1 + type: + $ref: "#/components/schemas/AppLinkType" + uuid: + type: string + description: Equinix-assigned access point identifier + format: uuid + example: 23cd19ab-d3bb-478b-9f25-bd12a3af1914 + x-order: 3 + name: + type: string + description: Customer-provided App Link name + format: string + example: Atlassian App Link + x-order: 4 + description: + type: string + description: Customer-provided App Link description + format: string + example: Atlassian App Link in SV + x-order: 5 + state: + $ref: "#/components/schemas/AppLinkState" + router: + $ref: "#/components/schemas/AppLinkCloudRouter" + ipv4Address: + type: string + description: App Link IP address + format: ipv4 + example: 192.168.10.1 + x-order: 8 + bandwidth: + type: integer + description: App Link aggregated data transfer capacity in Mbps + example: 1000 + x-order: 9 + project: + $ref: "#/components/schemas/Project" + description: App Link object + AppLinkType: + type: string + description: App Link Type + example: APP_LINK + default: APP_LINK + enum: + - APP_LINK + x-order: 2 + AppLinkPostRequestRouter: required: - uuid type: object + properties: + uuid: + type: string + description: Cloud Router UUID + format: uuid + example: 36204584-2ae1-44f6-980f-08ecd555d9c6 + description: Cloud Router reference for App Link + AppLinkCloudRouter: + type: object properties: href: type: string - description: Connection URI + description: Resource URI format: uri - readOnly: true + example: https://api.equinix.com/fabric/v4/routers/36204584-2ae1-44f6-980f-08ecd555d9c6 + x-order: 1 type: type: string - description: Connection Type + description: Cloud Router Type + example: XF_ROUTER + enum: + - XF_ROUTER + x-order: 2 uuid: type: string - description: Connection UUID. + description: Cloud Router UUID format: uuid - description: UUID of the Fabric Connection Instance - example: - uuid: 095be615-a8ad-4c33-8e9c-c7612fbf6c9f - ipv4: - title: ipv4 + example: 36204584-2ae1-44f6-980f-08ecd555d9c6 + x-order: 3 + description: App Link Cloud Router + x-order: 7 + AppLinkChange: required: - - networkMask - - primary - - secondary + - type + - updatedDateTime type: object properties: - primary: + uuid: type: string - description: Primary Timing Server IP Address - format: ipv4 - secondary: + description: Uniquely identifies a change + type: type: string - description: Secondary Timing Server IP Address - format: ipv4 - networkMask: + description: Type of change + enum: + - APP_LINK_UPDATE + status: type: string - description: Network Mask - format: ipv4 - defaultGateway: + description: Current outcome of the change flow + enum: + - COMPLETED + - FAILED + - REQUESTED + createdDateTime: type: string - description: Gateway Interface IP address - format: ipv4 - description: EPT service network information - example: - primary: 10.0.0.1 - secondary: 10.0.0.2 - networkMask: 255.255.255.240 - defaultGateway: 10.0.0.3 - ntpAdvanceConfiguration: - type: array - description: NTP Advanced configuration - MD5 Authentication. - items: - $ref: "#/components/schemas/md5" - ptpAdvanceConfiguration: + description: Set when change flow starts + format: date-time + example: 2026-06-29T07:00:00Z + updatedDateTime: + type: string + description: Set when change object is updated + format: date-time + example: 2026-06-29T07:15:00Z + data: + type: array + items: + $ref: "#/components/schemas/AppLinkChangeOperation" + description: Current state of latest AppLink change + AppLinkChangeOperation: + required: + - op + - path + - value type: object properties: - timeScale: + op: type: string - description: Time Scale value, ARB denotes Arbitrary and PTP denotes Precision Time Protocol. - example: ARB - enum: - - ARB - - PTP - domain: - maximum: 127 - minimum: 0 - type: integer - description: The PTP domain value. - example: 0 - priority1: - maximum: 248 - minimum: 0 - type: integer - description: The priority1 value determines the best primary clock, Lower value indicates higher priority. - example: 128 - priority2: - maximum: 248 - minimum: 0 - type: integer - description: The priority2 value differentiates and prioritizes the primary clock to avoid confusion when priority1-value is the same for different primary clocks in a network. - example: 128 - logAnnounceInterval: - type: integer - description: Logarithmic value that controls the rate of PTP Announce packets from the PTP time server. Default is 1 (1 packet every 2 seconds), Unit packets/second. - example: 1 - enum: - - -3 - - -2 - - -1 - - 0 - - 1 - logSyncInterval: - type: integer - description: Logarithmic value that controls the rate of PTP Sync packets. Default is -4 (16 packets per second), Unit packets/second.. - example: -4 - enum: - - -5 - - -4 - - -3 - - -2 - - -1 - - 0 - - 1 - logDelayReqInterval: - type: integer - description: Logarithmic value that controls the rate of PTP DelayReq packets. Default is -4 (16 packets per second), Unit packets/second.. - example: -4 + description: Handy shortcut for operation name enum: - - -5 - - -4 - - -3 - - -2 - - -1 - - 0 - - 1 - transportMode: + - replace + - add + - remove + path: type: string + description: path inside document leading to updated parameter enum: - - MULTICAST - - UNICAST - - HYBRID - grantTime: - maximum: 7200 - minimum: 30 - type: integer - description: Unicast Grant Time in seconds. For Multicast and Hybrid transport modes, grant time defaults to 300 seconds. For Unicast mode, grant time can be between 30 to 7200. - example: 300 - description: PTP Advanced Configuration. - precisionTimeOrder: - title: precisionTimeOrder + - /name + - /description + - /bandwidth + - /ipv4Address + value: + type: object + description: new value for updated parameter + x-go-type: json.RawMessage + description: App Link change operation data + AppLinkAttachState: + type: string + description: App Link attachment lifecycle state + format: string + example: ATTACHED + enum: + - ATTACHING + - ATTACHED + - DETACHING + - DETACHED + - FAILED + x-order: 10 + AppLinkAttachedAppDomain: + required: + - type + - uuid type: object properties: - purchaseOrderNumber: + href: type: string - description: Purchase order number - customerReferenceNumber: + description: Resource URI + format: uri + readOnly: true + example: https://api.equinix.com/fabric/v4/appLinks/23cd19ab-d3bb-478b-9f25-bd12a3af1914/appDomains/20f3ef8e-d670-4236-86fa-bb0038adcfc3 + x-order: 1 + type: + $ref: "#/components/schemas/AppDomainType" + uuid: type: string - description: Customer reference number - orderNumber: + description: Equinix-assigned access point identifier + format: uuid + example: 20f3ef8e-d670-4236-86fa-bb0038adcfc3 + x-order: 3 + name: type: string - description: Order Reference Number - description: Precision Time Order - timeServiceOperation: + description: Customer-provided App Domain name + format: string + example: atlassian.net + x-order: 4 + description: + type: string + description: Customer-provided App Domain description + format: string + example: Atlassian Domain + x-order: 5 + state: + $ref: "#/components/schemas/AppDomainState" + project: + $ref: "#/components/schemas/Project" + attachmentStatus: + $ref: "#/components/schemas/AppLinkAttachState" + description: App Domain object associated with App Link + AppServiceType: + type: string + description: App Service Type + example: APP_SERVICE + default: APP_SERVICE + enum: + - APP_SERVICE + x-order: 2 + AppLinkAppServiceAttachmentChange: + required: + - type + - updatedDateTime type: object properties: - operationalStatus: + uuid: type: string - description: time service operational status + description: Uniquely identifies a change + type: + type: string + description: Type of change enum: - - UP - - DOWN - - DEGRADED - description: time service operational data - precisionTimePackagePostResponse: - title: precisionTimePackagePostResponse + - APP_LINK_UPDATE + status: + type: string + description: Current outcome of the change flow + enum: + - COMPLETED + - FAILED + - REQUESTED + createdDateTime: + type: string + description: Set when change flow starts + format: date-time + example: 2026-06-29T07:00:00Z + updatedDateTime: + type: string + description: Set when change object is updated + format: date-time + example: 2026-06-29T07:15:00Z + data: + type: array + items: + $ref: "#/components/schemas/AppLinkChangeOperation" + description: Current state of latest AppLink change + AppLinkAppServiceAttachmentChangeOperation: required: - - code + - op + - path + - value type: object properties: - href: + op: type: string - format: uri - code: + description: Handy shortcut for operation name + enum: + - replace + - add + - remove + path: type: string + description: path inside document leading to updated parameter enum: - - NTP_STANDARD - - NTP_ENTERPRISE - - PTP_STANDARD - - PTP_ENTERPRISE - example: - href: https://api.equinix.com/fabric/v4/timeServicePackage/NTP_STANDARD - code: NTP_STANDARD - virtualConnectionTimeServiceResponse: - title: fabricConnectionResponse + - /destinationIp + value: + type: object + description: new value for updated parameter + x-go-type: json.RawMessage + description: App Link change operation data + AppLinkAttachedAppService: + required: + - destinationIp + - geoScope + - type + - uuid type: object properties: href: type: string - description: Connection URI + description: Resource URI format: uri readOnly: true + example: https://api.equinix.com/fabric/v4/appLinks/23cd19ab-d3bb-478b-9f25-bd12a3af1914/appServices/5008a109-9d1c-485c-b0ba-de9736f283c2 + x-order: 1 type: - type: string - description: Connection Type. + $ref: "#/components/schemas/AppServiceType" uuid: type: string - description: Connection UUID. + description: Equinix-assigned access point identifier format: uuid - aSide: - $ref: "#/components/schemas/virtualConnectionSide" - zSide: - $ref: "#/components/schemas/virtualConnectionSide" - description: Fabric Connection Precision Time Service Response Object - precisionTimePrice: - title: precisionTimePrice - type: object - properties: - currency: + example: 5008a109-9d1c-485c-b0ba-de9736f283c2 + x-order: 3 + name: type: string - description: offering price currency - charges: + description: Customer-provided App Service name + format: string + example: Atlassian App Service + x-order: 4 + description: + type: string + description: Customer-provided App Service description + format: string + example: Atlassian App Service in SV + x-order: 5 + state: + $ref: "#/components/schemas/AppServiceState" + endpoint: + type: string + description: Accessible endpoint through this service + example: equinixjira.atlassian.net + x-order: 7 + sourceDomains: type: array + description: List of source domains from where traffic is allowed items: - $ref: "#/components/schemas/PriceCharge" - description: Precision Time Price - connectionLink: - type: object - properties: - href: - type: string - format: uri - example: https://api.equinix.com/fabric/v4/timeServices/92dc376a-a932-43aa-a6a2-c806dedbd784/connections - type: + type: string + example: equinix.com + x-order: 8 + project: + $ref: "#/components/schemas/Project" + geoScope: type: string - enum: - - EVPL_VC - uuid: + description: Geo scope for the App Service + example: GLOBAL + x-order: 4 + destinationIp: type: string - format: uuid - StreamSubscriptionSinkResponse: + description: Target IP for forwarding API requests + format: ipv4 + example: 10.10.1.110 + x-order: 5 + attachmentStatus: + $ref: "#/components/schemas/AppLinkAttachState" + description: App Service object associated with App Link + AppServiceState: + type: string + description: App Service lifecycle state + example: PROVISIONING + enum: + - PROVISIONING + - PROVISIONED + - DEPROVISIONING + - DEPROVISIONED + - REPROVISIONING + x-order: 6 + AppServiceChange: + required: + - type + - updatedDateTime type: object properties: - uri: + uuid: type: string - description: any publicly reachable http endpoint + description: Uniquely identifies a change type: type: string - description: destination type + description: Type of change enum: - - DATADOG - - GOOGLE_PUBSUB - - PAGERDUTY - - SERVICENOW - - SLACK - - SPLUNK_HEC - - TEAMS - - WEBHOOK - batchEnabled: - type: boolean - description: batch mode on/off - example: false - batchSizeMax: - type: integer - description: maximum batch size - batchWaitTimeMax: - type: integer - description: maximum batch waiting time - credential: - $ref: "#/components/schemas/StreamSubscriptionSinkCredential" - settings: - $ref: "#/components/schemas/StreamSubscriptionSinkSetting" - host: + - APP_SERVICE_UPDATE + status: type: string - description: sink host - description: Create Stream destination - StreamSubscriptionOperation: - type: object - properties: - eventsDeliveredCount: - type: integer - description: count of delivered events - metricsDeliveredCount: - type: integer - description: count of delivered metrics - alertsDeliveredCount: - type: integer - description: count of delivered alerts - lastSuccessfulDeliveryDateTime: + description: Current outcome of the change flow + enum: + - COMPLETED + - FAILED + - REQUESTED + createdDateTime: type: string - description: last successful date time of delivered event, metric, or alert + description: Set when change flow starts format: date-time - suspendedDateTime: + example: 2026-06-29T07:00:00Z + updatedDateTime: type: string - description: suspended date time of stream subscription delivery for event, metric, or alert + description: Set when change object is updated format: date-time - errors: + example: 2026-06-29T07:15:00Z + data: type: array - description: List of error information for stream subscription delivery items: - $ref: "#/components/schemas/StreamSubscriptionOperationErrors" - description: Stream subscription operational information - StreamSubscriptionOperationErrors: + $ref: "#/components/schemas/AppServiceChangeOperation" + description: Current state of latest AppService change + AppServiceChangeOperation: + required: + - op + - path + - value type: object properties: - errorCode: - type: string - description: Equinix Observability error code - errorMessage: + op: type: string - description: Equinix Observability error message - dateTime: + description: Handy shortcut for operation name + enum: + - replace + - add + - remove + path: type: string - description: Equinix Observability error date time - format: date-time - additionalInfo: - $ref: "#/components/schemas/StreamSubscriptionOperationAdditionalInfo" - description: Error information for stream subscription delivery - StreamSubscriptionOperationAdditionalInfo: + description: path inside document leading to updated parameter + enum: + - /name + - /description + - /sourceDomains + value: + type: object + description: new value for updated parameter + x-go-type: json.RawMessage + description: App Service change operation data + AppServiceAttachedAppLink: + required: + - type + - uuid type: object properties: - property: + href: type: string - description: Additional attribute for error information - statusCode: + description: Resource URI + format: uri + readOnly: true + example: https://api.equinix.com/fabric/v4/appServices/5008a109-9d1c-485c-b0ba-de9736f283c2/appLinks/23cd19ab-d3bb-478b-9f25-bd12a3af1914 + x-order: 1 + type: + $ref: "#/components/schemas/AppLinkType" + uuid: type: string - description: HTTP error status code response from sink type if error occurred - reason: + description: Equinix-assigned access point identifier + format: uuid + example: 23cd19ab-d3bb-478b-9f25-bd12a3af1914 + x-order: 3 + name: type: string - description: HTTP error message response from sink type if error occurred - description: External error information from subscription sink - StreamSubscriptionFilter: - type: object - properties: - and: - maxItems: 8 - type: array - items: - $ref: "#/components/schemas/StreamFilter" - StreamFilter: - type: object - anyOf: - - $ref: "#/components/schemas/StreamFilterSimpleExpression" - - $ref: "#/components/schemas/StreamFilterOrFilter" - StreamFilterSimpleExpression: + description: Customer-provided App Link name + format: string + example: Atlassian App Link + x-order: 4 + description: + type: string + description: Customer-provided App Link description + format: string + example: Atlassian App Link in SV + x-order: 5 + state: + $ref: "#/components/schemas/AppLinkState" + router: + $ref: "#/components/schemas/AppLinkCloudRouter" + ipv4Address: + type: string + description: App Link IP address + format: ipv4 + example: 192.168.10.1 + x-order: 8 + bandwidth: + type: integer + description: App Link aggregated data transfer capacity in Mbps + example: 1000 + x-order: 9 + project: + $ref: "#/components/schemas/Project" + description: App Link object + AppSubscriptionState: + type: string + description: App Subscription lifecycle state + example: PROVISIONING + enum: + - PROVISIONING + - PROVISIONING_FAILED + - PROVISIONED + - DEPROVISIONING + - DEPROVISIONING_FAILED + - DEPROVISIONED + - REPROVISIONING + x-order: 6 + AppServiceAttachedAppSubscription: + required: + - state + - type + - uuid type: object properties: - property: + href: type: string - description: | - Possible field names to use on filters: - * `/subject` - subject - * `/type` - type - example: /type - operator: + description: Resource URI + format: uri + readOnly: true + example: https://api.equinix.com/fabric/v4/appSubscriptions/20f3ef8e-d670-4236-86fa-bb0038adcfc3 + x-order: 1 + type: + $ref: "#/components/schemas/AppSubscriptionType" + uuid: type: string - description: | - Possible operators to use on filters: - * `=` - equal - * `in` - in - * `LIKE` - case-sensitive like - * `ILIKE` - case-insensitive like - example: = - values: + description: Equinix-assigned access point identifier + format: uuid + example: 20f3ef8e-d670-4236-86fa-bb0038adcfc3 + x-order: 3 + state: + $ref: "#/components/schemas/AppSubscriptionState" + account: + $ref: "#/components/schemas/SimplifiedAccount" + description: App Subscription object attached to an App Service + AppSubscriptionType: + type: string + description: App Subscription Type + example: APP_SUBSCRIPTION + default: APP_SUBSCRIPTION + enum: + - APP_SUBSCRIPTION + x-order: 2 + AppSubscriptionSourceRequest: + required: + - ipSubnets + type: object + properties: + appLink: + $ref: "#/components/schemas/AppSubscriptionSourceRequestAppLink" + ipSubnets: type: array - description: | - ### Supported event or metric names to use on filters with property /type: - * `*` - all events or metrics - * `equinix.fabric.port.*` - port events or metrics - * `equinix.fabric.connection.*` - connection events or metrics - * `equinix.fabric.router.*` - cloud router events - * `equinix.fabric.metro.*` - metro metrics - * `equinix.fabric.network.*` - network events - * `equinix.fabric.service_token.*` - service token events - * `equinix.network_edge.*` - network edge events - * `equinix.network_edge.acl.*` - network edge acl events - * `equinix.network_edge.device.*` - network edge device events - * `equinix.access_manager.*` - identity access manager events - * `equinix.access_manager.user.role.*` - identity access manager user role events - ### Supported event or metric names to use on filters with property /subject: - * `*` - all events or metrics - * `/fabric/v4/ports/` - port events or metrics - * `/fabric/v4/connections/` - connection events or metrics - * `/fabric/v4/routers/` - cloud router events - * `/fabric/v4/metros/` - metro metrics - * `/fabric/v4/networks/` - network events - * `/fabric/v4/tokens/` - service token events - * `/ne/v1/acl/` - network edge acl events - * `/ne/v1/devices/` - network edge device events - * `/am/v2/users//roleAssignments/` - identity access manager events + description: List of IP subnets in CIDR notation items: type: string - StreamFilterOrFilter: + format: ipv4-cidr + example: 192.168.100.0/24 + description: Source details for the Subscription + x-order: 4 + AppSubscriptionTargetRequest: + required: + - geoScope + - prioritization type: object properties: - or: - maxItems: 3 - type: array - items: - $ref: "#/components/schemas/StreamFilterSimpleExpression" - MetricSelectorResponse: + appService: + $ref: "#/components/schemas/AppSubscriptionTargetRequestAppService" + geoScope: + type: string + description: Geo scope + example: GLOBAL + prioritization: + $ref: "#/components/schemas/AppSubscriptionPrioritization" + description: Target details for the Subscription + x-order: 5 + AppSubscriptionSource: + required: + - ipSubnets type: object properties: - include: + appLink: + $ref: "#/components/schemas/AppSubscriptionSourceAppLink" + ipSubnets: type: array - description: Stream alert rule filtered by metric name + description: List of IP subnets in CIDR notation items: type: string - example: equinix.fabric.metro.sv_da.latency - ResourceSelectorResponse: + format: ipv4-cidr + example: 192.168.100.0/24 + description: Source details for the Subscription + x-order: 4 + AppSubscriptionTarget: + required: + - geoScope + - prioritization type: object properties: - include: - type: array - description: | - ### Supported metric names to use on filters with property /subject: - * `/fabric/v4/ports/` - port metrics - * `/fabric/v4/connections/` - connection metrics - * `/fabric/v4/metros/` - metro latency metrics - items: - type: string - DetectionMethodResponse: + appService: + $ref: "#/components/schemas/AppSubscriptionTargetAppService" + geoScope: + type: string + description: Geo scope + example: GLOBAL + prioritization: + $ref: "#/components/schemas/AppSubscriptionPrioritization" + description: Target details for the Subscription + x-order: 5 + AppSubscriptionChange: + required: + - type + - updatedDateTime type: object properties: + uuid: + type: string + description: Uniquely identifies a change type: type: string - description: | - * THRESHOLD - Alert when a metric crosses a defined threshold by user. - * OUTLIER - Intelligent Alert that has an outlier behavior. This option is currently supported for metro latency metric. + description: Type of change enum: - - THRESHOLD - - OUTLIER - windowSize: - type: string - description: Stream alert rule metric window size - example: PT15M - operand: + - APP_SUBSCRIPTION_UPDATE + status: type: string - description: Stream alert rule metric operand + description: Current outcome of the change flow enum: - - ABOVE - - BELOW - warningThreshold: + - COMPLETED + - FAILED + - REQUESTED + createdDateTime: type: string - description: Stream alert rule metric warning threshold - criticalThreshold: + description: Set when change flow starts + format: date-time + example: 2026-06-29T07:00:00Z + updatedDateTime: type: string - description: Stream alert rule metric critical threshold - Notification: - type: object - CompanyProfileState: - type: object - CompanyMetro: + description: Set when change object is updated + format: date-time + example: 2026-06-29T07:15:00Z + data: + type: array + items: + $ref: "#/components/schemas/AppSubscriptionChangeOperation" + description: Current state of latest AppSubscription change + AppSubscriptionChangeOperation: + required: + - op + - path + - value type: object properties: - href: + op: type: string - metroCode: + description: Handy shortcut for operation name + enum: + - replace + - add + - remove + path: type: string - CompanyLogo: + description: path inside document leading to updated parameter + value: + type: object + description: new value for updated parameter + x-go-type: json.RawMessage + description: App Subscription change operation data + GatewayType: + type: string + description: Gateway type + enum: + - VPN_GW + Router: type: object properties: href: type: string + description: Fabric Cloud Router URI + format: uri + readOnly: true + example: https://api.equinix.com/fabric/v4/routers/c93a9ca0-bb56-490b-8bce-4b2bdaeb4d46 uuid: type: string - extensionType: - type: string - CompanyServiceProfile: - type: object - properties: - href: - type: string - uuid: + description: Cloud Router UUID + format: uuid + example: c9b8e7a2-f3b1-4576-a4a9-1366a63df170 + type: type: string - PrivateService: + enum: + - XF_ROUTER + GatewayState: + type: string + description: Gateway lifecycle state + example: PROVISIONED + enum: + - PROVISIONING + - PROVISIONED + - REPROVISIONING + - DEPROVISIONING + - DEPROVISIONED + - NOT_PROVISIONED + - NOT_DEPROVISIONED + Account: type: object properties: - href: - type: string - uuid: + accountId: + type: integer + description: Account identifier + accountNumber: + type: integer + description: Account number + accountName: type: string - CompanyProfileChange: - type: object - properties: - uuid: + description: Account name + ucmId: type: string - type: + description: Account ucm id + globalCustId: type: string - status: + description: Global customer organization id + orgId: + type: integer + description: Customer organization id + organizationName: type: string - createdDateTime: + description: Customer organization name + subCustomes: + type: array + description: All sub customer accounts + items: + $ref: "#/components/schemas/Account" + countryCode: type: string - format: date-time - updatedDateTime: + description: Account country code + operationalUnit: type: string - format: date-time - data: - $ref: "#/components/schemas/CompanyProfileChangeItem" - CompanyProfileSortDirection: - type: string - description: Sorting direction - enum: - - DESC - - ASC - default: ASC - LoaType: - type: string - description: Loa Type - example: PATCH_PANEL_PORT_LOA - enum: - - PATCH_PANEL_PORT_LOA - - CAGE_LOA - LoaState: - type: string - description: Loa State - example: ACTIVE - enum: - - PENDING - - FAILED - - PENDING_AUTHORIZATION - - PENDING_ACCEPTANCE - - REJECTED - - CANCELLED - - INACTIVE - - ACTIVE - - EXPIRED - LoaActionType: - type: string - description: Loa Action Type - example: AUTHORIZE_LOA - enum: - - AUTHORIZE_LOA - - ACCEPT_LOA - - COPY_LOA - - SEND_LOA - - CANCEL_LOA - LoaActionState: - type: string - description: Loa Action State - enum: - - COMPLETED - - FAILED - - PENDING - Agent: + description: Account operational unit + operationalUnitMetros: + type: array + description: Account operational unit metros + items: + type: string + signatureRequired: + type: boolean + description: Is signature required + poBearing: + type: boolean + description: Purchase order bearing + default: + type: boolean + description: Default account or not + GatewayChangeOperation: + required: + - op + - path + - value type: object properties: - uuid: + op: type: string - description: Agent Uuid - format: uuid - type: + description: Handy shortcut for operation name + enum: + - replace + - add + - remove + path: type: string - example: ANO_AGENT - ChatMessage: + description: path inside document leading to updated parameter + value: + type: object + description: new value for updated parameter + Phone: type: object properties: - messages: - $ref: "#/components/schemas/Messages" - description: Chat message and tool call information during the agent operation - Messages: - type: array - description: List of chat messages - items: - $ref: "#/components/schemas/Messages_inner" - ToolCallInformation: - type: array - description: List of tools called during the agent operation - items: - $ref: "#/components/schemas/ToolCallInformation_inner" + type: + type: string + description: Notification Type + example: MOBILE + enum: + - MOBILE + - OFFICE + number: + pattern: ^\+[1-9]\d{1,14}$ + type: string + description: Phone number + contactPreference: + $ref: "#/components/schemas/ContactPreference" ConnectionPriority: type: string description: Connection priority in redundancy group @@ -25489,6 +33958,8 @@ components: $ref: "#/components/schemas/Interface" network: $ref: "#/components/schemas/SimplifiedNetwork" + interconnect: + $ref: "#/components/schemas/Interconnect" environment: $ref: "#/components/schemas/ProviderEnvironment" sellerRegion: @@ -25515,6 +33986,18 @@ components: enum: - LEAF - ROOT + productOffering: + $ref: "#/components/schemas/ProductOffering" + bandwidthCommit: + maximum: 100000 + minimum: 0 + type: integer + description: Bandwidth commit in Mbps + providerIdentifier: + type: string + description: Provider identifier + address: + $ref: "#/components/schemas/Address" description: Access point object InternetAccess: type: object @@ -25524,21 +34007,6 @@ components: description: Internet Access Service Identifier format: uuid description: Internet Access Details - ConnectionCompanyProfile: - type: object - properties: - id: - type: number - description: company profile identifier - example: 1 - name: - type: string - description: company profile name - example: Company-1 - globalOrgId: - type: string - description: global customer organization value - description: Connection Company Profile Details ConnectionInvitation: type: object properties: @@ -25656,6 +34124,63 @@ components: type: string description: Equinix-assigned platform connection identifier description: Connection specification + ExchangeServiceResponseBgp: + type: object + properties: + customerPeerIp: + type: string + example: 12.1.1.1 + domainName: + type: string + example: ix-v4.gw01.sin.example.net + primaryRouteServerIp: + type: string + example: 206.126.239.251/22 + secondaryRouteServerIp: + type: string + example: 206.126.239.252/22 + asSet: + type: string + example: AS-EC-SV + mlpeEnabled: + type: boolean + example: true + md5AuthKey: + type: string + example: TestAuthKey12345 + rcMd5AuthKey: + type: string + example: TestAuthKey123456 + prefixes: + type: array + description: List of IP prefix + items: + type: string + description: IP prefix + maxPrefixLimit: + type: integer + format: int64 + example: 300 + prependSelfEnabled: + type: boolean + example: true + RouteCollector: + type: object + properties: + asn: + type: integer + description: Route Collector ASN + format: int64 + example: 1238 + ipV4: + type: string + description: Route Collector ipV4 address + example: 206.126.239.250/22 + ipV6: + type: string + description: Route Collector ipV6 address + example: 2001:504:0:2:0:6:5517:1/64 + description: Route Collector InternetAccessConnection: required: - href @@ -25741,6 +34266,22 @@ components: type: string description: Unique identifier for the IP block format: uuid + InterconnectSortDirectionResponse: + type: string + description: Sorting direction + default: DESC + enum: + - DESC + - ASC + InterconnectSortByResponse: + type: string + description: Possible field names to use on sorting + default: /changeLog/updatedDateTime + enum: + - /changeLog/createdDateTime + - /changeLog/updatedDateTime + - /name + - /state IpBlockProductType: type: string enum: @@ -25756,7 +34297,7 @@ components: - VIRTUAL_PORT_PRODUCT - CLOUD_ROUTER_PRODUCT - PRECISION_TIME_PRODUCT - - METRO_CONNECT_PRODUCT + - OPTICAL_CONNECT_PRODUCT PriceCharge: type: object properties: @@ -25794,6 +34335,8 @@ components: $ref: "#/components/schemas/VirtualConnectionPriceASide" zSide: $ref: "#/components/schemas/VirtualConnectionPriceZSide" + geoScope: + $ref: "#/components/schemas/GeoScopeType" description: Virtual Connection Product configuration IpBlockPrice: type: object @@ -25868,6 +34411,25 @@ components: connection: $ref: "#/components/schemas/TimeServicePriceConnection" description: Time Service Product configuration + OpticalConnectPrice: + type: object + properties: + type: + $ref: "#/components/schemas/OpticalConnectPricePortType" + bandwidth: + minimum: 0 + type: integer + description: Bandwidth in Mbps + example: 1000 + pathType: + $ref: "#/components/schemas/OpticalConnectPricePathType" + connectionDestinationType: + $ref: "#/components/schemas/OpticalConnectConnectionDestinationType" + aSide: + $ref: "#/components/schemas/OpticalConnectPriceASide" + zSide: + $ref: "#/components/schemas/OpticalConnectPriceZSide" + description: Optical Metro Connect Port Product configuration ServiceTokenSide: type: object properties: @@ -25877,6 +34439,50 @@ components: items: $ref: "#/components/schemas/AccessPointSelector" description: Connection link protocol,virtual device or network configuration + OpticalConnectPatchPanelFields: + type: object + properties: + patchPanelId: + type: string + description: Unique identifier of the patch panel. + example: CP:Demarc:1259684 + patchPanelPortA: + type: string + description: | + Specify the desired port number for Port A.
When ports are not provided, next available ports will be used. + example: "10" + patchPanelPortB: + type: string + description: | + Specify the desired port number for Port B.
When ports are not provided, next available ports will be used.
Required for Connector type FC, SC and ST only. + example: "11" + connectorType: + type: string + description: Type of Connector + example: SC + enum: + - FC + - SC + - LC + - ST + description: Patch Panel configuration. + OpticalConnectLocation: + type: object + properties: + ibxCode: + type: string + description: Equinix IBX data centre code. + example: SV1 + description: Destination location for BMMR and REMOTE connections. + OpticalConnectLOA: + type: object + properties: + uuid: + type: string + description: Identifier of the Letter of Authorization + example: 64de7e5-7fe7-41e6-b984-80d5aa159a0e + description: | + Letter of Authorization granting the right to terminate at the Z-side location.
Required for BMMR and REMOTE. PortOrderPurchaseOrder: type: object properties: @@ -26141,6 +34747,138 @@ components: description: Fabric Connection access point object. CompanyProfileChangeItem: type: object + LoaRequest: + required: + - authorizedProductType + - name + - type + type: object + properties: + type: + $ref: "#/components/schemas/LoaType" + name: + maxLength: 50 + minLength: 3 + type: string + description: A short, descriptive name for this LOA. + example: LOA-Equinix-SV1-2026 + description: + maxLength: 450 + minLength: 0 + type: string + description: Additional context about this LOA. + example: Authorization for patch panel port access to Equinix at SV1 + authorizedProductType: + $ref: "#/components/schemas/LoaProductType" + description: Create Loa + LoaPatchPanelConnectorType: + type: string + description: Connector Type + example: SC + enum: + - FC + - SC + - LC + - ST + LoaMagicLink: + type: string + description: | + Portal URL for the LOA to either accept from requestor
or authorize from the issuer. + readOnly: true + example: https://portal.equinix.com/fabric/loa/inventory/issuer/29cc7878-54e3-4e1a-8651-87a61354bac2/authorize + AppSubscriptionSourceRequestAppLink: + required: + - uuid + type: object + properties: + uuid: + type: string + description: Equinix-assigned access point identifier + format: uuid + example: 23cd19ab-d3bb-478b-9f25-bd12a3af1914 + description: App Link reference for App Subscription + AppSubscriptionTargetRequestAppService: + required: + - uuid + type: object + properties: + uuid: + type: string + description: Equinix-assigned access point identifier + format: uuid + example: 5008a109-9d1c-485c-b0ba-de9736f283c2 + description: App Service reference for App Subscription + AppSubscriptionPrioritization: + type: string + description: Prioritization strategy for forwarding API requests + example: LATENCY + enum: + - LATENCY + - PERFORMANCE + - UTILIZATION + - THRESHOLD + - ANY_TAG + AppSubscriptionSourceAppLink: + required: + - uuid + type: object + properties: + href: + type: string + description: Resource URI + format: uri + readOnly: true + example: https://api.equinix.com/fabric/v4/appLinks/23cd19ab-d3bb-478b-9f25-bd12a3af1914 + x-order: 1 + type: + type: string + description: App Link Type + example: APP_LINK + x-order: 2 + uuid: + type: string + description: Equinix-assigned access point identifier + format: uuid + example: 23cd19ab-d3bb-478b-9f25-bd12a3af1914 + x-order: 3 + description: App Link reference for App Subscription + AppSubscriptionTargetAppService: + required: + - uuid + type: object + properties: + href: + type: string + description: Resource URI + format: uri + readOnly: true + example: https://api.equinix.com/fabric/v4/appServices/5008a109-9d1c-485c-b0ba-de9736f283c2 + x-order: 1 + type: + type: string + description: App Service Type + example: APP_SERVICE + x-order: 2 + uuid: + type: string + description: Equinix-assigned access point identifier + format: uuid + example: 5008a109-9d1c-485c-b0ba-de9736f283c2 + x-order: 3 + description: App Service reference for App Subscription + ContactPreference: + type: object + properties: + timezone: + type: string + description: Timezone of the contact preference + availability: + type: string + description: Availability of the contact preference + enum: + - WORK_HOURS + - ANYTIME + description: Contact preference for the phone number AccessPointType: type: string description: Access point type @@ -26156,6 +34894,7 @@ components: - METAL_NETWORK - VPIC_INTERFACE - APP_LINK + - XF_IC SimplifiedPort: type: object properties: @@ -26411,26 +35150,41 @@ components: description: MCN assigned VPIC Interface Identifier format: uuid description: MCN VPIC Interface Information - LastMileConfig: + ProductOffering: type: object properties: - serviceType: + id: type: string - description: Last mile service type - bandwidth: - maximum: 100000 - minimum: 0 - type: integer - description: Last mile bandwidth in Mbps - address: + description: Product offering identifier + name: type: string - description: Last mile address - notifications: - type: array - description: Last mile notification contacts - items: - $ref: "#/components/schemas/LastMileNotificationInfo" - description: Last mile configuration for the connection. Applicable to zSide only. + description: Product offering name + description: Product offering for connection. Applicable to zSide only. + Address: + type: object + properties: + id: + type: string + description: Address identifier + streetNr: + type: string + description: Street number of address + streetName: + type: string + description: Street name of address + city: + type: string + description: City of address + stateOrProvince: + type: string + description: State of address + postCode: + type: string + description: Postal code of address + country: + type: string + description: Country of address + description: Address. VirtualConnectionPriceConnectionType: type: string description: Virtual Connection type @@ -26513,10 +35267,10 @@ components: VirtualPortServiceType: type: string description: Port service type. The default is managed-service provider (MSP). + default: MSP enum: - MSP - EPL - default: MSP VirtualPortConfiguration: type: object properties: @@ -26540,6 +35294,36 @@ components: aSide: $ref: "#/components/schemas/TimeServicePriceConnectionASide" description: Time Service Price Connection configuration + OpticalConnectPricePortType: + type: string + description: Optical Connect type. + example: OC + OpticalConnectPricePathType: + type: string + description: Optical Connect Port Path type. + enum: + - PROTECTED + - UNPROTECTED + - DUAL_DIVERSE + OpticalConnectConnectionDestinationType: + type: string + description: Destination Port connectivity type + enum: + - COLO + - BMMR + - REMOTE + OpticalConnectPriceASide: + type: object + properties: + location: + $ref: "#/components/schemas/OpticalConnectPriceLocation" + description: Optical Connection ASide configuration + OpticalConnectPriceZSide: + type: object + properties: + location: + $ref: "#/components/schemas/OpticalConnectPriceLocation" + description: Optical Connection ZSide configuration AccessPointSelector: type: object properties: @@ -26634,16 +35418,6 @@ components: - QINQ - EVPN_VXLAN - VXLAN - LastMileNotificationInfo: - type: object - properties: - key: - type: string - description: Key - value: - type: string - description: Value - description: Last mile notification contact information VirtualConnectionPriceAccessPointType: type: string description: Virtual Connection access point type @@ -26673,11 +35447,11 @@ components: ConnectivitySourceType: type: string description: Type of connectivity. COLO, colocation; BMMR, building meet-me room. The default is COLO.
A building meet-me room (BMMR) is a room within the same building where an Equinix IBX customer can connect with a non-Equinix IBX customer. + default: COLO enum: - COLO - BMMR - REMOTE - default: COLO VirtualPortPackageCode: type: string description: Virtual port package code @@ -26688,6 +35462,14 @@ components: accessPoint: $ref: "#/components/schemas/TimeServicePriceConnectionAccessPoint" description: Time Service Price Connection ASide configuration + OpticalConnectPriceLocation: + type: object + properties: + ibxCode: + type: string + description: IBX identifier + example: SV1 + description: Optical Connect Location SimplifiedMetadataEntity: type: object properties: @@ -26837,6 +35619,16 @@ components: properties: type: $ref: "#/components/schemas/InternetAccessBillingType" + InternetAccessRoutingProtocolBgpRequest_asn: + required: + - uuid + type: object + properties: + uuid: + type: string + description: Unique identifier of the ASN + format: uuid + example: ad8c5042-b553-4d5e-a2ac-c73bf6d4fd91 PriceError_additionalInfo: type: object properties: @@ -26897,6 +35689,13 @@ components: properties: rootOrgId: type: string + LoaResponse_operation: + type: object + properties: + consumersCount: + type: integer + description: Number of consumers associated with this LOA. + example: 10 Response_incomplete_details: type: object properties: @@ -26929,13 +35728,16 @@ components: type: integer description: The number of reasoning tokens. description: A detailed breakdown of the output tokens. - AgentActivities_metadata: + Gateway_ipv4: type: object properties: - chatMessage: - $ref: "#/components/schemas/ChatMessage" - toolCallInformation: - $ref: "#/components/schemas/ToolCallInformation" + primaryIp: + type: string + example: 192.168.1.1 + secondaryIp: + type: string + example: 192.168.1.2 + description: Gateway IPv4 address Metric_resource: type: object properties: @@ -26984,6 +35786,20 @@ components: href: type: string example: https://api.equinix.com/fabric/v4/connections/3066ab1d-af87-49d7-8a14-c9bdb57ac809 + InternetAccessRoutingProtocolBgp_asn: + required: + - uuid + type: object + properties: + href: + type: string + description: URI of the ASN resource + example: https://api.equinix.com/fabric/v4/asns/ad8c5042-b553-4d5e-a2ac-c73bf6d4fd91 + uuid: + type: string + description: Unique identifier of the ASN + format: uuid + example: ad8c5042-b553-4d5e-a2ac-c73bf6d4fd91 IpBlockRegulations_questions: required: - privateSpaceConsidered @@ -27018,28 +35834,16 @@ components: href: type: string format: uri - Messages_inner: - type: object - properties: - type: - type: string - description: Role of the message sender user or assistant - example: user - content: - type: string - description: Content of the chat message - ToolCallInformation_inner: - type: object + CompanyProfileContact_contacts: + required: + - email properties: name: type: string - description: Name of tools called - input: + role: type: string - description: Content of the tool request - response: + email: type: string - description: Content of the tool response VirtualConnectionPriceASide_accessPoint_port_settings: type: object properties: @@ -27115,137 +35919,12 @@ components: examples: "400": value: - - errorCode: EQ-3142102 - errorMessage: Connection has duplicate buyer-side VLAN ID for port or the same VLAN ID is in the process of being deleted and should be freed up soon - correlationId: cebc3d33-9037-4a2b-a7af-0ad65602cdec - additionalInfo: - - property: /aSide/accessPoint/linkProtocol - - errorCode: EQ-3142535 - errorMessage: The connection bandwidth provided in the connection request exceeds the bandwidth Limit on ServiceToken - details: Please enter bandwidth less than the Speed limit on ServiceToken - correlationId: test - additionalInfo: - - property: /aSide/serviceToken/uuid - - errorCode: EQ-3142536 - errorMessage: Remote connection cannot be created with the provided ServiceToken - details: Only local Connection can be created using this ServiceToken - correlationId: test - additionalInfo: - - property: /zSide/accessPoint/port/uuid - - errorCode: EQ-3142701 - errorMessage: The connection bandwidth provided in the connection request exceeds the bandwidth Limit on ServiceToken - details: not an authorized user - correlationId: test - - errorCode: EQ-3142501 - errorMessage: Invalid input - correlationId: 20d32a80-0d61-4333-bc03-707b591ae2f5 - additionalInfo: - - property: aSide/accessPoint/port/uuid - - errorCode: EQ-3142509 - errorMessage: Connection already deleted - correlationId: cebc3d33-9037-4a2b-a7af-0ad65602cdec - additionalInfo: - - property: uuid - - errorCode: EQ-3142510 - errorMessage: Connection is in transient state - correlationId: 20d32a80-0d61-4333-bc03-707b591ae2f5 - additionalInfo: - - property: uuid - - errorCode: EQ-3142221 - errorMessage: The primary and secondary token provided have different bandwidth tiers. Please use two tokens that support the same bandwidth tiers - correlationId: test - additionalInfo: - - property: /zSide/serviceToken/uuid - - errorCode: EQ-3142222 - errorMessage: The primary and secondary tokens have different encapsulation types (Dot1Q or QinQ). Please use two tokens that support the same encapsulation type - correlationId: test - additionalInfo: - - property: /zSide/serviceToken/uuid - - errorCode: EQ-3142223 - errorMessage: The primary and secondary tokens belong to different projects. Please use two tokens that belong to the same project - correlationId: test - additionalInfo: - - property: /zSide/serviceToken/uuid - - errorCode: EQ-3142224 - errorMessage: The primary and secondary ports have different port speeds (bandwidth). Please use two tokens that support the same port speed - correlationId: test - additionalInfo: - - property: /zSide/serviceToken/uuid - - errorCode: EQ-3142225 - errorMessage: The primary and secondary tokens provided are the same. Please provide a different token - correlationId: test - additionalInfo: - - property: /zSide/serviceToken/uuid - - errorCode: EQ-3142514 - errorMessage: Redundancy group is required - correlationId: test - additionalInfo: - - property: /redundancy/group - - errorCode: EQ-3142515 - errorMessage: Redundancy priority is required - correlationId: test - additionalInfo: - - property: /redundancy/priority - - errorCode: EQ-3142516 - errorMessage: Invalid redundancy group - correlationId: test - additionalInfo: - - property: /redundancy/group - - errorCode: EQ-3142517 - errorMessage: Invalid redundancy priority - correlationId: test - additionalInfo: - - property: /redundancy/priority - - errorCode: EQ-3142303 - errorMessage: Only Primary connection allowed for this CSP - correlationId: test - additionalInfo: - - property: /redundancy/priority - - errorCode: EQ-3142320 - errorMessage: For redundant connection, Service Profile should be the same - correlationId: test - additionalInfo: - - property: /zSide/accessPoint/profile/uuid - - errorCode: EQ-3142021 - errorMessage: For redundant connection, Fabric Cloud Router should be the same - correlationId: test - additionalInfo: - - property: /aSide/accessPoint/router/uuid - - errorCode: EQ-3142012 - errorMessage: Fabric Cloud Router is not in PROVISIONED state - correlationId: test - additionalInfo: - - property: /aSide/accessPoint/router/uuid - - errorCode: EQ-3142301 - errorMessage: Given profile does not exist - correlationId: test - additionalInfo: - - property: /zSide/accessPoint/profile/uuid - - errorCode: EQ-3142302 - errorMessage: Service provider does not exist in required zSide metro - correlationId: test - additionalInfo: - - property: /zSide/accessPoint/location/metroCode - - errorCode: EQ-3142013 - errorMessage: Invalid metro for Cloud Router connection - correlationId: test - additionalInfo: - - property: /aSide/accessPoint/router/uuid - - errorCode: EQ-3142304 - errorMessage: Private connections are not allowed on public profiles - correlationId: test - additionalInfo: - - property: visibility - - errorCode: EQ-3142306 - errorMessage: Requested bandwidth is not supported by service profile - correlationId: test - additionalInfo: - - property: /bandwidth - - errorCode: EQ-3142308 - errorMessage: Authentication key is required - correlationId: test + - errorCode: EQ-3036013 + errorMessage: Invalid Query Parameter + correlationId: c82ff3bc-de07-47e5-b3ec-53a009d01515 additionalInfo: - - property: /zSide/accessPoint/authenticationKey + - property: presence + reason: Allowed value for presence is MY_SERVICES "401": value: - errorCode: EQ-3000039 @@ -27253,10 +35932,9 @@ components: correlationId: c82ff3bc-de07-47e5-b3ec-53a009d01515 "403": value: - - errorCode: EQ-3045003 - errorMessage: Operation not allowed - correlationId: c82ff3bc-de07-47e5-b3ec-53a009d01515 - details: Operation not allowed for current user + - errorCode: EQ-3142402 + errorMessage: Do not have create connection permission on this port + correlationId: cebc3d33-9037-4a2b-a7af-0ad65602cdec "404": value: - errorCode: EQ-3045811 @@ -27273,16 +35951,17 @@ components: value: - errorCode: EQ-3040016 errorMessage: Unsupported media type, please check the request's Content-Type or Content-Encoding - correlationId: cebc3d33-9037-4a2b-a7af-0ad65602cdec + correlationId: c82ff3bc-de07-47e5-b3ec-53a009d01515 additionalInfo: - property: contentType reason: The payload format is in an unsupported format "500": value: - - errorCode: EQ-3045004 - errorMessage: Internal Server Error + - errorCode: EQ-3034003 + errorMessage: Method not supported,Please check the URL passed correlationId: c82ff3bc-de07-47e5-b3ec-53a009d01515 - details: Internal Server Error + additionalInfo: + - reason: method:PATCH AgentTemplatesGetAllResponseExample: value: pagination: @@ -27297,8 +35976,10 @@ components: description: connection bandwidth upgrader agent template state: PROVISIONED enabled: true - agentDefinition: + definition: url: /equinix/agent-factory/refs/heads/use_pdf_html/agent_factory_schema/equinix/fabric/v1/event_driven/upgrade-bw-primary-connection.md + modes: + - ON_EVENT changeLog: createdBy: testuser createdDateTime: 2024-05-06T16:21:18.545214 @@ -27338,13 +36019,55 @@ components: description: connection bandwidth upgrader agent template state: PROVISIONED enabled: true - agentDefinition: + definition: url: /equinix/agent-factory/refs/heads/use_pdf_html/agent_factory_schema/equinix/fabric/v1/event_driven/upgrade-bw-primary-connection.md + modes: + - ON_EVENT changeLog: createdBy: testuser createdDateTime: 2024-05-06T16:21:18.545214 updatedBy: testuser updatedDateTime: 2024-05-06T16:21:18.545214Z + AgentTemplatesSearchExample: + value: + filter: + and: + - property: /name + operator: IN + values: + - name1 + pagination: + offset: 0 + limit: 20 + AgentTemplatesTagsResponseExample: + value: + pagination: + offset: 0 + limit: 20 + total: 3 + data: + - href: https://api.equinix.com/fabric/v4/tags/d684aa26-8276-48b7-bb42-a6d9def0a418 + uuid: d684aa26-8276-48b7-bb42-a6d9def0a418 + type: PREDEFINED_TAG + name: equinix.fabric.agent_factory.templates.design + displayName: Design & Plan Agents + - href: https://api.equinix.com/fabric/v4/tags/e684aa26-8276-48b7-bb42-a6d9def0a418 + uuid: e684aa26-8276-48b7-bb42-a6d9def0a418 + type: PREDEFINED_TAG + name: equinix.fabric.agent_factory.templates.deploy + displayName: Deploy & Change Agents + - href: https://api.equinix.com/fabric/v4/tags/f684aa26-8276-48b7-bb42-a6d9def0a418 + uuid: f684aa26-8276-48b7-bb42-a6d9def0a418 + type: PREDEFINED_TAG + name: equinix.fabric.agent_factory.templates.monitor + displayName: Monitor & Report Agents + AgentTemplatesByUuidTagsResponseExample: + value: + href: https://api.equinix.com/fabric/v4/tags/d684aa26-8276-48b7-bb42-a6d9def0a418 + uuid: d684aa26-8276-48b7-bb42-a6d9def0a418 + type: PREDEFINED_TAG + name: equinix.fabric.agent_factory.templates.design + displayName: Design & Plan Agents AgentGetAllResponseExample: value: pagination: @@ -27363,8 +36086,17 @@ components: projectId: dadd3ab6-c0af-430c-8216-43d44f08c1c5 agentTemplate: uuid: 657400f8-c0af-430c-8216-43d44f08c1c5 + mode: ON_DEMAND configuration: prompt: Connection uuid is . Alert rule is . Upgrade bandwidth to 10GB. + activitiesCount: 0 + operation: + latestExecution: + href: https://api.equinix.com/fabric/v4/agents/d684aa26-8276-48b7-bb42-a6d9def0a418/activities/e684aa26-8276-48b7-bb42-a6d9def0a418 + uuid: e684aa26-8276-48b7-bb42-a6d9def0a418 + status: COMPLETED + startDateTime: 2026-07-29T00:00:00.001201Z + endDateTime: 2026-07-29T00:01:00.001201Z changeLog: createdBy: testuser createdDateTime: 2024-05-06T16:21:18.545214Z @@ -27419,6 +36151,7 @@ components: uuid: 657400f8-c0af-430c-8216-43d44f08c1c5 configuration: prompt: Connection uuid is . Alert rule is . Upgrade bandwidth to 10GB. + activitiesCount: 0 changeLog: createdBy: testuser createdDateTime: 2024-05-06T16:21:18.545214Z @@ -27447,6 +36180,14 @@ components: uuid: 657400f8-c0af-430c-8216-43d44f08c1c5 configuration: prompt: Connection uuid is . Alert rule is . Upgrade bandwidth to 10GB. + activitiesCount: 0 + operation: + latestExecution: + href: https://api.equinix.com/fabric/v4/agents/d684aa26-8276-48b7-bb42-a6d9def0a418/activities/e684aa26-8276-48b7-bb42-a6d9def0a418 + uuid: e684aa26-8276-48b7-bb42-a6d9def0a418 + status: COMPLETED + startDateTime: 2026-07-29T00:00:00.001201Z + endDateTime: 2026-07-29T00:01:00.001201Z changeLog: createdBy: testuser createdDateTime: 2024-05-06T16:21:18.545214Z @@ -27465,6 +36206,7 @@ components: uuid: 657400f8-c0af-430c-8216-43d44f08c1c5 configuration: prompt: Connection uuid is . Alert rule is . Upgrade bandwidth to 10GB. + activitiesCount: 0 changeLog: createdBy: testuser createdDateTime: 2024-05-06T16:21:18.545214Z @@ -27490,6 +36232,7 @@ components: uuid: 657400f8-c0af-430c-8216-43d44f08c1c5 configuration: prompt: Connection uuid is . Alert rule is . Upgrade bandwidth to 10GB. + activitiesCount: 0 changeLog: createdBy: testuser createdDateTime: 2024-05-06T16:21:18.545214Z @@ -27530,6 +36273,60 @@ components: changeLog: createdBy: testuser createdDateTime: 2024-05-06T16:21:18.545214Z + AgentActionGetAllResponseExample: + value: + pagination: + offset: 0 + limit: 20 + total: 1 + data: + - href: https://api.equinix.com/fabric/v4/agents/e59b74d7-58ca-408e-a406-b701e3fba0a7/actions/ee8532ca-7378-4343-b5f8-d17d9aad2895 + uuid: ee8532ca-7378-4343-b5f8-d17d9aad2895 + type: EXECUTE_AGENT + status: PENDING + schedule: + executeDateTime: 2026-03-20T10:10:10.000Z + changeLog: + createdBy: testUser@equinix.com + createdDateTime: 2026-03-10T10:10:10.000Z + AgentActionPostRequestExample: + value: + type: EXECUTE_AGENT + schedule: + executeDateTime: 2026-03-20T10:10:10.000Z + AgentActionResponseExample: + value: + href: https://api.equinix.com/fabric/v4/agents/e59b74d7-58ca-408e-a406-b701e3fba0a7/actions/ee8532ca-7378-4343-b5f8-d17d9aad2895 + uuid: ee8532ca-7378-4343-b5f8-d17d9aad2895 + type: EXECUTE_AGENT + status: PENDING + schedule: + executeDateTime: 2026-03-20T10:10:10.000Z + changeLog: + createdBy: testUser@equinix.com + createdDateTime: 2026-03-10T10:10:10.000Z + AgentActionDeleteResponseExample: + value: + href: https://api.equinix.com/fabric/v4/agents/e59b74d7-58ca-408e-a406-b701e3fba0a7/actions/ee8532ca-7378-4343-b5f8-d17d9aad2895 + uuid: ee8532ca-7378-4343-b5f8-d17d9aad2895 + type: EXECUTE_AGENT + status: DELETED + schedule: + executeDateTime: 2026-03-20T10:10:10.000Z + changeLog: + createdBy: testUser@equinix.com + createdDateTime: 2026-03-10T10:10:10.000Z + AgentSearchExample: + value: + filter: + and: + - property: /name + operator: IN + values: + - name1 + pagination: + offset: 0 + limit: 20 get-cloud-events-by-asset-id: value: pagination: @@ -27671,6 +36468,125 @@ components: pagination: offset: 0 limit: 20 + search-latest-operational-events: + value: + filter: + and: + - property: /subject + operator: IN + values: + - /fabric/v4/ports/8ac8ecfe-c7cb-4def-9f77-5ce93c19d83d + pagination: + offset: 0 + limit: 2 + search-latest-operational-events-response: + value: + pagination: + offset: 0 + limit: 2 + total: 1 + data: + - specversion: "1.0" + source: https://api.equinix.com/fabric/v4/cloudevents + id: 6c573287-9914-4202-8b6d-2d15e7da04b8 + type: equinix.fabric.port.status.down + subject: /fabric/v4/ports/8ac8ecfe-c7cb-4def-9f77-5ce93c19d83d + time: 2018-04-05T17:31:00.000Z + dataschema: https://equinix.github.io/equinix-cloudevents/jsonschema/equinix/fabric/v1/ChangeEvent.json + datacontenttype: application/json + severitynumber: 21 + severitytext: FATAL + equinixalert: raise/AABBcCCDDeEfFf123, + equinixproject: project-123 + data: + message: Virtual port 'port-name' status changed to DOWN + resource: + href: https://api.equinix.com//fabric/v4/ports/8ac8ecfe-c7cb-4def-9f77-5ce93c19d83d + uuid: 8ac8ecfe-c7cb-4def-9f77-5ce93c19d83d + type: XF_PORT + state: PROVISIONED + operation: + operationalStatus: DOWN + search-live-alerts: + value: + filter: + and: + - property: /equinixalert + operator: LIKE + values: + - raise/% + - property: /time + operator: BETWEEN + values: + - 2026-01-01T00:00:00.000Z + - 2026-01-02T00:00:00.000Z + - or: + - property: /equinixproject + operator: IN + values: + - 6a7ce6bb-4424-414d-bea4-7a6a05ff1919 + - property: /subject + operator: LIKE + values: + - /fabric/v4/metros/* + sort: + property: /time + order: DESC + pagination: + limit: 100 + offset: 0 + search-live-alerts-response: + value: + pagination: + offset: 0 + limit: 100 + total: 2 + data: + - specversion: "1.0" + source: https://api.equinix.com/fabric/v4/liveAlerts + id: 6c573287-9914-4202-8b6d-2d15e7da04b8 + type: equinix.fabric.connection.status.down + subject: /fabric/v4/connections/956a86fb-d03d-436c-8d5d-30d1f51f7688 + time: 2026-01-01T03:00:00.000Z + dataschema: https://equinix.github.io/equinix-cloudevents/jsonschema/equinix/fabric/v1/ChangeEvent.json + datacontenttype: application/json + severitynumber: 19 + severitytext: CRITICAL + equinixalert: raise/NCAB543WC4lrLpET8nLX4Vm8 + equinixproject: 6a7ce6bb-4424-414d-bea4-7a6a05ff1919 + data: + message: Connection 'Test-Connection' status changed to Down + resource: + href: https://api.equinix.com/fabric/v4/connections/956a86fb-d03d-436c-8d5d-30d1f51f7688 + uuid: 956a86fb-d03d-436c-8d5d-30d1f51f7688 + type: IP_VC + state: PROVISIONED + name: Test name + description: Test description + - specversion: "1.0" + source: https://api.equinix.com/fabric/v4/liveAlerts + id: 6c573287-9914-4202-8b6d-2d15e7da04b8 + type: equinix.fabric.metro.sv_ch.latency + subject: /fabric/v4/metros/SV + time: 2026-01-01T03:30:00.000Z + dataschema: https://equinix.github.io/equinix-cloudevents/jsonschema/equinix/fabric/v1/ChangeEvent.json + datacontenttype: application/json + severitynumber: 13 + severitytext: WARN + equinixalert: raise/DAEB543WC4lrLpET8nLX4Vm8 + data: + message: Abnormal detected for metro latency from Silicon to Chicago + resource: + href: https://api.equinix.com/fabric/v4/metros/SV + code: SV + type: XF_METRO + metrics: + - type: GAUGE + name: equinix.fabric.metro.sv_ch.latency + unit: ms + datapoints: + - endDateTime: 2026-01-01T03:30:00.000Z + value: 63.6634 get-metrics-by-asset-id: value: pagination: @@ -27757,6 +36673,117 @@ components: value: 251 - endDateTime: 2025-05-14T14:57:46.000Z value: 243 + maintenancesGetAll: + value: + pagination: + offset: 0 + limit: 20 + total: 2 + data: + - href: https://api.equinix.com/fabric/v4/ports/b2d93b39-02db-2dbc-ace0-30fa5c00ad04/maintenances/a1d93b39-02db-2dbc-ace0-30fa5c00ad04 + uuid: a1d93b39-02db-2dbc-ace0-30fa5c00ad04 + type: XF_MAINTENANCE + state: DEFERRED + incidentRefId: CHG0123456 + port: + href: https://api.equinix.com/fabric/v4/ports/b2d93b39-02db-2dbc-ace0-30fa5c00ad04 + type: XF_PORT + uuid: b2d93b39-02db-2dbc-ace0-30fa5c00ad04 + startDateTime: 2026-07-10T00:00:00Z + duration: PT8H + deferredDateTime: 2026-07-15T00:00:00Z + batchUuid: c3d93b39-02db-2dbc-ace0-30fa5c00ad04 + changeLog: + createdBy: admin_user + createdDateTime: 2026-07-01T09:00:00Z + updatedBy: test_user + updatedDateTime: 2026-07-05T14:30:00Z + - href: https://api.equinix.com/fabric/v4/ports/b2d93b39-02db-2dbc-ace0-30fa5c00ad04/maintenances/b1d93b39-02db-2dbc-ace0-30fa5c00ad04 + uuid: b1d93b39-02db-2dbc-ace0-30fa5c00ad04 + type: XF_MAINTENANCE + state: SCHEDULED + incidentRefId: CHG0123457 + port: + href: https://api.equinix.com/fabric/v4/ports/b2d93b39-02db-2dbc-ace0-30fa5c00ad04 + type: XF_PORT + uuid: b2d93b39-02db-2dbc-ace0-30fa5c00ad04 + startDateTime: 2026-07-11T00:00:00Z + duration: PT8H + batchUuid: c3d93b39-02db-2dbc-ace0-30fa5c00ad04 + changeLog: + createdBy: admin_user + createdDateTime: 2026-07-01T09:00:00Z + updatedBy: test_user + updatedDateTime: 2026-07-05T14:30:00Z + maintenanceGet: + value: + href: https://api.equinix.com/fabric/v4/ports/b2d93b39-02db-2dbc-ace0-30fa5c00ad04/maintenances/a1d93b39-02db-2dbc-ace0-30fa5c00ad04 + uuid: a1d93b39-02db-2dbc-ace0-30fa5c00ad04 + type: XF_MAINTENANCE + state: DEFERRED + incidentRefId: CHG0123456 + port: + href: https://api.equinix.com/fabric/v4/ports/b2d93b39-02db-2dbc-ace0-30fa5c00ad04 + type: XF_PORT + uuid: b2d93b39-02db-2dbc-ace0-30fa5c00ad04 + startDateTime: 2026-07-10T00:00:00Z + duration: PT8H + deferredDateTime: 2026-07-15T00:00:00Z + batchUuid: c3d93b39-02db-2dbc-ace0-30fa5c00ad04 + changeLog: + createdBy: admin_user + createdDateTime: 2026-07-01T09:00:00Z + updatedBy: test_user + updatedDateTime: 2026-07-05T14:30:00Z + maintenanceActionsGetAll: + value: + pagination: + offset: 0 + limit: 20 + total: 1 + data: + - href: https://api.equinix.com/fabric/v4/ports/29cc7878-54e3-4e1a-8651-87a61354bac2/maintenances/a1d93b39-02db-2dbc-ace0-30fa5c00ad04/actions/30cc7878-54e3-4e1a-8651-87a61354bad4 + uuid: 30cc7878-54e3-4e1a-8651-87a61354bad4 + type: MAINTENANCE_DEFER + state: COMPLETED + changeLog: + createdBy: admin_user + createdDateTime: 2025-10-21T10:30:00Z + maintenanceActionRequest: + value: + type: MAINTENANCE_DEFER + maintenanceActionPost: + value: + href: https://api.equinix.com/fabric/v4/ports/29cc7878-54e3-4e1a-8651-87a61354bac2/maintenances/a1d93b39-02db-2dbc-ace0-30fa5c00ad04/actions/30cc7878-54e3-4e1a-8651-87a61354bad4 + uuid: 30cc7878-54e3-4e1a-8651-87a61354bad4 + type: MAINTENANCE_DEFER + state: PENDING + changeLog: + createdBy: admin_user + createdDateTime: 2025-10-21T10:30:00Z + maintenanceActionSearchRequest: + value: + filter: + and: + - property: /type + operator: = + values: + - MAINTENANCE_DEFER + pagination: + offset: 0 + limit: 20 + sort: + - direction: DESC + property: /changeLog/createdDateTime + maintenanceActionGet: + value: + href: https://api.equinix.com/fabric/v4/ports/29cc7878-54e3-4e1a-8651-87a61354bac2/maintenances/a1d93b39-02db-2dbc-ace0-30fa5c00ad04/actions/30cc7878-54e3-4e1a-8651-87a61354bad4 + uuid: 30cc7878-54e3-4e1a-8651-87a61354bad4 + type: MAINTENANCE_DEFER + state: COMPLETED + changeLog: + createdBy: admin_user + createdDateTime: 2025-10-21T10:30:00Z get-metrics-by-name: value: pagination: @@ -28299,6 +37326,77 @@ components: - type: ALL emails: - test@test.com + COLO2LMaaSSP: + value: + type: EVPL_VC + name: Last Mile Connection 1 + bandwidth: 10 + redundancy: + priority: PRIMARY + order: + termLength: 1 + aSide: + accessPoint: + type: COLO + port: + uuid: d4db1048-ef3d-f3d6-49e0-306a5c00a341 + linkProtocol: + type: QINQ + vlanSTag: 121 + vlanCTag: 145 + zSide: + accessPoint: + type: SP + profile: + uuid: 8236fbb9-51e5-428f-86bf-6b67e1223ac1 + location: + metroCode: DC + productOffering: + id: sample-product-offering-id + name: Sample product offering 1 + bandwidthCommit: 50 + address: + id: lmaas-addr-sample-id + streetNr: "1234" + streetName: Main St + city: San Jose + stateOrProvince: CA + postCode: "95101" + country: United States + project: + projectId: ac4d34ca-0d9c-4bc2-9aab-1234567abcde + notifications: + - type: ALL + emails: + - someone@sample.com + - type: ORDERING + emails: + - someone@sample.com + phone: + - type: OFFICE + number: 11234567890 + contactPreference: + timezone: America/Los_Angeles + availability: ANYTIME + - type: MOBILE + number: 11234567890 + contactPreference: + timezone: America/Los_Angeles + availability: ANYTIME + - type: TECHNICAL + emails: + - someone@sample.com + phone: + - type: OFFICE + number: 11234567890 + contactPreference: + timezone: America/Los_Angeles + availability: ANYTIME + - type: MOBILE + number: 11234567890 + contactPreference: + timezone: America/Los_Angeles + availability: ANYTIME COLO2GoogleSPwithDot1q: value: type: EVPL_VC @@ -30688,6 +39786,97 @@ components: name: Azure ExpressRoute uuid: a1390b22-bbe0-4e93-ad37-85beef9d254a authenticationKey: xxxx-xxx-xxxx + COLO2LMaaSSP-Response: + value: + href: https://api.equinix.com/fabric/v4/connections/8236fbb9-51e5-428f-86bf-6b67e1223ac1 + uuid: 8236fbb9-51e5-428f-86bf-6b67e1223ac1 + type: EVPL_VC + name: Last Mile Connection 1 + bandwidth: 10 + operation: + providerStatus: NOT_AVAILABLE + equinixStatus: PENDING_APPROVAL + redundancy: + group: d4db1048-ef3d-f3d6-49e0-306a5c00a341 + priority: PRIMARY + order: + billingTier: Up to 10 MB + termLength: 1 + aSide: + accessPoint: + location: + metroCode: DC + port: + href: https://api.equinix.com/fabric/v4/ports/c4d9350e-780f-80fd-1ce0-306a5c00a600 + type: XF_PORT + uuid: c4d9350e-780f-80fd-1ce0-306a5c00a600 + name: Sample Port DC + linkProtocol: + type: QINQ + vlanSTag: 121 + vlanCTag: 145 + zSide: + accessPoint: + location: + metroCode: DC + profile: + href: https://api.equinix.com/fabric/v4/serviceProfiles/e36b0f9b-6080-4909-90a7-d5e3623d00d1 + uuid: e36b0f9b-6080-4909-90a7-d5e3623d00d1 + type: LMAAS_PROFILE + name: Last Mile Service Profile 1 + productOffering: + id: sample-product-offering-id + name: Sample product offering 1 + bandwidthCommit: 50 + address: + id: lmaas-addr-sample-id + streetNr: "1234" + streetName: Main St + city: San Jose + stateOrProvince: CA + postCode: "95101" + country: United States + notifications: + - type: ALL + emails: + - someone@sample.com + - type: ORDERING + emails: + - someone@sample.com + phone: + - type: OFFICE + number: 11234567890 + contactPreference: + timezone: America/Los_Angeles + availability: ANYTIME + - type: MOBILE + number: 11234567890 + contactPreference: + timezone: America/Los_Angeles + availability: ANYTIME + - type: TECHNICAL + emails: + - someone@sample.com + phone: + - type: OFFICE + number: 11234567890 + contactPreference: + timezone: America/Los_Angeles + availability: ANYTIME + - type: MOBILE + number: 11234567890 + contactPreference: + timezone: America/Los_Angeles + availability: ANYTIME + changeLog: + createdBy: sampleuser + createdByFullName: Sample User + createdByEmail: someone@sample.com + createdDateTime: 2026-01-01T00:00:00.000Z + updatedBy: sampleuser + updatedByFullName: Sample User + updatedByEmail: someone@sample.com + updatedDateTime: 2026-01-01T00:00:00.000Z COLO2GoogleSPwithDot1q-Response: value: href: https://api.equinix.com/fabric/v4/connections/f662d4c4-fcd8-40ba-b95b-64fc7e0a61fb @@ -31033,7 +40222,7 @@ components: notifications: - type: ALL emails: - - ? test@test.comoperation + - test@test.comoperation: null operation: providerStatus: ACTIVE equinixStatus: PROVISIONED @@ -33507,6 +42696,177 @@ components: linkProtocol: type: DOT1Q vlanTag: 3322 + ColoToColoWithMaintenanceResponseExample: + value: + href: https://api.equinix.com/fabric/v4/connections/650fa2db-37fc-4eca-a9ac-1bb33481b03f + type: EVPL_VC + uuid: 650fa2db-37fc-4eca-a9ac-1bb33481b03f + name: E2E-CON-ColoToColo-280122023234849 + state: PROVISIONED + operation: + providerStatus: AVAILABLE + equinixStatus: PROVISIONED + maintenanceStatus: SCHEDULED + lockEnabled: true + order: + purchaseOrderNumber: PO754587184643 + notifications: + - type: ALL + emails: + - fake@mail.com + account: + accountNumber: 270001 + orgId: 91997 + globalOrgId: 0016u000003JZ4sAAG + changeLog: + createdBy: admin_user + createdDateTime: 2022-01-28T02:32:36.402Z + updatedBy: test_user + updatedDateTime: 2022-01-29T02:32:36.402Z + bandwidth: 50 + redundancy: + group: 4647f20d-6339-4e83-b31e-b35da3060d63 + priority: PRIMARY + isRemote: false + direction: OUTGOING + aSide: + accessPoint: + type: COLO + location: + metroHref: https://api.equinix.com/fabric/v4/metros/DA + metroCode: DA + port: + href: https://api.equinix.com/fabric/v4/ports/c791f8cb-5a41-a410-8ce0-306a5c00a4ee + type: XF_PORT + uuid: c791f8cb-5a41-a410-8ce0-306a5c00a4ee + name: testBuyer-DA1-L-Dot1q-STD-PRI-10G-NK-329 + linkProtocol: + type: DOT1Q + vlanTag: 1043 + zSide: + accessPoint: + type: COLO + location: + metroHref: https://api.equinix.com/fabric/v4/metros/DA + metroCode: DA + port: + href: https://api.equinix.com/fabric/v4/ports/c791f8cb-5a49-a490-8ce0-306a5c00a4ee + type: XF_PORT + uuid: c791f8cb-5a49-a490-8ce0-306a5c00a4ee + name: testBuyer-DA1-L-Dot1q-STD-SEC-10G-NK-337 + linkProtocol: + type: DOT1Q + vlanTag: 3322 + LMaaSConnectionResponse: + value: + href: https://api.equinix.com/fabric/v4/connections/8236fbb9-51e5-428f-86bf-6b67e1223ac1 + uuid: 8236fbb9-51e5-428f-86bf-6b67e1223ac1 + type: EVPL_VC + name: Last Mile Connection 1 + state: ACTIVE + operation: + providerStatus: AVAILABLE + equinixStatus: PROVISIONED + order: + billingTier: Up to 10 MB + termLength: 1 + bandwidth: 10 + redundancy: + group: d4db1048-ef3d-f3d6-49e0-306a5c00a341 + priority: PRIMARY + isRemote: false + direction: INCOMING + account: + accountNumber: 201257 + orgId: 91955 + globalOrgId: "" + project: + projectId: ac4d34ca-0d9c-4bc2-9aab-1234567abcde + changeLog: + createdBy: sampleuser + createdDateTime: 2026-01-01T00:00:00.000Z + updatedBy: sampleuser + updatedDateTime: 2026-01-01T00:00:00.000Z + notifications: + - type: ALL + emails: + - someone@sample.com + - type: ORDERING + emails: + - someone@sample.com + phone: + - type: OFFICE + number: 11234567890 + contactPreference: + timezone: America/Los_Angeles + availability: ANYTIME + - type: MOBILE + number: 11234567890 + contactPreference: + timezone: America/Los_Angeles + availability: ANYTIME + - type: TECHNICAL + emails: + - someone@sample.com + phone: + - type: OFFICE + number: 11234567890 + contactPreference: + timezone: America/Los_Angeles + availability: ANYTIME + - type: MOBILE + number: 11234567890 + contactPreference: + timezone: America/Los_Angeles + availability: ANYTIME + aSide: + accessPoint: + type: COLO + account: + accountNumber: 201257 + organizationName: Sample Organization + location: + region: AMER + metroName: Ashburn + metroCode: DC + ibx: DC11 + port: + href: https://api.equinix.com/fabric/v4/ports/c4d9350e-780f-80fd-1ce0-306a5c00a600 + uuid: c4d9350e-780f-80fd-1ce0-306a5c00a600 + name: Sample Port DC + redundancy: + priority: SECONDARY + linkProtocol: + type: QINQ + vlanSTag: 121 + vlanCTag: 145 + zSide: + accessPoint: + type: SP + account: + organizationName: Sample Provider Organization + location: + region: AMER + metroName: Ashburn + metroCode: DC + ibx: DC11 + profile: + href: https://api.equinix.com/fabric/v4/serviceProfiles/e36b0f9b-6080-4909-90a7-d5e3623d00d1 + type: LMAAS_PROFILE + name: Last Mile Service Profile 1 + uuid: e36b0f9b-6080-4909-90a7-d5e3623d00d1 + productOffering: + id: sample-product-offering-id + name: Sample product offering 1 + bandwidthCommit: 50 + address: + id: lmaas-addr-sample-id + streetNr: "1234" + streetName: Main St + city: San Jose + stateOrProvince: CA + postCode: "95101" + country: United States 400_Invalid_id: value: - errorCode: EQ-3142519 @@ -34735,9 +44095,9 @@ components: order: purchaseOrderNumber: 1-3456576 notifications: - - type: ALL - emails: - - test@test.com + - type: NOTIFICATION + registeredUsers: + - jaguarsuser-port-order project: projectId: e275485c-7072-439f-943a-c923548b2be5 account: @@ -34799,9 +44159,9 @@ components: account: accountNumber: 100179 notifications: - - type: ALL - emails: - - test@test.com + - type: NOTIFICATION + registeredUsers: + - jaguarsuser-port-order changelog: createdBy: "12345" createdDateTime: 2025-08-30T07:21:39Z @@ -34825,9 +44185,9 @@ components: ExchangeService_404: value: - errorCode: EQ-3067101 - errorMessage: Exchange Service not found. + errorMessage: Internet Exchange Service not found. correlationId: c82ff3bc-de07-47e5-b3ec-53a009d01515 - details: Exchange Service not found. + details: Internet Exchange Service not found. ExchangeService_500: value: - errorCode: EQ-3067104 @@ -34891,9 +44251,9 @@ components: account: accountNumber: 100179 notifications: - - type: ALL - emails: - - test@test.com + - type: NOTIFICATION + registeredUsers: + - jaguarsuser-port-order changelog: updatedBy: "12345" updatedDateTime: 2025-08-30T07:21:39Z @@ -34959,9 +44319,9 @@ components: account: accountNumber: 100179 notifications: - - type: ALL - emails: - - test@test.com + - type: NOTIFICATION + registeredUsers: + - jaguarsuser-port-order changelog: updatedBy: "12345" updatedDateTime: 2025-08-30T07:21:39Z @@ -35044,9 +44404,9 @@ components: account: accountNumber: 100179 notifications: - - type: ALL - emails: - - test@test.com + - type: NOTIFICATION + registeredUsers: + - jaguarsuser-port-order changelog: updatedBy: "12345" updatedDateTime: 2025-08-30T07:21:39Z @@ -35243,6 +44603,174 @@ components: - op: replace path: /order/purchaseOrderNumber value: PO-98765 + InterconnectCreate: + value: + type: XF_IC + name: test ic sv + description: test interconnect + location: + metroCode: SV + package: + code: BASIC + order: + termLength: 1 + account: + accountNumber: 456789 + project: + projectId: ae708bbb-d669-406a-845a-99b39ff65fd0 + notifications: + - type: NOTIFICATIONS + emails: + - abc@test.com + InterconnectResponse: + value: + href: https://api.equinix.com/fabric/v4/interconnects/34085b91-2ea3-4578-bc1f-bbd526b57885 + uuid: 34085b91-2ea3-4578-bc1f-bbd526b57885 + type: XF_IC + name: test ic sv + description: test interconnect + state: PROVISIONING + location: + href: https://api.equinix.com/fabric/v4/metros/SV + metroCode: SV + usedBandwidth: 0 + package: + href: https://api.equinix.com/fabric/v4/interconnectPackages/BASIC + code: BASIC + router: + href: https://api.equinix.com/fabric/v4/routers/24884a4e-bb47-403a-9426-a1b766305226 + type: IC_ROUTER + uuid: 24884a4e-bb47-403a-9426-a1b766305226 + order: + termLength: 1 + account: + accountNumber: 456789 + project: + projectId: ae708bbb-d669-406a-845a-99b39ff65fd0 + notifications: + - type: NOTIFICATIONS + emails: + - test@test.com + - abc@test.com + changeLog: + createdId: 1111 + createdDateTime: 2026-01-15T08:00:00Z + InterconnectDeleteResponse: + value: + href: https://api.equinix.com/fabric/v4/interconnects/34085b91-2ea3-4578-bc1f-bbd526b57885 + uuid: 34085b91-2ea3-4578-bc1f-bbd526b57885 + type: XF_IC + name: test ic sv + description: test interconnect + state: DEPROVISIONED + location: + href: https://api.equinix.com/fabric/v4/metros/SV + metroCode: SV + usedBandwidth: 0 + package: + href: https://api.equinix.com/fabric/v4/interconnectPackages/BASIC + code: BASIC + router: + href: https://api.equinix.com/fabric/v4/routers/24884a4e-bb47-403a-9426-a1b766305226 + type: IC_ROUTER + uuid: 24884a4e-bb47-403a-9426-a1b766305226 + order: + termLength: 1 + account: + accountNumber: 456789 + project: + projectId: ae708bbb-d669-406a-845a-99b39ff65fd0 + changeLog: + createdBy: johnsmith + createdDateTime: 2026-01-15T08:00:00Z + updatedBy: johnsmith + updatedDateTime: 2026-07-24T10:30:00Z + deletedBy: johndoe + deletedDateTime: 2026-07-24T10:30:00Z + InterconnectSearchRequest: + value: + filter: + and: + - property: /project/projectId + operator: IN + values: + - ae708bbb-d669-406a-845a-99b39ff65fd0 + - property: /state + operator: IN + values: + - PROVISIONED + pagination: + offset: 0 + limit: 20 + sort: + - direction: DESC + property: /changeLog/createdDateTime + InterconnectSearchResponse: + value: + pagination: + total: 1 + offset: 0 + limit: 20 + sort: + - property: /changeLog/createdDateTime + direction: DESC + data: + - href: https://api.equinix.com/fabric/v4/interconnects/34085b91-2ea3-4578-bc1f-bbd526b57885 + uuid: 34085b91-2ea3-4578-bc1f-bbd526b57885 + type: XF_IC + state: PROVISIONED + description: test interconnect + location: + href: https://api.equinix.com/fabric/v4/metros/SV + metroCode: SV + usedBandwidth: 2000 + package: + href: https://api.equinix.com/fabric/v4/interconnectPackages/BASIC + code: BASIC + router: + href: https://api.equinix.com/fabric/v4/routers/24884a4e-bb47-403a-9426-a1b766305226 + uuid: 24884a4e-bb47-403a-9426-a1b766305226 + type: IC_ROUTER + order: + termLength: 1 + account: + accountNumber: 456789 + project: + projectId: ae708bbb-d669-406a-845a-99b39ff65fd0 + notifications: + - type: NOTIFICATIONS + emails: + - test@test.com + changeLog: + createdBy: johnsmith + createdDateTime: 2026-01-15T08:00:00Z + interconnect-packages: + value: + data: + - href: https://api.equinix.com/fabric/v4/interconnectPackages/b3ceae25-fc42-4857-9aa8-bd72e0d063df + type: IC_PACKAGE + uuid: b3ceae25-fc42-4857-9aa8-bd72e0d063df + code: BASIC + description: string + routesMax: 1000 + bandwidthMax: 100000 + isRemote: true + - href: https://api.equinix.com/fabric/v4/interconnectPackages/d89066ca-7861-457c-9dc1-63f131af4179 + type: IC_PACKAGE + uuid: d89066ca-7861-457c-9dc1-63f131af4179 + code: STANDARD + description: string + routesMax: 2000 + bandwidthMax: 200000 + isRemote: true + - href: https://api.equinix.com/fabric/v4/interconnectPackages/ca1551cd-0364-4508-a969-6631c4bf9ea7 + type: IC_PACKAGE + uuid: ca1551cd-0364-4508-a969-6631c4bf9ea7 + code: PREMIUM + description: string + routesMax: 3000 + bandwidthMax: 400000 + isRemote: true IpBlockCreateEquinixApacRequest: value: prefixLength: 24 @@ -36008,6 +45536,22 @@ components: pagination: limit: 25 offset: 0 + ConnectionSearchByMaintenanceStatus: + value: + filter: + and: + - property: /operation/maintenanceStatus + operator: IN + values: + - SCHEDULED + - COMPLETED + - property: /operation/lockEnabled + operator: IN + values: + - true + pagination: + limit: 25 + offset: 0 VirtualConnectionProductEvplVcTypeFromColoToColo: value: filter: @@ -36366,6 +45910,46 @@ components: operator: IN values: - "10" + VirtualConnectionProductColoToColoWithGeoScope: + value: + filter: + and: + - property: /type + operator: = + values: + - VIRTUAL_CONNECTION_PRODUCT + - property: /connection/type + operator: = + values: + - EVPL_VC + - property: /connection/bandwidth + operator: IN + values: + - "100" + - property: /connection/aSide/accessPoint/type + operator: = + values: + - COLO + - property: /connection/aSide/accessPoint/location/metroCode + operator: = + values: + - CH + - property: /connection/aSide/accessPoint/port/settings/buyout + operator: = + values: + - "false" + - property: /connection/zSide/accessPoint/location/metroCode + operator: = + values: + - CH + - property: /connection/zSide/accessPoint/type + operator: = + values: + - COLO + - property: /connection/geoScope + operator: = + values: + - CONUS FabricCloudRouterProduct: value: filter: @@ -36610,39 +46194,39 @@ components: operator: = values: - CH3 - MetroConnectProduct: + OpticalConnectProduct: value: filter: and: - property: /type operator: = values: - - METRO_CONNECT_PRODUCT + - OPTICAL_CONNECT_PRODUCT - property: /account/accountNumber operator: = values: - "200551" - - property: /metroConnect/type + - property: /opticalConnect/type operator: = values: - - OPTICAL_MC - - property: /metroConnect/bandwidth + - OC + - property: /opticalConnect/bandwidth operator: = values: - "1000" - - property: /metroConnect/pathType + - property: /opticalConnect/pathType operator: = values: - PROTECTED - - property: /metroConnect/connectionDestinationType + - property: /opticalConnect/connectionDestinationType operator: = values: - COLO - - property: /metroConnect/aSide/location/ibxCode + - property: /opticalConnect/aSide/location/ibxCode operator: = values: - CH1 - - property: /metroConnect/zSide/location/ibxCode + - property: /opticalConnect/zSide/location/ibxCode operator: = values: - CH3 @@ -36844,27 +46428,28 @@ components: location: metroCode: CH ibx: CH3 - MetroConnect: + OpticalConnect: value: pagination: offset: 0 limit: 1 total: 1 data: - - type: METRO_CONNECT_PRODUCT + - type: OPTICAL_CONNECT_PRODUCT code: MC00007.PROD - name: Metro Connect Port Product - description: Metro Connect Port + name: Optical Connect Port Product + description: Optical Connect Port account: accountNumber: 200551 + orgId: 123 charges: - type: MONTHLY_RECURRING price: 500 - type: NON_RECURRING price: 0 currency: USD - metroConnect: - type: OPTICAL_MC + opticalConnect: + type: OC bandwidth: 1000 pathType: PROTECTED connectionDestinationType: COLO @@ -37211,19 +46796,6 @@ components: supportedBandwidths: - 100 - 500 - lastMileCatalogs: - - name: att fiber - webUrl: att.com/lastmile - offerings: - - bandwidth: 10 - price: - unit: USD - min: 10 - max: 100 - deliveryDate: - min: 1 - max: 10 - unit: DAYS ServiceProfileCreate-CRH: value: name: Service Profile 1 @@ -37269,6 +46841,87 @@ components: supportedBandwidths: - 100 - 500 + LmaasServiceProfileCreate: + value: + name: Last Mile Service Profile 1 + description: Sample Last Mile Service Profile + type: LMAAS_PROFILE + notifications: + - emails: + - someone@sample.com + type: QUOTE_NOTIFICATIONS + tags: [] + visibility: PUBLIC + customFields: [] + allowedEmails: [] + ports: + - type: XF_PORT + uuid: c4d9350e-780f-80fd-1ce0-306a5c00a600 + location: + metroCode: DC + crossConnectId: ECX.03.00000962 + lastMileConfig: + productCatalogs: + - id: sample-product-offering-id + name: Sample Product Offering + webUrl: https://www.example.com/lastmile + deliveryDate: + min: 10 + max: 30 + unit: DAYS + offerings: + - bandwidth: 50 + price: + unit: USD + min: 100 + max: 500 + - bandwidth: 100 + price: + unit: USD + min: 200 + max: 500 + - bandwidth: 200 + price: + unit: USD + min: 300 + max: 500 + - bandwidth: 1000 + price: + unit: USD + min: 1000 + max: 2000 + accessPointTypeConfigs: + - type: COLO + linkProtocolConfig: + encapsulationStrategy: null + namedTags: [] + reuseVlanSTag: false + enableAutoGenerateServiceKey: false + apiConfig: + equinixManagedPort: false + equinixManagedVlan: false + allowOverSubscription: false + overSubscriptionLimit: 1 + apiAvailable: false + integrationId: "" + bandwidthFromApi: false + authenticationKey: + required: false + allowRemoteConnections: true + supportedBandwidths: + - 10 + - 50 + - 200 + - 500 + - 1000 + allowCustomBandwidth: false + connectionLabel: Connection + allowBandwidthAutoApproval: false + connectionRedundancyRequired: false + selectiveRedundancy: true + marketingInfo: + processSteps: [] + promotion: true ServiceProfileCreateResponse: value: state: PENDING_APPROVAL @@ -37335,19 +46988,96 @@ components: - code: SY ibxs: - SY4 - lastMileCatalogs: - - name: att fiber - webUrl: att.com/lastmile - offerings: - - bandwidth: 10 - price: - unit: USD - min: 10 - max: 100 - deliveryDate: - min: 1 - max: 10 - unit: DAYS + LmaasServiceProfileCreateResponse: + value: + href: https://api.equinix.com/fabric/v4/serviceProfiles/e36b0f9b-6080-4909-90a7-d5e3623d00d1 + uuid: e36b0f9b-6080-4909-90a7-d5e3623d00d1 + name: Last Mile Service Profile 1 + description: Sample Last Mile Service Profile + type: LMAAS_PROFILE + notifications: + - emails: + - someone@sample.com + type: QUOTE_NOTIFICATIONS + tags: [] + visibility: PUBLIC + customFields: [] + allowedEmails: [] + ports: + - type: XF_PORT + uuid: c4d9350e-780f-80fd-1ce0-306a5c00a600 + location: + metroCode: DC + crossConnectId: ECX.03.00000962 + lastMileConfig: + apiIntegration: + siteValidationEnabled: false + dataCenterLocationEnabled: false + productOfferingEnabled: false + poqEnabled: false + quoteEnabled: false + placeOrderEnabled: false + productCatalogs: + - id: sample-product-offering-id + name: Sample Product Offering + webUrl: https://www.example.com/lastmile + deliveryDate: + min: 10 + max: 30 + unit: DAYS + offerings: + - bandwidth: 50 + price: + unit: USD + min: 100 + max: 500 + - bandwidth: 100 + price: + unit: USD + min: 200 + max: 500 + - bandwidth: 200 + price: + unit: USD + min: 300 + max: 500 + - bandwidth: 1000 + price: + unit: USD + min: 1000 + max: 2000 + accessPointTypeConfigs: + - type: COLO + linkProtocolConfig: + encapsulationStrategy: null + namedTags: [] + reuseVlanSTag: false + enableAutoGenerateServiceKey: false + apiConfig: + equinixManagedPort: false + equinixManagedVlan: false + allowOverSubscription: false + overSubscriptionLimit: 1 + apiAvailable: false + integrationId: "" + bandwidthFromApi: false + authenticationKey: + required: false + allowRemoteConnections: true + supportedBandwidths: + - 10 + - 50 + - 200 + - 500 + - 1000 + allowCustomBandwidth: false + connectionLabel: Connection + allowBandwidthAutoApproval: false + connectionRedundancyRequired: false + selectiveRedundancy: true + marketingInfo: + processSteps: [] + promotion: true sp-403-create: value: - errorCode: EQ-3001036 @@ -37619,6 +47349,121 @@ components: ibxs: - SY4 displayName: Sydney + LmaasServiceProfileResponse: + value: + state: ACTIVE + account: + orgId: 90925 + organizationName: Sample Organization + globalOrgId: 0017i000011X23ZAAS + project: + projectId: ac4d34ca-0d9c-4bc2-9aab-1234567abcde + changeLog: + createdBy: sampleuser + createdByFullName: Sample User + createdByEmail: someone@sample.com + createdDateTime: 2026-01-01T00:00:00.000Z + updatedBy: sampleuser + updatedByFullName: Sample User + updatedByEmail: someone@sample.com + updatedDateTime: 2026-01-01T00:00:00.000Z + href: https://api.equinix.com/fabric/v4/serviceProfiles/e36b0f9b-6080-4909-90a7-d5e3623d00d1 + uuid: e36b0f9b-6080-4909-90a7-d5e3623d00d1 + type: LMAAS_PROFILE + name: Last Mile Service Profile 1 + description:

Sample Last Mile Service Profile

+ notifications: + - type: QUOTE_NOTIFICATIONS + emails: + - someone@sample.com + visibility: PUBLIC + customFields: + - label: Account Id + description: Provider Portal User ID + required: true + dataType: NUMBER + captureInEmail: false + ports: + - type: XF_PORT + uuid: c4d9350e-780f-80fd-1ce0-306a5c00a600 + location: + metroCode: DC + crossConnectId: ECX.03.00000962 + metros: + - code: DC + name: Ashburn + ibxs: + - DC6 + - DC5 + displayName: Ashburn + accessPointTypeConfigs: + - uuid: d2d8105b-da0c-4b09-92d7-2584a85cbb33 + type: COLO + supportedBandwidths: + - 10 + - 50 + - 200 + - 500 + - 1000 + allowRemoteConnections: true + allowCustomBandwidth: false + allowBandwidthAutoApproval: false + linkProtocolConfig: + reuseVlanSTag: false + encapsulation: DOT1Q + enableAutoGenerateServiceKey: false + connectionRedundancyRequired: false + selectiveRedundancy: true + apiConfig: + apiAvailable: false + integrationId: "" + equinixManagedPort: false + equinixManagedVlan: false + allowOverSubscription: false + overSubscriptionLimit: 1 + bandwidthFromApi: false + connectionLabel: Connection + authenticationKey: + required: false + marketingInfo: + promotion: true + lastMileConfig: + apiIntegration: + siteValidationEnabled: false + dataCenterLocationEnabled: false + productOfferingEnabled: false + poqEnabled: false + quoteEnabled: false + placeOrderEnabled: false + productCatalogs: + - id: Sample-product-offering-id + name: Sample Product Offering + webUrl: https://www.example.com/lastmile + deliveryDate: + unit: DAYS + min: 10 + max: 90 + offerings: + - bandwidth: 50 + price: + unit: USD + min: 100 + max: 500 + - bandwidth: 100 + price: + unit: USD + min: 200 + max: 500 + - bandwidth: 500 + price: + unit: USD + min: 500 + max: 1000 + - bandwidth: 1000 + price: + unit: USD + min: 1000 + max: 2000 ServiceProfileUpdate: value: name: Service Profile 2 @@ -38019,6 +47864,44 @@ components: createdDateTime: 2026-03-04T10:30:00Z updatedBy: adminuser updatedDateTime: 2026-03-04T10:35:00Z + ServiceProfileEnvironmentsResponse: + value: + data: + - href: https://api.equinix.com/fabric/v4/serviceProfiles/23ad37d0-6b1c-4d1f-a4eb-9f3d68fbe4fd/environments/6ad498b5-d929-44ac-a199-ce9f0d31d9ac + uuid: 6ad498b5-d929-44ac-a199-ce9f0d31d9ac + type: IC_ENV + name: US West 1 – Production + description: Primary production environment + region: us-west-1 + metros: + - code: CH + name: Chicago + displayName: Chicago + - code: DC + name: Ashburn + displayName: Ashburn + supportedBandwidths: + - 1000 + - 10000 + - 100000 + - href: https://api.equinix.com/fabric/v4/serviceProfiles/23ad37d0-6b1c-4d1f-a4eb-9f3d68fbe4fd/environments/1ad498b5-d929-44ac-a199-ce9f0d31d9ab + uuid: 1ad498b5-d929-44ac-a199-ce9f0d31d9ab + type: IC_ENV + name: US East 1 – Production + description: Primary production environment + region: us-east-1 + metros: + - href: https://api.equinix.com/fabric/v4/metros/DC + metroCode: DC + type: XF_METRO + supportedBandwidths: + - 1000 + - 10000 + - 100000 + pagination: + offset: 0 + limit: 2 + total: 2 getServiceToken: value: href: http://api.equinix.com/fabric/v4/serviceTokens/13ab7dc7-c18e-4f73-aa35-fc3a83966e79 @@ -38823,15 +48706,16 @@ components: values: - 407f8239-254c-4fe2-a378-458f197e17c4 ColoOpticalConnectCreate: + description: Both ends terminate on patch panels in colocation space you occupy, so no Letter of Authorization is needed. value: - type: MC + type: OC bandwidth: 100000 connectionDestinationType: COLO pathType: UNPROTECTED aSide: patchPanelId: CP:Demarc:1259684 - patchPanelPortA: null - patchPanelPortB: null + patchPanelPortA: "9" + patchPanelPortB: "10" connectorType: SC zSide: patchPanelId: PP:Demarc:1259684 @@ -38839,20 +48723,17 @@ components: patchPanelPortB: "11" connectorType: SC order: - purchaseOrderNumber: 156576 - project: - projectId: 8f23b36f-db8f-44c8-a6e5-606e1b485931 - account: - accountNumber: 270848 + purchaseOrderNumber: "156576" notifications: - - type: ALL + - type: NOTIFICATION emails: - test@test.com - registeredUsers: - - test@test.com RemoteOpticalConnectCreate: + description: |- + The Z-side is identified by IBX code and the Letter of Authorization + issued by the destination customer. value: - type: MC + type: OC bandwidth: 100000 connectionDestinationType: REMOTE pathType: UNPROTECTED @@ -38867,23 +48748,19 @@ components: loa: uuid: 64de7e5-7fe7-41e6-b984-80d5aa159a0e order: - purchaseOrderNumber: 156576 - project: - projectId: 8f23b36f-db8f-44c8-a6e5-606e1b485931 - account: - accountNumber: 270848 + purchaseOrderNumber: "156576" notifications: - - type: ALL + - type: NOTIFICATION emails: - test@test.com - registeredUsers: - - test@test.com BMMROpticalConnectCreate: + description: The Z-side is identified by location and Letter of Authorization.
bmmrType declares who operates the meet-me room. value: - type: MC + type: OC bandwidth: 100000 connectionDestinationType: BMMR pathType: UNPROTECTED + bmmrType: EQUINIX aSide: patchPanelId: PP:Demarc:1259684 patchPanelPortA: "10" @@ -38894,24 +48771,18 @@ components: ibxCode: SV2 loa: uuid: 64de7e5-7fe7-41e6-b984-80d5aa159a0e - bmmrType: EQUINIX order: - purchaseOrderNumber: 156576 - project: - projectId: 8f23b36f-db8f-44c8-a6e5-606e1b485931 - account: - accountNumber: 270848 + purchaseOrderNumber: "156576" notifications: - - type: ALL + - type: NOTIFICATION emails: - test@test.com - registeredUsers: - - test@test.com ColoOpticalConnectResponseExample: + summary: COLO connection value: href: https://api.equinix.com/fabric/v4/opticalConnects/06dbb0e3-e55d-4090-8aff-fc5654abaad0 uuid: 06dbb0e3-e55d-4090-8aff-fc5654abaad0 - type: MC + type: OC name: 270848-SV1-SV2-01 state: PROVISIONING bandwidth: 100000 @@ -38936,28 +48807,26 @@ components: location: ibxCode: SV2 order: - purchaseOrderNumber: 156576 + purchaseOrderNumber: "156576" orderNumber: 1-129105284100 - project: - projectId: 8f23b36f-db8f-44c8-a6e5-606e1b485931 account: accountNumber: 270848 + orgId: 123 notifications: - - type: ALL + - type: NOTIFICATION emails: - test@test.com - registeredUsers: - - test@test.com changeLog: createdByEmail: abc@xyz.com createdDateTime: 2025-07-24T06:50:46Z updatedByEmail: abc@xyz.com updatedDateTime: 2025-07-24T06:51:46Z RemoteOpticalConnectResponseExample: + summary: Remote connection value: href: https://api.equinix.com/fabric/v4/opticalConnects/06dbb0e3-e55d-4090-8aff-fc5654abaad0 uuid: 06dbb0e3-e55d-4090-8aff-fc5654abaad0 - type: MC + type: OC name: 270848-SV1-SV2-01 state: PROVISIONING bandwidth: 100000 @@ -38978,28 +48847,26 @@ components: loa: uuid: 64de7e5-7fe7-41e6-b984-80d5aa159a0e order: - purchaseOrderNumber: 156576 + purchaseOrderNumber: "156576" orderNumber: 1-129105284100 - project: - projectId: 8f23b36f-db8f-44c8-a6e5-606e1b485931 account: accountNumber: 270848 + orgId: 123 notifications: - - type: ALL + - type: NOTIFICATION emails: - test@test.com - registeredUsers: - - test@test.com changeLog: createdByEmail: abc@xyz.com createdDateTime: 2025-07-24T06:50:46Z updatedByEmail: abc@xyz.com updatedDateTime: 2025-07-24T06:51:46Z BMMROpticalConnectResponseExample: + summary: BMMR connection value: href: https://api.equinix.com/fabric/v4/opticalConnects/06dbb0e3-e55d-4090-8aff-fc5654abaad0 uuid: 06dbb0e3-e55d-4090-8aff-fc5654abaad0 - type: MC + type: OC name: 270848-SV1-SV2-01 state: PROVISIONING bandwidth: 100000 @@ -39021,27 +48888,54 @@ components: loa: uuid: 64de7e5-7fe7-41e6-b984-80d5aa159a0e order: - purchaseOrderNumber: 156576 + purchaseOrderNumber: "156576" orderNumber: 1-129105284100 - project: - projectId: 8f23b36f-db8f-44c8-a6e5-606e1b485931 account: accountNumber: 270848 + orgId: 123 notifications: - - type: ALL + - type: NOTIFICATION emails: - test@test.com - registeredUsers: - - test@test.com changeLog: createdByEmail: abc@xyz.com createdDateTime: 2025-07-24T06:50:46Z updatedByEmail: abc@xyz.com updatedDateTime: 2025-07-24T06:51:46Z + OpticalConnect_400: + summary: Unknown or inaccessible connection. + value: + - errorCode: EQ-3057103 + errorMessage: Optical Connect Service does not exist or does not belong to the user.Please check Optical Connect UUID + correlationId: cebc3d33-9037-4a2b-a7af-0ad65602cdec + details: Optical Connect Service does not exist or does not belong to the user.Please check Optical Connect UUID + OpticalConnect_403: + summary: Operation not permitted + value: + - errorCode: EQ-3057102 + errorMessage: Operation not allowed + correlationId: c82ff3bc-de07-47e5-b3ec-53a009d01515 + details: Operation not allowed for current user + OpticalConnect_404: + summary: Optical connection not found + value: + - errorCode: EQ-3057101 + errorMessage: Optical Connect Service not found or already deleted + correlationId: c82ff3bc-de07-47e5-b3ec-53a009d01515 + details: Optical Connect Service not found or already deleted + OpticalConnect_500: + summary: Unexpected server error + value: + - errorCode: EQ-3057104 + errorMessage: Internal Server Error + correlationId: c82ff3bc-de07-47e5-b3ec-53a009d01515 + details: Internal Server Error ColoOpticalConnectBulkCreate: + summary: COLO diverse pair + description: Two connections on separate patch panels. Equinix assigns the shared redundancy group and returns it on both connections. value: data: - - type: MC + - type: OC bandwidth: 100000 connectionDestinationType: COLO pathType: DUAL_DIVERSE @@ -39057,15 +48951,13 @@ components: patchPanelPortA: "10" patchPanelPortB: "11" connectorType: SC - project: - projectId: 8f23b36f-db8f-44c8-a6e5-606e1b485931 - account: - accountNumber: 270848 notifications: - - type: ALL + - type: NOTIFICATION emails: - test@test.com - - type: MC + registeredUsers: + - test + - type: OC bandwidth: 100000 connectionDestinationType: COLO pathType: DUAL_DIVERSE @@ -39081,18 +48973,14 @@ components: patchPanelPortA: "14" patchPanelPortB: "15" connectorType: SC - project: - projectId: 8f23b36f-db8f-44c8-a6e5-606e1b485931 - account: - accountNumber: 270848 notifications: - - type: ALL + - type: NOTIFICATION emails: - test@test.com RemoteOpticalConnectBulkCreate: value: data: - - type: MC + - type: OC bandwidth: 100000 connectionDestinationType: REMOTE pathType: DUAL_DIVERSE @@ -39108,15 +48996,15 @@ components: ibxCode: SV2 loa: uuid: 64de7e5-7fe7-41e6-b984-80d5aa159a0e - project: - projectId: 8f23b36f-db8f-44c8-a6e5-606e1b485931 account: accountNumber: 270848 notifications: - - type: ALL + - type: NOTIFICATION emails: - test@test.com - - type: MC + registeredUsers: + - test@test.com + - type: OC bandwidth: 100000 connectionDestinationType: REMOTE pathType: DUAL_DIVERSE @@ -39132,18 +49020,16 @@ components: ibxCode: SV2 loa: uuid: e9e2a1b6-8d4f-4c3e-8b2a-5f1d6e7a9c59 - project: - projectId: 8f23b36f-db8f-44c8-a6e5-606e1b485931 account: accountNumber: 270848 notifications: - - type: ALL + - type: NOTIFICATION emails: - test@test.com BMMROpticalConnectBulkCreate: value: data: - - type: MC + - type: OC bandwidth: 100000 connectionDestinationType: BMMR pathType: DUAL_DIVERSE @@ -39160,15 +49046,15 @@ components: ibxCode: SV2 loa: uuid: 64de7e5-7fe7-41e6-b984-80d5aa159a0e - project: - projectId: 8f23b36f-db8f-44c8-a6e5-606e1b485931 account: accountNumber: 270848 notifications: - - type: ALL + - type: NOTIFICATION emails: - test@test.com - - type: MC + registeredUsers: + - test@test.com + - type: OC bandwidth: 100000 connectionDestinationType: BMMR pathType: DUAL_DIVERSE @@ -39185,67 +49071,10 @@ components: ibxCode: SV2 loa: uuid: e9e2a1b6-8d4f-4c3e-8b2a-5f1d6e7a9c59 - project: - projectId: 8f23b36f-db8f-44c8-a6e5-606e1b485931 account: accountNumber: 270848 notifications: - - type: ALL - emails: - - test@test.com - ColoOpticalConnectBulkCreateWithPurchaseOrder: - value: - data: - - type: MC - bandwidth: 100000 - connectionDestinationType: COLO - pathType: DUAL_DIVERSE - redundancy: - priority: PRIMARY - aSide: - patchPanelId: CP:Demarc:1259684 - patchPanelPortA: "10" - patchPanelPortB: "11" - connectorType: SC - zSide: - patchPanelId: CP:Demarc:1259684 - patchPanelPortA: "10" - patchPanelPortB: "11" - connectorType: SC - order: - purchaseOrderNumber: 156576 - project: - projectId: 8f23b36f-db8f-44c8-a6e5-606e1b485931 - account: - accountNumber: 270848 - notifications: - - type: ALL - emails: - - test@test.com - - type: MC - bandwidth: 100000 - connectionDestinationType: COLO - pathType: DUAL_DIVERSE - redundancy: - priority: SECONDARY - aSide: - patchPanelId: PP:Demarc:1260379 - patchPanelPortA: "14" - patchPanelPortB: "15" - connectorType: SC - zSide: - patchPanelId: PP:Demarc:1260379 - patchPanelPortA: "14" - patchPanelPortB: "15" - connectorType: SC - order: - purchaseOrderNumber: 156576 - project: - projectId: 8f23b36f-db8f-44c8-a6e5-606e1b485931 - account: - accountNumber: 270848 - notifications: - - type: ALL + - type: NOTIFICATION emails: - test@test.com ColoOpticalConnectBulkResponseExample: @@ -39253,7 +49082,7 @@ components: data: - href: https://api.equinix.com/fabric/v4/opticalConnects/06dbb0e3-e55d-4090-8aff-fc5654abaad0 uuid: 06dbb0e3-e55d-4090-8aff-fc5654abaad0 - type: MC + type: OC name: 270848-SV1-SV2-PRI-01 state: PROVISIONING bandwidth: 100000 @@ -39282,19 +49111,16 @@ components: ibxCode: SV2 order: orderNumber: 1-129105284100 - project: - projectId: 8f23b36f-db8f-44c8-a6e5-606e1b485931 account: accountNumber: 270848 + orgId: 123 notifications: - - type: ALL + - type: NOTIFICATION emails: - test@test.com - registeredUsers: - - test@test.com - href: https://api.equinix.com/fabric/v4/opticalConnects/a6f77b33-96c6-4eeb-8d79-76374d950603 uuid: a6f77b33-96c6-4eeb-8d79-76374d950603 - type: MC + type: OC name: 270848-SV1-SV2-SEC-02 state: PROVISIONING bandwidth: 100000 @@ -39323,22 +49149,19 @@ components: ibxCode: SV2 order: orderNumber: 1-129105284100 - project: - projectId: 8f23b36f-db8f-44c8-a6e5-606e1b485931 account: accountNumber: 270848 + orgId: 123 notifications: - - type: ALL + - type: NOTIFICATION emails: - test@test.com - registeredUsers: - - test@test.com RemoteOpticalConnectBulkResponseExample: value: data: - href: https://api.equinix.com/fabric/v4/opticalConnects/06dbb0e3-e55d-4090-8aff-fc5654abaad0 uuid: 06dbb0e3-e55d-4090-8aff-fc5654abaad0 - type: MC + type: OC name: 270848-SV1-SV2-PRI-01 state: PROVISIONING bandwidth: 100000 @@ -39363,19 +49186,16 @@ components: uuid: 64de7e5-7fe7-41e6-b984-80d5aa159a0e order: orderNumber: 1-129105284100 - project: - projectId: 8f23b36f-db8f-44c8-a6e5-606e1b485931 account: accountNumber: 270848 + orgId: 123 notifications: - - type: ALL + - type: NOTIFICATION emails: - test@test.com - registeredUsers: - - test@test.com - href: https://api.equinix.com/fabric/v4/opticalConnects/c9e2a1b6-7d4f-4c3e-8b2a-5f1d6e7a9c58 uuid: c9e2a1b6-7d4f-4c3e-8b2a-5f1d6e7a9c58 - type: MC + type: OC name: 270848-SV1-SV2-SEC-02 state: PROVISIONING bandwidth: 100000 @@ -39400,22 +49220,19 @@ components: uuid: e9e2a1b6-8d4f-4c3e-8b2a-5f1d6e7a9c59 order: orderNumber: 1-129105284100 - project: - projectId: 8f23b36f-db8f-44c8-a6e5-606e1b485931 account: accountNumber: 270848 + orgId: 123 notifications: - - type: ALL + - type: NOTIFICATION emails: - test@test.com - registeredUsers: - - test@test.com BMMROpticalConnectBulkResponseExample: value: data: - href: https://api.equinix.com/fabric/v4/opticalConnects/06dbb0e3-e55d-4090-8aff-fc5654abaad0 uuid: 06dbb0e3-e55d-4090-8aff-fc5654abaad0 - type: MC + type: OC name: 270848-SV1-SV2-PRI-01 state: PROVISIONING bandwidth: 100000 @@ -39441,19 +49258,16 @@ components: uuid: 64de7e5-7fe7-41e6-b984-80d5aa159a0e order: orderNumber: 1-129105284100 - project: - projectId: 8f23b36f-db8f-44c8-a6e5-606e1b485931 account: accountNumber: 270848 + orgId: 123 notifications: - - type: ALL + - type: NOTIFICATION emails: - test@test.com - registeredUsers: - - test@test.com - href: https://api.equinix.com/fabric/v4/opticalConnects/c9e2a1b6-7d4f-4c3e-8b2a-5f1d6e7a9c58 uuid: c9e2a1b6-7d4f-4c3e-8b2a-5f1d6e7a9c58 - type: MC + type: OC name: 270848-SV1-SV2-SEC-02 state: PROVISIONING bandwidth: 100000 @@ -39479,132 +49293,18 @@ components: uuid: e9e2a1b6-8d4f-4c3e-8b2a-5f1d6e7a9c59 order: orderNumber: 1-129105284100 - project: - projectId: 8f23b36f-db8f-44c8-a6e5-606e1b485931 account: accountNumber: 270848 + orgId: 123 notifications: - - type: ALL - emails: - - test@test.com - registeredUsers: - - test@test.com - ColoOpticalConnectBulkResponseWithPurchaseOrderExample: - value: - data: - - href: https://api.equinix.com/fabric/v4/opticalConnects/06dbb0e3-e55d-4090-8aff-fc5654abaad0 - uuid: 06dbb0e3-e55d-4090-8aff-fc5654abaad0 - type: MC - name: 270848-SV1-SV2-PRI-01 - state: PROVISIONING - bandwidth: 100000 - connectionDestinationType: COLO - pathType: DUAL_DIVERSE - redundancy: - priority: PRIMARY - group: 22f8e668-4754-4564-825d-d1c7889c885a - aSide: - patchPanelId: CP:Demarc:1259684 - patchPanelPortA: "10" - patchPanelPortB: "11" - connectorType: SC - cageUniqueSpaceId: SV1:01:002174 - cabinetUniqueSpaceId: Demarc - location: - ibxCode: SV1 - zSide: - patchPanelId: CP:Demarc:1259684 - patchPanelPortA: "10" - patchPanelPortB: "11" - connectorType: SC - cageUniqueSpaceId: SV1:01:002174 - cabinetUniqueSpaceId: Demarc - location: - ibxCode: SV2 - order: - purchaseOrderNumber: 156576 - orderNumber: 1-129105284100 - project: - projectId: 8f23b36f-db8f-44c8-a6e5-606e1b485931 - account: - accountNumber: 270848 - notifications: - - type: ALL - emails: - - test@test.com - registeredUsers: - - test@test.com - - href: https://api.equinix.com/fabric/v4/opticalConnects/a6f77b33-96c6-4eeb-8d79-76374d950603 - uuid: a6f77b33-96c6-4eeb-8d79-76374d950603 - type: MC - name: 270848-SV1-SV2-SEC-02 - state: PROVISIONING - bandwidth: 100000 - connectionDestinationType: COLO - pathType: DUAL_DIVERSE - redundancy: - priority: SECONDARY - group: 22f8e668-4754-4564-825d-d1c7889c885a - aSide: - patchPanelId: PP:Demarc:1260379 - patchPanelPortA: "14" - patchPanelPortB: "15" - connectorType: SC - cageUniqueSpaceId: SV1:01:002174 - cabinetUniqueSpaceId: Demarc - location: - ibxCode: SV1 - zSide: - patchPanelId: PP:Demarc:1260379 - patchPanelPortA: "14" - patchPanelPortB: "15" - connectorType: SC - cageUniqueSpaceId: SV1:01:002174 - cabinetUniqueSpaceId: Demarc - location: - ibxCode: SV2 - order: - purchaseOrderNumber: 156576 - orderNumber: 1-129105284100 - project: - projectId: 8f23b36f-db8f-44c8-a6e5-606e1b485931 - account: - accountNumber: 270848 - notifications: - - type: ALL + - type: NOTIFICATION emails: - test@test.com - registeredUsers: - - test@test.com - OpticalConnect_400: - value: - - errorCode: EQ-3057103 - errorMessage: Optical Connect Service does not exist or does not belong to the user.Please check Optical Connect UUID - correlationId: cebc3d33-9037-4a2b-a7af-0ad65602cdec - details: Optical Connect Service does not exist or does not belong to the user.Please check Optical Connect UUID - OpticalConnect_403: - value: - - errorCode: EQ-3057102 - errorMessage: Operation not allowed - correlationId: c82ff3bc-de07-47e5-b3ec-53a009d01515 - details: Operation not allowed for current user - OpticalConnect_404: - value: - - errorCode: EQ-3057101 - errorMessage: Optical Connect Service not found or already deleted - correlationId: c82ff3bc-de07-47e5-b3ec-53a009d01515 - details: Optical Connect Service not found or already deleted - OpticalConnect_500: - value: - - errorCode: EQ-3057104 - errorMessage: Internal Server Error - correlationId: c82ff3bc-de07-47e5-b3ec-53a009d01515 - details: Internal Server Error ColoOpticalConnectResponseDeprovisioningExample: value: href: https://api.equinix.com/fabric/v4/opticalConnects/06dbb0e3-e55d-4090-8aff-fc5654abaad0 uuid: 06dbb0e3-e55d-4090-8aff-fc5654abaad0 - type: MC + type: OC name: 270848-SV1-SV2-01 state: DEPROVISIONING bandwidth: 100000 @@ -39629,18 +49329,15 @@ components: location: ibxCode: SV2 order: - purchaseOrderNumber: 156576 + purchaseOrderNumber: "156576" orderNumber: 1-129105284100 - project: - projectId: 8f23b36f-db8f-44c8-a6e5-606e1b485931 account: accountNumber: 270848 + orgId: 123 notifications: - - type: ALL + - type: NOTIFICATION emails: - test@test.com - registeredUsers: - - test@test.com changeLog: createdByEmail: abc@xyz.com createdDateTime: 2025-07-24T06:50:46Z @@ -39650,7 +49347,7 @@ components: value: href: https://api.equinix.com/fabric/v4/opticalConnects/06dbb0e3-e55d-4090-8aff-fc5654abaad0 uuid: 06dbb0e3-e55d-4090-8aff-fc5654abaad0 - type: MC + type: OC name: 270848-SV1-SV2-01 state: DEPROVISIONING bandwidth: 100000 @@ -39671,23 +49368,20 @@ components: loa: uuid: 64de7e5-7fe7-41e6-b984-80d5aa159a0e order: - purchaseOrderNumber: 156576 + purchaseOrderNumber: "156576" orderNumber: 1-129105284100 - project: - projectId: 8f23b36f-db8f-44c8-a6e5-606e1b485931 account: accountNumber: 270848 + orgId: 123 notifications: - - type: ALL + - type: NOTIFICATION emails: - test@test.com - registeredUsers: - - test@test.com BMMROpticalConnectResponseDeprovisioningExample: value: href: https://api.equinix.com/fabric/v4/opticalConnects/06dbb0e3-e55d-4090-8aff-fc5654abaad0 uuid: 06dbb0e3-e55d-4090-8aff-fc5654abaad0 - type: MC + type: OC name: 270848-SV1-SV2-01 state: DEPROVISIONING bandwidth: 100000 @@ -39709,24 +49403,22 @@ components: loa: uuid: 64de7e5-7fe7-41e6-b984-80d5aa159a0e order: - purchaseOrderNumber: 156576 + purchaseOrderNumber: "156576" orderNumber: 1-129105284100 - project: - projectId: 8f23b36f-db8f-44c8-a6e5-606e1b485931 account: accountNumber: 270848 + orgId: 123 notifications: - - type: ALL + - type: NOTIFICATION emails: - test@test.com - registeredUsers: - - test@test.com changeLog: createdByEmail: abc@xyz.com createdDateTime: 2025-07-24T06:50:46Z updatedByEmail: abc@xyz.com updatedDateTime: 2025-07-24T06:51:46Z SearchOpticalConnectFilterByStatus: + summary: All provisioned connections value: filter: and: @@ -39734,10 +49426,6 @@ components: operator: = values: - PROVISIONED - - property: /project/projectId - operator: = - values: - - 66a2d2f7-b79b-49bc-8642-d2b3c1c138b4 pagination: offset: 0 limit: 20 @@ -39745,6 +49433,7 @@ components: - direction: DESC property: /changeLog/updatedDateTime SearchOpticalConnectByName: + summary: A named connection of a given type value: filter: and: @@ -39755,11 +49444,7 @@ components: - property: /type operator: = values: - - MC - - property: /project/projectId - operator: = - values: - - 8f23b36f-db8f-44c8-a6e5-606e1b485931 + - OC pagination: offset: 0 limit: 20 @@ -39767,6 +49452,8 @@ components: - direction: DESC property: /changeLog/updatedDateTime SearchOpticalConnectFilterOrAnd: + summary: Partial match on uuid or name + description: An OR group nested inside the top-level AND — matches circuits whose uuid starts with the given prefix, or whose name is like the value. value: filter: and: @@ -39778,12 +49465,9 @@ components: - property: /name operator: LIKE values: - - fmc-service - - property: /project/projectId - operator: = - values: - - 8f23b36f-db8f-44c8-a6e5-606e1b485931 + - 270848-SV1-SV2-01 OpticalConnectSearchResponseExample: + summary: One matching connection. value: pagination: offset: 20 @@ -39794,7 +49478,7 @@ components: data: - href: https://api.equinix.com/fabric/v4/opticalConnects/06dbb0e3-e55d-4090-8aff-fc5654abaad0 uuid: 06dbb0e3-e55d-4090-8aff-fc5654abaad0 - type: MC + type: OC name: 270848-SV1-SV2-01-1 state: PROVISIONING bandwidth: 100000 @@ -39818,18 +49502,15 @@ components: location: ibxCode: SV2 order: - purchaseOrderNumber: 156576 + purchaseOrderNumber: "156576" orderNumber: 1-129105284100 - project: - projectId: 8f23b36f-db8f-44c8-a6e5-606e1b485931 account: accountNumber: 270848 + orgId: 123 notifications: - - type: ALL + - type: NOTIFICATION emails: - test@test.com - registeredUsers: - - test@test.com changeLog: createdByEmail: abc@xyz.com createdDateTime: 2025-07-24T06:50:46Z @@ -39837,7 +49518,7 @@ components: updatedDateTime: 2025-07-24T06:51:46Z - href: https://api.equinix.com/fabric/v4/opticalConnects/07abb0e3-e67d-5090-9aff-fc5654abaae0 uuid: 07abb0e3-e67d-5090-9aff-fc5654abaae0 - type: MC + type: OC name: 270848-SV1-SV2-01-2 state: PROVISIONED bandwidth: 100000 @@ -39861,24 +49542,22 @@ components: location: ibxCode: SV2 order: - purchaseOrderNumber: 126758 + purchaseOrderNumber: "126758" orderNumber: 1-139105284200 - project: - projectId: 66a2d2f7-b79b-49bc-8642-d2b3c1c138b4 account: accountNumber: 280845 + orgId: 123 notifications: - - type: ALL + - type: NOTIFICATION emails: - test@test.com - registeredUsers: - - test@test.com changeLog: createdByEmail: abc@xyz.com createdDateTime: 2024-07-24T06:50:46Z updatedByEmail: abc@xyz.com updatedDateTime: 2024-07-24T06:51:46Z OpticalConnect_400_invalid_sorting: + summary: Invalid sort direction. value: - errorCode: EQ-3057105 errorMessage: Invalid value for sorting direction. @@ -39886,6 +49565,7 @@ components: additionalInfo: - reason: Only accept DESC and ASC for sorting direction. OpticalConnect_401: + summary: Missing or invalid credentials value: - errorCode: EQ-3057106 errorMessage: User not found in request or invalid. @@ -40172,6 +49852,8 @@ components: connectionCount: 1 evplVCCount: 1 accessVCCount: 0 + maintenanceStatus: SCHEDULED + lockEnabled: true account: accountNumber: 200558 accountName: Gen-L2-Qa-01-Auto-200558 @@ -42098,6 +51780,68 @@ components: ibx: DA1 operation: operationalStatus: UP + maintenanceScheduledPortByUUID: + value: + href: https://api.equinix.com/fabric/v4/ports/44c5712b-d704-4ca5-9b42-ee6be32ee06a + type: XF_PORT + uuid: 44c5712b-d704-4ca5-9b42-ee6be32ee06a + name: 270843-DA1-CX-PRI-33 + physicalPortsSpeed: 1000 + physicalPortsType: 1000BASE_LX + project: + projectId: 66a2d2f7-b79b-49bc-8642-d2b3c1c138b4 + package: + code: UNLIMITED + state: ACTIVE + connectivitySourceType: COLO + operation: + operationalStatus: UP + connectionCount: 10 + evplVCCount: 10 + accessVCCount: 0 + maintenanceStatus: SCHEDULED + lockEnabled: true + account: + accountNumber: 270843 + accountName: ctr-sit-account1 + orgId: 93055 + organizationName: ctr-sit-account1-270843 + ucmId: 64726950-A62C-4749-98E2-5AA4CA44284F + globalCustId: 0016u000003JZ3XAAW + changeLog: + createdBy: admin_user + createdDateTime: 2025-05-21T18:12:18.300Z + updatedBy: test_user + updatedDateTime: 2025-05-29T20:38:48.900Z + bandwidth: 1000 + availableBandwidth: 500 + usedBandwidth: 500 + location: + metroHref: https://api.equinix.com/fabric/v4/metros/DA + region: AMER + metroName: Dallas + metroCode: DA + ibx: DA1 + demarcationPointIbx: DA1 + tetherIbx: DA1 + redundancy: + priority: PRIMARY + encapsulation: + type: QINQ + tagProtocolId: 34984 + lagEnabled: false + physicalPorts: + - type: XF_PHYSICAL_PORT + state: ADDED + bandwidth: 0 + uuid: 0189244a-f3ac-7258-a8b4-3167af899305 + tether: + crossConnectId: "513213223" + ibx: DA1 + demarcationPoint: + ibx: DA1 + operation: + operationalStatus: UP portDryRunDelete: value: type: XF_PORT @@ -42672,6 +52416,22 @@ components: sort: - property: /changeLog/createdDateTime direction: DESC + portSearchByMaintenanceStatus: + value: + filter: + and: + - property: /operation/maintenanceStatus + operator: IN + values: + - SCHEDULED + - COMPLETED + - property: /operation/lockEnabled + operator: IN + values: + - true + pagination: + limit: 25 + offset: 0 portSearchInvalidProjectRequest: value: - errorCode: EQ-3046110 @@ -45162,97 +54922,6 @@ components: errorMessage: The provided subnet is not valid. details: The provided subnet is overlapping with other connections in the same Fabric Cloud Router. correlationId: 5f9f9ab9-a6cb-4e8a-aa34-105cd4cb6cc8 - GatewayAttachmentListResponse: - value: - pagination: - offset: 0 - limit: 10 - total: 1 - data: - - href: https://api.equinix.com/fabric/v4/routers/369c112f-1d8e-4ad1-ae85-7b03ddf4c728/gateways/3cacb007-1f0a-4686-8bf4-7cdcaf696e05 - uuid: 3cacb007-1f0a-4686-8bf4-7cdcaf696e05 - type: VPN_GATEWAY - attachmentStatus: ATTACHED - changeLog: - createdBy: testuser - createdByEmail: testuser@equinix.com - createdByFullName: testuser testuser - createdDateTime: 2020-05-21T10:30:00Z - GatewayAttachmentListErrorResponse: - value: - pagination: - offset: 0 - limit: 10 - total: 1 - data: - - href: https://api.equinix.com/fabric/v4/routers/369c112f-1d8e-4ad1-ae85-7b03ddf4c728/gateways/3cacb007-1f0a-4686-8bf4-7cdcaf696e05 - uuid: 3cacb007-1f0a-4686-8bf4-7cdcaf696e05 - type: VPN_GATEWAY - attachmentStatus: ATTACHED - errors: - - errorCode: EQ-3040085 - errorMessage: Gateway detachment failed due to configuration error. - correlationId: abcd1234-56ef-78gh-90ij-klmnopqrstuv - details: The gateway configuration is invalid for detachment. - additionalInfo: - - reason: Invalid gateway settings. - changeLog: - createdBy: testuser - createdByEmail: testuser@equinix.com - createdByFullName: testuser testuser - createdDateTime: 2020-05-21T10:30:00Z - updatedBy: adminuser - updatedByEmail: adminuser@equinix.com - updatedByFullName: admin user - updatedDateTime: 2020-06-15T14:45:00Z - GatewayAttachmentResponse: - value: - href: https://api.equinix.com/fabric/v4/routers/81331c52-04c0-4656-a4a7-18c52669348f/gateways/695a8471-6595-4ac6-a2f4-b3d96ed3a59d - type: VPN_GATEWAY - uuid: 695a8471-6595-4ac6-a2f4-b3d96ed3a59d - attachmentStatus: ATTACHING - changeLog: - createdBy: testuser - createdByEmail: testuser@equinix.com - createdByFullName: testuser testuser - createdDateTime: 2020-05-21T10:30:00Z - GatewayAttachmentErrorResponse: - value: - href: https://api.equinix.com/fabric/v4/routers/81331c52-04c0-4656-a4a7-18c52669348f/gateways/695a8471-6595-4ac6-a2f4-b3d96ed3a59d - type: VPN_GATEWAY - uuid: 695a8471-6595-4ac6-a2f4-b3d96ed3a59d - attachmentStatus: ATTACHED - errors: - - errorCode: EQ-3040085 - errorMessage: Gateway detachment failed due to configuration error. - correlationId: abcd1234-56ef-78gh-90ij-klmnopqrstuv - details: The gateway configuration is invalid for detachment. - additionalInfo: - - reason: Invalid gateway settings. - changeLog: - createdBy: testuser - createdByEmail: testuser@equinix.com - createdByFullName: testuser testuser - createdDateTime: 2020-05-21T10:30:00Z - updatedBy: adminuser - updatedByEmail: adminuser@equinix.com - updatedByFullName: admin user - updatedDateTime: 2020-06-15T14:45:00Z - GatewayDetachmentResponse: - value: - href: https://api.equinix.com/fabric/v4/routers/369c112f-1d8e-4ad1-ae85-7b03ddf4c728/gateways/3cacb007-1f0a-4686-8bf4-7cdcaf696e05 - uuid: 3cacb007-1f0a-4686-8bf4-7cdcaf696e05 - type: VPN_GATEWAY - attachmentStatus: DETACHING - changeLog: - createdBy: testuser - createdByEmail: testuser@equinix.com - createdByFullName: testuser testuser - createdDateTime: 2020-05-21T10:30:00Z - deletedBy: testuser - deletedByEmail: testuser@equinix.com - deletedByFullName: testuser testuser - deletedDateTime: 2020-05-21T10:30:00Z CloudRouterSearchRouteFiltersRequest: value: filter: @@ -46953,10 +56622,10 @@ components: ntpAdvancedConfiguration: - type: ASCII keyNumber: 65534 - key: plain_printable_key + key: YmFzZTY0X3ByaW50YWJsZV9rZXk= - type: HEX keyNumber: 65535 - key: a1a1a1a1a1a1a1 + key: YTFhMWExYTFhMWExYTE= ntpStandardCreateResponse: value: href: https://api.equinix.com/fabric/v4/timeServices/a8ba52de-faae-43b5-b0b1-6904d37ee011 @@ -47031,10 +56700,10 @@ components: ntpAdvancedConfiguration: - type: ASCII keyNumber: 65534 - key: plain_printable_key + key: YmFzZTY0X3ByaW50YWJsZV9rZXk= - type: HEX keyNumber: 65535 - key: a1a1a1a1a1a1a1 + key: YTFhMWExYTFhMWExYTE= account: accountNumber: 123456 changeLog: @@ -47570,10 +57239,10 @@ components: ntpAdvancedConfiguration: - type: ASCII keyNumber: 65534 - key: plain_printable_key + key: YmFzZTY0X3ByaW50YWJsZV9rZXk= - type: HEX keyNumber: 65535 - key: a1a1a1a1a1a1a1 + key: YTFhMWExYTFhMWExYTE= order: orderNumber: 1-129105284100 account: @@ -47620,10 +57289,10 @@ components: ntpAdvancedConfiguration: - type: ASCII keyNumber: 65534 - key: plain_printable_key + key: YmFzZTY0X3ByaW50YWJsZV9rZXk= - type: HEX keyNumber: 65535 - key: a1a1a1a1a1a1a1 + key: YTFhMWExYTFhMWExYTE= order: orderNumber: 1-129105284100 account: @@ -47669,10 +57338,10 @@ components: ntpAdvancedConfiguration: - type: ASCII keyNumber: 65534 - key: plain_printable_key + key: YmFzZTY0X3ByaW50YWJsZV9rZXk= - type: HEX keyNumber: 65535 - key: a1a1a1a1a1a1a1 + key: YTFhMWExYTFhMWExYTE= order: orderNumber: 1-129105284100 account: @@ -47807,10 +57476,10 @@ components: ntpAdvancedConfiguration: - type: ASCII keyNumber: 65534 - key: plain_printable_key + key: YmFzZTY0X3ByaW50YWJsZV9rZXk= - type: HEX keyNumber: 65535 - key: a1a1a1a1a1a1a1 + key: YTFhMWExYTFhMWExYTE= configurePtpWithAdvancedConfig: value: type: PTP @@ -47960,10 +57629,10 @@ components: value: - type: ASCII keyNumber: 65534 - key: plain-text-key + key: YmFzZTY0X3ByaW50YWJsZV9rZXk= - type: HEX keyNumber: 65535 - key: a1a1a1a1a1a1 + key: YTFhMWExYTFhMWExYTE= ntpStandardReprovisionResponse: value: href: https://api.equinix.com/fabric/v4/timeServices/a8ba52de-faae-43b5-b0b1-6904d37ee011 @@ -48293,6 +57962,51 @@ components: alertRulesCount: 3 changeLog: createdDateTime: 2024-05-06T16:21:18.545214Z + StreamSearchRequestExample: + value: + filter: + and: + - property: /project/projectId + operator: IN + values: + - 2f7f1a59-2dbf-43f8-b1a4-3c1f4e4b55b5 + - or: + - property: /uuid + operator: IN + values: + - 12f4d4a1-c7cb-4def-9f77-5ce93c19d999 + - 8ac8ecfe-c7cb-4def-9f77-5ce93c19d83d + - property: /state + operator: = + values: + - PROVISIONED + sort: + - direction: DESC + property: /changeLog/createdDateTime + pagination: + offset: 0 + limit: 20 + stream-search-all-example: + value: + pagination: + offset: 0 + limit: 20 + total: 1 + data: + - href: https://api.equinix.com/fabric/v4/streams/12f4d4a1-c7cb-4def-9f77-5ce93c19d999 + uuid: 12f4d4a1-c7cb-4def-9f77-5ce93c19d999 + type: TELEMETRY_STREAM + name: stream-dev-01 + description: Observability stream for project assets + project: + projectId: 2f7f1a59-2dbf-43f8-b1a4-3c1f4e4b55b5 + state: PROVISIONED + assetsCount: 3 + streamSubscriptionsCount: 1 + alertRulesCount: 2 + changeLog: + createdDateTime: 2026-06-17T10:15:30Z + updatedDateTime: 2026-06-18T10:15:30Z StreamPutRequestExample: value: name: splunk1 @@ -48315,17 +58029,27 @@ components: value: filter: and: + - property: /uuid + operator: IN + values: + - 8ac8ecfe-c7cb-4def-9f77-5ce93c19d83d + - 9ac8ecfe-c7cb-4def-9f77-5ce93c19d83e - property: /streamUuid operator: = values: - - e684aa26-8276-48b7-bb42-a6d9def0a419 - pagination: - offset: 0 - limit: 20 + - 4719e319-65ae-4001-aabf-ca5f107b9b29 + - property: /attachmentStatus + operator: IN + values: + - ATTACHED + - ATTACHING sort: - direction: DESC property: /uuid - stream-asset-get-all-example: + pagination: + offset: 0 + limit: 20 + stream-asset-search-all-example: value: pagination: offset: 0 @@ -48334,9 +58058,11 @@ components: data: - href: https://api.equinix.com/fabric/v4/ports/e684aa26-8276-48b7-bb42-a6d9def0a419 uuid: d684aa26-8276-48b7-bb42-a6d9def0a418 + streamUuid: e784aa26-8276-48b7-bb42-a6d9def0a424 type: XF_PORT metricsEnabled: false attachmentStatus: ATTACHED + projectId: dadd3ab6-c0af-430c-8216-43d44f08c1c5 StreamConnectionAssetResponseExample: value: href: https://api.equinix.com/fabric/v4/streams/e684aa26-8276-48b7-bb42-a6d9def0a419/connections/d684aa26-8276-48b7-bb42-a6d9def0a418 @@ -48520,20 +58246,64 @@ components: password: settings: source: Equinix - StreamSubscriptionPostRequestExampleWebhook: + StreamSubscriptionPostRequestExampleGenericWebhookNoAuth: + value: + type: STREAM_SUBSCRIPTION + name: webhook + description: subscription-1 + enabled: true + sink: + type: WEBHOOK + settings: + eventUri: https://xxxxxx + metricUri: https://xxxxxx + format: CLOUDEVENT + StreamSubscriptionPostRequestExampleGenericWebhookApiKey: + value: + type: STREAM_SUBSCRIPTION + name: webhook + description: subscription-1 + enabled: true + sink: + type: WEBHOOK + settings: + eventUri: https://xxxxxx + metricUri: https://xxxxxx + format: CLOUDEVENT + credential: + type: API_KEY + apiKey: + StreamSubscriptionPostRequestExampleGenericWebhookAccessToken: + value: + type: STREAM_SUBSCRIPTION + name: webhook + description: subscription-1 + enabled: true + sink: + type: WEBHOOK + settings: + eventUri: https://xxxxxx + metricUri: https://xxxxxx + format: CLOUDEVENT + credential: + type: ACCESS_TOKEN + accessToken: + StreamSubscriptionPostRequestExampleGenericWebhookUsernamePassword: value: type: STREAM_SUBSCRIPTION name: webhook description: subscription-1 enabled: true - metricSelector: - include: - - equinix.fabric.connection.* sink: type: WEBHOOK settings: eventUri: https://xxxxxx + metricUri: https://xxxxxx format: CLOUDEVENT + credential: + type: USERNAME_PASSWORD + username: + password: StreamSubscriptionPostRequestExampleGrafanaWebhook: value: type: STREAM_SUBSCRIPTION @@ -48656,6 +58426,63 @@ components: batchWaitTimeMax: 5 changeLog: createdDateTime: 2024-05-06T16:21:18.545214Z + StreamSubscriptionSearchRequestExample: + value: + filter: + and: + - property: /streamUuid + operator: = + values: + - 12f4d4a1-c7cb-4def-9f77-5ce93c19d999 + - or: + - property: /uuid + operator: = + values: + - 8ac8ecfe-c7cb-4def-9f77-5ce93c19d83d + - property: /name + operator: ILIKE + values: + - demo% + sort: + - direction: DESC + property: /changeLog/createdDateTime + pagination: + offset: 0 + limit: 20 + stream-subscription-search-all-example: + value: + pagination: + offset: 0 + limit: 20 + total: 1 + data: + - href: https://api.equinix.com/fabric/v4/streams/12f4d4a1-c7cb-4def-9f77-5ce93c19d999/subscriptions/8ac8ecfe-c7cb-4def-9f77-5ce93c19d83d + uuid: 8ac8ecfe-c7cb-4def-9f77-5ce93c19d83d + type: STREAM_SUBSCRIPTION + name: demo-subscription + description: Subscription for demo stream events + state: PROVISIONED + enabled: true + metricSelector: + include: + - equinix.fabric.connection.* + eventSelector: + include: + - equinix.fabric.connection.* + sink: + uri: https://hooks.example.com/fabric + type: WEBHOOK + batchEnabled: false + batchSizeMax: 50 + batchWaitTimeMax: 5 + operation: + eventsDeliveredCount: 12 + metricsDeliveredCount: 4 + alertsDeliveredCount: 0 + errors: [] + changeLog: + createdDateTime: 2026-06-17T10:15:30Z + updatedDateTime: 2026-06-18T10:15:30Z stream-alert-rules-get-all-example: value: pagination: @@ -49332,123 +59159,193 @@ components: - DIRECT_CONNECT - VPC - SUBNET - IssueLoaOnCageWithPatchPanelPort: - value: - type: CAGE_LOA - name: My-LOA - description: Issue Loa on cage with patch patch port to organizationName1 - expirationDateTime: 2024-12-31T23:59:59Z - requestor: - email: user@org1.com - orgId: 95900 - organizationName: organizationName1 - patchPanelPort: - patchPanelId: CP:Demarc:1259684 - patchPanelPortA: 23 - patchPanelPortB: 24 - connectorType: SC IssueLoaOnCageWithCageId: value: type: CAGE_LOA - name: My-LOA - description: Issue Loa on cage with cageUniqueSpaceId to organizationName1 - expirationDateTime: 2024-12-31T23:59:59Z + name: LOA-Equinix-SV1-2026 + description: Authorization for cage access to Equinix at SV1 + authorizedProductType: XC + expirationDateTime: 2026-12-31T23:59:59Z requestor: email: user@org1.com orgId: 95900 - organizationName: organizationName1 - cageUniqueSpaceId: AM7:0G:0202 + orgName: organizationName1 + demarcationPoint: + cageUniqueSpaceId: AM7:0G:0202 IssueLoaOnPatchPanelPort: value: type: PATCH_PANEL_PORT_LOA - name: My-LOA - description: Issue Loa on patch panel ports to organizationName1 - expirationDateTime: 2024-12-31T23:59:59Z + name: LOA-Equinix-SV1-2026 + description: Authorization for patch panel port access to Equinix at SV1 + authorizedProductType: XC + expirationDateTime: 2026-12-31T23:59:59Z requestor: email: user@org1.com orgId: 95900 - organizationName: organizationName1 - patchPanelPort: + orgName: organizationName1 + demarcationPoint: patchPanelId: CP:Demarc:1259684 patchPanelPortA: 23 patchPanelPortB: 24 connectorType: SC + IssueLoaOnPatchPanel: + value: + type: PATCH_PANEL_LOA + name: LOA-Equinix-SV1-2026 + description: Authorization for patch panel access to Equinix at SV1 + authorizedProductType: XC + expirationDateTime: 2026-12-31T23:59:59Z + requestor: + email: user@org1.com + orgId: 95900 + orgName: organizationName1 + demarcationPoint: + patchPanelId: CP:Demarc:1259684 RequestLoaOnCage: value: type: CAGE_LOA - name: My-LOA - description: Request Loa on cage to organizationName2 + name: LOA-Equinix-SV1-2026 + description: Authorization for patch panel port access to Equinix at SV1 + authorizedProductType: XC issuer: email: user@org2.com orgId: 95901 - organizationName: organizationName2 + orgName: organizationName2 location: ibxCode: SV11 RequestLoaOnPatchPanel: + value: + type: PATCH_PANEL_LOA + name: LOA-Equinix-SV1-2026 + description: Authorization for patch panel port access to Equinix at SV1 + authorizedProductType: XC + issuer: + email: user@org2.com + orgId: 95901 + orgName: organizationName2 + location: + ibxCode: SV11 + RequestLoaOnPatchPanelPort: value: type: PATCH_PANEL_PORT_LOA - name: My-LOA - description: Request Loa on patch patch port to organizationName2 + name: LOA-Equinix-SV1-2026 + description: Authorization for patch panel port access to Equinix at SV1 + authorizedProductType: XC issuer: email: user@org2.com orgId: 95901 - organizationName: organizationName2 + orgName: organizationName2 location: ibxCode: SV11 - LoaCreateResponseWhenRequestedByRequestor: + LoaCreateResponseByRequestor: value: href: https://api.equinix.com/fabric/v4/loas/29cc7878-54e3-4e1a-8651-87a61354bac2 uuid: 29cc7878-54e3-4e1a-8651-87a61354bac2 type: PATCH_PANEL_PORT_LOA - name: My-LOA - description: create loa + name: LOA-Equinix-SV1-2026 + description: Authorization for cage access to Equinix at SV1 + authorizedProductType: XC state: PENDING_AUTHORIZATION requestor: email: user@org1.com orgId: 95900 - organizationName: organizationName1 + orgName: organizationName1 issuer: email: user@org2.com orgId: 95901 - organizationName: organizationName2 + orgName: organizationName2 location: - ibxCode: AM1 + ibxCode: SV1 changeLog: - createdDateTime: 2025-07-24T06:50:46Z - createdBy: "123" - LoaCreateResponseWhenRequestedByIssuer: + createdDateTime: 2026-07-24T06:50:46Z + createdBy: user + createdByEmail: user@org1.com + LoaCreateResponseByIssuerWithCageType: value: href: https://api.equinix.com/fabric/v4/loas/29cc7878-54e3-4e1a-8651-87a61354bac2 uuid: 29cc7878-54e3-4e1a-8651-87a61354bac2 type: CAGE_LOA - name: My-LOA - description: create loa + name: LOA-Equinix-SV1-2026 + description: Authorization for cage access to Equinix at SV1 + authorizedProductType: XC state: PENDING_ACCEPTANCE requestor: email: user@org1.com orgId: 95900 - organizationName: organizationName1 + orgName: organizationName1 issuer: email: user@org2.com orgId: 95901 - organizationName: organizationName2 - patchPanelPort: + orgName: organizationName2 + demarcationPoint: + cageUniqueSpaceId: SV1:01:10:200 + location: + ibxCode: SV1 + changeLog: + createdDateTime: 2025-07-24T06:50:46Z + createdBy: user + createdByEmail: user@org2.com + LoaCreateResponseByIssuerWithPatchPanelPortType: + value: + href: https://api.equinix.com/fabric/v4/loas/29cc7878-54e3-4e1a-8651-87a61354bac2 + uuid: 29cc7878-54e3-4e1a-8651-87a61354bac2 + type: PATCH_PANEL_PORT_LOA + name: LOA-Equinix-SV1-2026 + description: Authorization for cage access to Equinix at SV1 + authorizedProductType: XC + state: PENDING_ACCEPTANCE + requestor: + email: user@org1.com + orgId: 95900 + orgName: organizationName1 + issuer: + email: user@org2.com + orgId: 95901 + orgName: organizationName2 + demarcationPoint: patchPanelId: CP:Demarc:1259684 patchPanelPortA: 23 patchPanelPortB: 23 connectorType: SC - cageUniqueSpaceId: SV2:01:10:200 location: - ibxCode: SV11 + ibxCode: SV1 changeLog: - createdDateTime: 2025-07-24T06:50:46Z - createdBy: "123" + createdDateTime: 2026-07-24T06:50:46Z + createdBy: user + createdByEmail: user@org2.com + LoaCreateResponseByIssuerWithPatchPanelType: + value: + href: https://api.equinix.com/fabric/v4/loas/29cc7878-54e3-4e1a-8651-87a61354bac2 + uuid: 29cc7878-54e3-4e1a-8651-87a61354bac2 + type: PATCH_PANEL_LOA + name: LOA-Equinix-SV1-2026 + description: Authorization for cage access to Equinix at SV1 + authorizedProductType: XC + state: PENDING_ACCEPTANCE + requestor: + email: user@org1.com + orgId: 95900 + orgName: organizationName1 + issuer: + email: user@org2.com + orgId: 95901 + orgName: organizationName2 + demarcationPoint: + patchPanelId: CP:Demarc:1259684 + location: + ibxCode: SV1 + changeLog: + createdDateTime: 2026-07-24T06:50:46Z + createdBy: user + createdByEmail: user@org2.com Loa_400: value: - errorCode: EQ-3070103 - errorMessage: Loa does not exist. Please check Loa UUID + errorMessage: Loa does not exist. correlationId: cebc3d33-9037-4a2b-a7af-0ad65602cdec - details: Loa does not exist. Please check Loa UUID + additionalInfo: + - property: uuid + reason: Loa does not exist. Please check Loa UUID Loa_401: value: - errorCode: EQ-3070106 @@ -49459,155 +59356,333 @@ components: - errorCode: EQ-3070102 errorMessage: Operation not allowed correlationId: c82ff3bc-de07-47e5-b3ec-53a009d01515 - details: Operation not allowed for current user + additionalInfo: + - reason: Operation not allowed for current user Loa_404: value: - errorCode: EQ-3070101 errorMessage: Loa not found correlationId: c82ff3bc-de07-47e5-b3ec-53a009d01515 - details: Loa not found + additionalInfo: + - property: uuid + reason: Loa does not exist. Please check Loa UUID Loa_500: value: - errorCode: EQ-3070104 errorMessage: Internal Server Error correlationId: c82ff3bc-de07-47e5-b3ec-53a009d01515 - details: Internal Server Error - LoaResponseExample: + additionalInfo: + - reason: An unexpected error occurred while processing the request + LoaResponse: value: href: https://api.equinix.com/fabric/v4/loas/29cc7878-54e3-4e1a-8651-87a61354bac2 uuid: 29cc7878-54e3-4e1a-8651-87a61354bac2 type: PATCH_PANEL_PORT_LOA - name: My-LOA - description: create loa + name: LOA-Equinix-SV1-2026 + description: Authorization for cage access to Equinix at SV1 + authorizedProductType: XC state: INACTIVE + expirationDateTime: 2024-12-31T23:59:59Z + operation: + consumersCount: 10 requestor: email: user@org1.com orgId: 95900 - organizationName: organizationName1 + orgName: organizationName1 issuer: email: user@org2.com orgId: 95901 - organizationName: organizationName2 - patchPanelPort: + orgName: organizationName2 + demarcationPoint: patchPanelId: CP:Demarc:1259684 - patchPanelPortA: "23" - patchPanelPortB: "23" + patchPanelPortA: 23 + patchPanelPortB: 23 connectorType: SC - cageId: SV2:01:10:200 location: - ibxCode: AM1 + ibxCode: SV1 changeLog: createdDateTime: 2025-07-24T06:50:46Z - createdBy: "123" + createdBy: user + createdByEmail: user@org2.com LoaPatchRequest: value: - op: replace - path: /patchPanelPort/patchPanelId + path: /demarcationPoint/patchPanelId value: CP:Demarc:1259685 LoaPatchResponse: value: href: https://api.equinix.com/fabric/v4/loas/29cc7878-54e3-4e1a-8651-87a61354bac2 uuid: 29cc7878-54e3-4e1a-8651-87a61354bac2 type: PATCH_PANEL_PORT_LOA - name: My-LOA - description: create loa + name: LOA-Equinix-SV1-2026 + description: Authorization for cage access to Equinix at SV1 + authorizedProductType: XC state: INACTIVE + operation: + consumersCount: 1 requestor: email: user@org1.com orgId: 95900 - organizationName: organizationName1 + orgName: organizationName1 issuer: email: user@org2.com orgId: 95901 - organizationName: organizationName2 - patchPanelPort: + orgName: organizationName2 + demarcationPoint: patchPanelId: CP:Demarc:1259684 - patchPanelPortA: "23" - patchPanelPortB: "23" + patchPanelPortA: 23 + patchPanelPortB: 23 connectorType: SC - cageId: SV2:01:10:200 location: - ibxCode: AM1 + ibxCode: SV1 changeLog: - createdDateTime: 2025-07-24T06:50:46Z - createdBy: "123" + createdDateTime: 2026-07-24T06:50:46Z + createdBy: user + createdByEmail: user@org2.com AuthorizeLoaActionRequest: value: - type: AUTHORIZE_LOA + type: LOA_ISSUER_AUTHORIZATION data: - patchPanelPort: + demarcationPoint: patchPanelId: CP:Demarc:1259684 patchPanelPortA: "23" patchPanelPortB: "23" connectorType: SC + expirationDateTime: 2026-08-07T07:00:00Z AcceptLoaActionRequest: value: - type: ACCEPT_LOA + type: LOA_REQUESTOR_ACCEPTANCE CopyLoaActionRequest: value: - type: COPY_LOA + type: LOA_COPY_LINK SendLoaActionRequest: value: - type: SEND_LOA + type: LOA_SEND_EMAIL_NOTIFICATION CancelLoaActionRequest: value: - type: CANCEL_LOA + type: LOA_CANCEL AuthorizeLoaActionResponse: value: href: https://api.equinix.com/fabric/v4/loas/29cc7878-54e3-4e1a-8651-87a61354bac2/actions/30cc7878-54e3-4e1a-8651-87a61354bad4 uuid: 30cc7878-54e3-4e1a-8651-87a61354bad4 - type: AUTHORIZE_LOA + type: LOA_ISSUER_AUTHORIZATION state: COMPLETED data: - patchPanelPort: + demarcationPoint: patchPanelId: CP:Demarc:1259684 - patchPanelPortA: "23" - patchPanelPortB: "23" + patchPanelPortA: 23 + patchPanelPortB: 23 connectorType: SC + expirationDateTime: 2026-08-07T07:00:00Z changeLog: - createdDateTime: 2025-07-24T06:50:46Z - createdBy: "123" + createdDateTime: 2026-06-24T06:50:46Z + createdBy: user + createdByEmail: user@org1.com AcceptLoaActionResponse: value: href: https://api.equinix.com/fabric/v4/loas/29cc7878-54e3-4e1a-8651-87a61354bac2/actions/30cc7878-54e3-4e1a-8651-87a61354bad4 uuid: 30cc7878-54e3-4e1a-8651-87a61354bad4 - type: ACCEPT_LOA + type: LOA_REQUESTOR_ACCEPTANCE state: COMPLETED changeLog: createdDateTime: 2025-07-24T06:50:46Z - createdBy: user1 + createdBy: user + createdByEmail: user@org2.com SendLoaActionResponse: value: href: https://api.equinix.com/fabric/v4/loas/29cc7878-54e3-4e1a-8651-87a61354bac2/actions/30cc7878-54e3-4e1a-8651-87a61354bad4 uuid: 30cc7878-54e3-4e1a-8651-87a61354bad4 - type: SEND_LOA + type: LOA_SEND_EMAIL_NOTIFICATION state: COMPLETED changeLog: - createdDateTime: 2025-07-24T06:50:46Z - createdBy: "123" + createdDateTime: 2026-07-24T06:50:46Z + createdBy: user + createdByEmail: user@org2.com CopyLoaActionResponse: value: href: https://api.equinix.com/fabric/v4/loas/29cc7878-54e3-4e1a-8651-87a61354bac2/actions/30cc7878-54e3-4e1a-8651-87a61354bad4 uuid: 30cc7878-54e3-4e1a-8651-87a61354bad4 - type: COPY_LOA + type: LOA_COPY_LINK state: COMPLETED + data: + portalUrl: https://portal.equinix.com/fabric/loa/inventory/issuer/29cc7878-54e3-4e1a-8651-87a61354bac2/authorize changeLog: - createdDateTime: 2025-07-24T06:50:46Z - createdBy: "123" - LoaSearchByLoaId: + createdDateTime: 2026-06-24T06:50:46Z + createdBy: user + createdByEmail: user@org1.com + Loa_Action_400: + value: + - errorCode: EQ-3070107 + errorMessage: Loa Action does not exist. + correlationId: cebc3d33-9037-4a2b-a7af-0ad65602cdec + additionalInfo: + - property: uuid + reason: Loa Action does not exist. Please check Loa UUID + Loa_Action_404: + value: + - errorCode: EQ-3070101 + errorMessage: Loa Action not found + correlationId: c82ff3bc-de07-47e5-b3ec-53a009d01515 + additionalInfo: + - property: uuid + reason: Loa 3070101 does not exist. Please check Loa UUID + LoaSearchByNameWithType: + summary: A named loa of a given type value: filter: and: - - property: /uuid + - property: /name + operator: ILIKE + values: + - LOA-Equinix-SV1 + - property: /type operator: = values: - - 29cc7878-54e3-4e1a-8651-87a61354bac2 + - PATCH_PANEL_PORT_LOA pagination: limit: 25 offset: 0 sort: - property: /changeLog/updatedDateTime direction: DESC + LoaSearchStateWithPartnerOrIbx: + summary: Partial match on state with partner name or with ibx code + value: + filter: + and: + - property: /state + operator: = + values: + - PENDING_ACCEPTANCE + - or: + - property: /requestor/orgName + operator: ILIKE + values: + - abc + - property: /location/ibxCode + operator: ILIKE + values: + - MB + pagination: + limit: 25 + offset: 0 + sort: + - property: /changeLog/updatedDateTime + direction: DESC + LoaSearchResponse: + value: + pagination: + offset: 0 + limit: 25 + total: 1 + sort: + - property: /changeLog/createdDateTime + direction: DESC + data: + - href: https://api.equinix.com/fabric/v4/loas/29cc7878-54e3-4e1a-8651-87a61354bac2 + uuid: 29cc7878-54e3-4e1a-8651-87a61354bac2 + type: PATCH_PANEL_PORT_LOA + name: LOA-Equinix-SV1-2026 + description: Authorization for cage access to Equinix at SV1 + authorizedProductType: XC + state: INACTIVE + expirationDateTime: 2026-12-31T23:59:59Z + operation: + connectionsCount: 1 + requestor: + email: user@org1.com + orgId: 95900 + orgName: organizationName1 + issuer: + email: user@org2.com + orgId: 95901 + orgName: organizationName2 + demarcationPoint: + patchPanelId: CP:Demarc:1259684 + patchPanelPortA: 23 + patchPanelPortB: 23 + connectorType: SC + location: + ibxCode: SV1 + changeLog: + createdDateTime: 2026-07-24T06:50:46Z + createdBy: user + createdByEmail: user@org2.com + LoaActionSearchByActionType: + value: + filter: + and: + - property: /type + operator: = + values: + - LOA_REQUESTOR_ACCEPTANCE + pagination: + limit: 25 + offset: 0 + sort: + - property: /changeLog/createdDateTime + direction: DESC + LoaSearchActionResponse: + value: + pagination: + offset: 0 + limit: 25 + total: 1 + sort: + - property: /changeLog/createdDateTime + direction: DESC + data: + - href: https://api.equinix.com/fabric/v4/loas/29cc7878-54e3-4e1a-8651-87a61354bac2/actions/30cc7878-54e3-4e1a-8651-87a61354bad4 + uuid: 30cc7878-54e3-4e1a-8651-87a61354bad4 + type: LOA_ISSUER_AUTHORIZATION + state: COMPLETED + changeLog: + createdDateTime: 2026-07-24T06:50:46Z + createdBy: user + createdByEmail: user@org2.com + LoaConsumersResponse: + value: + pagination: + offset: 0 + limit: 25 + total: 2 + data: + - href: https://api.equinix.com/fabric/v4/ports/29cc7878-54e3-4e1a-8651-87a61354bac2 + uuid: 29cc7878-54e3-4e1a-8651-87a61354bac2 + type: XF_PORT + changeLog: + createdDateTime: 2025-07-24T06:50:46Z + - href: https://api.equinix.com/fabric/v4/ports/b7e14c2d-93f8-4a61-8d5b-c29f71e4a306 + uuid: b7e14c2d-93f8-4a61-8d5b-c29f71e4a306 + type: XF_PORT + changeLog: + createdDateTime: 2025-07-26T06:50:46Z + LoaNotesResponse: + value: + data: + - type: ISSUER + href: https://api.equinix.com/fabric/v4/loas/7c-5b93-4e6a-a218-6c7d9e3f45b1/notes/e41f485e-3094-42de-8797-0ef19a51df79 + uuid: e41f485e-3094-42de-8797-0ef19a51df79 + comments: test note from issuer + changeLog: + createdDateTime: 2026-07-24T06:50:46Z + - type: REQUESTOR + href: https://api.equinix.com/fabric/v4/loas/7c-5b93-4e6a-a218-6c7d9e3f45b1/notes/a41f485e-3094-42de-8797-0ef19a51df81 + uuid: a41f485e-3094-42de-8797-0ef19a51df81 + comments: test note from requestor + changeLog: + createdDateTime: 2026-07-25T06:50:46Z + LoaNoteRequest: + value: + comments: LOA under review by our team. Expected response within 2 business days. + CreateLoaNoteResponse: + value: + type: ISSUER + href: https://api.equinix.com/fabric/v4/loas/7c-5b93-4e6a-a218-6c7d9e3f45b1/notes/e41f485e-3094-42de-8797-0ef19a51df79 + uuid: e41f485e-3094-42de-8797-0ef19a51df79 + comments: LOA under review by our team. Expected response within 2 business days. + changeLog: + createdDateTime: 2026-06-24T06:50:46Z AppDomainCreate: value: type: APP_DOMAIN @@ -49625,6 +59700,10 @@ components: state: PENDING_VERIFICATION project: projectId: 71b55fef-fd2e-402f-ae3c-01d5f00bf2d4 + changeLog: + createdBy: test + createdDateTime: 2026-06-27T04:20:55.471Z + updatedDateTime: 2026-06-28T04:20:55.471Z AppDomain_400_InvalidName: value: - errorCode: EQ-3810022 @@ -49671,6 +59750,10 @@ components: state: PROVISIONED project: projectId: 71b55fef-fd2e-402f-ae3c-01d5f00bf2d4 + changeLog: + createdBy: test + createdDateTime: 2026-06-27T04:20:55.471Z + updatedDateTime: 2026-06-28T04:20:55.471Z AppDomain_404: value: - errorCode: EQ-3810020 @@ -49687,12 +59770,54 @@ components: state: DEPROVISIONED project: projectId: 71b55fef-fd2e-402f-ae3c-01d5f00bf2d4 + changeLog: + createdBy: test + createdDateTime: 2026-06-27T04:20:55.471Z + updatedBy: test + updatedDateTime: 2026-06-28T04:20:55.471Z + deletedBy: test + deletedDateTime: 2026-06-29T04:20:55.471Z AppDomain_400_InvalidState: value: - errorCode: EQ-3810030 errorMessage: Cannot delete App Domain in transient state correlationId: 09fbe616-e563-438e-9b1b-56632d1611ff details: Cannot delete App Domain in transient state. + AppDomainUpdateDescription: + value: + - op: replace + path: /description + value: Updated Atlassian Domain + AppDomainPatchResponseExample: + value: + href: https://api.equinix.com/fabric/v4/appDomains/20f3ef8e-d670-4236-86fa-bb0038adcfc3 + uuid: 20f3ef8e-d670-4236-86fa-bb0038adcfc3 + type: APP_DOMAIN + name: atlassian.net + description: Updated Atlassian Domain + state: PROVISIONED + project: + projectId: 71b55fef-fd2e-402f-ae3c-01d5f00bf2d4 + change: + uuid: 531c4ab5-43b0-4352-8975-ee9045325841 + type: APP_DOMAIN_UPDATE + status: REQUESTED + createdDateTime: 2026-06-27T04:20:55.471Z + updatedDateTime: 2026-06-28T04:20:55.471Z + data: + - op: replace + path: /description + value: Updated Atlassian Domain + changeLog: + createdBy: test + createdDateTime: 2026-06-27T04:20:55.471Z + updatedBy: test + updatedDateTime: 2026-06-28T04:20:55.471Z + AppDomain_400_InvalidOperation: + value: + - errorCode: EQ-3810022 + errorMessage: Invalid Argument passed + correlationId: c82ff3bc-de07-47e5-b3ec-53a009d01515 AppDomainSearchFilterByStatus: value: filter: @@ -49735,9 +59860,9 @@ components: and: - or: - property: /name - operator: = + operator: LIKE values: - - abc + - abc% - property: /project/projectId operator: = values: @@ -49814,6 +59939,10 @@ components: bandwidth: 1000 project: projectId: 71b55fef-fd2e-402f-ae3c-01d5f00bf2d4 + changeLog: + createdBy: test + createdDateTime: 2026-06-27T04:20:55.471Z + updatedDateTime: 2026-06-28T04:20:55.471Z AppLink_400_InvalidName: value: - errorCode: EQ-3820022 @@ -49866,6 +59995,10 @@ components: bandwidth: 1000 project: projectId: 71b55fef-fd2e-402f-ae3c-01d5f00bf2d4 + changeLog: + createdBy: test + createdDateTime: 2026-06-27T04:20:55.471Z + updatedDateTime: 2026-06-28T04:20:55.471Z AppLink_404: value: - errorCode: EQ-3820020 @@ -49888,12 +60021,60 @@ components: bandwidth: 1000 project: projectId: 71b55fef-fd2e-402f-ae3c-01d5f00bf2d4 + changeLog: + createdBy: test + createdDateTime: 2026-06-27T04:20:55.471Z + updatedBy: test + updatedDateTime: 2026-06-28T04:20:55.471Z + deletedBy: test + deletedDateTime: 2026-06-29T04:20:55.471Z AppLink_400_InvalidState: value: - errorCode: EQ-3820030 errorMessage: Cannot delete App Link in transient state correlationId: 09fbe616-e563-438e-9b1b-56632d1611ff details: Cannot delete App Link in transient state. + AppLinkUpdateName: + value: + - op: replace + path: /name + value: Updated Atlassian App Link + AppLinkPatchResponseExample: + value: + href: https://api.equinix.com/fabric/v4/appLinks/23cd19ab-d3bb-478b-9f25-bd12a3af1914 + uuid: 23cd19ab-d3bb-478b-9f25-bd12a3af1914 + type: APP_LINK + name: Updated Atlassian App Link + description: Atlassian App Link in SV + state: REPROVISIONING + router: + href: https://api.equinix.com/fabric/v4/routers/36204584-2ae1-44f6-980f-08ecd555d9c6 + uuid: 36204584-2ae1-44f6-980f-08ecd555d9c6 + type: XF_ROUTER + ipv4Address: 192.168.10.1 + bandwidth: 1000 + project: + projectId: 71b55fef-fd2e-402f-ae3c-01d5f00bf2d4 + change: + uuid: 531c4ab5-43b0-4352-8975-ee9045325841 + type: APP_LINK_UPDATE + status: REQUESTED + createdDateTime: 2026-06-27T04:20:55.471Z + updatedDateTime: 2026-06-28T04:20:55.471Z + data: + - op: replace + path: /name + value: Updated Atlassian App Link + changeLog: + createdBy: test + createdDateTime: 2026-06-27T04:20:55.471Z + updatedBy: test + updatedDateTime: 2026-06-28T04:20:55.471Z + AppLink_400_InvalidOperation: + value: + - errorCode: EQ-3040054 + errorMessage: Invalid Argument passed + correlationId: c82ff3bc-de07-47e5-b3ec-53a009d01515 AppLinkSearchFilterByStatus: value: filter: @@ -49936,9 +60117,9 @@ components: and: - or: - property: /name - operator: = + operator: LIKE values: - - abc + - abc% - property: /project/projectId operator: = values: @@ -49973,6 +60154,17 @@ components: correlationId: 11091aa7-322a-461e-b6af-40fd10543c94 additionalInfo: - reason: Only accept DESC and ASC for sorting direction. + AppLinkAttachDomainResponse: + value: + href: https://api.equinix.com/fabric/v4/appLinks/23cd19ab-d3bb-478b-9f25-bd12a3af1914/appDomains/20f3ef8e-d670-4236-86fa-bb0038adcfc3 + uuid: 20f3ef8e-d670-4236-86fa-bb0038adcfc3 + type: APP_DOMAIN + name: atlassian.net + attachmentStatus: ATTACHED + changeLog: + createdBy: test + createdDateTime: 2026-06-27T04:20:55.471Z + updatedDateTime: 2026-06-28T04:20:55.471Z AppLinkAttachDomainAttachResponse: value: href: https://api.equinix.com/fabric/v4/appLinks/23cd19ab-d3bb-478b-9f25-bd12a3af1914/appDomains/20f3ef8e-d670-4236-86fa-bb0038adcfc3 @@ -49980,6 +60172,10 @@ components: type: APP_DOMAIN name: atlassian.net attachmentStatus: ATTACHING + changeLog: + createdBy: test + createdDateTime: 2026-06-27T04:20:55.471Z + updatedDateTime: 2026-06-27T04:20:55.471Z AppLink_400_InvalidAttachState: value: - errorCode: EQ-3820030 @@ -49993,6 +60189,10 @@ components: type: APP_DOMAIN name: atlassian.net attachmentStatus: DETACHING + changeLog: + createdBy: test + createdDateTime: 2026-06-27T04:20:55.471Z + updatedDateTime: 2026-06-28T04:20:55.471Z AppLinkAttachDomainSearchFilterByStatus: value: filter: @@ -50048,6 +60248,22 @@ components: project: projectId: 71b55fef-fd2e-402f-ae3c-01d5f00bf2d4 attachmentStatus: ATTACHED + changeLog: + createdBy: test + createdDateTime: 2026-06-27T04:20:55.471Z + updatedDateTime: 2026-06-28T04:20:55.471Z + AppLinkAttachServiceResponse: + value: + href: https://api.equinix.com/fabric/v4/appLinks/23cd19ab-d3bb-478b-9f25-bd12a3af1914/appServices/5008a109-9d1c-485c-b0ba-de9736f283c2 + uuid: 5008a109-9d1c-485c-b0ba-de9736f283c2 + type: APP_SERVICE + geoScope: GLOBAL + destinationIp: 10.10.1.110 + attachmentStatus: ATTACHED + changeLog: + createdBy: test + createdDateTime: 2026-06-27T04:20:55.471Z + updatedDateTime: 2026-06-28T04:20:55.471Z AppLinkAttachService: value: geoScope: GLOBAL @@ -50060,6 +60276,10 @@ components: geoScope: GLOBAL destinationIp: 10.10.1.110 attachmentStatus: ATTACHING + changeLog: + createdBy: test + createdDateTime: 2026-06-27T04:20:55.471Z + updatedDateTime: 2026-06-27T04:20:55.471Z AppLinkAttachServiceDetachResponse: value: href: https://api.equinix.com/fabric/v4/appLinks/23cd19ab-d3bb-478b-9f25-bd12a3af1914/appServices/5008a109-9d1c-485c-b0ba-de9736f283c2 @@ -50068,6 +60288,38 @@ components: geoScope: GLOBAL destinationIp: 10.10.1.110 attachmentStatus: DETACHING + changeLog: + createdBy: test + createdDateTime: 2026-06-27T04:20:55.471Z + updatedDateTime: 2026-06-28T04:20:55.471Z + AppLinkAttachServicePatchDestinationIp: + value: + - op: replace + path: /destinationIp + value: 10.10.1.120 + AppLinkAttachServicePatchResponse: + value: + href: https://api.equinix.com/fabric/v4/appLinks/23cd19ab-d3bb-478b-9f25-bd12a3af1914/appServices/5008a109-9d1c-485c-b0ba-de9736f283c2 + uuid: 5008a109-9d1c-485c-b0ba-de9736f283c2 + type: APP_SERVICE + geoScope: GLOBAL + destinationIp: 10.10.1.120 + attachmentStatus: ATTACHING + change: + uuid: 531c4ab5-43b0-4352-8975-ee9045325841 + type: APP_LINK_UPDATE + status: REQUESTED + createdDateTime: 2026-06-27T04:20:55.471Z + updatedDateTime: 2026-06-27T04:20:55.471Z + data: + - op: replace + path: /destinationIp + value: 10.10.1.120 + changeLog: + createdBy: test + createdDateTime: 2026-06-27T04:20:55.471Z + updatedBy: test + updatedDateTime: 2026-06-27T04:20:55.471Z AppLinkAttachServiceSearchFilterByStatus: value: filter: @@ -50130,6 +60382,10 @@ components: geoScope: GLOBAL destinationIp: 10.10.1.110 attachmentStatus: ATTACHED + changeLog: + createdBy: test + createdDateTime: 2026-06-27T04:20:55.471Z + updatedDateTime: 2026-06-28T04:20:55.471Z AppServiceCreate: value: type: APP_SERVICE @@ -50149,12 +60405,15 @@ components: name: Atlassian App Service description: Atlassian App Service in SV state: PROVISIONING - endpoints: - - equinixjira.atlassian.net + endpoint: equinixjira.atlassian.net sourceDomains: - equinix.com project: projectId: 71b55fef-fd2e-402f-ae3c-01d5f00bf2d4 + changeLog: + createdBy: test + createdDateTime: 2026-06-27T04:20:55.471Z + updatedDateTime: 2026-06-28T04:20:55.471Z AppService_400_InvalidName: value: - errorCode: EQ-3830022 @@ -50199,14 +60458,17 @@ components: name: Atlassian App Service description: Atlassian App Service in SV state: PROVISIONED - endpoints: - - equinixjira.atlassian.net + endpoint: equinixjira.atlassian.net sourceDomains: - equinix.com project: projectId: 71b55fef-fd2e-402f-ae3c-01d5f00bf2d4 account: organizationName: atlassian + changeLog: + createdBy: test + createdDateTime: 2026-06-27T04:20:55.471Z + updatedDateTime: 2026-06-28T04:20:55.471Z AppService_404: value: - errorCode: EQ-3830020 @@ -50221,18 +60483,62 @@ components: name: Atlassian App Service description: Atlassian App Service in SV state: DEPROVISIONING - endpoints: - - equinixjira.atlassian.net + endpoint: equinixjira.atlassian.net sourceDomains: - equinix.com project: projectId: 71b55fef-fd2e-402f-ae3c-01d5f00bf2d4 + changeLog: + createdBy: test + createdDateTime: 2026-06-27T04:20:55.471Z + updatedBy: test + updatedDateTime: 2026-06-28T04:20:55.471Z + deletedBy: test + deletedDateTime: 2026-06-29T04:20:55.471Z AppService_400_InvalidState: value: - errorCode: EQ-3830030 errorMessage: Cannot delete App Service in transient state correlationId: 09fbe616-e563-438e-9b1b-56632d1611ff details: Cannot delete App Service in transient state. + AppServiceUpdateName: + value: + - op: replace + path: /name + value: Updated Atlassian App Service + AppServicePatchResponseExample: + value: + href: https://api.equinix.com/fabric/v4/appServices/5008a109-9d1c-485c-b0ba-de9736f283c2 + uuid: 5008a109-9d1c-485c-b0ba-de9736f283c2 + type: APP_SERVICE + name: Updated Atlassian App Service + description: Atlassian App Service in SV + state: REPROVISIONING + endpoint: equinixjira.atlassian.net + sourceDomains: + - equinix.com + project: + projectId: 71b55fef-fd2e-402f-ae3c-01d5f00bf2d4 + change: + uuid: 531c4ab5-43b0-4352-8975-ee9045325841 + type: APP_SERVICE_UPDATE + status: REQUESTED + createdDateTime: 2026-06-27T04:20:55.471Z + updatedDateTime: 2026-06-28T04:20:55.471Z + data: + - op: replace + path: /name + value: Updated Atlassian App Service + changeLog: + createdBy: test + createdDateTime: 2026-06-27T04:20:55.471Z + updatedBy: test + updatedDateTime: 2026-06-28T04:20:55.471Z + AppService_400_InvalidOperation: + value: + - errorCode: EQ-3040054 + errorMessage: Invalid Argument passed + correlationId: c82ff3bc-de07-47e5-b3ec-53a009d01515 AppServiceSearchFilterByStatus: value: filter: @@ -50275,9 +60581,9 @@ components: and: - or: - property: /name - operator: = + operator: LIKE values: - - abc + - abc% - property: /project/projectId operator: = values: @@ -50297,8 +60603,7 @@ components: name: Atlassian App Service description: Atlassian App Service in SV state: PROVISIONED - endpoints: - - equinixjira.atlassian.net + endpoint: equinixjira.atlassian.net sourceDomains: - equinix.com project: @@ -50333,6 +60638,19 @@ components: ipv4Address: 192.168.10.1 project: projectId: 71b55fef-fd2e-402f-ae3c-01d5f00bf2d4 + AppServiceAttachedAppSubscriptionsGetResponseExample: + value: + pagination: + limit: 20 + offset: 0 + total: 1 + data: + - href: https://api.equinix.com/fabric/v4/appSubscriptions/20f3ef8e-d670-4236-86fa-bb0038adcfc3 + type: APP_SUBSCRIPTION + uuid: 20f3ef8e-d670-4236-86fa-bb0038adcfc3 + state: PROVISIONED + account: + organizationName: equinix AppServiceAttachedAppSubscriptionSearchExample: value: pagination: @@ -50379,6 +60697,10 @@ components: state: PROVISIONING project: projectId: 71b55fef-fd2e-402f-ae3c-01d5f00bf2d4 + changeLog: + createdBy: test + createdDateTime: 2026-06-27T04:20:55.471Z + updatedDateTime: 2026-06-28T04:20:55.471Z AppSubscription_401: value: - errorCode: EQ-3840001 @@ -50424,6 +60746,10 @@ components: state: PROVISIONED project: projectId: 71b55fef-fd2e-402f-ae3c-01d5f00bf2d4 + changeLog: + createdBy: test + createdDateTime: 2026-06-27T04:20:55.471Z + updatedDateTime: 2026-06-28T04:20:55.471Z AppSubscription_404: value: - errorCode: EQ-3840020 @@ -50448,12 +60774,65 @@ components: state: DEPROVISIONED project: projectId: 71b55fef-fd2e-402f-ae3c-01d5f00bf2d4 + changeLog: + createdBy: test + createdDateTime: 2026-06-27T04:20:55.471Z + updatedBy: test + updatedDateTime: 2026-06-28T04:20:55.471Z + deletedBy: test + deletedDateTime: 2026-06-29T04:20:55.471Z AppSubscription_400_InvalidState: value: - errorCode: EQ-3840030 errorMessage: Cannot delete App Subscription in transient state correlationId: 09fbe616-e563-438e-9b1b-56632d1611ff details: Cannot delete App Subscription in transient state. + AppSubscriptionUpdateSourceIpSubnets: + value: + - op: add + path: /source/ipSubnets + value: + - 192.168.200.0/24 + AppSubscriptionPatchResponseExample: + value: + href: https://api.equinix.com/fabric/v4/appSubscriptions/20f3ef8e-d670-4236-86fa-bb0038adcfc3 + uuid: 20f3ef8e-d670-4236-86fa-bb0038adcfc3 + type: APP_SUBSCRIPTION + source: + appLink: + uuid: e32c9c7a-0149-4582-8345-192b82aef972 + ipSubnets: + - 192.168.100.0/24 + - 192.168.200.0/24 + target: + appService: + uuid: e18c15f4-c8aa-4c18-9e35-a7e9b288201d + geoScope: GLOBAL + prioritization: LATENCY + state: PROVISIONING + project: + projectId: 71b55fef-fd2e-402f-ae3c-01d5f00bf2d4 + change: + uuid: 531c4ab5-43b0-4352-8975-ee9045325841 + type: APP_SUBSCRIPTION_UPDATE + status: REQUESTED + createdDateTime: 2026-06-27T04:20:55.471Z + updatedDateTime: 2026-06-28T04:20:55.471Z + data: + - op: add + path: /source/ipSubnets + value: + - 192.168.200.0/24 + changeLog: + createdBy: test + createdDateTime: 2026-06-27T04:20:55.471Z + updatedBy: test + updatedDateTime: 2026-06-28T04:20:55.471Z + AppSubscription_400_InvalidOperation: + value: + - errorCode: EQ-3040054 + errorMessage: Invalid Argument passed + correlationId: c82ff3bc-de07-47e5-b3ec-53a009d01515 AppSubscriptionSearchFilterByStatus: value: filter: @@ -51079,6 +61458,478 @@ components: has_more: false last_id: msg_3920f72c-5172-42d1-8f5b-7eafd490411e object: list + GatewayCreate: + value: + type: VPN_GW + name: My-VPN-Gateway + description: my test gateway + bandwidth: 1000 + haEnabled: true + router: + uuid: 89fcecec-b7e7-453b-b1ba-b35757bfcdbf + type: XF_ROUTER + project: + projectId: b1baecec-b7e7-453b-89fc-b35757bfcdbf + account: + accountNumber: "123456" + GatewayPostResponseExample: + value: + href: https://api.equinix.com/fabric/v4/gateways/c93a9ca0-bb56-490b-8bce-4b2bdaeb4d46 + uuid: c93a9ca0-bb56-490b-8bce-4b2bdaeb4d46 + type: VPN_GW + name: My-VPN-Gateway + description: my test gateway + state: PROVISIONING + bandwidth: 50 + router: + href: https://api.equinix.com/fabric/v4/routers/6658cc3b-18e0-437c-b972-62b51a419a1e + uuid: 6658cc3b-18e0-437c-b972-62b51a419a1e + type: XF_ROUTER + haEnabled: true + ipv4: + primaryIp: 192.168.127.12 + secondaryIp: 192.168.127.13 + project: + projectId: b1baecec-b7e7-453b-89fc-b35757bfcdbf + account: + accountNumber: "12345678" + changeLog: + createdBy: abc@xyz.com + createdByEmail: abc@xyz.com + createdDateTime: 2025-04-21T01:11:11.117Z + updatedBy: abc@xyz.com + updatedByEmail: abc@xyz.com + updatedDateTime: 2025-04-22T02:22:22.227Z + Gateway_400_InvalidName: + value: + - errorCode: EQ-8010022 + errorMessage: Name is minimum 0 and up to 50 characters in length + correlationId: fc7a32c8-2b99-4915-bb4b-eb42bbba668e + details: Name is minimum 0 and up to 50 characters in length + additionalInfo: + - property: /name + reason: Name is minimum 0 and up to 50 characters in length + Gateway_401: + value: + - errorCode: EQ-8010001 + errorMessage: User not found in request or invalid. + correlationId: c82ff3bc-de07-47e5-b3ec-53a009d01515 + additionalInfo: + - reason: You are unauthorized to perform this operation + Gateway_403: + value: + - errorCode: EQ-8010002 + errorMessage: Operation not allowed + correlationId: 8a72af9d-23f7-4b90-8237-0987130b42dd + details: Operation not allowed for current user + Gateway_415: + value: + - errorCode: EQ-8010016 + errorMessage: Unsupported media type, please check the request's Content-Type or Content-Encoding + correlationId: c82ff3bc-de07-47e5-b3ec-53a009d01515 + additionalInfo: + - property: contentType + reason: The payload format is in an unsupported format + Gateway_500: + value: + - errorCode: EQ-8010030 + errorMessage: Internal Server Error + correlationId: f9018571-1001-4422-978b-bfa38ed6b92e + details: Internal Server Error + GatewayGetResponseExample: + value: + href: https://api.equinix.com/fabric/v4/gateways/c93a9ca0-bb56-490b-8bce-4b2bdaeb4d46 + uuid: c93a9ca0-bb56-490b-8bce-4b2bdaeb4d46 + type: VPN_GW + name: My-VPN-Gateway + description: my test gateway + state: PROVISIONED + bandwidth: 50 + router: + href: https://api.equinix.com/fabric/v4/routers/6658cc3b-18e0-437c-b972-62b51a419a1e + uuid: 6658cc3b-18e0-437c-b972-62b51a419a1e + type: XF_ROUTER + haEnabled: true + ipv4: + primaryIp: 192.168.127.12 + secondaryIp: 192.168.127.13 + project: + projectId: b1baecec-b7e7-453b-89fc-b35757bfcdbf + account: + accountNumber: "12345678" + changeLog: + createdBy: abc@xyz.com + createdByEmail: abc@xyz.com + createdDateTime: 2025-04-21T01:11:11.117Z + updatedBy: abc@xyz.com + updatedByEmail: abc@xyz.com + updatedDateTime: 2025-04-22T02:22:22.227Z + Gateway_404: + value: + - errorCode: EQ-8010020 + errorMessage: Gateway not found or already deleted + correlationId: 9b6baf30-3eb0-458c-af8b-fff3fae32bc7 + details: Gateway not found or already deleted + GatewayDeleteResponseExample: + value: + href: https://api.equinix.com/fabric/v4/gateways/c93a9ca0-bb56-490b-8bce-4b2bdaeb4d46 + uuid: c93a9ca0-bb56-490b-8bce-4b2bdaeb4d46 + type: VPN_GW + name: My-VPN-Gateway + description: my test gateway + state: DEPROVISIONING + bandwidth: 50 + router: + href: https://api.equinix.com/fabric/v4/routers/6658cc3b-18e0-437c-b972-62b51a419a1e + uuid: 6658cc3b-18e0-437c-b972-62b51a419a1e + type: XF_ROUTER + haEnabled: true + ipv4: + primaryIp: 192.168.127.12 + secondaryIp: 192.168.127.13 + project: + projectId: b1baecec-b7e7-453b-89fc-b35757bfcdbf + account: + accountNumber: "12345678" + changeLog: + createdBy: abc@xyz.com + createdByEmail: abc@xyz.com + createdDateTime: 2025-04-21T01:11:11.117Z + updatedBy: abc@xyz.com + updatedByEmail: abc@xyz.com + updatedDateTime: 2025-04-22T02:22:22.227Z + deletedBy: abc@xyz.com + deletedByEmail: abc@xyz.com + deletedDateTime: 2025-04-23T03:33:33.337Z + Gateway_400_InvalidState: + value: + - errorCode: EQ-8010030 + errorMessage: Cannot delete Gateway in transient state + correlationId: 09fbe616-e563-438e-9b1b-56632d1611ff + details: Cannot delete Gateway in transient state. + GatewayUpdateNameRequest: + value: + - op: replace + path: /name + value: Gw-Name-2 + GatewayUpdateBandwidthRequest: + value: + - op: replace + path: /bandwidth + value: 1000 + GatewayUpdateResponseExample: + value: + href: https://api.equinix.com/fabric/v4/gateways/c93a9ca0-bb56-490b-8bce-4b2bdaeb4d46 + uuid: c93a9ca0-bb56-490b-8bce-4b2bdaeb4d46 + type: VPN_GW + name: Gw-Name-2 + description: my test gateway + state: REPROVISIONING + bandwidth: 50 + router: + href: https://api.equinix.com/fabric/v4/routers/6658cc3b-18e0-437c-b972-62b51a419a1e + uuid: 6658cc3b-18e0-437c-b972-62b51a419a1e + type: XF_ROUTER + haEnabled: true + ipv4: + primaryIp: 192.168.127.12 + secondaryIp: 192.168.127.13 + project: + projectId: b1baecec-b7e7-453b-89fc-b35757bfcdbf + account: + accountNumber: "12345678" + changeLog: + createdBy: abc@xyz.com + createdByEmail: abc@xyz.com + createdDateTime: 2025-04-21T01:11:11.117Z + updatedBy: abc@xyz.com + updatedByEmail: abc@xyz.com + updatedDateTime: 2025-04-22T02:22:22.227Z + TermPostFCRRequestExample: + value: + accountNumber: ACCT-123456 + product: CLOUD_ROUTER_PRODUCT + type: BCD_FIXED_TERM + delayDuration: P30D + startDateTime: 2026-09-24T06:59:46Z + quantityEntitled: 1 + name: Q3 FCR Trial — Advanced & Premium + comSolCaseId: CS-98765 + notes: text1 + selector: + and: + - property: /router/package/code + operator: IN + values: + - ADVANCED + - PREMIUM + TermPostVCRequestExample: + value: + accountNumber: ACCT-654321 + product: VIRTUAL_CONNECTION_PRODUCT + type: BCD_FIXED_TERM + delayDuration: P60D + startDateTime: 2026-07-01T00:00:00Z + quantityEntitled: 1 + name: Q3 VC Trial — Up to 1G + comSolCaseId: CS-98766 + selector: + and: + - property: /connection/bandwidth + operator: <= + values: + - "1000" + TermPostFCRResponseExample: + value: + href: https://api.equinix.com/fabric/v4/terms/a1b2c3d4-e5f6-7890-abcd-ef1234567890 + uuid: a1b2c3d4-e5f6-7890-abcd-ef1234567890 + accountNumber: ACCT-123456 + type: BCD_FIXED_TERM + product: CLOUD_ROUTER_PRODUCT + state: ACTIVE + startDateTime: 2026-09-24T06:59:46Z + delayDuration: P30D + commencementDateTime: 2026-12-24T06:59:46Z + quantityEntitled: 1 + name: Q3 FCR Trial — Advanced & Premium + comSolCaseId: CS-98765 + notes: text1 + selector: + and: + - property: /router/package/code + operator: IN + values: + - ADVANCED + - PREMIUM + changeLog: + createdId: 1222 + createdDateTime: 2026-06-15T10:00:00Z + TermPostVCResponseExample: + value: + href: https://api.equinix.com/fabric/v4/terms/b2c3d4e5-f6a7-8901-bcde-f12345678901 + uuid: b2c3d4e5-f6a7-8901-bcde-f12345678901 + accountNumber: ACCT-654321 + type: BCD_FIXED_TERM + product: VIRTUAL_CONNECTION_PRODUCT + state: ACTIVE + startDateTime: 2026-07-01T00:00:00Z + delayDuration: P60D + commencementDateTime: 2026-08-30T00:00:00Z + quantityEntitled: 1 + name: Q3 VC Trial — Up to 1G + comSolCaseId: CS-98766 + selector: + and: + - property: /connection/bandwidth + operator: <= + values: + - "1000" + changeLog: + createdId: 1223 + createdDateTime: 2026-06-15T10:05:00Z + Terms_400: + value: + - errorCode: EQ-3073002 + errorMessage: Invalid argument + correlationId: req-abc-123 + details: accountNumber is required + additionalInfo: + - property: accountNumber + reason: required + Terms_400_TermStartDateInPast: + value: + - errorCode: EQ-3073010 + errorMessage: startDateTime cannot be in the past + correlationId: req-abc-123 + details: startDateTime cannot be in the past + additionalInfo: + - property: startDateTime + reason: must be today or a future date + Terms_500: + value: + - errorCode: EQ-3073001 + errorMessage: Internal error + correlationId: req-abc-123 + details: Internal system error + TermGetByIdFCRResponseExample: + value: + href: https://api.equinix.com/fabric/v4/terms/a1b2c3d4-e5f6-7890-abcd-ef1234567890 + uuid: a1b2c3d4-e5f6-7890-abcd-ef1234567890 + accountNumber: ACCT-123456 + type: BCD_FIXED_TERM + product: CLOUD_ROUTER_PRODUCT + state: ACTIVE + startDateTime: 2026-09-24T06:59:46Z + delayDuration: P30D + commencementDateTime: 2026-12-24T06:59:46Z + quantityEntitled: 1 + name: Q3 FCR Trial — Advanced & Premium + comSolCaseId: CS-98765 + notes: text1 + selector: + and: + - property: /router/package/code + operator: IN + values: + - ADVANCED + - PREMIUM + changeLog: + createdId: 1222 + createdDateTime: 2026-06-15T10:00:00Z + TermGetByIdVCResponseExample: + value: + href: https://api.equinix.com/fabric/v4/terms/b2c3d4e5-f6a7-8901-bcde-f12345678901 + uuid: b2c3d4e5-f6a7-8901-bcde-f12345678901 + accountNumber: ACCT-654321 + type: BCD_FIXED_TERM + product: VIRTUAL_CONNECTION_PRODUCT + state: ACTIVE + startDateTime: 2026-07-01T00:00:00Z + delayDuration: P60D + commencementDateTime: 2026-08-30T00:00:00Z + quantityEntitled: 1 + name: Q3 VC Trial — Up to 1G + comSolCaseId: CS-98766 + selector: + and: + - property: /connection/bandwidth + operator: <= + values: + - "1000" + changeLog: + createdId: 1223 + createdDateTime: 2026-06-15T10:05:00Z + Terms_404: + value: + - errorCode: EQ-3073004 + errorMessage: Resource not found + correlationId: req-abc-123 + details: "Term not found: a1b2c3d4-e5f6-7890-abcd-ef1234567890" + TermDeleteFCRResponseExample: + value: + href: https://api.equinix.com/fabric/v4/terms/a1b2c3d4-e5f6-7890-abcd-ef1234567890 + uuid: a1b2c3d4-e5f6-7890-abcd-ef1234567890 + accountNumber: ACCT-123456 + type: BCD_FIXED_TERM + product: CLOUD_ROUTER_PRODUCT + state: DELETED + startDateTime: 2026-09-24T06:59:46Z + delayDuration: P30D + commencementDateTime: 2026-12-24T06:59:46Z + quantityEntitled: 1 + name: Q3 FCR Trial — Advanced & Premium + comSolCaseId: CS-98765 + notes: text1 + selector: + and: + - property: /router/package/code + operator: IN + values: + - ADVANCED + - PREMIUM + changeLog: + createdId: 1222 + createdDateTime: 2026-06-15T10:00:00Z + deletedId: 1222 + deletedDateTime: 2026-07-29T09:00:00Z + TermDeleteVCResponseExample: + value: + href: https://api.equinix.com/fabric/v4/terms/b2c3d4e5-f6a7-8901-bcde-f12345678901 + uuid: b2c3d4e5-f6a7-8901-bcde-f12345678901 + accountNumber: ACCT-654321 + type: BCD_FIXED_TERM + product: VIRTUAL_CONNECTION_PRODUCT + state: DELETED + startDateTime: 2026-07-01T00:00:00Z + delayDuration: P60D + commencementDateTime: 2026-08-30T00:00:00Z + quantityEntitled: 1 + name: Q3 VC Trial — Up to 1G + comSolCaseId: CS-98766 + selector: + and: + - property: /connection/bandwidth + operator: <= + values: + - "1000" + changeLog: + createdId: 1223 + createdDateTime: 2026-06-15T10:05:00Z + deletedId: 1223 + deletedDateTime: 2026-07-29T09:05:00Z + Terms_409: + value: + - errorCode: EQ-3073005 + errorMessage: Resource already deleted + correlationId: req-abc-123 + details: "Term already deleted: a1b2c3d4-e5f6-7890-abcd-ef1234567890" + TermSearchFCRRequestExample: + value: + filter: + and: + - property: accountNumber + operator: = + values: + - ACCT-123456 + - property: product + operator: = + values: + - CLOUD_ROUTER_PRODUCT + - property: state + operator: = + values: + - ACTIVE + sort: + - field: changeLog.createdDateTime + direction: DESC + pagination: + offset: 0 + limit: 20 + TermSearchVCRequestExample: + value: + filter: + and: + - property: accountNumber + operator: = + values: + - ACCT-654321 + - property: product + operator: = + values: + - VIRTUAL_CONNECTION_PRODUCT + - property: state + operator: IN + values: + - ACTIVE + - INACTIVE + sort: + - field: startDateTime + direction: ASC + pagination: + offset: 0 + limit: 20 + TermSearchResponseExample: + value: + data: + - uuid: a1b2c3d4-e5f6-7890-abcd-ef1234567890 + href: https://api.equinix.com/fabric/v4/terms/a1b2c3d4-e5f6-7890-abcd-ef1234567890 + accountNumber: ACCT-123456 + type: BCD_FIXED_TERM + product: CLOUD_ROUTER_PRODUCT + state: ACTIVE + startDateTime: 2026-09-24T06:59:46Z + delayDuration: P30D + commencementDateTime: 2026-12-24T06:59:46Z + quantityEntitled: 1 + name: Q3 FCR Trial — Advanced & Premium + comSolCaseId: CS-98765 + changeLog: + createdId: 1222 + createdDateTime: 2026-06-15T10:00:00Z + pagination: + offset: 0 + limit: 20 + total: 1 headers: ETag: description: response header - identifier for a specific version of a resource. From a479b063cabd8d294906070fd24438a53b70bc99 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 17 Aug 2026 09:00:37 +0000 Subject: [PATCH 02/16] sync: patch spec with 2026-08-17 spec --- .../fabricv4/oas3.patched/openapi.yaml | 30413 +++++++++++----- 1 file changed, 20632 insertions(+), 9781 deletions(-) diff --git a/spec/services/fabricv4/oas3.patched/openapi.yaml b/spec/services/fabricv4/oas3.patched/openapi.yaml index 3ca737cf..83855f3f 100644 --- a/spec/services/fabricv4/oas3.patched/openapi.yaml +++ b/spec/services/fabricv4/oas3.patched/openapi.yaml @@ -9,7 +9,7 @@ info: license: name: Equinix Inc url: https://developer.equinix.com/agreement - version: "4.30" + version: "4.31" externalDocs: description: Find more information on Equinix Docs Portal url: https://docs.equinix.com/fabric/ @@ -19,6 +19,14 @@ servers: security: - BearerAuth: [] tags: + - name: Application Domains + description: Application Domains Beta + - name: Application Links + description: Application Links Beta + - name: Application Services + description: Application Services Beta + - name: Application Subscriptions + description: Application Subscriptions Beta - name: Cloud Events description: Cloud Events - name: Cloud Routers @@ -27,12 +35,32 @@ tags: description: Company Profiles Beta - name: Connections description: Connections + - name: Health + description: Health + - name: Internet Exchange Services + description: Internet Exchange Services Beta + - name: Gateways + description: Fabric Gateway Service Beta + - name: Fabric One + description: Fabric One Beta - name: Internet Access Services description: Equinix Internet Access (EIA) Beta - - name: Ip Blocks - description: Ip Blocks Beta + - name: IP Blocks + description: IP Blocks Beta + - name: Loas + description: Loas Beta + - name: Logos + description: Logos Beta + - name: Marketplace Subscriptions + description: Marketplace Subscriptions - name: Metrics description: Metrics + - name: Metros + description: Metros + - name: Networks + description: Networks + - name: Optical Metro Connects + description: Optical Metro Connects Beta - name: Port Packages description: Port Packages Beta - name: Ports @@ -58,579 +86,14 @@ tags: - name: Statistics description: Statistics - name: Stream Alert Rules - description: Stream Alert Rules Beta + description: Stream Alert Rules - name: Stream Subscriptions description: Stream Subscriptions - name: Streams description: Streams + - name: Tags + description: Tags Beta paths: - /fabric/v4/agentTemplates: - get: - tags: - - Agent Templates - summary: Get Agent Templates - description: This API provides capability to retrieve agent templates Beta - operationId: getAgentTemplates - parameters: - - name: offset - in: query - description: offset - required: false - schema: - type: integer - example: 1 - - name: limit - in: query - description: number of records to fetch - required: false - schema: - type: integer - example: 10 - responses: - "200": - description: Successful operation - content: - application/json: - schema: - $ref: "#/components/schemas/AgentTemplateGetAllResponse" - examples: - Example: - $ref: "#/components/examples/AgentTemplatesGetAllResponseExample" - "401": - description: Unauthorized - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorList" - examples: - example: - $ref: "#/components/examples/AgentTemplate_401" - "403": - description: Forbidden - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorList" - examples: - example: - $ref: "#/components/examples/AgentTemplate_403" - "404": - description: Not Found - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorList" - examples: - example: - $ref: "#/components/examples/AgentTemplate_404" - "500": - description: Internal server error - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorList" - examples: - example: - $ref: "#/components/examples/AgentTemplate_500" - "/fabric/v4/agentTemplates/{agentTemplateId}": - get: - tags: - - Agent Templates - summary: Get Agent Template by UUID - description: This API provides capability to retrieve an agent template by uuid Beta - operationId: getAgentTemplateByUuid - parameters: - - name: agentTemplateId - in: path - description: Agent Template UUID - required: true - schema: - $ref: "#/components/schemas/AgentTemplateId" - - name: offset - in: query - description: offset - required: false - schema: - type: integer - example: 1 - - name: limit - in: query - description: number of records to fetch - required: false - schema: - type: integer - example: 10 - responses: - "200": - description: Agent object - content: - application/json: - schema: - $ref: "#/components/schemas/AgentTemplates" - examples: - AgentByUuidResponse: - $ref: "#/components/examples/AgentTemplatesResponseExample" - "401": - description: Unauthorized - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorList" - examples: - example: - $ref: "#/components/examples/AgentTemplate_401" - "403": - description: Forbidden - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorList" - examples: - example: - $ref: "#/components/examples/AgentTemplate_403" - "404": - description: Not Found - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorList" - examples: - example: - $ref: "#/components/examples/AgentTemplate_404" - "500": - description: Internal server error - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorList" - examples: - example: - $ref: "#/components/examples/AgentTemplate_500" - /fabric/v4/agents: - get: - tags: - - Agents - summary: Get Agents - description: This API provides capability to retrieve agents Beta - operationId: getAgents - parameters: - - name: offset - in: query - description: offset - required: false - schema: - type: integer - example: 1 - - name: limit - in: query - description: number of records to fetch - required: false - schema: - type: integer - example: 10 - responses: - "200": - description: Successful operation - content: - application/json: - schema: - $ref: "#/components/schemas/AgentGetAllResponse" - examples: - Example: - $ref: "#/components/examples/AgentGetAllResponseExample" - "401": - description: Unauthorized - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorList" - examples: - example: - $ref: "#/components/examples/Agent_401" - "403": - description: Forbidden - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorList" - examples: - example: - $ref: "#/components/examples/Agent_403" - "404": - description: Not Found - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorList" - examples: - example: - $ref: "#/components/examples/Agent_404" - "500": - description: Internal server error - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorList" - examples: - example: - $ref: "#/components/examples/Agent_500" - post: - tags: - - Agents - summary: Create Agent - description: This API provides capability to create user's agent Beta - operationId: createAgent - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/AgentPostRequest" - examples: - CreateAgent: - $ref: "#/components/examples/AgentPostRequestExample" - required: true - responses: - "202": - description: Agent object - content: - application/json: - schema: - $ref: "#/components/schemas/Agents" - examples: - AgentPostResponse: - $ref: "#/components/examples/AgentPostResponseExample" - "400": - description: Bad request - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorList" - "401": - description: Unauthorized - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorList" - examples: - example: - $ref: "#/components/examples/Agent_401" - "403": - description: Forbidden - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorList" - examples: - example: - $ref: "#/components/examples/Agent_403" - "415": - description: Unsupported Media Type - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorList" - examples: - example: - $ref: "#/components/examples/Agent_415" - "500": - description: Internal server error - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorList" - examples: - example: - $ref: "#/components/examples/Agent_500" - "/fabric/v4/agents/{agentId}": - get: - tags: - - Agents - summary: Get Agent by UUID - description: This API provides capability to retrieve an agent by uuid Beta - operationId: getAgentByUuid - parameters: - - name: agentId - in: path - description: Agent UUID - required: true - schema: - $ref: "#/components/schemas/AgentId" - - name: offset - in: query - description: offset - required: false - schema: - type: integer - example: 1 - - name: limit - in: query - description: number of records to fetch - required: false - schema: - type: integer - example: 10 - responses: - "200": - description: Agent object - content: - application/json: - schema: - $ref: "#/components/schemas/Agents" - examples: - AgentByUuidResponse: - $ref: "#/components/examples/AgentResponseExample" - "401": - description: Unauthorized - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorList" - examples: - example: - $ref: "#/components/examples/Agent_401" - "403": - description: Forbidden - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorList" - examples: - example: - $ref: "#/components/examples/Agent_403" - "404": - description: Not Found - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorList" - examples: - example: - $ref: "#/components/examples/Agent_404" - "500": - description: Internal server error - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorList" - examples: - example: - $ref: "#/components/examples/Agent_500" - delete: - tags: - - Agents - summary: Delete Agent by UUID - description: This API provides capability to delete an agent by uuid Beta - operationId: deleteAgentByUuid - parameters: - - name: agentId - in: path - description: Agent UUID - required: true - schema: - $ref: "#/components/schemas/AgentId" - - name: offset - in: query - description: offset - required: false - schema: - type: integer - example: 1 - - name: limit - in: query - description: number of records to fetch - required: false - schema: - type: integer - example: 10 - responses: - "202": - description: Agent object - content: - application/json: - schema: - $ref: "#/components/schemas/Agents" - examples: - AgentDeleteResponse: - $ref: "#/components/examples/AgentDeleteResponseExample" - "401": - description: Unauthorized - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorList" - examples: - example: - $ref: "#/components/examples/Agent_401" - "403": - description: Forbidden - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorList" - examples: - example: - $ref: "#/components/examples/Agent_403" - "404": - description: Not Found - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorList" - examples: - example: - $ref: "#/components/examples/Agent_404" - "500": - description: Internal server error - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorList" - examples: - example: - $ref: "#/components/examples/Agent_500" - patch: - tags: - - Agents - summary: Update Agent by UUID - description: This API provides capability to update an agent by uuid Beta - operationId: patchAgentByUuid - parameters: - - name: agentId - in: path - description: Agent UUID - required: true - schema: - $ref: "#/components/schemas/AgentId" - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/AgentPatchRequest" - examples: - PatchAgent: - $ref: "#/components/examples/AgentPatchRequestExample" - required: true - responses: - "202": - description: Agent object - content: - application/json: - schema: - $ref: "#/components/schemas/Agents" - examples: - AgentPostResponse: - $ref: "#/components/examples/AgentPatchResponseExample" - "401": - description: Unauthorized - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorList" - examples: - example: - $ref: "#/components/examples/Agent_401" - "403": - description: Forbidden - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorList" - examples: - example: - $ref: "#/components/examples/Agent_403" - "404": - description: Not Found - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorList" - examples: - example: - $ref: "#/components/examples/Agent_404" - "500": - description: Internal server error - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorList" - examples: - example: - $ref: "#/components/examples/Agent_500" - "/fabric/v4/agents/{agentId}/activities": - get: - tags: - - Agents - summary: Get Agent Activities - description: This API provides capability to retrieve an agent activities Beta - operationId: getAgentActivities - parameters: - - name: agentId - in: path - description: Agent UUID - required: true - schema: - $ref: "#/components/schemas/AgentId" - - name: offset - in: query - description: offset - required: false - schema: - type: integer - example: 1 - - name: limit - in: query - description: number of records to fetch - required: false - schema: - type: integer - example: 10 - responses: - "200": - description: Successful operation - content: - application/json: - schema: - $ref: "#/components/schemas/AgentGetActivities" - examples: - Example: - $ref: "#/components/examples/AgentActivitiesResponseExample" - "401": - description: Unauthorized - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorList" - examples: - example: - $ref: "#/components/examples/Agent_401" - "403": - description: Forbidden - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorList" - examples: - example: - $ref: "#/components/examples/Agent_403" - "404": - description: Not Found - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorList" - examples: - example: - $ref: "#/components/examples/Agent_404" - "500": - description: Internal server error - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorList" - examples: - example: - $ref: "#/components/examples/Agent_500" "/fabric/v4/{asset}/{assetId}/cloudevents": get: tags: @@ -844,6 +307,69 @@ paths: examples: example: $ref: "#/components/examples/500" + /fabric/v4/latestOperationalEvents/search: + post: + tags: + - Cloud Events + summary: Search Last Operational Cloud Events + description: This API provides capability to search last operational cloud events from a filtered query + operationId: searchLastOpEvents + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/OperationalEventSearchRequest" + examples: + OperationalEventSearchRequestExample: + $ref: "#/components/examples/search-latest-operational-events" + required: true + responses: + "200": + description: Successful operation + content: + application/json: + schema: + $ref: "#/components/schemas/SearchOperationalEventResponse" + examples: + Example: + $ref: "#/components/examples/search-latest-operational-events-response" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/401" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/403" + "404": + description: Not Found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/404" + "500": + description: Internal server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/500" "/fabric/v4/{asset}/{assetId}/metrics": get: tags: @@ -1202,6 +728,8 @@ paths: $ref: "#/components/examples/COLO2AWSSPwithDot1q-Primary" Colo2Sp-Azure-Primary: $ref: "#/components/examples/COLO2AzureSP-Primary" + Colo2Sp-LMaaS-Primary: + $ref: "#/components/examples/COLO2LMaaSSP" Colo2Sp-Google: $ref: "#/components/examples/COLO2GoogleSPwithDot1q" Colo2Sp-Ibm_1.0: @@ -1372,6 +900,8 @@ paths: $ref: "#/components/examples/COLO2COLO-MetroConnect-Response" Colo2Sp-Azure-Primary: $ref: "#/components/examples/COLO2AzureSP-Primary-Response" + Colo2Sp-LMaaS-Primary: + $ref: "#/components/examples/COLO2LMaaSSP-Response" Colo2Sp-Google: $ref: "#/components/examples/COLO2GoogleSPwithDot1q-Response" Colo2Sp-Alibaba: @@ -1524,6 +1054,10 @@ paths: $ref: "#/components/examples/NonGenericConnectionResponseExample" genericConnectionResponse: $ref: "#/components/examples/GenericConnectionResponseExample" + coloToColoWithMaintenanceResponse: + $ref: "#/components/examples/ColoToColoWithMaintenanceResponseExample" + Colo2Sp-LMaaS: + $ref: "#/components/examples/LMaaSConnectionResponse" "400": description: Bad request content: @@ -3085,6 +2619,138 @@ paths: examples: example: $ref: "#/components/examples/500_internal_error" + /fabric/v4/exchangeServices/{exchangeServiceId}: + get: + tags: + - Internet Exchange Services + summary: Get Internet Exchange Service + description: The API provides capability to get Internet Exchange Service + operationId: getExchangeServiceById + parameters: + - name: exchangeServiceId + in: path + description: Internet Exchange Service Id + required: true + schema: + $ref: "#/components/schemas/ExchangeServiceId" + responses: + "200": + description: Successful Operation + content: + application/json: + schema: + $ref: "#/components/schemas/ExchangeServiceResponse" + examples: + GetExchangeServiceResponse: + $ref: "#/components/examples/ExchangeServiceResponse" + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/ExchangeService_400" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/ExchangeService_401" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/ExchangeService_403" + "404": + description: Not Found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/ExchangeService_404" + "500": + description: Internal Server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/ExchangeService_500" + /fabric/v4/exchangeServices/search: + post: + tags: + - Internet Exchange Services + summary: Search Internet Exchange Service + description: The API provides capability to get list of user's Internet Exchange Service using search criteria, including optional filtering, pagination and sorting. + operationId: searchExchangeService + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/ExchangeServiceSearchRequest" + examples: + ExchangeServiceSearchProjectId: + $ref: "#/components/examples/ExchangeServiceSearchProjectId" + required: true + responses: + "200": + description: Successful operation + content: + application/json: + schema: + $ref: "#/components/schemas/ExchangeServiceSearchResponse" + examples: + example: + $ref: "#/components/examples/ExchangeServiceSearchResponse" + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + example: + - errorCode: EQ-3000035 + errorMessage: Invalid request body + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/ExchangeService_401" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + example: + - errorCode: EQ-3000197 + errorMessage: User not authorized to perform given action + "500": + description: Internal Server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/ExchangeService_500" /fabric/v4/internetAccessServices: post: tags: @@ -3283,12 +2949,343 @@ paths: application/json: schema: $ref: "#/components/schemas/ErrorList" + /fabric/v4/interconnects: + post: + tags: + - Fabric One + summary: Create Interconnect + description: This API provides capability to create user's Interconnect Beta + operationId: createInterconnect + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/InterconnectPostRequest" + examples: + CreateInterconnect: + $ref: "#/components/examples/InterconnectCreate" + required: true + responses: + "201": + description: Interconnect created successfully + content: + application/json: + schema: + $ref: "#/components/schemas/Interconnect" + examples: + CreateInterconnectResponse: + $ref: "#/components/examples/InterconnectResponse" + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/400" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/401" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/403" + "415": + description: Unsupported Media Type + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/415" + "500": + description: Internal server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/500" + "/fabric/v4/interconnects/{interconnectId}": + get: + tags: + - Fabric One + summary: Get Interconnect By ID + description: This API provides capability to retrieve user's Interconnect Beta + operationId: getInterconnectByUuid + parameters: + - name: interconnectId + in: path + description: Interconnect UUID + required: true + schema: + $ref: "#/components/schemas/InterconnectId" + responses: + "200": + description: Interconnect object + content: + application/json: + schema: + $ref: "#/components/schemas/Interconnect" + examples: + interconnectResponse: + $ref: "#/components/examples/InterconnectResponse" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/401" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/403" + "404": + description: Not Found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/400" + delete: + tags: + - Fabric One + summary: Delete Interconnect By ID + description: This API provides capability to delete user's Interconnect Beta + operationId: deleteInterconnectByUuid + parameters: + - name: interconnectId + in: path + description: Interconnect UUID + required: true + schema: + $ref: "#/components/schemas/InterconnectId" + responses: + "202": + description: Fabric Interconnect object + content: + application/json: + schema: + $ref: "#/components/schemas/Interconnect" + examples: + interconnectDeleteResponse: + $ref: "#/components/examples/InterconnectDeleteResponse" + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/400" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/401" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/403" + "404": + description: Not Found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/400" + /fabric/v4/interconnects/search: + post: + tags: + - Fabric One + summary: Search Interconnects + description: The API provides capability to get list of user's Interconnects using search criteria, including optional filtering, pagination and sorting Beta + operationId: searchInterconnects + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/InterconnectSearchRequest" + examples: + SearchInterconnects: + $ref: "#/components/examples/InterconnectSearchRequest" + required: true + responses: + "200": + description: Fabric Interconnect Search Response + content: + application/json: + schema: + $ref: "#/components/schemas/InterconnectSearchResponse" + examples: + interconnectSearchResponse: + $ref: "#/components/examples/InterconnectSearchResponse" + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/400" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/401" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/403" + "415": + description: Unsupported Media Type + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/415" + "500": + description: Internal server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/500" + /fabric/v4/interconnectPackages: + get: + tags: + - Fabric One + summary: Get All Interconnect Packages + description: Get All Interconnect Packages returns details of all available interconnect packages for the specified user credentials. Beta + operationId: getInterconnectPackages + parameters: + - name: offset + in: query + description: offset + required: false + schema: + type: integer + example: 1 + - name: limit + in: query + description: number of records to fetch + required: false + schema: + type: integer + example: 10 + responses: + "200": + description: Successful operation + content: + application/json: + schema: + $ref: "#/components/schemas/AllInterconnectPackagesResponse" + examples: + interconnectPackagesExample: + $ref: "#/components/examples/interconnect-packages" + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/400" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/401" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/403" + "404": + description: Not Found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/400" + "415": + description: Unsupported Media Type + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/415" /fabric/v4/ipBlocks: post: tags: - - Ip Blocks - summary: Submits new Equinix owned or customer owned Ip Block request - description: Submits new Equinix owned or customer owned Ip Block request + - IP Blocks + summary: Submits new Equinix owned or customer owned IP Block request + description: Submits new Equinix owned or customer owned IP Block request operationId: submitIpBlock parameters: [] requestBody: @@ -3304,7 +3301,7 @@ paths: required: true responses: "202": - description: Ip Block submitted, patched, or deletion accepted + description: IP Block submitted, patched, or deletion accepted content: application/json: schema: @@ -3335,21 +3332,21 @@ paths: "/fabric/v4/ipBlocks/{uuid}": get: tags: - - Ip Blocks - summary: Retrieve Ip Block by UUID - description: Retrieve Ip Block by UUID + - IP Blocks + summary: Retrieve IP Block by UUID + description: Retrieve IP Block by UUID operationId: getIpBlock parameters: - name: uuid in: path - description: UUID of the Ip Block + description: UUID of the IP Block required: true schema: type: string format: uuid responses: "200": - description: Ip Block retrieved successfully + description: IP Block retrieved successfully content: application/json: schema: @@ -3366,7 +3363,7 @@ paths: schema: $ref: "#/components/schemas/ErrorList" "404": - description: Ip Block not found + description: IP Block not found content: application/json: schema: @@ -3379,21 +3376,21 @@ paths: $ref: "#/components/schemas/ErrorList" delete: tags: - - Ip Blocks - summary: Delete Ip Block by UUID - description: Delete Ip Block by UUID + - IP Blocks + summary: Delete IP Block by UUID + description: Delete IP Block by UUID operationId: deleteIpBlockById parameters: - name: uuid in: path - description: UUID of the Ip Block + description: UUID of the IP Block required: true schema: type: string format: uuid responses: "202": - description: Ip Block submitted, patched, or deletion accepted + description: IP Block submitted, patched, or deletion accepted content: application/json: schema: @@ -3416,13 +3413,13 @@ paths: schema: $ref: "#/components/schemas/ErrorList" "404": - description: Ip Block not found + description: IP Block not found content: application/json: schema: $ref: "#/components/schemas/ErrorList" "409": - description: Ip Block cannot be deleted due to active products + description: IP Block cannot be deleted due to active products content: application/json: schema: @@ -3435,14 +3432,14 @@ paths: $ref: "#/components/schemas/ErrorList" patch: tags: - - Ip Blocks - summary: patch Ip Block by UUID - description: patch Ip Block by UUID + - IP Blocks + summary: patch IP Block by UUID + description: patch IP Block by UUID operationId: patchIpBlockById parameters: - name: uuid in: path - description: UUID of the Ip Block + description: UUID of the IP Block required: true schema: type: string @@ -3455,7 +3452,7 @@ paths: required: true responses: "202": - description: Ip Block submitted, patched, or deletion accepted + description: IP Block submitted, patched, or deletion accepted content: application/json: schema: @@ -3466,7 +3463,7 @@ paths: CustomerOwnedAccepted: $ref: "#/components/examples/IpBlockCustomerOwnershipAcceptedResponse" "404": - description: Ip Block not found + description: IP Block not found content: application/json: schema: @@ -3480,9 +3477,9 @@ paths: /fabric/v4/ipBlocks/search: post: tags: - - Ip Blocks - summary: Search for Ip Blocks - description: Search for Ip Blocks based on criteria + - IP Blocks + summary: Search for IP Blocks + description: Search for IP Blocks based on criteria operationId: searchIpBlocks parameters: [] requestBody: @@ -3493,7 +3490,7 @@ paths: required: true responses: "200": - description: Ip Blocks found successfully + description: IP Blocks found successfully content: application/json: schema: @@ -3596,6 +3593,8 @@ paths: $ref: "#/components/examples/ConnectionSearchANDClause" ConnectionSearchANDwithNestedOR: $ref: "#/components/examples/ConnectionSearchANDwithNestedOR" + ConnectionSearchByMaintenanceStatus: + $ref: "#/components/examples/ConnectionSearchByMaintenanceStatus" required: true responses: "200": @@ -3651,6 +3650,8 @@ paths: operation: providerStatus: PROVISIONING equinixStatus: PROVISIONED + maintenanceStatus: SCHEDULED + lockEnabled: true changeLog: createdDateTime: 2020-05-21T10:30:00Z updatedDateTime: 2020-05-21T10:30:00Z @@ -3723,6 +3724,8 @@ paths: $ref: "#/components/examples/VirtualConnectionProductOfflineEvplVcTypeFromColoToSp" virtualConnectionProductOfflineEvpLanVcTypeFromColoToNetwork: $ref: "#/components/examples/VirtualConnectionProductEvpLanVcTypeFromColoToNetwork" + virtualConnectionProductColoToColoWithGeoScope: + $ref: "#/components/examples/VirtualConnectionProductColoToColoWithGeoScope" cloudRouterProduct: $ref: "#/components/examples/FabricCloudRouterProduct" ipBlockProduct: @@ -3741,8 +3744,8 @@ paths: $ref: "#/components/examples/PrecisionTimePtpStandardPackage" precisionTimeProductPtpEnterprisePackageCode: $ref: "#/components/examples/PrecisionTimePtpEnterprisePackage" - metroConnectProduct: - $ref: "#/components/examples/MetroConnectProduct" + opticalConnectProduct: + $ref: "#/components/examples/OpticalConnectProduct" required: true responses: "200": @@ -3766,8 +3769,8 @@ paths: $ref: "#/components/examples/VirtualPortIX" precisionTimeService: $ref: "#/components/examples/PrecisionTimeService" - metroConnect: - $ref: "#/components/examples/MetroConnect" + opticalConnect: + $ref: "#/components/examples/OpticalConnect" "400": description: Bad Request content: @@ -3943,10 +3946,10 @@ paths: description: flips view between buyer and seller representation schema: type: string + default: aSide enum: - aSide - zSide - default: aSide responses: "200": description: Successful operation @@ -4012,6 +4015,8 @@ paths: $ref: "#/components/examples/ServiceProfileCreate" ServiceProfileCreate-CRH: $ref: "#/components/examples/ServiceProfileCreate-CRH" + LmaasServiceProfileCreate: + $ref: "#/components/examples/LmaasServiceProfileCreate" required: true responses: "201": @@ -4026,6 +4031,8 @@ paths: examples: ServiceProfile: $ref: "#/components/examples/ServiceProfileCreateResponse" + LmaasServiceProfile: + $ref: "#/components/examples/LmaasServiceProfileCreateResponse" "400": description: Bad request content: @@ -4075,10 +4082,10 @@ paths: description: flips view between buyer and seller representation schema: type: string + default: aSide enum: - aSide - zSide - default: aSide requestBody: content: application/json: @@ -4158,10 +4165,10 @@ paths: description: flips view between buyer and seller representation schema: type: string + default: aSide enum: - aSide - zSide - default: aSide responses: "200": description: Successful operation @@ -4177,6 +4184,8 @@ paths: $ref: "#/components/examples/ServiceProfileResponse" ZSideServiceProfile: $ref: "#/components/examples/SellerServiceProfileResponse" + LmaasServiceProfile: + $ref: "#/components/examples/LmaasServiceProfileResponse" "400": description: Bad request content: @@ -4387,7 +4396,7 @@ paths: content: application/json-patch+json: schema: - $ref: "#/components/schemas/JsonPatch_1" + $ref: "#/components/schemas/ServiceProfileUpdateRequest" examples: ServiceProfilePatchRequest: $ref: "#/components/examples/ServiceProfilePatchRequest" @@ -4454,7 +4463,7 @@ paths: examples: example: $ref: "#/components/examples/sp-500" - "/fabric/v4/serviceProfiles/{serviceProfileId}/actions": + /fabric/v4/serviceProfiles/{serviceProfileId}/actions: post: tags: - Service Profiles @@ -4534,6 +4543,155 @@ paths: examples: example: $ref: "#/components/examples/sp-500" + "/fabric/v4/serviceProfiles/{serviceProfileId}/environments": + get: + tags: + - Service Profiles + summary: Get Profile Environments + description: Get service profile provider environments by UUID Beta. + operationId: getServiceProfileEnvironmentsByUuid + parameters: + - name: serviceProfileId + in: path + description: Service Profile UUID + required: true + schema: + $ref: "#/components/schemas/ServiceProfileId" + - name: offset + in: query + description: offset + required: false + schema: + type: integer + example: 1 + - name: limit + in: query + description: number of records to fetch + required: false + schema: + type: integer + example: 10 + responses: + "200": + description: Successful operation + content: + application/json; charset=UTF-8: + schema: + $ref: "#/components/schemas/ProviderEnvironments" + examples: + ServiceProfileEnvironments: + $ref: "#/components/examples/ServiceProfileEnvironmentsResponse" + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/sp-400" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/sp-401" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/sp-403-read" + "500": + description: Internal Server Error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/sp-500" + "/fabric/v4/serviceProfiles/{serviceProfileId}/environments/{environmentId}/actions": + post: + tags: + - Service Profiles + summary: Service Profile Environment Actions + description: This API provides capability to perform actions on a service profile environment, such as validating an activation key.Beta + operationId: serviceProfileEnvironmentAction + parameters: + - name: serviceProfileId + in: path + description: Service Profile UUID + required: true + schema: + $ref: "#/components/schemas/ServiceProfileId" + - name: environmentId + in: path + description: Provider Environment Reference + required: true + schema: + $ref: "#/components/schemas/EnvironmentId" + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/EnvironmentActionRequest" + examples: + ValidateActivationKey: + value: + type: VALIDATE_ACTIVATION_KEY + keyDetails: + value: key_here + required: true + responses: + "201": + description: Successful service profile environment action operation + content: + application/json: + schema: + $ref: "#/components/schemas/EnvironmentActionResponse" + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/sp-400" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/sp-401" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/sp-403-update" + "500": + description: Internal Server Error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/sp-500" "/fabric/v4/serviceProfiles/{serviceProfileId}/metros": get: tags: @@ -5092,6 +5250,292 @@ paths: examples: example: $ref: "#/components/examples/500_internal_error" + /fabric/v4/opticalConnects: + post: + tags: + - Optical Metro Connects + summary: Create Optical Metro Connect Service + description: | + Create a single Optical Metro Connect circuit. + operationId: createOpticalConnect + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/OpticalConnectPostRequest" + examples: + COLOToCOLO: + $ref: "#/components/examples/ColoOpticalConnectCreate" + COLOToRemote: + $ref: "#/components/examples/RemoteOpticalConnectCreate" + COLOToBMMR: + $ref: "#/components/examples/BMMROpticalConnectCreate" + required: true + responses: + "202": + description: Accepted Operation + content: + application/json: + schema: + $ref: "#/components/schemas/OpticalConnectResponse" + examples: + COLOToCOLO: + $ref: "#/components/examples/ColoOpticalConnectResponseExample" + COLOToRemote: + $ref: "#/components/examples/RemoteOpticalConnectResponseExample" + COLOToBMMR: + $ref: "#/components/examples/BMMROpticalConnectResponseExample" + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/OpticalConnect_400" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/OpticalConnect_403" + "404": + description: Not Found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/OpticalConnect_404" + "500": + description: Internal Server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/OpticalConnect_500" + /fabric/v4/opticalConnects/bulk: + post: + tags: + - Optical Metro Connects + summary: Create Dual Diverse Optical Metro Connect Service + description: | + Create a dual diverse pair of circuits on separate optical paths. + operationId: createBulkOpticalConnect + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/BulkOpticalConnectRequest" + examples: + COLOToCOLO: + $ref: "#/components/examples/ColoOpticalConnectBulkCreate" + COLOToRemote: + $ref: "#/components/examples/RemoteOpticalConnectBulkCreate" + COLOToBMMR: + $ref: "#/components/examples/BMMROpticalConnectBulkCreate" + required: true + responses: + "202": + description: Accepted Operation + content: + application/json: + schema: + $ref: "#/components/schemas/OpticalConnectBulk" + examples: + COLOToCOLO: + $ref: "#/components/examples/ColoOpticalConnectBulkResponseExample" + COLOToRemote: + $ref: "#/components/examples/RemoteOpticalConnectBulkResponseExample" + COLOToBMMR: + $ref: "#/components/examples/BMMROpticalConnectBulkResponseExample" + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/OpticalConnect_400" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/OpticalConnect_403" + "404": + description: Not Found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/OpticalConnect_404" + "500": + description: Internal Server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/OpticalConnect_500" + "/fabric/v4/opticalConnects/{opticalConnectId}": + get: + tags: + - Optical Metro Connects + summary: Get Optical Metro Connect Service + description: | + Get a single Optical Metro Connect by UUID. + operationId: getOpticalConnectByUuid + parameters: + - name: opticalConnectId + in: path + description: Unique identifier of an Optical Connect. + required: true + schema: + $ref: "#/components/schemas/OpticalConnectId" + responses: + "200": + description: Successful Operation + content: + application/json: + schema: + $ref: "#/components/schemas/OpticalConnectResponse" + examples: + COLOToCOLO: + $ref: "#/components/examples/ColoOpticalConnectResponseExample" + COLOToRemote: + $ref: "#/components/examples/RemoteOpticalConnectResponseExample" + COLOToBMMR: + $ref: "#/components/examples/BMMROpticalConnectResponseExample" + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/OpticalConnect_400" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/OpticalConnect_403" + "404": + description: Not Found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/OpticalConnect_404" + "500": + description: Internal Server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/OpticalConnect_500" + /fabric/v4/opticalConnects/search: + post: + tags: + - Optical Metro Connects + summary: Search Optical Metro Connect Services + description: | + Get Optical Metro Connects matching the supplied criteria, with optional filtering, pagination and sorting. + operationId: searchOpticalConnect + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/OpticalConnectSearchRequest" + examples: + SearchFilterByStatus: + $ref: "#/components/examples/SearchOpticalConnectFilterByStatus" + SearchFilterByName: + $ref: "#/components/examples/SearchOpticalConnectByName" + SearchFilterOrAnd: + $ref: "#/components/examples/SearchOpticalConnectFilterOrAnd" + required: true + responses: + "200": + description: Successful operation + content: + application/json: + schema: + $ref: "#/components/schemas/OpticalConnectServiceSearchResponse" + examples: + Example: + $ref: "#/components/examples/OpticalConnectSearchResponseExample" + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/OpticalConnect_400_invalid_sorting" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/OpticalConnect_401" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/OpticalConnect_403" + "404": + description: Not Found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/OpticalConnect_404" + "500": + description: Internal Server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/OpticalConnect_500" /fabric/v4/metros: get: tags: @@ -5157,7 +5601,7 @@ paths: examples: example: $ref: "#/components/examples/500_metros" - "/fabric/v4/metros/{metroCode}": + /fabric/v4/metros/{metroCode}: get: tags: - Metros @@ -5474,6 +5918,8 @@ paths: examples: portExample: $ref: "#/components/examples/portByUUID" + maintenanceScheduledPortExample: + $ref: "#/components/examples/maintenanceScheduledPortByUUID" "400": description: Bad request content: @@ -5713,6 +6159,8 @@ paths: $ref: "#/components/examples/portSearchByOptionalFilters" PortSearchRangeOperators: $ref: "#/components/examples/portSearchRangeOperators" + PortSearchByMaintenanceStatus: + $ref: "#/components/examples/portSearchByMaintenanceStatus" required: true responses: "200": @@ -9697,7 +10145,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/CloudRouter" + $ref: "#/components/schemas/CloudRouterReadResponse" examples: cloudRouterResponse: $ref: "#/components/examples/CloudRouterResponseExample" @@ -10073,7 +10521,7 @@ paths: examples: example: $ref: "#/components/examples/500" - "/fabric/v4/routers/{routerId}/actions/search": + /fabric/v4/routers/{routerId}/actions/search: post: tags: - Cloud Routers @@ -12966,261 +13414,33 @@ paths: examples: example: $ref: "#/components/examples/500" - "/fabric/v4/streams/{streamId}": - get: - tags: - - Streams - summary: Get Stream - description: This API provides capability to get user's stream - operationId: getStreamByUuid - parameters: - - name: streamId - in: path - description: Stream UUID - required: true - schema: - $ref: "#/components/schemas/StreamId" - responses: - "200": - description: Stream object - content: - application/json: - schema: - $ref: "#/components/schemas/Stream" - examples: - StreamSubscriptionResponse: - $ref: "#/components/examples/StreamResponseExample" - "400": - description: Bad request - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorList" - "401": - description: Unauthorized - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorList" - examples: - example: - $ref: "#/components/examples/401" - "403": - description: Forbidden - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorList" - examples: - example: - $ref: "#/components/examples/403" - "404": - description: Not Found - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorList" - examples: - example: - $ref: "#/components/examples/404" - "500": - description: Internal server error - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorList" - examples: - example: - $ref: "#/components/examples/500" - put: - tags: - - Streams - summary: Update Stream - description: This API provides capability to update user's stream - operationId: updateStreamByUuid - parameters: - - name: streamId - in: path - description: Stream UUID - required: true - schema: - $ref: "#/components/schemas/StreamId" - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/StreamPutRequest" - examples: - UpdateStream: - $ref: "#/components/examples/StreamPutRequestExample" - required: true - responses: - "202": - description: Stream object - content: - application/json: - schema: - $ref: "#/components/schemas/Stream" - examples: - StreamResponse: - $ref: "#/components/examples/StreamResponseExample" - "400": - description: Bad request - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorList" - "401": - description: Unauthorized - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorList" - examples: - example: - $ref: "#/components/examples/401" - "403": - description: Forbidden - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorList" - examples: - example: - $ref: "#/components/examples/403" - "404": - description: Not Found - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorList" - examples: - example: - $ref: "#/components/examples/404" - "415": - description: Unsupported Media Type - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorList" - examples: - example: - $ref: "#/components/examples/415" - "500": - description: Internal server error - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorList" - examples: - example: - $ref: "#/components/examples/500" - delete: - tags: - - Streams - summary: Delete Stream - description: This API provides capability to delete user's stream - operationId: deleteStreamByUuid - parameters: - - name: streamId - in: path - description: Stream UUID - required: true - schema: - $ref: "#/components/schemas/StreamId" - responses: - "202": - description: Stream object - content: - application/json: - schema: - $ref: "#/components/schemas/Stream" - examples: - StreamSubscriptionResponse: - $ref: "#/components/examples/StreamDeleteRequestExample" - "400": - description: Bad request - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorList" - "401": - description: Unauthorized - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorList" - examples: - example: - $ref: "#/components/examples/401" - "403": - description: Forbidden - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorList" - examples: - example: - $ref: "#/components/examples/403" - "404": - description: Not Found - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorList" - examples: - example: - $ref: "#/components/examples/404" - "500": - description: Internal server error - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorList" - examples: - example: - $ref: "#/components/examples/500" - /fabric/v4/streamAssets/search: + /fabric/v4/streams/search: post: tags: - Streams - summary: Get Assets - description: This API provides capability to retrieve stream assets - operationId: getStreamsAssets - parameters: - - name: offset - in: query - description: offset - required: false - schema: - type: integer - example: 1 - - name: limit - in: query - description: number of records to fetch - required: false - schema: - type: integer - example: 10 + summary: Search Streams + description: This API provides capability to search streams + operationId: searchStreams + parameters: [] requestBody: content: application/json: schema: - $ref: "#/components/schemas/StreamAssetSearchRequest" + $ref: "#/components/schemas/StreamSearchRequest" examples: - SearchAssets: - $ref: "#/components/examples/StreamAssetSearchRequestExample" - required: true + SearchStreams: + $ref: "#/components/examples/StreamSearchRequestExample" + required: false responses: "200": description: Successful operation content: application/json: schema: - $ref: "#/components/schemas/GetAllStreamAssetResponse" + $ref: "#/components/schemas/SearchStreamResponse" examples: Example: - $ref: "#/components/examples/stream-asset-get-all-example" + $ref: "#/components/examples/stream-search-all-example" "401": description: Unauthorized content: @@ -13257,26 +13477,14 @@ paths: examples: example: $ref: "#/components/examples/500" - "/fabric/v4/streams/{streamId}/{asset}/{assetId}": + "/fabric/v4/streams/{streamId}": get: tags: - Streams - summary: Get Asset - description: This API provides capability to get user's assets attached to a stream - operationId: getStreamAssetByUuid + summary: Get Stream + description: This API provides capability to get user's stream + operationId: getStreamByUuid parameters: - - name: assetId - in: path - description: asset UUID - required: true - schema: - $ref: "#/components/schemas/AssetId_1" - - name: asset - in: path - description: asset - required: true - schema: - $ref: "#/components/schemas/Asset" - name: streamId in: path description: Stream UUID @@ -13285,14 +13493,309 @@ paths: $ref: "#/components/schemas/StreamId" responses: "200": - description: Stream asset object + description: Stream object content: application/json: schema: - $ref: "#/components/schemas/StreamAsset" + $ref: "#/components/schemas/Stream" examples: StreamSubscriptionResponse: - $ref: "#/components/examples/StreamConnectionAssetResponseExample" + $ref: "#/components/examples/StreamResponseExample" + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/401" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/403" + "404": + description: Not Found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/404" + "500": + description: Internal server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/500" + put: + tags: + - Streams + summary: Update Stream + description: This API provides capability to update user's stream + operationId: updateStreamByUuid + parameters: + - name: streamId + in: path + description: Stream UUID + required: true + schema: + $ref: "#/components/schemas/StreamId" + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/StreamPutRequest" + examples: + UpdateStream: + $ref: "#/components/examples/StreamPutRequestExample" + required: true + responses: + "202": + description: Stream object + content: + application/json: + schema: + $ref: "#/components/schemas/Stream" + examples: + StreamResponse: + $ref: "#/components/examples/StreamResponseExample" + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/401" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/403" + "404": + description: Not Found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/404" + "415": + description: Unsupported Media Type + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/415" + "500": + description: Internal server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/500" + delete: + tags: + - Streams + summary: Delete Stream + description: This API provides capability to delete user's stream + operationId: deleteStreamByUuid + parameters: + - name: streamId + in: path + description: Stream UUID + required: true + schema: + $ref: "#/components/schemas/StreamId" + responses: + "202": + description: Stream object + content: + application/json: + schema: + $ref: "#/components/schemas/Stream" + examples: + StreamSubscriptionResponse: + $ref: "#/components/examples/StreamDeleteRequestExample" + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/401" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/403" + "404": + description: Not Found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/404" + "500": + description: Internal server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/500" + /fabric/v4/streamAssets/search: + post: + tags: + - Streams + summary: Search Stream Assets + description: This API provides capability to search stream assets + operationId: searchStreamAssets + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/StreamAssetSearchRequest" + examples: + SearchStreamAssets: + $ref: "#/components/examples/StreamAssetSearchRequestExample" + required: true + responses: + "200": + description: Successful operation + content: + application/json: + schema: + $ref: "#/components/schemas/SearchStreamAssetResponse" + examples: + Example: + $ref: "#/components/examples/stream-asset-search-all-example" + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/401" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/403" + "404": + description: Not Found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/404" + "500": + description: Internal server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/500" + "/fabric/v4/streams/{streamId}/{asset}/{assetId}": + get: + tags: + - Streams + summary: Get Asset + description: This API provides capability to get user's assets attached to a stream + operationId: getStreamAssetByUuid + parameters: + - name: assetId + in: path + description: asset UUID + required: true + schema: + $ref: "#/components/schemas/AssetId_1" + - name: asset + in: path + description: asset + required: true + schema: + $ref: "#/components/schemas/Asset" + - name: streamId + in: path + description: Stream UUID + required: true + schema: + $ref: "#/components/schemas/StreamId" + responses: + "200": + description: Stream asset object + content: + application/json: + schema: + $ref: "#/components/schemas/StreamAsset" + examples: + StreamSubscriptionResponse: + $ref: "#/components/examples/StreamConnectionAssetResponseExample" "400": description: Bad request content: @@ -13614,8 +14117,14 @@ paths: $ref: "#/components/examples/StreamSubscriptionPostRequestExampleTeams" CreateStreamSubscription_Servicenow: $ref: "#/components/examples/StreamSubscriptionPostRequestExampleServicenow" - CreateStreamSubscription_Webhook: - $ref: "#/components/examples/StreamSubscriptionPostRequestExampleWebhook" + CreateStreamSubscription_Generic_Webhook_No_Auth: + $ref: "#/components/examples/StreamSubscriptionPostRequestExampleGenericWebhookNoAuth" + CreateStreamSubscription_Generic_Webhook_With_ApiKey: + $ref: "#/components/examples/StreamSubscriptionPostRequestExampleGenericWebhookApiKey" + CreateStreamSubscription_Generic_Webhook_With_AccessToken: + $ref: "#/components/examples/StreamSubscriptionPostRequestExampleGenericWebhookAccessToken" + CreateStreamSubscription_Generic_Webhook_With_Username_Password: + $ref: "#/components/examples/StreamSubscriptionPostRequestExampleGenericWebhookUsernamePassword" CreateStreamSubscription_Grafana_Webhook: $ref: "#/components/examples/StreamSubscriptionPostRequestExampleGrafanaWebhook" CreateStreamSubscription_Google_PubSub: @@ -13905,6 +14414,75 @@ paths: examples: example: $ref: "#/components/examples/500" + /fabric/v4/streamSubscriptions/search: + post: + tags: + - Stream Subscriptions + summary: Search Stream Subscriptions + description: This API provides capability to search stream subscriptions + operationId: searchStreamSubscriptions + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/StreamSubscriptionSearchRequest" + examples: + SearchStreamSubscriptions: + $ref: "#/components/examples/StreamSubscriptionSearchRequestExample" + required: true + responses: + "200": + description: Successful operation + content: + application/json: + schema: + $ref: "#/components/schemas/SearchStreamSubscriptionResponse" + examples: + Example: + $ref: "#/components/examples/stream-subscription-search-all-example" + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/401" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/403" + "404": + description: Not Found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/404" + "500": + description: Internal server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/500" "/fabric/v4/streams/{streamId}/alertRules": get: tags: @@ -14302,8 +14880,8 @@ paths: $ref: "#/components/schemas/CompanyProfileRequest" required: true responses: - "201": - description: Company profile created successfully + "202": + description: Company profile created and pending for approval content: application/json: schema: @@ -14827,7 +15405,52 @@ paths: application/json: schema: $ref: "#/components/schemas/ErrorList" - "/fabric/v4/logos/{uuid}": + /fabric/v4/logos: + post: + tags: + - Logos + summary: Create Logo + description: Create Logo for Equinix Fabric™ Company Profile. + operationId: createLogo + parameters: [] + requestBody: + content: + multipart/form-data: + schema: + $ref: "#/components/schemas/LogoRequest" + required: true + responses: + "201": + description: Successful Create operation + content: + application/json: + schema: + $ref: "#/components/schemas/LogoResponse" + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + "500": + description: Internal Server Error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + /fabric/v4/logos/{uuid}: get: tags: - Logos @@ -14925,336 +15548,3943 @@ paths: application/json: schema: $ref: "#/components/schemas/ErrorList" - /fabric/v4/tags: + /fabric/v4/loas: + post: + tags: + - Loas + summary: Create Loa + description: The API provides capability to create a new Loa + operationId: createLoa + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/CreateLoa" + examples: + IssueLoa-OnCageWithCageId: + $ref: "#/components/examples/IssueLoaOnCageWithCageId" + IssueLoa-OnPatchPanelPort: + $ref: "#/components/examples/IssueLoaOnPatchPanelPort" + IssueLoa-OnPatchPanel: + $ref: "#/components/examples/IssueLoaOnPatchPanel" + RequestLoa-OnCage: + $ref: "#/components/examples/RequestLoaOnCage" + RequestLoa-OnPatchPanel: + $ref: "#/components/examples/RequestLoaOnPatchPanel" + RequestLoa-OnPatchPanelPort: + $ref: "#/components/examples/RequestLoaOnPatchPanelPort" + required: true + responses: + "202": + description: Accepted + content: + application/json: + schema: + $ref: "#/components/schemas/LoaResponse" + examples: + ByRequestor: + $ref: "#/components/examples/LoaCreateResponseByRequestor" + ByIssuerWithCageType: + $ref: "#/components/examples/LoaCreateResponseByIssuerWithCageType" + ByIssuerWithPatchPanelPortType: + $ref: "#/components/examples/LoaCreateResponseByIssuerWithPatchPanelPortType" + ByIssuerWithPatchPanelType: + $ref: "#/components/examples/LoaCreateResponseByIssuerWithPatchPanelType" + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Loa_400" + "401": + description: Unauthorized request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Loa_401" + "403": + description: Operation not allowed + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Loa_403" + "404": + description: Not found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Loa_404" + "500": + description: Internal Server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Loa_500" + "/fabric/v4/loas/{loaId}": get: tags: - - Tags - summary: List Tags - description: Get all Tags - operationId: listTags + - Loas + summary: Get Loa + description: The API provides capability to get Loa details by Loa ID + operationId: getLoaByUuid parameters: - - name: type - in: query - description: Filter by tag type - required: false + - name: loaId + in: path + description: Loa UUID + required: true schema: - type: array - items: - type: string - - name: offset - in: query - description: Offset for pagination - required: false + $ref: "#/components/schemas/LoaId" + responses: + "200": + description: Successful Operation + content: + application/json: + schema: + $ref: "#/components/schemas/LoaResponse" + examples: + LoaExample: + $ref: "#/components/examples/LoaResponse" + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Loa_400" + "401": + description: Unauthorized request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Loa_401" + "403": + description: Operation not allowed + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Loa_403" + "404": + description: Not found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Loa_404" + "500": + description: Internal Server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Loa_500" + patch: + tags: + - Loas + summary: Update Loa + description: The API provides capability to update Loa details by Loa ID + operationId: updateLoaByUuid + parameters: + - name: loaId + in: path + description: Loa UUID + required: true schema: - type: integer - format: int32 - default: 0 - - name: limit - in: query - description: Limit for pagination - required: false + $ref: "#/components/schemas/LoaId" + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/LoaUpdate" + examples: + LoaPatchRequest: + $ref: "#/components/examples/LoaPatchRequest" + required: true + responses: + "200": + description: Successful operation + content: + application/json: + schema: + $ref: "#/components/schemas/LoaResponse" + examples: + PatchLoaResponse: + $ref: "#/components/examples/LoaPatchResponse" + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Loa_400" + "401": + description: Unauthorized request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Loa_401" + "403": + description: Operation not allowed + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Loa_403" + "404": + description: Not found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Loa_404" + "500": + description: Internal Server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Loa_500" + "/fabric/v4/loas/{loaId}/actions": + post: + tags: + - Loas + summary: Loa Actions + description: The API provides capability to perform actions on Loa + operationId: performLoaAction + parameters: + - name: loaId + in: path + description: Loa UUID + required: true schema: - maximum: 100 - type: integer - format: int32 - default: 20 + $ref: "#/components/schemas/LoaId" + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/LoaActionRequest" + examples: + AuthorizeLoa: + $ref: "#/components/examples/AuthorizeLoaActionRequest" + AcceptLoa: + $ref: "#/components/examples/AcceptLoaActionRequest" + CopyLoa: + $ref: "#/components/examples/CopyLoaActionRequest" + SendLoa: + $ref: "#/components/examples/SendLoaActionRequest" + CancelLoa: + $ref: "#/components/examples/CancelLoaActionRequest" + required: true + responses: + "202": + description: Accepted + content: + application/json: + schema: + $ref: "#/components/schemas/LoaActionResponse" + examples: + AuthorizeLoa: + $ref: "#/components/examples/AuthorizeLoaActionResponse" + AcceptLoa: + $ref: "#/components/examples/AcceptLoaActionResponse" + SendLoa: + $ref: "#/components/examples/SendLoaActionResponse" + CopyLoa: + $ref: "#/components/examples/CopyLoaActionResponse" + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Loa_Action_400" + "401": + description: Unauthorized request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Loa_401" + "403": + description: Operation not allowed + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Loa_403" + "404": + description: Not found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Loa_Action_404" + "500": + description: Internal Server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Loa_500" + "/fabric/v4/loas/{loaId}/actions/{actionId}": + get: + tags: + - Loas + summary: Get Loa Action by Action ID + description: This API provides capability to fetch action details + operationId: getLoaActionsByUuid + parameters: + - name: loaId + in: path + description: Loa UUID + required: true + schema: + $ref: "#/components/schemas/LoaId" + - name: actionId + in: path + description: Action UUID + required: true + schema: + $ref: "#/components/schemas/ActionId_2" responses: "200": - description: Successful List operation + description: Successful Operation content: application/json: schema: - $ref: "#/components/schemas/TagListResponse" + $ref: "#/components/schemas/LoaActionResponse" + examples: + AuthorizeLoaActionExample: + $ref: "#/components/examples/AuthorizeLoaActionResponse" "400": description: Bad request content: application/json: schema: $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Loa_Action_400" "401": - description: Unauthorized + description: Unauthorized request content: application/json: schema: $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Loa_401" "403": - description: Forbidden + description: Operation not allowed + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Loa_403" + "404": + description: Not found content: application/json: schema: $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Loa_Action_404" "500": - description: Internal Server Error + description: Internal Server error content: application/json: schema: $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Loa_500" + /fabric/v4/loas/search: post: tags: - - Tags - summary: Create Tag - description: Create Tag for Equinix Fabric™. - operationId: createTag + - Loas + summary: Search Loas + description: The API provides capability to get list of user's Loa using search criteria, including optional filtering, pagination and sorting + operationId: searchLoa parameters: [] requestBody: content: application/json: schema: - $ref: "#/components/schemas/TagRequest" + $ref: "#/components/schemas/LoaSearchRequest" + examples: + SearchByNameWithType: + $ref: "#/components/examples/LoaSearchByNameWithType" + SearchByStateWithPartnerOrIbx: + $ref: "#/components/examples/LoaSearchStateWithPartnerOrIbx" required: true responses: - "201": - description: Successful Create operation + "200": + description: Successful operation content: application/json: schema: - $ref: "#/components/schemas/TagResponse" + $ref: "#/components/schemas/LoaSearchResponse" + examples: + example: + $ref: "#/components/examples/LoaSearchResponse" "400": description: Bad request content: application/json: schema: $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Loa_400" "401": - description: Unauthorized + description: Unauthorized request content: application/json: schema: $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Loa_401" "403": - description: Forbidden + description: Operation not allowed + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Loa_403" + "404": + description: Not found content: application/json: schema: $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Loa_404" "500": - description: Internal Server Error + description: Internal Server error content: application/json: schema: $ref: "#/components/schemas/ErrorList" -components: - schemas: - AgentTemplateGetAllResponse: - type: object - properties: - pagination: - $ref: "#/components/schemas/Pagination" - data: - type: array - description: Data returned from the API call. - items: - $ref: "#/components/schemas/AgentTemplates" - ErrorList: - type: array - description: List of Error Message - items: - $ref: "#/components/schemas/Error" - AgentTemplateId: - type: string - description: Agent Template UUID - format: uuid - example: 657400f8-d360-11e9-bb65-2a2ae2dbcce5 - AgentTemplates: - type: object - properties: - href: - type: string - description: Agent Template URI - format: uuid - example: c9b8e7a2-f3b1-4576-a4a9-1366a63df170 - type: - type: string - description: type - example: ANO_AGENT_TEMPLATE - uuid: - type: string - description: Equinix-assigned access point identifier - format: uuid - example: c9b8e7a2-f3b1-4576-a4a9-1366a63df170 - name: - maxLength: 50 - minLength: 3 - type: string - description: Equinix-provided agent template name - description: - type: string - description: Equinix-provided agent template description - state: - type: string - description: Agent state - enum: - - PROVISIONING - - PROVISIONED - - REPROVISIONING - - DEPROVISIONING - - DEPROVISIONED - - FAILED - enabled: - type: boolean - description: Equinix-provided agent template enabled status - agentDefinition: - $ref: "#/components/schemas/AgentDefinition" - changeLog: - $ref: "#/components/schemas/Changelog" - description: Agent Template object - AgentGetAllResponse: - type: object - properties: - pagination: - $ref: "#/components/schemas/Pagination" - data: - type: array - description: Data returned from the API call. - items: - $ref: "#/components/schemas/Agents" - AgentPostRequest: - required: - - agentTemplate - - name - - project - - type - type: object - properties: - type: - type: string - example: ANO_AGENT - name: - maxLength: 50 - minLength: 3 - type: string - description: Customer-provided agent name - description: - maxLength: 500 - minLength: 0 - type: string - description: Customer-provided agent description - enabled: - type: boolean - description: Customer-provided agent enabled status - project: - $ref: "#/components/schemas/Project" - agentTemplate: - $ref: "#/components/schemas/AgentTemplate" - configuration: - $ref: "#/components/schemas/Configuration" - description: Create Agent - AgentTemplate: - type: object - properties: - uuid: - type: string - description: Agent Template Uuid - Configuration: - type: object - properties: - prompt: - type: string - description: Agent configuration prompt to be used for agent specification - Agents: - type: object - properties: - href: - type: string - description: Agent URI - format: uri - readOnly: true - example: https://api.equinix.com/fabric/v4/agents/3c9b8e7a2-f3b1-4576-a4a9-1366a63df170 - type: - type: string - description: type - example: ANO_AGENT - uuid: - type: string - description: Equinix-assigned access point identifier - format: uuid - example: c9b8e7a2-f3b1-4576-a4a9-1366a63df170 - name: - type: string - description: Customer-provided agent name - description: - type: string - description: Customer-provided agent description - state: - type: string - description: Agent state - enum: - - PROVISIONING - - PROVISIONED - - REPROVISIONING - - DEPROVISIONING - - DEPROVISIONED - - FAILED - enabled: - type: boolean - description: Customer-provided agent enabled status - project: - $ref: "#/components/schemas/Project" - agentTemplate: - $ref: "#/components/schemas/AgentTemplate" - configuration: - $ref: "#/components/schemas/Configuration" - changeLog: - $ref: "#/components/schemas/Changelog" - description: Agent object - AgentId: - type: string - description: Agent UUID - format: uuid - example: 557400f8-d360-11e9-bb65-2a2ae2dbcce4 - AgentPatchRequest: - required: - - op - - path - - value - type: object - properties: - path: - type: string - description: path inside document leading to updated parameters for /name, /description, /enabled, and /configration/prompt - example: /name - op: - type: string - description: Handy shortcut for operation name - example: replace - value: - description: new value for updated parameter - description: Update Agent - AgentGetActivities: - type: object - properties: - pagination: - $ref: "#/components/schemas/Pagination" - data: - type: array - description: Data returned from the API call. - items: - $ref: "#/components/schemas/AgentActivities" - CloudEventAssetType: - type: string - enum: - - ports - - connections - - routers - - metros - - serviceTokens - - networks - - projects - - organizations - - timeServices - - companyProfiles - AssetId: - type: string - description: Asset UUID - format: uuid - example: 757400f8-d360-11e9-bb65-2a2ae2dbcce6 - StartDateTime: - type: string - description: Start date and time - format: date-time - example: 2024-07-11T18:06:21Z - EndDateTime: - type: string + examples: + example: + $ref: "#/components/examples/Loa_500" + "/fabric/v4/loas/{loaId}/actions/search": + post: + tags: + - Loas + summary: Search Loa Actions + description: The API provides capability to get list of user's Loa Actions using search criteria, including optional filtering, pagination and sorting + operationId: searchLoaAction + parameters: + - name: loaId + in: path + description: Loa UUID + required: true + schema: + $ref: "#/components/schemas/LoaId" + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/LoaActionSearchRequest" + examples: + ActionTypeSearch: + $ref: "#/components/examples/LoaActionSearchByActionType" + required: true + responses: + "200": + description: Successful Operation + content: + application/json: + schema: + $ref: "#/components/schemas/LoaActionSearchResponse" + examples: + LoaActionSearchExample: + $ref: "#/components/examples/LoaSearchActionResponse" + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Loa_Action_400" + "401": + description: Unauthorized request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Loa_401" + "403": + description: Operation not allowed + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Loa_403" + "404": + description: Not found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Loa_Action_404" + "500": + description: Internal Server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Loa_500" + "/fabric/v4/loas/{loaId}/consumers": + get: + tags: + - Loas + summary: Get Loa Consumers + description: The API provides capability to get Loa consumers by Loa ID + operationId: getLoaConsumersByLoaId + parameters: + - name: loaId + in: path + description: Loa UUID + required: true + schema: + $ref: "#/components/schemas/LoaId" + responses: + "200": + description: Successful Operation + content: + application/json: + schema: + $ref: "#/components/schemas/LoaConsumersResponse" + examples: + LoaConsumersExample: + $ref: "#/components/examples/LoaConsumersResponse" + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Loa_400" + "401": + description: Unauthorized request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Loa_401" + "403": + description: Operation not allowed + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Loa_403" + "404": + description: Not found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Loa_404" + "500": + description: Internal Server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Loa_500" + "/fabric/v4/loas/{loaId}/notes": + get: + tags: + - Loas + summary: Get Loa Notes + description: The API provides capability to get Loa notes by Loa ID + operationId: getLoaNotesByUuid + parameters: + - name: loaId + in: path + description: Loa UUID + required: true + schema: + $ref: "#/components/schemas/LoaId" + responses: + "200": + description: Successful Operation + content: + application/json: + schema: + $ref: "#/components/schemas/LoaNotesResponse" + examples: + GetLoaNotesExample: + $ref: "#/components/examples/LoaNotesResponse" + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Loa_400" + "401": + description: Unauthorized request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Loa_401" + "403": + description: Operation not allowed + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Loa_403" + "404": + description: Not found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Loa_404" + "500": + description: Internal Server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Loa_500" + post: + tags: + - Loas + summary: Create Loa Note + description: The API provides capability to create Loa note by Loa ID + operationId: createLoaNoteByLoaId + parameters: + - name: loaId + in: path + description: Loa UUID + required: true + schema: + $ref: "#/components/schemas/LoaId" + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/CreateLoaNote" + examples: + LoaNoteRequest: + $ref: "#/components/examples/LoaNoteRequest" + required: true + responses: + "201": + description: Created + content: + application/json: + schema: + $ref: "#/components/schemas/LoaNoteDetails" + examples: + CreateLoaNoteExample: + $ref: "#/components/examples/CreateLoaNoteResponse" + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Loa_400" + "401": + description: Unauthorized request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Loa_401" + "403": + description: Operation not allowed + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Loa_403" + "404": + description: Not found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Loa_404" + "500": + description: Internal Server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Loa_500" + /fabric/v4/tags: + get: + tags: + - Tags + summary: List Tags + description: Get all Tags + operationId: listTags + parameters: + - name: type + in: query + description: Filter by tag type + required: false + schema: + type: array + items: + type: string + - name: offset + in: query + description: Offset for pagination + required: false + schema: + type: integer + format: int32 + default: 0 + - name: limit + in: query + description: Limit for pagination + required: false + schema: + maximum: 100 + type: integer + format: int32 + default: 20 + responses: + "200": + description: Successful List operation + content: + application/json: + schema: + $ref: "#/components/schemas/TagListResponse" + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + "500": + description: Internal Server Error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + post: + tags: + - Tags + summary: Create Tag + description: Create Tag for Equinix Fabric™. + operationId: createTag + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/TagRequest" + required: true + responses: + "202": + description: Successfully created tag and pending for approval + content: + application/json: + schema: + $ref: "#/components/schemas/TagResponse" + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + "500": + description: Internal Server Error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + /fabric/v4/tags/{uuid}: + get: + tags: + - Tags + summary: Get Tag + description: Get Tag by UUID + operationId: getTagByUuid + parameters: + - name: uuid + in: path + description: UUID of the Tag + required: true + schema: + type: string + format: uuid + responses: + "200": + description: Successful Get operation + content: + application/json: + schema: + $ref: "#/components/schemas/TagResponse" + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + "404": + description: Not Found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + "500": + description: Internal Server Error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + /fabric/v4/appDomains: + post: + tags: + - Application Domains + summary: Create App Domain + description: This API provides capability to create user's App Domain + operationId: createAppDomain + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/AppDomainPostRequest" + examples: + CreateAppDomain: + $ref: "#/components/examples/AppDomainCreate" + required: true + responses: + "202": + description: App Domain object + content: + application/json: + schema: + $ref: "#/components/schemas/AppDomain" + examples: + AppDomainResponse: + $ref: "#/components/examples/AppDomainPostResponseExample" + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + InvalidName: + $ref: "#/components/examples/AppDomain_400_InvalidName" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppDomain_401" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppDomain_403" + "415": + description: Unsupported Media Type + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppDomain_415" + "500": + description: Internal server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppDomain_500" + "/fabric/v4/appDomains/{appDomainId}": + get: + tags: + - Application Domains + summary: Get App Domain + description: This API provides capability to retrieve user's App Domain + operationId: getAppDomainByUuid + parameters: + - name: appDomainId + in: path + description: App Domain UUID + required: true + schema: + $ref: "#/components/schemas/AppDomainId" + responses: + "200": + description: App Domain object + content: + application/json: + schema: + $ref: "#/components/schemas/AppDomain" + examples: + AppDomainResponse: + $ref: "#/components/examples/AppDomainGetResponseExample" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppDomain_401" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppDomain_403" + "404": + description: Not Found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppDomain_404" + "500": + description: Internal server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppDomain_500" + delete: + tags: + - Application Domains + summary: Delete App Domain + description: This API provides capability to delete user's App Domain + operationId: deleteAppDomainByUuid + parameters: + - name: appDomainId + in: path + description: App Domain UUID + required: true + schema: + $ref: "#/components/schemas/AppDomainId" + responses: + "202": + description: App Domain object + content: + application/json: + schema: + $ref: "#/components/schemas/AppDomain" + examples: + AppDomainResponse: + $ref: "#/components/examples/AppDomainDeleteResponseExample" + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppDomain_400_InvalidState" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppDomain_401" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppDomain_403" + "404": + description: Not Found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppDomain_404" + "500": + description: Internal server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppDomain_500" + patch: + tags: + - Application Domains + summary: Update App Domain + description: This API provides capability to update user's App Domain + operationId: updateAppDomainByUuid + parameters: + - name: appDomainId + in: path + description: App Domain UUID + required: true + schema: + $ref: "#/components/schemas/AppDomainId" + requestBody: + content: + application/json-patch+json: + schema: + $ref: "#/components/schemas/AppDomainUpdateRequest" + examples: + UpdateDescription: + $ref: "#/components/examples/AppDomainUpdateDescription" + required: true + responses: + "202": + description: App Domain object + content: + application/json: + schema: + $ref: "#/components/schemas/AppDomain" + examples: + AppDomainResponse: + $ref: "#/components/examples/AppDomainPatchResponseExample" + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppDomain_400_InvalidOperation" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/401" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppDomain_403" + "404": + description: Not Found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppDomain_404" + "415": + description: Unsupported Media Type + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppDomain_415" + "500": + description: Internal server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppDomain_500" + /fabric/v4/appDomains/search: + post: + tags: + - Application Domains + summary: Search App Domains + description: The API provides capability to get list of user's App Domains using search criteria, including optional filtering, pagination and sorting + operationId: searchAppDomains + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/AppDomainSearchRequest" + examples: + SearchFilterByStatus: + $ref: "#/components/examples/AppDomainSearchFilterByStatus" + SearchFilterByName: + $ref: "#/components/examples/AppDomainSearchFilterByName" + SearchFilterOrAnd: + $ref: "#/components/examples/AppDomainSearchFilterOrAnd" + required: true + responses: + "200": + description: Successful operation + content: + application/json: + schema: + $ref: "#/components/schemas/AppDomainSearchResponse" + examples: + Example: + $ref: "#/components/examples/AppDomainSearchExample" + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppDomain_400_InvalidSorting" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppDomain_401" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppDomain_403" + "415": + description: Unsupported Media Type + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppDomain_415" + "500": + description: Internal server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppDomain_500" + "/fabric/v4/appDomains/{appDomainId}/appLinks": + get: + tags: + - Application Domains + summary: Get attached App Links for App Domain + description: This API provides capability to retrieve App Links attached to an App Domain. + operationId: getAttachedAppLinksByAppDomainId + parameters: + - name: appDomainId + in: path + description: App Domain UUID + required: true + schema: + $ref: "#/components/schemas/AppDomainId" + - name: offset + in: query + description: offset + required: false + schema: + type: integer + example: 1 + - name: limit + in: query + description: number of records to fetch + required: false + schema: + type: integer + example: 10 + - name: state + in: query + description: Filter attached App Links by one or more lifecycle states. + required: false + style: form + explode: false + schema: + $ref: "#/components/schemas/AttachedAppLinkState" + - name: order + in: query + description: Sort order for attached App Links. + required: false + schema: + $ref: "#/components/schemas/AttachedAppLinkOrder" + - name: style + in: query + description: Detail level of the response. + required: false + schema: + $ref: "#/components/schemas/Style" + responses: + "200": + description: Successful operation + content: + application/json: + schema: + $ref: "#/components/schemas/AppDomainAttachedAppLinks" + examples: + Example: + $ref: "#/components/examples/AppDomainAttachedAppLinksGetResponseExample" + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppDomain_400_InvalidSorting" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppDomain_401" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppDomain_403" + "404": + description: Not Found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppDomain_404" + "500": + description: Internal server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppDomain_500" + /fabric/v4/appLinks: + post: + tags: + - Application Links + summary: Create App Link + description: This API provides capability to create user's App Link + operationId: createAppLink + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/AppLinkPostRequest" + examples: + CreateAppLink: + $ref: "#/components/examples/AppLinkCreate" + required: true + responses: + "202": + description: App Link object + content: + application/json: + schema: + $ref: "#/components/schemas/AppLink" + examples: + AppLinkResponse: + $ref: "#/components/examples/AppLinkPostResponseExample" + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + InvalidName: + $ref: "#/components/examples/AppLink_400_InvalidName" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_401" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_403" + "415": + description: Unsupported Media Type + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_415" + "500": + description: Internal server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_500" + "/fabric/v4/appLinks/{appLinkId}": + get: + tags: + - Application Links + summary: Get App Link + description: This API provides capability to retrieve user's App Link + operationId: getAppLinkByUuid + parameters: + - name: appLinkId + in: path + description: App Link UUID + required: true + schema: + $ref: "#/components/schemas/AppLinkId" + responses: + "200": + description: App Link object + content: + application/json: + schema: + $ref: "#/components/schemas/AppLink" + examples: + AppLinkResponse: + $ref: "#/components/examples/AppLinkGetResponseExample" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_401" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_403" + "404": + description: Not Found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_404" + "500": + description: Internal server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_500" + delete: + tags: + - Application Links + summary: Delete App Link + description: This API provides capability to delete user's App Link + operationId: deleteAppLinkByUuid + parameters: + - name: appLinkId + in: path + description: App Link UUID + required: true + schema: + $ref: "#/components/schemas/AppLinkId" + responses: + "202": + description: App Link object + content: + application/json: + schema: + $ref: "#/components/schemas/AppLink" + examples: + AppLinkResponse: + $ref: "#/components/examples/AppLinkDeleteResponseExample" + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_400_InvalidState" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_401" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_403" + "404": + description: Not Found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_404" + "500": + description: Internal server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_500" + patch: + tags: + - Application Links + summary: Update App Link + description: This API provides capability to update user's App Link + operationId: updateAppLinkByUuid + parameters: + - name: appLinkId + in: path + description: App Link UUID + required: true + schema: + $ref: "#/components/schemas/AppLinkId" + requestBody: + content: + application/json-patch+json: + schema: + $ref: "#/components/schemas/AppLinkUpdateRequest" + examples: + UpdateName: + $ref: "#/components/examples/AppLinkUpdateName" + required: true + responses: + "202": + description: App Link object + content: + application/json: + schema: + $ref: "#/components/schemas/AppLink" + examples: + AppLinkResponse: + $ref: "#/components/examples/AppLinkPatchResponseExample" + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_400_InvalidOperation" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/401" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_403" + "404": + description: Not Found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_404" + "415": + description: Unsupported Media Type + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_415" + "500": + description: Internal server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_500" + /fabric/v4/appLinks/search: + post: + tags: + - Application Links + summary: Search App Links + description: The API provides capability to get list of user's App Links using search criteria, including optional filtering, pagination and sorting + operationId: searchAppLinks + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/AppLinkSearchRequest" + examples: + SearchFilterByStatus: + $ref: "#/components/examples/AppLinkSearchFilterByStatus" + SearchFilterByName: + $ref: "#/components/examples/AppLinkSearchFilterByName" + SearchFilterOrAnd: + $ref: "#/components/examples/AppLinkSearchFilterOrAnd" + required: true + responses: + "200": + description: Successful operation + content: + application/json: + schema: + $ref: "#/components/schemas/AppLinkSearchResponse" + examples: + Example: + $ref: "#/components/examples/AppLinkSearchExample" + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_400_InvalidSorting" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_401" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_403" + "415": + description: Unsupported Media Type + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_415" + "500": + description: Internal server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_500" + "/fabric/v4/appLinks/{appLinkId}/appDomains/{appDomainId}": + get: + tags: + - Application Links + summary: Get attached App Domain for App Link + description: This API provides ability to retrieve an App Domain attached to an App Link. + operationId: getAttachedAppDomainByUuid + parameters: + - name: appLinkId + in: path + description: App Link UUID + required: true + schema: + $ref: "#/components/schemas/AppLinkId" + - name: appDomainId + in: path + description: App Domain UUID + required: true + schema: + $ref: "#/components/schemas/AppDomainId" + responses: + "200": + description: Attached App Domain object + content: + application/json: + schema: + $ref: "#/components/schemas/AppLinkAppDomainAttachment" + examples: + AppLinkDomainResponse: + $ref: "#/components/examples/AppLinkAttachDomainResponse" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_401" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_403" + "404": + description: Not Found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_404" + "500": + description: Internal server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_500" + put: + tags: + - Application Links + summary: Attach App Domain to App Link + description: This API provides ability to attach the user's App Domain to App Link. + operationId: attachAppDomainToAppLink + parameters: + - name: appLinkId + in: path + description: App Link UUID + required: true + schema: + $ref: "#/components/schemas/AppLinkId" + - name: appDomainId + in: path + description: App Domain UUID + required: true + schema: + $ref: "#/components/schemas/AppDomainId" + responses: + "202": + description: Attach App Domain object + content: + application/json: + schema: + $ref: "#/components/schemas/AppLinkAppDomainAttachment" + examples: + AppLinkAttachDomainResponse: + $ref: "#/components/examples/AppLinkAttachDomainAttachResponse" + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_400_InvalidAttachState" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_401" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_403" + "404": + description: Not Found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_404" + "500": + description: Internal server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_500" + delete: + tags: + - Application Links + summary: Detach App Domain from App Link + description: This API provides ability to detach App Domain from App Link + operationId: detachAppDomainFromAppLink + parameters: + - name: appLinkId + in: path + description: App Link UUID + required: true + schema: + $ref: "#/components/schemas/AppLinkId" + - name: appDomainId + in: path + description: App Domain UUID + required: true + schema: + $ref: "#/components/schemas/AppDomainId" + responses: + "202": + description: Detach App Domain object + content: + application/json: + schema: + $ref: "#/components/schemas/AppLinkAppDomainAttachment" + examples: + AppLinkDetachDomainResponse: + $ref: "#/components/examples/AppLinkAttachDomainDetachResponse" + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_400_InvalidAttachState" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_401" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_403" + "404": + description: Not Found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_404" + "500": + description: Internal server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_500" + "/fabric/v4/appLinks/{appLinkId}/appDomains/search": + post: + tags: + - Application Links + summary: Search attached App Domain to App Link + description: The API provides capability to get list of user's attached App Domains using search criteria, including optional filtering, pagination and sorting + operationId: searchAttachedAppDomains + parameters: + - name: appLinkId + in: path + description: App Link UUID + required: true + schema: + $ref: "#/components/schemas/AppLinkId" + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/AppLinkAttachDomainSearchRequest" + examples: + SearchAttachedDomainFilterByStatus: + $ref: "#/components/examples/AppLinkAttachDomainSearchFilterByStatus" + SearchAttachedDomainFilterOrAnd: + $ref: "#/components/examples/AppLinkAttachDomainSearchFilterOrAnd" + required: true + responses: + "200": + description: Successful operation + content: + application/json: + schema: + $ref: "#/components/schemas/AppLinkAttachDomainSearchResponse" + examples: + Example: + $ref: "#/components/examples/AppLinkAttachDomainSearchExample" + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_400_InvalidSorting" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_401" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_403" + "415": + description: Unsupported Media Type + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_415" + "500": + description: Internal server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_500" + "/fabric/v4/appLinks/{appLinkId}/appDomains": + get: + tags: + - Application Links + summary: Get attached App Domains for App Link + description: This API provides capability to retrieve App Domains attached to an App Link. + operationId: getAttachedAppDomainsByAppLinkId + parameters: + - name: appLinkId + in: path + description: App Link UUID + required: true + schema: + $ref: "#/components/schemas/AppLinkId" + - name: offset + in: query + description: offset + required: false + schema: + type: integer + example: 1 + - name: limit + in: query + description: number of records to fetch + required: false + schema: + type: integer + example: 10 + - name: attachmentStatus + in: query + description: Filter attached App Domains by one or more attachment lifecycle states. + required: false + style: form + explode: false + schema: + $ref: "#/components/schemas/AttachedAppDomainAttachmentStatus" + - name: order + in: query + description: Sort order for attached App Domains. + required: false + schema: + $ref: "#/components/schemas/AttachedAppDomainOrder" + - name: style + in: query + description: Detail level of the response. + required: false + schema: + $ref: "#/components/schemas/Style" + responses: + "200": + description: Successful operation + content: + application/json: + schema: + $ref: "#/components/schemas/AppLinkAttachedAppDomains" + examples: + Example: + $ref: "#/components/examples/AppLinkAttachDomainGetExample" + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_400_InvalidSorting" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_401" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_403" + "404": + description: Not Found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_404" + "500": + description: Internal server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_500" + "/fabric/v4/appLinks/{appLinkId}/appServices/{appServiceId}": + get: + tags: + - Application Links + summary: Get attached App Service for App Link + description: This API provides ability to retrieve an App Service attached to an App Link. + operationId: getAttachedAppServiceByUuid + parameters: + - name: appLinkId + in: path + description: App Link UUID + required: true + schema: + $ref: "#/components/schemas/AppLinkId" + - name: appServiceId + in: path + description: App Service UUID + required: true + schema: + $ref: "#/components/schemas/AppServiceId" + responses: + "200": + description: Attached App Service object + content: + application/json: + schema: + $ref: "#/components/schemas/AppLinkAppServiceAttachment" + examples: + AppLinkResponse: + $ref: "#/components/examples/AppLinkAttachServiceResponse" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_401" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_403" + "404": + description: Not Found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_404" + "500": + description: Internal server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_500" + put: + tags: + - Application Links + summary: Attach App Service to App Link + description: This API provides ability to attach the user's App Service to App Link. + operationId: attachAppServiceToAppLink + parameters: + - name: appLinkId + in: path + description: App Link UUID + required: true + schema: + $ref: "#/components/schemas/AppLinkId" + - name: appServiceId + in: path + description: App Service UUID + required: true + schema: + $ref: "#/components/schemas/AppServiceId" + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/AppLinkAttachServiceRequest" + examples: + AttachAppLinkToService: + $ref: "#/components/examples/AppLinkAttachService" + required: true + responses: + "202": + description: Attach App Service object + content: + application/json: + schema: + $ref: "#/components/schemas/AppLinkAppServiceAttachment" + examples: + AppLinkResponse: + $ref: "#/components/examples/AppLinkAttachServiceAttachResponse" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_401" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_403" + "404": + description: Not Found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_404" + "500": + description: Internal server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_500" + delete: + tags: + - Application Links + summary: Detach App Service from App Link + description: This API provides ability to detach App Service from App Link + operationId: detachAppServiceFromAppLink + parameters: + - name: appLinkId + in: path + description: App Link UUID + required: true + schema: + $ref: "#/components/schemas/AppLinkId" + - name: appServiceId + in: path + description: App Service UUID + required: true + schema: + $ref: "#/components/schemas/AppServiceId" + responses: + "202": + description: Detach App Service object + content: + application/json: + schema: + $ref: "#/components/schemas/AppLinkAppServiceAttachment" + examples: + AppLinkResponse: + $ref: "#/components/examples/AppLinkAttachServiceDetachResponse" + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_400_InvalidState" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_401" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_403" + "404": + description: Not Found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_404" + "500": + description: Internal server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_500" + patch: + tags: + - Application Links + summary: Update App Service attachment to App Link + description: This API provides ability to update the App Service attachment to App Link. + operationId: updateAppServiceAttachmentToAppLink + parameters: + - name: appLinkId + in: path + description: App Link UUID + required: true + schema: + $ref: "#/components/schemas/AppLinkId" + - name: appServiceId + in: path + description: App Service UUID + required: true + schema: + $ref: "#/components/schemas/AppServiceId" + requestBody: + content: + application/json-patch+json: + schema: + $ref: "#/components/schemas/AppLinkAttachServiceUpdateRequest" + examples: + UpdateDestinationIp: + $ref: "#/components/examples/AppLinkAttachServicePatchDestinationIp" + required: true + responses: + "202": + description: Update App Service attachment object + content: + application/json: + schema: + $ref: "#/components/schemas/AppLinkAppServiceAttachment" + examples: + AppLinkResponse: + $ref: "#/components/examples/AppLinkAttachServicePatchResponse" + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_400_InvalidOperation" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/401" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_403" + "404": + description: Not Found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_404" + "415": + description: Unsupported Media Type + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_415" + "500": + description: Internal server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_500" + "/fabric/v4/appLinks/{appLinkId}/appServices/search": + post: + tags: + - Application Links + summary: Search attached App Service to App Link + description: The API provides capability to get list of user's attached App Services using search criteria, including optional filtering, pagination and sorting + operationId: searchAttachedAppServices + parameters: + - name: appLinkId + in: path + description: App Link UUID + required: true + schema: + $ref: "#/components/schemas/AppLinkId" + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/AppLinkAttachServiceSearchRequest" + examples: + SearchAttachedServiceFilterByStatus: + $ref: "#/components/examples/AppLinkAttachServiceSearchFilterByStatus" + SearchAttachedServiceFilterOrAnd: + $ref: "#/components/examples/AppLinkAttachServiceSearchFilterOrAnd" + required: true + responses: + "200": + description: Successful operation + content: + application/json: + schema: + $ref: "#/components/schemas/AppLinkAttachServiceSearchResponse" + examples: + Example: + $ref: "#/components/examples/AppLinkAttachServiceSearchExample" + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_400_InvalidSorting" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_401" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_403" + "415": + description: Unsupported Media Type + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_415" + "500": + description: Internal server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_500" + "/fabric/v4/appLinks/{appLinkId}/appServices": + get: + tags: + - Application Links + summary: Get attached App Services for App Link + description: This API provides capability to retrieve App Services attached to an App Link. + operationId: getAttachedAppServicesByAppLinkId + parameters: + - name: appLinkId + in: path + description: App Link UUID + required: true + schema: + $ref: "#/components/schemas/AppLinkId" + - name: offset + in: query + description: offset + required: false + schema: + type: integer + example: 1 + - name: limit + in: query + description: number of records to fetch + required: false + schema: + type: integer + example: 10 + - name: attachmentStatus + in: query + description: Filter attached App Services by one or more attachment lifecycle states. + required: false + style: form + explode: false + schema: + $ref: "#/components/schemas/AttachedAppServiceAttachmentStatus" + - name: order + in: query + description: Sort order for attached App Services. + required: false + schema: + $ref: "#/components/schemas/AttachedAppServiceOrder" + - name: style + in: query + description: Detail level of the response. + required: false + schema: + $ref: "#/components/schemas/Style" + responses: + "200": + description: Successful operation + content: + application/json: + schema: + $ref: "#/components/schemas/AppLinkAttachedAppServices" + examples: + Example: + $ref: "#/components/examples/AppLinkAttachServiceGetExample" + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_400_InvalidSorting" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_401" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_403" + "404": + description: Not Found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_404" + "500": + description: Internal server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppLink_500" + /fabric/v4/appServices: + post: + tags: + - Application Services + summary: Create App Service + description: This API provides capability to create user's App Service + operationId: createAppService + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/AppServicePostRequest" + examples: + CreateAppService: + $ref: "#/components/examples/AppServiceCreate" + required: true + responses: + "202": + description: App Service object + content: + application/json: + schema: + $ref: "#/components/schemas/AppService" + examples: + AppServiceResponse: + $ref: "#/components/examples/AppServicePostResponseExample" + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + InvalidName: + $ref: "#/components/examples/AppService_400_InvalidName" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppService_401" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppService_403" + "415": + description: Unsupported Media Type + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppService_415" + "500": + description: Internal server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppService_500" + "/fabric/v4/appServices/{appServiceId}": + get: + tags: + - Application Services + summary: Get App Service + description: This API provides capability to retrieve user's App Service + operationId: getAppServiceByUuid + parameters: + - name: appServiceId + in: path + description: App Service UUID + required: true + schema: + $ref: "#/components/schemas/AppServiceId" + responses: + "200": + description: App Service object + content: + application/json: + schema: + $ref: "#/components/schemas/AppService" + examples: + AppServiceResponse: + $ref: "#/components/examples/AppServiceGetResponseExample" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppService_401" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppService_403" + "404": + description: Not Found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppService_404" + "500": + description: Internal server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppService_500" + delete: + tags: + - Application Services + summary: Delete App Service + description: This API provides capability to delete user's App Service + operationId: deleteAppServiceByUuid + parameters: + - name: appServiceId + in: path + description: App Service UUID + required: true + schema: + $ref: "#/components/schemas/AppServiceId" + responses: + "202": + description: App Service object + content: + application/json: + schema: + $ref: "#/components/schemas/AppService" + examples: + AppServiceResponse: + $ref: "#/components/examples/AppServiceDeleteResponseExample" + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppService_400_InvalidState" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppService_401" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppService_403" + "404": + description: Not Found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppService_404" + "500": + description: Internal server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppService_500" + patch: + tags: + - Application Services + summary: Update App Service + description: This API provides capability to update user's App Service + operationId: updateAppServiceByUuid + parameters: + - name: appServiceId + in: path + description: App Service UUID + required: true + schema: + $ref: "#/components/schemas/AppServiceId" + requestBody: + content: + application/json-patch+json: + schema: + $ref: "#/components/schemas/AppServiceUpdateRequest" + examples: + UpdateName: + $ref: "#/components/examples/AppServiceUpdateName" + required: true + responses: + "202": + description: App Service object + content: + application/json: + schema: + $ref: "#/components/schemas/AppService" + examples: + AppServiceResponse: + $ref: "#/components/examples/AppServicePatchResponseExample" + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppService_400_InvalidOperation" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/401" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppService_403" + "404": + description: Not Found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppService_404" + "415": + description: Unsupported Media Type + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppService_415" + "500": + description: Internal server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppService_500" + /fabric/v4/appServices/search: + post: + tags: + - Application Services + summary: Search App Services + description: The API provides capability to get list of user's App Services using search criteria, including optional filtering, pagination and sorting + operationId: searchAppServices + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/AppServiceSearchRequest" + examples: + SearchFilterByStatus: + $ref: "#/components/examples/AppServiceSearchFilterByStatus" + SearchFilterByName: + $ref: "#/components/examples/AppServiceSearchFilterByName" + SearchFilterOrAnd: + $ref: "#/components/examples/AppServiceSearchFilterOrAnd" + required: true + responses: + "200": + description: Successful operation + content: + application/json: + schema: + $ref: "#/components/schemas/AppServiceSearchResponse" + examples: + Example: + $ref: "#/components/examples/AppServiceSearchExample" + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppService_400_InvalidSorting" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppService_401" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppService_403" + "415": + description: Unsupported Media Type + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppService_415" + "500": + description: Internal server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppService_500" + "/fabric/v4/appServices/{appServiceId}/appLinks": + get: + tags: + - Application Services + summary: Get attached App Links for App Service + description: This API provides capability to retrieve App Links attached to an App Service. + operationId: getAttachedAppLinksByAppServiceId + parameters: + - name: appServiceId + in: path + description: App Service UUID + required: true + schema: + $ref: "#/components/schemas/AppServiceId" + - name: offset + in: query + description: offset + required: false + schema: + type: integer + example: 1 + - name: limit + in: query + description: number of records to fetch + required: false + schema: + type: integer + example: 10 + - name: state + in: query + description: Filter attached App Links by one or more lifecycle states. + required: false + style: form + explode: false + schema: + $ref: "#/components/schemas/AttachedAppLinkState_1" + - name: order + in: query + description: Sort order for attached App Links. + required: false + schema: + $ref: "#/components/schemas/AttachedAppLinkOrder" + - name: style + in: query + description: Detail level of the response. + required: false + schema: + $ref: "#/components/schemas/Style" + responses: + "200": + description: Successful operation + content: + application/json: + schema: + $ref: "#/components/schemas/AppServiceAttachedAppLinks" + examples: + Example: + $ref: "#/components/examples/AppServiceAttachedAppLinksGetResponseExample" + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppService_400_InvalidSorting" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppService_401" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppService_403" + "404": + description: Not Found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppService_404" + "500": + description: Internal server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppService_500" + "/fabric/v4/appServices/{appServiceId}/appSubscriptions": + get: + tags: + - Application Services + summary: Get attached App Subscriptions for App Service + description: This API provides capability to retrieve App Subscriptions attached to an App Service. + operationId: getAttachedAppSubscriptionsByAppServiceId + parameters: + - name: appServiceId + in: path + description: App Service UUID + required: true + schema: + $ref: "#/components/schemas/AppServiceId" + - name: offset + in: query + description: offset + required: false + schema: + type: integer + example: 1 + - name: limit + in: query + description: number of records to fetch + required: false + schema: + type: integer + example: 10 + - name: state + in: query + description: Filter attached App Subscriptions by one or more lifecycle states. + required: false + style: form + explode: false + schema: + $ref: "#/components/schemas/AttachedAppSubscriptionState" + - name: order + in: query + description: Sort order for attached App Subscriptions. + required: false + schema: + $ref: "#/components/schemas/AttachedAppSubscriptionOrder" + - name: style + in: query + description: Detail level of the response. + required: false + schema: + $ref: "#/components/schemas/Style" + responses: + "200": + description: Successful operation + content: + application/json: + schema: + $ref: "#/components/schemas/AppServiceAttachedAppSubscriptions" + examples: + Example: + $ref: "#/components/examples/AppServiceAttachedAppSubscriptionsGetResponseExample" + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppService_400_InvalidSorting" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppService_401" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppService_403" + "404": + description: Not Found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppService_404" + "500": + description: Internal server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppService_500" + "/fabric/v4/appServices/{appServiceId}/appSubscriptions/search": + post: + tags: + - Application Services + summary: Search attached App Subscriptions + description: The API provides capability to get list of App Subscriptions attached to an App Service using search criteria. + operationId: searchAttachedAppSubscriptionsByAppServiceId + parameters: + - name: appServiceId + in: path + description: App Service UUID + required: true + schema: + $ref: "#/components/schemas/AppServiceId" + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/AppServiceAttachedAppSubscriptionSearchRequest" + required: true + responses: + "200": + description: Successful operation + content: + application/json: + schema: + $ref: "#/components/schemas/AppServiceAttachedAppSubscriptionSearchResponse" + examples: + Example: + $ref: "#/components/examples/AppServiceAttachedAppSubscriptionSearchExample" + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppService_400_InvalidSorting" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppService_401" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppService_403" + "415": + description: Unsupported Media Type + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppService_415" + "500": + description: Internal server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppService_500" + /fabric/v4/appSubscriptions: + post: + tags: + - Application Subscriptions + summary: Create App Subscription + description: This API provides capability to create user's App Subscription + operationId: createAppSubscription + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/AppSubscriptionPostRequest" + examples: + CreateAppSubscription: + $ref: "#/components/examples/AppSubscriptionCreate" + required: true + responses: + "202": + description: App Subscription object + content: + application/json: + schema: + $ref: "#/components/schemas/AppSubscription" + examples: + AppSubscriptionResponse: + $ref: "#/components/examples/AppSubscriptionPostResponseExample" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppSubscription_401" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppSubscription_403" + "415": + description: Unsupported Media Type + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppSubscription_415" + "500": + description: Internal server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppSubscription_500" + "/fabric/v4/appSubscriptions/{appSubscriptionId}": + get: + tags: + - Application Subscriptions + summary: Get App Subscription + description: This API provides capability to retrieve user's App Subscription + operationId: getAppSubscriptionByUuid + parameters: + - name: appSubscriptionId + in: path + description: App Subscription UUID + required: true + schema: + $ref: "#/components/schemas/AppSubscriptionId" + responses: + "200": + description: App Subscription object + content: + application/json: + schema: + $ref: "#/components/schemas/AppSubscription" + examples: + AppSubscriptionResponse: + $ref: "#/components/examples/AppSubscriptionGetResponseExample" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppSubscription_401" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppSubscription_403" + "404": + description: Not Found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppSubscription_404" + "500": + description: Internal server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppSubscription_500" + delete: + tags: + - Application Subscriptions + summary: Delete App Subscription + description: This API provides capability to delete user's App Subscription + operationId: deleteAppSubscriptionByUuid + parameters: + - name: appSubscriptionId + in: path + description: App Subscription UUID + required: true + schema: + $ref: "#/components/schemas/AppSubscriptionId" + responses: + "202": + description: App Subscription object + content: + application/json: + schema: + $ref: "#/components/schemas/AppSubscription" + examples: + AppSubscriptionResponse: + $ref: "#/components/examples/AppSubscriptionDeleteResponseExample" + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppSubscription_400_InvalidState" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppSubscription_401" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppSubscription_403" + "404": + description: Not Found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppSubscription_404" + "500": + description: Internal server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppSubscription_500" + patch: + tags: + - Application Subscriptions + summary: Update App Subscription + description: This API provides capability to update user's App Subscription + operationId: updateAppSubscriptionByUuid + parameters: + - name: appSubscriptionId + in: path + description: App Subscription UUID + required: true + schema: + $ref: "#/components/schemas/AppSubscriptionId" + requestBody: + content: + application/json-patch+json: + schema: + $ref: "#/components/schemas/AppSubscriptionUpdateRequest" + examples: + UpdateSourceIpSubnets: + $ref: "#/components/examples/AppSubscriptionUpdateSourceIpSubnets" + required: true + responses: + "202": + description: App Subscription object + content: + application/json: + schema: + $ref: "#/components/schemas/AppSubscription" + examples: + AppSubscriptionResponse: + $ref: "#/components/examples/AppSubscriptionPatchResponseExample" + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppSubscription_400_InvalidOperation" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/401" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppSubscription_403" + "404": + description: Not Found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppSubscription_404" + "415": + description: Unsupported Media Type + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppSubscription_415" + "500": + description: Internal server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppSubscription_500" + /fabric/v4/appSubscriptions/search: + post: + tags: + - Application Subscriptions + summary: Search App Subscriptions + description: The API provides capability to get list of user's App Subscriptions using search criteria, including optional filtering, pagination and sorting + operationId: searchAppSubscriptions + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/AppSubscriptionSearchRequest" + examples: + SearchFilterByStatus: + $ref: "#/components/examples/AppSubscriptionSearchFilterByStatus" + SearchFilterOrAnd: + $ref: "#/components/examples/AppSubscriptionSearchFilterOrAnd" + required: true + responses: + "200": + description: Successful operation + content: + application/json: + schema: + $ref: "#/components/schemas/AppSubscriptionSearchResponse" + examples: + Example: + $ref: "#/components/examples/AppSubscriptionSearchExample" + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppSubscription_400_InvalidSorting" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppSubscription_401" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppSubscription_403" + "415": + description: Unsupported Media Type + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppSubscription_415" + "500": + description: Internal server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/AppSubscription_500" + /fabric/v4/gateways: + post: + tags: + - Gateways + summary: Create Gateway + description: This API provides capability to create user's Gateways + operationId: createGateway + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/GatewayPostRequest" + examples: + CreateGateway: + $ref: "#/components/examples/GatewayCreate" + required: true + responses: + "202": + description: Gateway object + content: + application/json: + schema: + $ref: "#/components/schemas/Gateway" + examples: + GatewayResponse: + $ref: "#/components/examples/GatewayPostResponseExample" + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + InvalidName: + $ref: "#/components/examples/Gateway_400_InvalidName" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Gateway_401" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Gateway_403" + "415": + description: Unsupported Media Type + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Gateway_415" + "500": + description: Internal server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Gateway_500" + "/fabric/v4/gateways/{gatewayId}": + get: + tags: + - Gateways + summary: Get Gateway + description: This API provides capability to retrieve user's Gateways + operationId: getGatewayByUuid + parameters: + - name: gatewayId + in: path + description: Gateway UUID + required: true + schema: + $ref: "#/components/schemas/GatewayId" + responses: + "200": + description: Gateway object + content: + application/json: + schema: + $ref: "#/components/schemas/Gateway" + examples: + GatewayResponse: + $ref: "#/components/examples/GatewayGetResponseExample" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Gateway_401" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Gateway_403" + "404": + description: Not Found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Gateway_404" + "500": + description: Internal server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Gateway_500" + delete: + tags: + - Gateways + summary: Delete Gateway + description: This API provides capability to delete user's Gateways + operationId: deleteGatewayByUuid + parameters: + - name: gatewayId + in: path + description: Gateway UUID + required: true + schema: + $ref: "#/components/schemas/GatewayId" + responses: + "202": + description: Gateway object + content: + application/json: + schema: + $ref: "#/components/schemas/Gateway" + examples: + GatewayResponse: + $ref: "#/components/examples/GatewayDeleteResponseExample" + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Gateway_400_InvalidState" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Gateway_401" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Gateway_403" + "404": + description: Not Found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Gateway_404" + "500": + description: Internal server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Gateway_500" + patch: + tags: + - Gateways + summary: Update Gateway by ID + description: Update Gateway by Uuid + operationId: updateGatewayByUuid + parameters: + - name: gatewayId + in: path + description: Gateway UUID + required: true + schema: + $ref: "#/components/schemas/GatewayId" + requestBody: + content: + application/json-patch+json: + schema: + $ref: "#/components/schemas/GatewayUpdateRequest" + examples: + ConnectionUpdateNameRequest: + $ref: "#/components/examples/GatewayUpdateNameRequest" + ConnectionUpdateBandwidthRequest: + $ref: "#/components/examples/GatewayUpdateBandwidthRequest" + required: true + responses: + "202": + description: Gateway object + content: + application/json: + schema: + $ref: "#/components/schemas/Gateway" + examples: + GatewayResponse: + $ref: "#/components/examples/GatewayUpdateResponseExample" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Gateway_401" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Gateway_403" + "404": + description: Not Found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Gateway_404" + "500": + description: Internal server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorList" + examples: + example: + $ref: "#/components/examples/Gateway_500" +components: + schemas: + ErrorList: + type: array + description: List of Error Message + items: + $ref: "#/components/schemas/Error" + CloudEventAssetType: + type: string + enum: + - ports + - connections + - routers + - metros + - serviceTokens + - networks + - projects + - organizations + - timeServices + - companyProfiles + AssetId: + type: string + description: Asset UUID + format: uuid + example: 757400f8-d360-11e9-bb65-2a2ae2dbcce6 + StartDateTime: + type: string + description: Start date and time + format: date-time + example: 2024-07-11T18:06:21Z + EndDateTime: + type: string description: End date and time format: date-time example: 2024-07-11T18:06:21Z @@ -15265,123 +19495,5059 @@ components: default: 0 Limit: type: integer - description: Pagination limit - example: 20 - default: 100 - GetCloudEventsByAssetResponse: + description: Pagination limit + example: 20 + default: 100 + GetCloudEventsByAssetResponse: + type: object + properties: + pagination: + $ref: "#/components/schemas/Pagination" + data: + type: array + description: Data returned from the API call. + items: + $ref: "#/components/schemas/CloudEvent" + CloudEventId: + type: string + description: Cloud Event UUID + format: uuid + example: 557400f8-d360-11e9-bb65-2a2ae2dbcce4 + CloudEvent: + type: object + properties: + spec: + type: string + description: Cloud Event Open Telemetry specification + readOnly: true + source: + type: string + description: Cloud Event source + id: + type: string + description: Cloud Event identifier + format: uuid + type: + type: string + description: Equinix supported event type + subject: + type: string + description: Cloud Event subject + time: + type: string + description: Cloud Event time the event occurred + format: date-time + dataschema: + type: string + description: Cloud Event dataschema reference + datacontenttype: + type: string + description: Cloud Event data content type + severitynumber: + type: string + description: Cloud Event severity number + severitytext: + type: string + description: Cloud Event severity text + equinixalert: + type: string + description: Equinix alert + equinixorganization: + type: string + description: Equinix organization identifier + equinixproject: + type: string + description: Equinix project identifier + authtype: + type: string + description: Cloud Event auth type + authid: + type: string + description: Cloud Event user identifier + traceparent: + type: string + description: Cloud Event traceparent + tracestate: + type: string + description: Cloud Event tracestate + data: + $ref: "#/components/schemas/CloudEventData" + description: Cloud Event object + CloudEventSearchRequest: + required: + - filter + type: object + properties: + filter: + $ref: "#/components/schemas/CloudEventFilters" + pagination: + $ref: "#/components/schemas/PaginationRequest" + description: Search requests containing criteria + CloudEventFilters: + type: object + properties: + and: + type: array + items: + $ref: "#/components/schemas/CloudEventFilter" + CloudEventFilter: + type: object + anyOf: + - $ref: "#/components/schemas/CloudEventSimpleExpression" + CloudEventSimpleExpression: + type: object + properties: + property: + type: string + description: | + Possible field names to use on filters: + * `/id` - Cloud Event identifier + * `/subject` - Cloud Event subject description + * `/type` - Cloud Event type + * `/time` - Time of Cloud Events + * `/equinixproject` - Equinix Project of Cloud Events + * `/equinixorganization` - Equinix Organization of Cloud Events + * `/equinixalert` - Equinix Alert Identifier for raise/clear Cloud Events + * `/severitytext` - cloud event severity text + * `/authid` - Equinix user key to identify the user that performed the action that triggered the Cloud Event + * `/authtype` - Equinix user type either user or system + example: /subject + operator: + type: string + description: | + Possible operators to use on filters: + * `=` - equal + * `!=` - not equal + * `>` - greater than + * `>=` - greater than or equal to + * `<` - less than + * `<=` - less than or equal to + * `BETWEEN` - between + * `IN` - in + * `LIKE` - like + * `ILIKE` - like case-insensitive + * `IS NULL` - is null + * `IS NOT NULL` - is not null + example: = + values: + type: array + items: + type: string + example: equinix.fabric.port.status.* + OperationalEventSearchRequest: + type: object + properties: + filter: + $ref: "#/components/schemas/OperationalEventFilters" + pagination: + $ref: "#/components/schemas/PaginationRequest" + description: Search requests containing criteria + OperationalEventFilters: + type: object + properties: + and: + type: array + items: + $ref: "#/components/schemas/OperationalEventFilter" + OperationalEventFilter: + type: object + anyOf: + - $ref: "#/components/schemas/OperationalEventSimpleExpression" + OperationalEventSimpleExpression: + type: object + properties: + property: + type: string + description: | + Possible field names to use on filters: + * `/subject` - Cloud Event subject description + example: /subject + operator: + type: string + description: | + Possible operators to use on filters: + * `=` - equal + * `IN` - in + example: = + values: + type: array + items: + type: string + SearchOperationalEventResponse: + type: object + properties: + pagination: + $ref: "#/components/schemas/Pagination" + data: + type: array + description: Data returned from the API call. + items: + $ref: "#/components/schemas/CloudEvent" + MetricAssetType: + type: string + enum: + - ports + - connections + - metros + Limit_1: + type: integer + description: Pagination limit + example: 20 + default: 20 + GetMetricsByAssetResponse: + type: object + properties: + pagination: + $ref: "#/components/schemas/Pagination" + data: + type: array + description: Data returned from the API call. + items: + $ref: "#/components/schemas/Metric" + PortUUID: + type: string + description: Port UUID + format: uuid + Value: + type: string + description: Which value to retrieve + example: last + GetMetricsByNameResponse: + type: object + properties: + pagination: + $ref: "#/components/schemas/Pagination" + data: + type: array + description: Data returned from the API call. + items: + $ref: "#/components/schemas/Metric" + MetricsSearchRequest: + required: + - filter + type: object + properties: + filter: + $ref: "#/components/schemas/MetricFilters" + pagination: + $ref: "#/components/schemas/PaginationRequest" + description: Search requests containing criteria + MetricFilters: + type: object + properties: + and: + type: array + items: + $ref: "#/components/schemas/MetricFilter" + MetricFilter: + type: object + anyOf: + - $ref: "#/components/schemas/MetricSimpleExpression" + MetricSimpleExpression: + type: object + properties: + property: + type: string + description: | + Possible field names to use on filters: + * `/subject` - Metric subject description (required and limited to 1 value) + * `/name` - Metric names (required) + * `/dataPoints/endDateTime` - Time of Metrics + * `/time` - Time of Metrics + * `/interval` - ISO-8601 duration format to specify the interval of metrics data points + * `/value` - specific data points of the metric to return (e.g. 'last' - for metros only) + example: /subject + operator: + type: string + description: | + Possible operators to use on filters: + * `=` - equal + * `>` - greater than + * `>=` - greater than or equal to + * `<` - less than + * `<=` - less than or equal to + * `BETWEEN` - between + * `IN` - in + example: = + values: + type: array + items: + type: string + example: equinix.fabric.port.bandwidth_rx.usage + ConnectionPostRequest: + required: + - aSide + - bandwidth + - name + - notifications + - type + - zSide + type: object + properties: + type: + $ref: "#/components/schemas/ConnectionType" + name: + type: string + description: Customer-provided connection name + order: + $ref: "#/components/schemas/Order" + notifications: + type: array + description: Preferences for notifications on connection configuration or status changes + items: + $ref: "#/components/schemas/SimplifiedNotification" + bandwidth: + maximum: 100000 + minimum: 0 + type: integer + description: Connection bandwidth in Mbps + geoScope: + $ref: "#/components/schemas/GeoScopeType" + redundancy: + $ref: "#/components/schemas/ConnectionRedundancy" + aSide: + $ref: "#/components/schemas/ConnectionSide" + zSide: + $ref: "#/components/schemas/ConnectionSide" + project: + $ref: "#/components/schemas/Project" + additionalInfo: + type: array + description: Connection additional information + items: + $ref: "#/components/schemas/ConnectionSideAdditionalInfo" + marketplaceSubscription: + $ref: "#/components/schemas/marketplaceSubscription" + endCustomer: + $ref: "#/components/schemas/EndCustomer" + description: Create connection post request + Connection: + required: + - aSide + - bandwidth + - name + - type + - zSide + type: object + properties: + href: + type: string + description: Connection URI + format: uri + readOnly: true + type: + $ref: "#/components/schemas/ConnectionType" + uuid: + type: string + description: Equinix-assigned connection identifier + name: + type: string + description: Customer-provided connection name + description: + type: string + description: Customer-provided connection description + state: + $ref: "#/components/schemas/ConnectionState" + change: + $ref: "#/components/schemas/Change" + operation: + $ref: "#/components/schemas/ConnectionOperation" + order: + $ref: "#/components/schemas/Order" + notifications: + type: array + description: Preferences for notifications on connection configuration or status changes + items: + $ref: "#/components/schemas/SimplifiedNotification" + account: + $ref: "#/components/schemas/SimplifiedAccount" + changeLog: + $ref: "#/components/schemas/Changelog" + bandwidth: + maximum: 10000 + minimum: 0 + type: integer + description: Connection bandwidth in Mbps + geoScope: + $ref: "#/components/schemas/GeoScopeType" + redundancy: + $ref: "#/components/schemas/ConnectionRedundancy" + isRemote: + type: boolean + description: Connection property derived from access point locations + direction: + $ref: "#/components/schemas/ConnectionDirection" + aSide: + $ref: "#/components/schemas/ConnectionSide" + zSide: + $ref: "#/components/schemas/ConnectionSide" + marketplaceSubscription: + $ref: "#/components/schemas/marketplaceSubscription" + additionalInfo: + type: array + description: Connection additional information + items: + $ref: "#/components/schemas/ConnectionSideAdditionalInfo" + project: + $ref: "#/components/schemas/Project" + description: Connection specification + ConnectionId: + type: string + description: Connection UUID + example: 557400f8-d360-11e9-bb65-2a2ae2dbcce4 + ConnectionDirection: + type: string + description: Connection directionality from the requester point of view + enum: + - INTERNAL + - INCOMING + - OUTGOING + VirtualCircuitId: + type: string + description: Virtual Circuit UUID + ConnectionUpdateRequest: + minItems: 1 + type: array + description: Connection Update Request + items: + $ref: "#/components/schemas/ConnectionChangeOperation" + ConnectionActionRequest: + required: + - type + type: object + properties: + type: + $ref: "#/components/schemas/Actions" + description: + type: string + description: Connection rejection reason detail + data: + $ref: "#/components/schemas/ConnectionAcceptanceData" + description: Connection action request + ConnectionAction: + required: + - data + - type + - uuid + type: object + properties: + type: + $ref: "#/components/schemas/Actions" + href: + type: string + description: Connection action URI + format: uri + readOnly: true + uuid: + type: string + description: Equinix-assigned connection identifier + description: + type: string + description: Connection rejection reason detail + data: + $ref: "#/components/schemas/ConnectionAcceptanceData" + changeLog: + $ref: "#/components/schemas/Changelog" + description: Connection action + ConnectionRouteSearchRequest: + type: object + properties: + filter: + $ref: "#/components/schemas/ConnectionRouteEntryFilters" + pagination: + $ref: "#/components/schemas/PaginationRequest" + sort: + type: array + items: + $ref: "#/components/schemas/ConnectionRouteSortCriteria" + description: Search requests containing criteria + ConnectionRouteEntryFilters: + type: object + properties: + and: + maxItems: 8 + type: array + items: + $ref: "#/components/schemas/ConnectionRouteEntryFilter" + ConnectionRouteEntryFilter: + type: object + anyOf: + - $ref: "#/components/schemas/ConnectionRouteEntrySimpleExpression" + - $ref: "#/components/schemas/ConnectionRouteEntryOrFilter" + ConnectionRouteEntrySimpleExpression: + type: object + properties: + property: + type: string + description: | + Possible field names to use on filters: + * `/type` - Route table entry type + * `/state` - Route table entry state + * `/prefix` - Route table entry prefix + * `/nextHop` - Route table entry nextHop + * `/*` - all-category search + example: /type + operator: + type: string + description: | + Possible operators to use on filters: + * `=` - equal + * `!=` - not equal + * `>` - greater than + * `>=` - greater than or equal to + * `<` - less than + * `<=` - less than or equal to + * `[NOT] BETWEEN` - (not) between + * `[NOT] LIKE` - (not) like + * `[NOT] IN` - (not) in + * `~*` - case-insensitive like + example: = + values: + type: array + items: + type: string + example: IPv4_BGP_ROUTE + ConnectionRouteEntryOrFilter: + type: object + properties: + or: + maxItems: 3 + type: array + items: + $ref: "#/components/schemas/ConnectionRouteEntrySimpleExpression" + ConnectionRouteSortCriteria: + type: object + properties: + direction: + $ref: "#/components/schemas/ConnectionRouteEntrySortDirection" + property: + $ref: "#/components/schemas/ConnectionRouteEntrySortBy" + ConnectionRouteEntrySortDirection: + type: string + description: Sorting direction + default: DESC + enum: + - DESC + - ASC + ConnectionRouteEntrySortBy: + type: string + description: Possible field names to use on sorting + default: /changeLog/updatedDateTime + enum: + - /changeLog/createdDateTime + - /changeLog/updatedDateTime + - /med + - /connection/name + - /type + - /prefix + - /nextHop + ConnectionRouteTableEntrySearchResponse: + type: object + properties: + pagination: + $ref: "#/components/schemas/Pagination" + data: + type: array + description: Data returned from the API call. + items: + $ref: "#/components/schemas/ConnectionRouteTableEntry" + GetResponse: + type: object + properties: + pagination: + $ref: "#/components/schemas/Pagination" + data: + type: array + description: List of Routing Protocols + items: + $ref: "#/components/schemas/RoutingProtocolData" + RoutingProtocolBase: + required: + - type + type: object + properties: + type: + type: string + description: Routing protocol type + enum: + - BGP + - DIRECT + oneOf: + - $ref: "#/components/schemas/RoutingProtocolBGPType" + - $ref: "#/components/schemas/RoutingProtocolDirectType" + RoutingProtocolBGPType: + required: + - type + type: object + properties: + type: + type: string + description: Routing protocol type + enum: + - BGP + name: + type: string + example: My-BGP-route-1 + bgpIpv4: + $ref: "#/components/schemas/BGPConnectionIpv4" + bgpIpv6: + $ref: "#/components/schemas/BGPConnectionIpv6" + customerAsn: + type: integer + description: Customer asn + format: int64 + bgpAuthKey: + type: string + description: BGP authorization key + asOverrideEnabled: + type: boolean + description: Enable AS number override + bfd: + $ref: "#/components/schemas/RoutingProtocolBFD" + RoutingProtocolDirectType: + required: + - type + type: object + properties: + type: + type: string + description: Routing protocol type + enum: + - DIRECT + name: + type: string + example: My-direct-route-1 + directIpv4: + $ref: "#/components/schemas/DirectConnectionIpv4" + directIpv6: + $ref: "#/components/schemas/DirectConnectionIpv6" + RoutingProtocolData: + type: object + properties: + type: + type: string + description: Routing protocol type + enum: + - BGP + - DIRECT + oneOf: + - $ref: "#/components/schemas/RoutingProtocolBGPData" + - $ref: "#/components/schemas/RoutingProtocolDirectData" + ConnectionRoutingProtocolPostRequest: + type: object + properties: + data: + type: array + description: Connection routing protocol configuration + items: + $ref: "#/components/schemas/RoutingProtocolBase" + description: Create connection routing protocolpost request + RoutingProtocolId: + type: string + description: Routing Protocol UUID + format: uuid + example: 557400f8-d360-11e9-bb65-2a2ae2dbcce4 + ConnectionRoutingProtocolPatchRequest: + minItems: 1 + type: array + description: Patch connection routing protocol request + items: + $ref: "#/components/schemas/ConnectionChangeOperation" + BGPActionsBulkData: + type: object + properties: + pagination: + $ref: "#/components/schemas/Pagination" + data: + type: array + items: + $ref: "#/components/schemas/BGPActionData" + description: List of BGP Actions + BGPActionRequest: + required: + - type + type: object + properties: + type: + $ref: "#/components/schemas/BGPActions" + description: BGP action request + BGPActionData: + type: object + properties: + href: + type: string + description: Routing Protocol URI + format: uri + example: https://api.equinix.com/fabric/v4/connections/81331c52-04c0-4656-a4a7-18c52669348f/routingProtocols/69762051-85ed-4d13-b6b4-e32e93c672b5/actions + uuid: + type: string + description: Routing protocol identifier + format: uuid + example: c9b8e7a2-f3b1-4576-a4a9-1366a63df170 + type: + $ref: "#/components/schemas/BGPActions" + description: + type: string + description: BGP action description + state: + $ref: "#/components/schemas/BGPActionStates" + changelog: + $ref: "#/components/schemas/Changelog" + ActionId: + type: string + description: BGP Action UUID + format: uuid + example: 86534014-34b4-53f6-45d6-4b94a92d8623 + ChangeId: + type: string + description: Routing Protocol Change UUID + format: uuid + example: 6d500177-9404-41f2-99e8-2bf1a84d8db5 + RoutingProtocolChangeData: + type: object + properties: + status: + type: string + description: Current outcome of the change flow + enum: + - COMPLETED + - FAILED + - REQUESTED + createdBy: + type: string + description: Created by User Key + createdDateTime: + type: string + description: Set when change flow starts + format: date-time + updatedBy: + type: string + description: Updated by User Key + updatedDateTime: + type: string + description: Set when change object is updated + format: date-time + information: + type: string + description: Additional information + data: + $ref: "#/components/schemas/RoutingProtocolChangeOperation" + description: Current state of latest Routing Protocol change + allOf: + - $ref: "#/components/schemas/RoutingProtocolChange" + RoutingProtocolChangeDataResponse: + type: object + properties: + pagination: + $ref: "#/components/schemas/Pagination" + data: + type: array + items: + $ref: "#/components/schemas/RoutingProtocolChangeData" + description: List of network changes + ExchangeServiceResponse: + type: object + properties: + href: + type: string + description: Internet Exchange Service URI + example: https://api.equinix.com/fabric/v4/exchangeServices/a8ba52de-faae-43b5-b0b1-6904d37ee011 + uuid: + type: string + description: Internet Exchange Service identifier + format: uuid + example: a8ba52de-faae-43b5-b0b1-6904d37ee011 + type: + type: string + description: Internet Exchange Service Type + example: IX + default: IX + enum: + - IX + name: + type: string + description: Name + example: ix_exchange_service + bandwidth: + type: integer + description: bandwidth in Mbps + example: 400000 + description: + type: string + description: Description + example: ix_exchange_service + state: + type: string + description: State + example: PROVISIONING + enum: + - PROVISIONING + - PROVISIONING_FAILED + - PENDING_ACTIVATION + - ACTIVATING + - ACTIVATING_FAILED + - PROVISIONED + - REPROVISIONING + - REPROVISIONING_FAILED + - DEPROVISIONING + - DEPROVISIONED + - DEPROVISIONING_FAILED + location: + $ref: "#/components/schemas/SimplifiedLocation" + publicPeeringConnection: + $ref: "#/components/schemas/PublicPeeringConnectionResponse" + routingProtocol: + $ref: "#/components/schemas/RoutingProtocolResponse" + order: + $ref: "#/components/schemas/Order" + project: + $ref: "#/components/schemas/Project" + account: + $ref: "#/components/schemas/SimplifiedAccount" + notifications: + type: array + description: Preferences for notifications on Internet Exchange Service configuration or status changes + items: + $ref: "#/components/schemas/ExchangeServiceNotification" + changelog: + $ref: "#/components/schemas/PlatformChangelog" + ExchangeServiceId: + type: string + description: Internet Exchange Service UUID + format: uuid + example: a8ba52de-faae-43b5-b0b1-6904d37ee011 + ExchangeServiceSearchRequest: + type: object + properties: + filter: + $ref: "#/components/schemas/ExchangeServiceSearchExpression" + pagination: + $ref: "#/components/schemas/PaginationRequest" + sort: + type: array + items: + $ref: "#/components/schemas/ExchangeServiceSearchSortCriteria" + description: Search requests containing criteria + ExchangeServiceSearchExpression: + oneOf: + - $ref: "#/components/schemas/ExchangeServiceAndExpression" + - $ref: "#/components/schemas/ExchangeServiceOrExpression" + - $ref: "#/components/schemas/ExchangeServicePropertyExpression" + ExchangeServiceAndExpression: + required: + - and + type: object + properties: + and: + type: array + items: + $ref: "#/components/schemas/ExchangeServiceSearchExpression" + ExchangeServiceOrExpression: + required: + - or + type: object + properties: + or: + type: array + items: + $ref: "#/components/schemas/ExchangeServiceSearchExpression" + ExchangeServicePropertyExpression: + required: + - operator + - property + - values + type: object + properties: + property: + type: string + description: Possible field names to use on filters + enum: + - /project/projectId + operator: + type: string + enum: + - = + values: + maxItems: 1 + minItems: 1 + type: array + items: + type: string + ExchangeServiceSearchSortCriteria: + type: object + properties: + direction: + type: string + description: Sorting direction + default: DESC + enum: + - DESC + - ASC + property: + type: string + description: Possible field names to use on sorting + default: /changeLog/updatedDateTime + enum: + - /name + - /changeLog/createdDateTime + - /changeLog/updatedDateTime + ExchangeServiceSearchResponse: + type: object + properties: + pagination: + $ref: "#/components/schemas/Pagination" + sort: + type: array + items: + $ref: "#/components/schemas/ExchangeServiceSearchSortCriteria" + data: + type: array + items: + $ref: "#/components/schemas/ExchangeServiceResponse" + description: List of Internet Exchange Service + InternetAccessPostRequest: + required: + - account + - billing + - name + - project + - routingProtocol + - type + type: object + properties: + type: + $ref: "#/components/schemas/InternetAccessServiceType" + name: + type: string + description: The name of the EIA Service + bandwidth: + type: integer + description: Bandwidth of the service + bandwidthCommit: + type: integer + description: Minimum bandwidth commit for burst billing variant of the service + routingProtocol: + $ref: "#/components/schemas/InternetAccessRoutingProtocolRequest" + order: + $ref: "#/components/schemas/InternetAccessOrderRequest" + billing: + $ref: "#/components/schemas/InternetAccessPostRequest_billing" + project: + $ref: "#/components/schemas/Project" + account: + $ref: "#/components/schemas/InternetAccessAccount" + InternetAccessRoutingProtocolRequest: + required: + - customerRoutes + - type + type: object + properties: + type: + $ref: "#/components/schemas/InternetAccessRoutingProtocolType" + customerRoutes: + maxItems: 100 + minItems: 1 + type: array + items: + $ref: "#/components/schemas/InternetAccessCustomerRouteRequest" + discriminator: + propertyName: type + mapping: + BGP: "#/components/schemas/InternetAccessRoutingProtocolBgpRequest" + DIRECT: "#/components/schemas/InternetAccessRoutingProtocolDirectRequest" + STATIC: "#/components/schemas/InternetAccessRoutingProtocolStaticRequest" + InternetAccessCustomerRouteRequest: + required: + - ipBlock + type: object + properties: + ipBlock: + $ref: "#/components/schemas/InternetAccessIpBlockRequest" + InternetAccessIpBlockRequest: + required: + - uuid + type: object + properties: + uuid: + type: string + description: Unique identifier for the IP Block + format: uuid + InternetAccessRoutingProtocolBgpRequest: + allOf: + - $ref: "#/components/schemas/InternetAccessRoutingProtocolRequest" + - required: + - connections + - exportPolicy + type: object + properties: + connections: + maxItems: 2 + minItems: 1 + type: array + items: + $ref: "#/components/schemas/InternetAccessConnectionBgpRequest" + exportPolicy: + $ref: "#/components/schemas/InternetAccessExportPolicy" + asn: + $ref: "#/components/schemas/InternetAccessRoutingProtocolBgpRequest_asn" + customerAsn: + type: integer + description: Customer ASN. Valid range is 1-64495 or 65536-4199999999. + format: int64 + example: 16220 + deprecated: true + bgpAuthKey: + type: string + description: BGP authentication key + example: SecretKey + customerAsnRange: + $ref: "#/components/schemas/InternetAccessCustomerAsnRange" + InternetAccessConnectionBgpRequest: + required: + - uuid + type: object + properties: + uuid: + type: string + description: Unique identifier for the connection + format: uuid + InternetAccessRoutingProtocolDirectRequest: + allOf: + - $ref: "#/components/schemas/InternetAccessRoutingProtocolRequest" + - required: + - connections + type: object + properties: + connections: + maxItems: 2 + minItems: 1 + type: array + items: + $ref: "#/components/schemas/InternetAccessConnectionDirectRequest" + InternetAccessConnectionDirectRequest: + required: + - uuid + type: object + properties: + uuid: + type: string + description: Unique identifier for the connection + format: uuid + peeringIpv4: + $ref: "#/components/schemas/InternetAccessPeeringIpv4Request" + peeringIpv6: + $ref: "#/components/schemas/InternetAccessPeeringIpv6Request" + InternetAccessPeeringIpv4Request: + type: object + properties: + equinixPeerIp: + pattern: ^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$ + type: string + description: IPv4 address of the Equinix peering IP + equinixVrrpIp: + pattern: ^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$ + type: string + description: IPv4 address for Equinix VRRP IP + InternetAccessPeeringIpv6Request: + type: object + properties: + equinixPeerIp: + pattern: ^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$ + type: string + description: IPv6 address of the Equinix peering IP + equinixVrrpIp: + pattern: ^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$ + type: string + description: IPv6 address for Equinix VRRP IP + InternetAccessRoutingProtocolStaticRequest: + allOf: + - $ref: "#/components/schemas/InternetAccessRoutingProtocolRequest" + - required: + - connections + type: object + properties: + connections: + maxItems: 2 + minItems: 1 + type: array + items: + $ref: "#/components/schemas/InternetAccessConnectionStaticRequest" + InternetAccessConnectionStaticRequest: + required: + - uuid + type: object + properties: + uuid: + type: string + description: Unique identifier for the connection + format: uuid + InternetAccessOrderRequest: + type: object + properties: + purchaseOrderNumber: + type: string + description: Purchase order number + nullable: true + orderNumber: + type: string + description: Order Number + nullable: true + orderLine: + type: string + description: Order Line Number + nullable: true + InternetAccessService: + required: + - account + - billing + - change + - changeLog + - href + - name + - project + - routingProtocol + - state + - type + - useCase + - uuid + type: object + properties: + href: + type: string + description: Service URL path + format: uri + example: https://api.equinix.com/fabric/v4/internetAccessServices/673c6e6c-2c36-4488-b3f1-47064357b5b4 + type: + $ref: "#/components/schemas/InternetAccessServiceType" + uuid: + type: string + description: Unique identifier for the EIA Service + format: uuid + name: + type: string + description: The name of the EIA Service + bandwidth: + type: integer + description: Bandwidth of the service + bandwidthCommit: + type: integer + description: Minimum bandwidth commit for burst billing variant of the service + state: + $ref: "#/components/schemas/InternetAccessServiceState" + change: + $ref: "#/components/schemas/InternetAccessChange" + locations: + type: array + description: List of locations associated with the service + items: + $ref: "#/components/schemas/InternetAccessLocation" + routingProtocol: + $ref: "#/components/schemas/InternetAccessRoutingProtocol" + billing: + $ref: "#/components/schemas/InternetAccessBilling" + account: + $ref: "#/components/schemas/InternetAccessAccount" + project: + $ref: "#/components/schemas/Project" + order: + $ref: "#/components/schemas/InternetAccessOrder" + changeLog: + $ref: "#/components/schemas/Changelog" + useCase: + $ref: "#/components/schemas/InternetAccessUseCase" + InternetAccessServiceType: + type: string + description: Type of the service, either single or dual internet access + enum: + - SINGLE_IA + - DUAL_IA + x-enum-varnames: + - SINGLE_IA + - DUAL_IA + InternetAccessServiceState: + type: string + description: Current state of the service + enum: + - PROVISIONING + - PROVISIONED + - FAILED + - DEPROVISIONING + - DEPROVISIONED + x-enum-varnames: + - PROVISIONING + - PROVISIONED + - FAILED + - DEPROVISIONING + - DEPROVISIONED + InternetAccessSearchRequest: + type: object + properties: + pagination: + $ref: "#/components/schemas/PaginationRequest" + filter: + $ref: "#/components/schemas/SearchExpression" + sort: + $ref: "#/components/schemas/SearchSort" + InternetAccessServices: + required: + - data + - pagination + - sort + type: object + properties: + pagination: + $ref: "#/components/schemas/Pagination" + sort: + $ref: "#/components/schemas/SearchSort" + data: + type: array + items: + $ref: "#/components/schemas/InternetAccessService" + InternetAccessPatchRequest: + maxItems: 100 + minItems: 1 + type: array + description: Only one replace operation allowed for '/bandwidth' path. + items: + $ref: "#/components/schemas/InternetAccessPatchOperationUpdate" + InternetAccessPatchOperationUpdate: + required: + - op + - path + type: object + properties: + op: + $ref: "#/components/schemas/InternetAccessPatchOperationUpdateAllowedOp" + path: + $ref: "#/components/schemas/InternetAccessPatchOperationUpdateAllowedPath" + value: + description: New value for updated parameter. Required for add and replace. + InternetAccessPatchOperationUpdateAllowedOp: + type: string + description: Allowed patch operations. + enum: + - replace + - add + - remove + InternetAccessPatchOperationUpdateAllowedPath: + pattern: ^(\/bandwidth|\/bandwidthCommit|\/routingProtocol\/customerRoutes(?:\[@\.ipBlock\.uuid=[A-Fa-f0-9-]+\])?|\/order\/purchaseOrderNumber)$ + type: string + description: Allowed patch paths for Internet Access update. + example: /bandwidth + InterconnectPostRequest: + required: + - account + - location + - name + - notifications + - package + - project + - type + type: object + properties: + type: + type: string + description: Interconnect type + example: XF_IC + enum: + - XF_IC + name: + maxLength: 24 + minLength: 1 + type: string + description: Customer-provided interconnect name + example: test ic sv + description: + maxLength: 50 + minLength: 1 + type: string + description: Customer-provided interconnect description + example: test interconnect + location: + $ref: "#/components/schemas/InterconnectLocationRequest" + package: + $ref: "#/components/schemas/InterconnectPackage" + order: + $ref: "#/components/schemas/Order" + account: + $ref: "#/components/schemas/SimplifiedAccount" + project: + $ref: "#/components/schemas/Project" + notifications: + type: array + description: Preferences for notifications on interconnect configuration or status changes + items: + $ref: "#/components/schemas/InterconnectNotification" + description: Create Interconnect request + InterconnectLocationRequest: + type: object + properties: + metroCode: + type: string + description: Metro code where the interconnect is created + example: SV + description: Interconnect location for create request + InterconnectNotification: + type: object + properties: + type: + type: string + description: Notification type + example: NOTIFICATIONS + enum: + - NOTIFICATIONS + emails: + type: array + description: Array of contact emails + items: + type: string + format: email + description: Interconnect notification preference + Interconnect: + type: object + properties: + href: + type: string + description: Interconnect URI + example: /fabric/v4/interconnects/34085b91-2ea3-4578-bc1f-bbd526b57885 + uuid: + type: string + description: Equinix-assigned interconnect identifier + format: uuid + example: 34085b91-2ea3-4578-bc1f-bbd526b57885 + type: + type: string + description: Interconnect type + example: XF_IC + enum: + - XF_IC + name: + type: string + description: Interconnect name + example: test ic sv + description: + type: string + description: Interconnect description + example: test interconnect + state: + $ref: "#/components/schemas/InterconnectState" + location: + $ref: "#/components/schemas/InterconnectLocation" + usedBandwidth: + minimum: 0 + type: integer + description: Interconnect used bandwidth in Mbps + example: 0 + package: + $ref: "#/components/schemas/InterconnectPackage" + router: + $ref: "#/components/schemas/InterconnectRouter" + order: + $ref: "#/components/schemas/Order" + account: + $ref: "#/components/schemas/SimplifiedAccount" + project: + $ref: "#/components/schemas/Project" + notifications: + type: array + description: Interconnect notification preferences + items: + $ref: "#/components/schemas/InterconnectNotification" + changeLog: + $ref: "#/components/schemas/Changelog" + description: Interconnect specification Beta + InterconnectState: + type: string + description: Interconnect lifecycle state + example: PROVISIONING + enum: + - PROVISIONING + - PROVISIONED + - DEPROVISIONING + - DEPROVISIONED + InterconnectLocation: + type: object + properties: + href: + type: string + description: Metro URI + example: /fabric/v4/metros/SV + metroCode: + type: string + description: Metro code where the interconnect is created + example: SV + description: Interconnect metro location + InterconnectRouter: + type: object + properties: + href: + type: string + description: Router URI + example: /fabric/v4/routers/24884a4e-bb47-403a-9426-a1b766305226 + type: + type: string + description: Router type + example: IC_ROUTER + enum: + - IC_ROUTER + uuid: + type: string + description: Router identifier + format: uuid + example: 24884a4e-bb47-403a-9426-a1b766305226 + description: Router associated with the interconnect Beta + InterconnectId: + type: string + description: Interconnect UUID + format: uuid + example: 34085b91-2ea3-4578-bc1f-bbd526b57885 + InterconnectSearchRequest: + type: object + properties: + filter: + $ref: "#/components/schemas/InterconnectFilter" + pagination: + $ref: "#/components/schemas/PaginationRequest" + sort: + type: array + items: + $ref: "#/components/schemas/InterconnectSortCriteria" + description: Search requests containing criteria + InterconnectFilter: + type: object + properties: + and: + $ref: "#/components/schemas/InterconnectSimpleExpression" + or: + $ref: "#/components/schemas/InterconnectSimpleExpression" + property: + $ref: "#/components/schemas/InterconnectSearchFieldName" + operator: + type: string + example: = + enum: + - = + - "!=" + - ">" + - ">=" + - < + - <= + - BETWEEN + - NOT BETWEEN + - LIKE + - NOT LIKE + - ILIKE + - NOT ILIKE + - IN + - NOT IN + values: + type: array + items: + type: string + example: PROVISIONED + InterconnectSimpleExpression: + type: array + items: + $ref: "#/components/schemas/InterconnectFilter" + InterconnectSearchFieldName: + type: string + description: Possible field names to use on filters + example: /state + enum: + - /uuid + - /type + - /name + - /state + - /description + - /location/metroCode + - /package/code + - /project/projectId + - /changeLog/createdDateTime + - /changeLog/updatedDateTime + - /changeLog/deletedDateTime + - /router/uuid + - /* + InterconnectSortCriteria: + type: object + properties: + direction: + $ref: "#/components/schemas/InterconnectSortDirection" + property: + $ref: "#/components/schemas/InterconnectSortBy" + InterconnectSortDirection: + type: string + description: Sorting direction + default: DESC + enum: + - DESC + - ASC + InterconnectSortBy: + type: string + description: Possible field names to use on sorting + default: /changeLog/updatedDateTime + enum: + - /changeLog/createdDateTime + - /changeLog/updatedDateTime + - /name + - /state + InterconnectSearchResponse: + type: object + properties: + pagination: + $ref: "#/components/schemas/Pagination" + sort: + type: array + items: + $ref: "#/components/schemas/InterconnectSortCriteriaResponse" + data: + type: array + items: + $ref: "#/components/schemas/Interconnect" + description: List of interconnects + AllInterconnectPackagesResponse: + required: + - data + type: object + properties: + pagination: + $ref: "#/components/schemas/Pagination" + data: + type: array + description: List of Interconnect Packages + items: + $ref: "#/components/schemas/InterconnectPackage" + description: Interconnect Packages response Beta + InterconnectPackage: + required: + - code + - type + type: object + properties: + href: + type: string + description: Interconnect Package URI + readOnly: true + type: + type: string + description: Interconnect Package Type + uuid: + type: string + description: Equinix-assigned Interconnect Package identifier + code: + type: string + description: Interconnect Package code (e.g. LAB, BASIC, STANDARD, PREMIUM) + description: + type: string + description: Interconnect Package description + routesMax: + type: integer + description: Maximum number of routes + bandwidthMax: + type: integer + description: Maximum bandwidth in Mbps + isRemote: + type: boolean + description: Authorization to connect remotely + description: Interconnect Package details Beta + SubmitIpBlockRequestBody: + required: + - project + - type + type: object + properties: + location: + $ref: "#/components/schemas/IpBlockLocation" + type: + $ref: "#/components/schemas/TypeOfIpBlockProduct" + project: + $ref: "#/components/schemas/IpBlockProjectRequest" + account: + $ref: "#/components/schemas/IpBlockAccount" + order: + $ref: "#/components/schemas/IpBlockOrderRequest" + regulations: + $ref: "#/components/schemas/IpBlockRegulations" + prefixLength: + $ref: "#/components/schemas/IpBlockPrefixLength" + prefix: + $ref: "#/components/schemas/IpBlockPrefix" + IpBlock: + required: + - changeLog + - href + - ownership + - prefixLength + - project + - state + - type + - uuid + type: object + properties: + uuid: + type: string + description: Unique identifier for the IP Block + format: uuid + href: + type: string + description: Resource URL path for the IP Block + example: /fabric/v4/ipBlocks/31fbdb3f-8def-410d-868b-ef920878affb + type: + $ref: "#/components/schemas/TypeOfIpBlockProduct" + state: + $ref: "#/components/schemas/IpBlockState" + ownership: + $ref: "#/components/schemas/IpBlockOwnership" + location: + $ref: "#/components/schemas/IpBlockLocation" + prefixLength: + $ref: "#/components/schemas/IpBlockPrefixLength" + prefix: + $ref: "#/components/schemas/IpBlockPrefix" + order: + $ref: "#/components/schemas/IpBlockOrderResponse" + account: + $ref: "#/components/schemas/IpBlockAccount" + project: + $ref: "#/components/schemas/IpBlockProject" + regulations: + $ref: "#/components/schemas/IpBlockRegulations" + assets: + type: array + description: Products using this IP Block + items: + $ref: "#/components/schemas/IpBlockAsset" + change: + $ref: "#/components/schemas/IpBlockChange" + changeLog: + $ref: "#/components/schemas/IpBlockChangeLog" + error: + $ref: "#/components/schemas/Error" + PatchIpBlockRequestBody: + maxItems: 1 + minItems: 1 + type: array + items: + $ref: "#/components/schemas/PatchIpBlockRequestBodyItem" + IpBlocksSearchRequestBody: + properties: + pagination: + $ref: "#/components/schemas/PaginationRequest" + filter: + $ref: "#/components/schemas/IpBlockFilter" + sort: + $ref: "#/components/schemas/SearchSort" + IpBlockFilter: + type: object + properties: + and: + type: array + items: + $ref: "#/components/schemas/IpBlockAndQuery" + IpBlockAndQuery: + required: + - operator + - property + - values + type: object + properties: + property: + type: string + operator: + type: string + enum: + - = + values: + type: array + items: + type: string + IpBlockSearchResponseBody: + required: + - data + - pagination + properties: + pagination: + $ref: "#/components/schemas/Pagination" + sort: + $ref: "#/components/schemas/SearchSort" + data: + type: array + items: + $ref: "#/components/schemas/IpBlock" + SearchRequest: + type: object + properties: + filter: + $ref: "#/components/schemas/Expression" + pagination: + $ref: "#/components/schemas/PaginationRequest" + sort: + type: array + items: + $ref: "#/components/schemas/SortCriteria" + description: Search requests containing criteria + Expression: + type: object + properties: + and: + $ref: "#/components/schemas/Expressions" + or: + $ref: "#/components/schemas/Expressions" + property: + $ref: "#/components/schemas/SearchFieldName" + operator: + type: string + enum: + - = + - "!=" + - ">" + - ">=" + - < + - <= + - LIKE + - ILKE + - IS NOT NULL + - IS NULL + - IN + - BETWEEN + values: + type: array + items: + type: string + Expressions: + type: array + items: + $ref: "#/components/schemas/Expression" + SearchFieldName: + type: string + description: Possible field names to use on filters + enum: + - /isRemote + - /name + - /uuid + - /type + - /geoScope + - /account/orgId + - /aSide/accessPoint/account/accountName + - /aSide/accessPoint/account/accountNumber + - /aSide/accessPoint/router/uuid + - /aSide/accessPoint/linkProtocol/vlanTagMin + - /aSide/accessPoint/linkProtocol/vlanTagMax + - /aSide/accessPoint/location/metroCode + - /aSide/accessPoint/location/metroName + - /aSide/accessPoint/name + - /aSide/accessPoint/port/uuid + - /aSide/accessPoint/port/name + - /aSide/accessPoint/type + - /aSide/accessPoint/virtualDevice/name + - /aSide/accessPoint/virtualDevice/uuid + - /aSide/serviceToken/uuid + - /bandwidth + - /change/status + - /changeLog/createdBy + - /changeLog/createdDateTime + - /changeLog/deletedBy + - /changeLog/deletedDateTime + - /changeLog/lastUpdatedBy + - /operation/equinixStatus + - /operation/providerStatus + - /operation/maintenanceStatus + - /operation/lockEnabled + - /project/projectId + - /redundancy/group + - /redundancy/priority + - /zSide/accessPoint/account/accountName + - /zSide/accessPoint/authenticationKey + - /zSide/accessPoint/linkProtocol/vlanTagMin + - /zSide/accessPoint/linkProtocol/vlanTagMax + - /zSide/accessPoint/location/metroCode + - /zSide/accessPoint/location/metroName + - /zSide/accessPoint/sellerRegion + - /zSide/accessPoint/name + - /zSide/accessPoint/port/uuid + - /zSide/accessPoint/network/uuid + - /zSide/accessPoint/port/name + - /zSide/accessPoint/profile/uuid + - /zSide/accessPoint/type + - /zSide/accessPoint/role + - /zSide/accessPoint/virtualDevice/name + - /zSide/accessPoint/virtualDevice/uuid + - /zSide/serviceToken/uuid + - /zSide/internetAccess/uuid + - /state + SortCriteria: + type: object + properties: + direction: + $ref: "#/components/schemas/SortDirection" + property: + $ref: "#/components/schemas/SortBy" + ConnectionSearchResponse: + type: object + properties: + pagination: + $ref: "#/components/schemas/Pagination" + sort: + type: array + items: + $ref: "#/components/schemas/SortCriteriaResponse" + data: + type: array + items: + $ref: "#/components/schemas/Connection" + description: List of connections + FilterBody: + type: object + properties: + filter: + $ref: "#/components/schemas/SearchExpression" + description: Search requests containing criteria + SearchExpression: + type: object + properties: + and: + $ref: "#/components/schemas/SearchExpressions" + or: + $ref: "#/components/schemas/SearchExpressions" + property: + type: string + operator: + type: string + enum: + - = + - "!=" + - ">" + - ">=" + - < + - <= + - BETWEEN + - NOT BETWEEN + - LIKE + - NOT LIKE + - IN + - NOT IN + - IS NOT NULL + - IS NULL + values: + type: array + items: + type: string + SearchExpressions: + type: array + items: + $ref: "#/components/schemas/SearchExpression" + PriceSearchResponse: + type: object + properties: + data: + type: array + items: + $ref: "#/components/schemas/Price" + pagination: + $ref: "#/components/schemas/Pagination" + PriceErrorList: + type: array + items: + $ref: "#/components/schemas/PriceError" + PriceError: + required: + - errorCode + - errorMessage + type: object + properties: + errorCode: + type: string + enum: + - EQ-3038010 + - EQ-3038022 + - EQ-3038030 + errorMessage: + type: string + enum: + - Validation failure + - Invalid value + - Internal Server Error + correlationId: + type: string + details: + type: string + help: + type: string + additionalInfo: + type: array + items: + $ref: "#/components/schemas/PriceError_additionalInfo" + description: Error with details + discriminator: + propertyName: errorCode + Statistics: + type: object + properties: + startDateTime: + type: string + description: Start and duration of the statistical analysis interval. + format: date-time + example: 2020-11-06T07:00:00Z + endDateTime: + type: string + description: End and duration of the statistical analysis interval. + format: date-time + example: 2020-11-06T07:00:00Z + viewPoint: + type: string + description: Point of view for connection metrics - aSide or zSide + enum: + - aSide + - zSide + bandwidthUtilization: + $ref: "#/components/schemas/BandwidthUtilization" + description: This API provides service-level traffic metrics so that you can view access and gather key information required to manage service subscription sizing and capacity. + BandwidthUtilization: + type: object + properties: + unit: + type: string + description: Aggregated data transfer capacity. Possible values- Mbps, megabits (1 million bits) per second; Gbps, gigabits (1 billion bits) per second. + enum: + - Mbps + metricInterval: + type: string + description: An interval formatted value, indicating the time-interval the metric objects within the response represent + inbound: + $ref: "#/components/schemas/Direction" + outbound: + $ref: "#/components/schemas/Direction" + description: Bandwidth utilization statistics (octet counters-based) + Direction: + type: object + properties: + max: + type: number + description: Max bandwidth within request time range, represented in units specified by response "units" field + format: float + mean: + type: number + description: Mean bandwidth within request time range, represented in units specified by response "units" field + format: float + metrics: + type: array + description: Bandwidth utilization statistics for a specified interval. + items: + $ref: "#/components/schemas/Metrics" + description: Directional statistics + Metrics: + type: object + properties: + intervalEndTimestamp: + type: string + description: Interval end timestamp + format: date-time + example: 2020-11-06T07:00:00Z + max: + type: number + description: Max bandwidth within statistics object time interval, represented in units specified by response "units" field + format: float + mean: + type: number + description: Mean bandwidth within statistics object time interval, represented in units specified by response "units" field + format: float + description: Bandwidth utilization statistics for a specified interval. + viewPoint: + type: string + description: viewPoint + enum: + - aSide + - zSide + ServiceProfiles: + type: object + properties: + data: + type: array + items: + $ref: "#/components/schemas/ServiceProfile" + pagination: + $ref: "#/components/schemas/Pagination" + description: Service Profiles + ServiceProfileRequest: + required: + - description + - name + - type + type: object + properties: + project: + $ref: "#/components/schemas/Project" + description: | + Service Profile is a software definition for a named provider service and it's network connectivity requirements. + This includes the basic marketing information and one + or more sets of access points (a set per each access point type) fulfilling the provider service. + allOf: + - $ref: "#/components/schemas/SimplifiedServiceProfile" + SimplifiedServiceProfile: + type: object + properties: + href: + type: string + description: Service Profile URI response attribute + format: uri + readOnly: true + type: + $ref: "#/components/schemas/ServiceProfileTypeEnum" + name: + maxLength: 50 + type: string + description: Customer-assigned service profile name + example: Sample Service Profile + uuid: + type: string + description: Equinix-assigned service profile identifier + format: uuid + description: + type: string + description: User-provided service description should be of maximum length 375 + example: offering connectivity to my-network + notifications: + type: array + description: Recipients of notifications on service profile change + items: + $ref: "#/components/schemas/SimplifiedNotification" + tags: + $ref: "#/components/schemas/Tags" + visibility: + $ref: "#/components/schemas/ServiceProfileVisibilityEnum" + allowedEmails: + type: array + items: + type: string + format: email + accessPointTypeConfigs: + minItems: 1 + type: array + items: + $ref: "#/components/schemas/ServiceProfileAccessPointType" + customFields: + type: array + items: + $ref: "#/components/schemas/CustomField" + marketingInfo: + $ref: "#/components/schemas/MarketingInfo" + ports: + type: array + items: + $ref: "#/components/schemas/ServiceProfileAccessPointCOLO" + virtualDevices: + type: array + items: + $ref: "#/components/schemas/ServiceProfileAccessPointVD" + metros: + type: array + description: Derived response attribute. + items: + $ref: "#/components/schemas/ServiceMetro" + environments: + type: array + description: Provider environments associated with this IC_PROFILE service profile. Beta + items: + $ref: "#/components/schemas/ProviderEnvironment" + selfProfile: + type: boolean + description: response attribute indicates whether the profile belongs to the same organization as the api-invoker. + readOnly: true + projectId: + type: string + lastMileConfig: + $ref: "#/components/schemas/ServiceProfileLastMileConfig" + description: | + Service Profile is a software definition for a named provider service and it's network connectivity requirements. + This includes the basic marketing information and one + or more sets of access points (a set per each access point type) fulfilling the provider service. + Tags: + type: array + items: + type: string + ServiceProfileAccessPointType: + type: object + description: Access Point Type + oneOf: + - $ref: "#/components/schemas/ServiceProfileAccessPointTypeCOLO" + - $ref: "#/components/schemas/ServiceProfileAccessPointTypeVD" + ServiceProfileAccessPointTypeCOLO: + required: + - type + type: object + properties: + uuid: + type: string + type: + $ref: "#/components/schemas/ServiceProfileAccessPointTypeEnum" + supportedBandwidths: + $ref: "#/components/schemas/Bandwidths" + allowRemoteConnections: + type: boolean + description: Setting to allow or prohibit remote connections to the service profile. + example: true + default: false + allowCustomBandwidth: + type: boolean + description: Setting to enable or disable the ability of the buyer to customize the bandwidth. + example: true + default: false + bandwidthAlertThreshold: + type: number + description: percentage of port bandwidth at which an allocation alert is generated - missing on wiki. + allowBandwidthAutoApproval: + type: boolean + description: Setting to enable or disable the ability of the buyer to change connection bandwidth without approval of the seller. + default: false + allowBandwidthUpgrade: + type: boolean + description: Availability of a bandwidth upgrade. The default is false. + linkProtocolConfig: + $ref: "#/components/schemas/ServiceProfileLinkProtocolConfig" + enableAutoGenerateServiceKey: + type: boolean + description: for verizon only. + connectionRedundancyRequired: + type: boolean + description: Mandate redundant connections + example: true + default: false + selectiveRedundancy: + type: boolean + description: Optional redundant connections + example: true + default: false + apiConfig: + $ref: "#/components/schemas/ApiConfig" + connectionLabel: + type: string + description: custom name for "Connection" + authenticationKey: + $ref: "#/components/schemas/AuthenticationKey" + metadata: + $ref: "#/components/schemas/ServiceProfileMetadata" + description: Colo Access Point Type + ServiceProfileAccessPointTypeEnum: + type: string + description: Access point type + enum: + - VD + - COLO + Bandwidths: + type: array + items: + $ref: "#/components/schemas/Bandwidth" + Bandwidth: + type: integer + description: speed in Mbps + example: 50 + ServiceProfileLinkProtocolConfig: + type: object + properties: + encapsulationStrategy: + type: string + description: was tagType - missing on wiki + enum: + - CTAGED + - BOTH + - NAMED + namedTags: + maxItems: 64 + type: array + items: + type: string + vlanCTagLabel: + type: string + description: was ctagLabel + reuseVlanSTag: + type: boolean + example: true + default: false + encapsulation: + type: string + description: Port encapsulation - Derived response attribute. Ignored on request payloads. + enum: + - QINQ + - DOT1Q + - UNTAGGED + description: Configuration for dot1q to qinq translation support + ApiConfig: + type: object + properties: + apiAvailable: + type: boolean + description: Setting indicating whether the API is available (true) or not (false). + example: true + default: false + integrationId: + type: string + equinixManagedPort: + type: boolean + description: Setting indicating that the port is managed by Equinix (true) or not (false). + example: true + default: false + equinixManagedVlan: + type: boolean + description: Setting indicating that the VLAN is managed by Equinix (true) or not (false). + example: true + default: false + allowOverSubscription: + type: boolean + description: | + Setting showing that oversubscription support is available (true) or not (false). The default is false. + Oversubscription is the sale of more than the available network bandwidth. This practice is common + and legitimate. After all, many customers use less bandwidth than they've purchased. + And network users don't consume bandwidth all at the same time. The leftover bandwidth can be sold to + other customers. When demand surges, operational and engineering resources can be shifted to + accommodate the load. + example: false + default: false + overSubscriptionLimit: + maximum: 20 + minimum: 1 + type: integer + description: A cap on oversubscription. + example: 1 + default: 1 + bandwidthFromApi: + type: boolean + default: false + description: Configuration for API based Integration for Service Profile + AuthenticationKey: + type: object + properties: + required: + type: boolean + example: true + default: false + label: + type: string + example: Service Key + description: + type: string + example: description for the authentication key + description: Authentication Key Support and Customization + ServiceProfileMetadata: + type: object + properties: + props: + type: string + regEx: + type: string + regExMsg: + type: string + vlanRangeMaxValue: + type: integer + vlanRangeMinValue: + type: integer + maxQinq: + type: string + maxDot1q: + type: integer + variableBilling: + type: boolean + globalOrganization: + type: string + limitAuthKeyConn: + type: boolean + allowSecondaryLocation: + type: boolean + redundantProfileId: + type: string + allowVcMigration: + type: boolean + connectionEditable: + type: boolean + releaseVlan: + type: boolean + maxConnectionsOnPort: + type: integer + portAssignmentStrategy: + type: string + eqxManagedPort: + type: boolean + connectionNameEditable: + type: boolean + description: Metadata. Response attribute. Ignored on request payload. + ServiceProfileAccessPointTypeVD: + required: + - type + type: object + properties: + uuid: + type: string + type: + $ref: "#/components/schemas/ServiceProfileAccessPointTypeEnum" + supportedBandwidths: + $ref: "#/components/schemas/Bandwidths" + allowRemoteConnections: + type: boolean + description: Allow remote connections to Service Profile + example: true + allowCustomBandwidth: + type: boolean + example: true + additionalProperties: false + description: VirtualDevice Access Point Type + CustomField: + required: + - dataType + - isRequired + - label + properties: + label: + type: string + example: Account Number + description: + type: string + example: Provide a valid account number + required: + type: boolean + example: true + dataType: + type: string + enum: + - STRING + - LIST + - NUMBER + options: + type: array + items: + type: string + captureInEmail: + type: boolean + description: capture this field as a part of email notification + description: Define Custom Attributes + MarketingInfo: + type: object + properties: + logo: + type: string + description: Logo file name + promotion: + type: boolean + description: Profile promotion on marketplace + processSteps: + maxItems: 3 + type: array + items: + $ref: "#/components/schemas/ProcessStep" + ProcessStep: + type: object + properties: + title: + type: string + description: Service profile custom step title + subTitle: + type: string + description: Service profile custom step sub title + description: + type: string + description: Service profile custom step description + description: Definition of customized step while making connection + ServiceProfileAccessPointCOLO: + required: + - type + - uuid + type: object + properties: + type: + type: string + enum: + - XF_PORT + - IX_PORT + uuid: + type: string + format: uuid + example: 94662143-e21b-4098-bfcf-e9416f47eae1 + location: + $ref: "#/components/schemas/SimplifiedLocation" + sellerRegion: + type: string + sellerRegionDescription: + type: string + crossConnectId: + type: string + description: Colo Access Point + ServiceProfileAccessPointVD: + required: + - type + - uuid + type: object + properties: + type: + type: string + enum: + - VD + uuid: + type: string + format: uuid + example: 94662143-e21b-4098-bfcf-e9416f47eae1 + location: + $ref: "#/components/schemas/SimplifiedLocation" + interfaceUuid: + type: string + format: uuid + example: 94662143-e21b-4098-bfcf-e9416f47eae1 + description: Virtual Device Point + ServiceMetro: + type: object + properties: + code: + type: string + description: metro code + name: + type: string + description: metro name + vcBandwidthMax: + type: integer + description: max VC speed supported in Mbps + ibxs: + type: array + items: + type: string + description: ibx codes + inTrail: + type: boolean + displayName: + type: string + description: service metro display name + sellerRegions: + type: object + additionalProperties: + type: string + ProviderEnvironment: + type: object + properties: + href: + type: string + description: Provider Environment URI + format: uri + readOnly: true + uuid: + type: string + description: Equinix-assigned provider environment identifier + format: uuid + type: + $ref: "#/components/schemas/ProviderEnvironmentTypeEnum" + name: + type: string + description: Provider environment name + example: US West 1 – Production + description: + type: string + description: Provider environment description + example: Primary production environment + region: + type: string + description: Cloud provider region identifier + example: us-west-1 + supportedBandwidths: + type: array + description: Supported bandwidths in Mbps + example: + - 1000 + - 10000 + - 100000 + items: + type: integer + metros: + type: array + description: Derived response attribute. + items: + $ref: "#/components/schemas/ServiceMetro" + supportedFeatures: + type: array + description: Supported Feature Types + example: + - FEATURE_TYPE_L3_BASE + items: + type: string + changeLog: + $ref: "#/components/schemas/Changelog" + description: Provider Environment associated with an IC_PROFILE service profile Beta + ProviderEnvironmentTypeEnum: + type: string + description: Provider environment type + enum: + - IC_ENV + ServiceProfileLastMileConfig: + type: object + properties: + apiIntegration: + $ref: "#/components/schemas/ServiceProfileLastMileApiIntegration" + productCatalogs: + type: array + description: Last-mile provider catalogs. + items: + $ref: "#/components/schemas/ServiceProfileLastMileProductCatalog" + description: Last-mile configuration for the service profile. + ServiceProfileLastMileApiIntegration: + type: object + properties: + siteValidationEnabled: + type: boolean + description: Whether site validation is enabled for the last-mile provider. + dataCenterLocationEnabled: + type: boolean + description: Whether data center location is enabled for the last-mile provider. + productOfferingEnabled: + type: boolean + description: Whether product offering is enabled for the last-mile provider. + poqEnabled: + type: boolean + description: Whether product qualification is enabled for the last-mile provider. + quoteEnabled: + type: boolean + description: Whether quote generation is enabled for the last-mile provider. + placeOrderEnabled: + type: boolean + description: Whether place order is enabled for the last-mile provider. + description: Last-mile API integration details. + ServiceProfileLastMileProductCatalog: + type: object + properties: + name: + type: string + description: Last-mile provider or catalog name. + example: att fiber + id: + type: string + description: Last-mile provider or catalog identifier. + example: fc1eb018-df0a-4ee8-8dd1-e6b8ad61178d + webUrl: + type: string + description: Last-mile catalog or provider website URL. + example: att.com/lastmile + deliveryDate: + $ref: "#/components/schemas/ServiceProfileLastMileDeliveryDateRange" + offerings: + type: array + description: Available last-mile offerings. + items: + $ref: "#/components/schemas/ServiceProfileLastMileOffering" + description: Last-mile provider catalog details. + ServiceProfileLastMileDeliveryDateRange: + type: object + properties: + unit: + type: string + description: Unit for this range is DAYS. + example: USD + min: + type: integer + description: Minimum value for the range. + example: 1 + max: + type: integer + description: Maximum value for the range. + example: 10 + description: Range details for delivery window. + ServiceProfileLastMileOffering: + type: object + properties: + bandwidth: + type: integer + description: Offered bandwidth in Mbps. + example: 10 + price: + $ref: "#/components/schemas/ServiceProfileLastMilePriceRange" + description: Last-mile offering details. + ServiceProfileLastMilePriceRange: + type: object + properties: + unit: + type: string + description: Unit for this range, such as USD or DAYS. + example: USD + min: + type: number + description: Minimum value for the range. + format: double + example: 10 + max: + type: number + description: Maximum value for the range. + format: double + example: 100 + description: Range details for price or delivery window. + ServiceProfile: + type: object + properties: + state: + $ref: "#/components/schemas/ServiceProfileStateEnum" + account: + description: Seller Account for Service Profile. + allOf: + - $ref: "#/components/schemas/SimplifiedAccount" + - type: object + project: + $ref: "#/components/schemas/Project" + change: + $ref: "#/components/schemas/ServiceProfileChange" + changeLog: + description: Seller Account for Service Profile. + allOf: + - $ref: "#/components/schemas/Changelog" + - type: object + description: | + Service Profile is a software definition for a named provider service and it's network connectivity requirements. + This includes the basic marketing information and one + or more sets of access points (a set per each access point type) fulfilling the provider service. + allOf: + - $ref: "#/components/schemas/SimplifiedServiceProfile" + ServiceProfileChange: + required: + - createdDateTime + - type + type: object + properties: + uuid: + type: string + description: Uniquely identifies a change + type: + type: string + description: Type of change + example: SERVICE_PROFILE_VISIBILITY_UPDATE + status: + type: string + description: Current outcome of the change flow + enum: + - APPROVED + - COMPLETED + - FAILED + - REJECTED + - REQUESTED + - SUBMITTED_FOR_APPROVAL + createdDateTime: + type: string + description: Set when change flow starts + format: date-time + example: 2020-11-06T07:00:00Z + updatedDateTime: + type: string + description: Set when change object is updated + format: date-time + example: 2020-11-06T07:00:00Z + information: + type: string + description: Additional information + data: + $ref: "#/components/schemas/ServiceProfileUpdateRequest" + description: Current state of latest service profile change + ServiceProfileSearchRequest: + type: object + properties: + filter: + $ref: "#/components/schemas/ServiceProfileFilter" + pagination: + $ref: "#/components/schemas/PaginationRequest" + sort: + type: array + items: + $ref: "#/components/schemas/ServiceProfileSortCriteria" + description: Search requests containing criteria + ServiceProfileFilter: + type: object + anyOf: + - $ref: "#/components/schemas/ServiceProfileSimpleExpression" + - $ref: "#/components/schemas/ServiceProfileAndFilter" + ServiceProfileSimpleExpression: + type: object + properties: + property: + type: string + description: | + Possible field names to use on filters: + * `/name` - Service Profile name + * `/uuid` - Service Profile uuid + * `/state` - Service Profile status + * `/metros/code` - Service Profile metro code + * `/visibility` - Service Profile package + * `/type` - Service Profile package + * `/project/projectId` - Service Profile project id + example: /name + operator: + type: string + description: | + Possible operators to use on filters: + * `=` - equal + example: = + values: + type: array + items: + type: string + example: ServiceProfile-1 + ServiceProfileAndFilter: + type: object + properties: + and: + type: array + items: + $ref: "#/components/schemas/ServiceProfileSimpleExpression" + ServiceProfileSortCriteria: + type: object + properties: + direction: + $ref: "#/components/schemas/ServiceProfileSortDirection" + property: + $ref: "#/components/schemas/ServiceProfileSortBy" + ServiceProfileSortDirection: + type: string + description: Sorting direction + default: DESC + enum: + - DESC + - ASC + ServiceProfileSortBy: + type: string + description: Possible field names to use on sorting + default: /changeLog/updatedDateTime + enum: + - /name + - /state + - /changeLog/createdDateTime + - /changeLog/updatedDateTime + ServiceProfileId: + type: string + description: Service Profile UUID + format: uuid + ServiceProfileUpdateRequest: + type: array + items: + $ref: "#/components/schemas/ServiceProfileUpdateOperation" + ServiceProfileUpdateOperation: + type: object + description: Service Profile Access Points + oneOf: + - $ref: "#/components/schemas/AddOperation" + - $ref: "#/components/schemas/RemoveOperation" + - $ref: "#/components/schemas/ReplaceOperation" + AddOperation: + required: + - op + - path + - value + type: object + properties: + op: + type: string + enum: + - add + path: + $ref: "#/components/schemas/Path" + value: + type: object + description: value to add + description: Add Sub-Resource to the existing model + Path: + type: string + description: A JSON Pointer path. + RemoveOperation: + required: + - op + - path + type: object + properties: + op: + type: string + enum: + - remove + path: + $ref: "#/components/schemas/Path" + description: Remove sub-resource from an existing model + ReplaceOperation: + required: + - op + - path + - value + type: object + properties: + op: + type: string + enum: + - replace + path: + $ref: "#/components/schemas/Path" + value: + type: object + description: value to replace with + description: Replace attribute value or sub-resource in the existing model + ServiceProfileActionRequest: + required: + - type + type: object + properties: + type: + type: string + description: "Action type. Example values: PROFILE_UPDATE_ACCEPTANCE, PROFILE_UPDATE_REJECTION" + example: PROFILE_UPDATE_ACCEPTANCE + description: + type: string + description: Action description + example: Approved to migrate to public + description: Service Profile Action Request + ServiceProfileActionResponse: + type: object + properties: + href: + type: string + description: Service Profile Action URI + format: uri + readOnly: true + type: + type: string + description: "Action type. Example values: PROFILE_UPDATE_ACCEPTANCE, PROFILE_UPDATE_REJECTION" + example: PROFILE_UPDATE_ACCEPTANCE + uuid: + type: string + description: Equinix-assigned action identifier + format: uuid + comments: + type: string + description: Action comments + example: Approved to migrate to public + changeLog: + $ref: "#/components/schemas/Changelog" + description: Service Profile Action Response + ProviderEnvironments: + type: object + properties: + data: + type: array + items: + $ref: "#/components/schemas/ProviderEnvironment" + pagination: + $ref: "#/components/schemas/Pagination" + description: Service Profile Provider Environments + EnvironmentId: + type: string + description: Provider Environment Reference + EnvironmentActionRequest: + required: + - keyDetails + - type + type: object + properties: + type: + $ref: "#/components/schemas/EnvironmentActionTypeEnum" + keyDetails: + $ref: "#/components/schemas/ActivationKeyDetails" + description: Request payload for environment action + EnvironmentActionTypeEnum: + type: string + description: Environment action type + example: VALIDATE_ACTIVATION_KEY + enum: + - VALIDATE_ACTIVATION_KEY + ActivationKeyDetails: + type: object + properties: + value: + type: string + description: Provider Encoded activation key + example: key_here + providerId: + type: string + description: AWS Connection identifier + accountId: + type: string + description: Account identifier + bandwidth: + type: integer + description: Bandwidth in Mbps + region: + type: string + description: Cloud provider region identifier + description: Activation Key Details Beta + EnvironmentActionResponse: + type: object + properties: + href: + type: string + description: Environment action URI + format: uri + readOnly: true + type: + $ref: "#/components/schemas/EnvironmentActionTypeEnum" + uuid: + type: string + description: Equinix-assigned action identifier + format: uuid + example: 3a58dd05-f46d-4b1d-a154-2e85c396ea62 + state: + $ref: "#/components/schemas/EnvironmentActionStateEnum" + keyDetails: + $ref: "#/components/schemas/ActivationKeyDetails" + changeLog: + $ref: "#/components/schemas/Changelog" + description: Response from environment action Beta + EnvironmentActionStateEnum: + type: string + description: Environment action state. ACTIVE - already used , INACTIVE - not used + example: ACTIVE + enum: + - ACTIVE + - INACTIVE + ServiceMetros: + type: object + properties: + data: + type: array + items: + $ref: "#/components/schemas/ServiceMetro" + pagination: + $ref: "#/components/schemas/Pagination" + description: Service Profile Metros + ServiceTokenUUID: + type: string + description: Service Token UUID + format: uuid + ServiceToken: + type: object + properties: + type: + $ref: "#/components/schemas/ServiceTokenType" + href: + type: string + description: An absolute URL that is the subject of the link's context. + format: uri + readOnly: true + expiry: + type: integer + deprecated: true + uuid: + type: string + description: Equinix-assigned service token identifier + format: uuid + issuerSide: + type: string + description: information about token side + deprecated: true + name: + type: string + description: Customer-provided service token name + description: + type: string + description: Customer-provided service token description + expirationDateTime: + type: string + description: Expiration date and time of the service token. + format: date-time + example: 2020-11-06T07:00:00Z + connection: + $ref: "#/components/schemas/ServiceTokenConnection" + state: + $ref: "#/components/schemas/ServiceTokenState" + notifications: + type: array + description: Service token related notifications + items: + $ref: "#/components/schemas/SimplifiedNotification" + account: + $ref: "#/components/schemas/SimplifiedAccount" + changelog: + $ref: "#/components/schemas/Changelog" + project: + $ref: "#/components/schemas/Project" + description: Create Service Tokens (v4) generates Equinix Fabric service tokens. These tokens authorize users to access protected resources and services. The tokens remove sensitive content from the environment, rather than just masking it, making the protected data impossible to unencrypt or decrypt. Resource owners can distribute the tokens to trusted partners and vendors, allowing selected third parties to work directly with Equinix network assets. + ServiceTokenUpdateRequest: + minItems: 1 + type: array + description: Service Token Update Request + items: + $ref: "#/components/schemas/ServiceTokenChangeOperation" + ServiceTokens: + type: object + properties: + data: + type: array + description: List of Service Tokens + items: + $ref: "#/components/schemas/ServiceToken" + pagination: + $ref: "#/components/schemas/Pagination" + description: Service tokens authorize a user to access protected resources and services available on the Equinix Fabric network. The owner of the resources can distribute service tokens to third-party users (trusted partners and vendors), allowing them to directly access and work with the resources on the network without involving the resource owners. + ServiceTokenActionRequest: + required: + - type + type: object + properties: + type: + $ref: "#/components/schemas/ServiceTokenActions" + description: Service Token action request + ServiceTokenSearchRequest: + type: object + properties: + filter: + $ref: "#/components/schemas/ServiceTokenSearchExpression" + pagination: + $ref: "#/components/schemas/PaginationRequest" + description: Search requests containing criteria + ServiceTokenSearchExpression: + type: object + properties: + and: + $ref: "#/components/schemas/ServiceTokenSearchExpressions" + or: + $ref: "#/components/schemas/ServiceTokenSearchExpressions" + property: + $ref: "#/components/schemas/ServiceTokenSearchFieldName" + operator: + type: string + enum: + - = + - "!=" + - LIKE + - ILIKE + - < + - ">" + - <= + - ">=" + - IN + - NOT IN + - BETWEEN + - NOT BETWEEN + values: + type: array + items: + type: string + ServiceTokenSearchExpressions: + type: array + items: + $ref: "#/components/schemas/ServiceTokenSearchExpression" + ServiceTokenSearchFieldName: + type: string + description: Possible field names to use on filters + enum: + - /uuid + - /state + - /name + - /project/projectId + - /type + - /expirationDateTime + - /changeLog/createdDateTime + - /changeLog/updatedDateTime + - /connection/aSide/accessPointSelectors/port/uuid + - /connection/zSide/accessPointSelectors/port/uuid + OpticalConnectPostRequest: + required: + - aSide + - bandwidth + - connectionDestinationType + - pathType + - type + - zSide + type: object + properties: + type: + type: string + description: OC - Optical Connect Type + example: OC + enum: + - OC + bandwidth: + type: integer + description: | + Connection bandwidth Mbps.
Available bandwidths depend on the IBX pair.
1000 - 1 Gbps.
10000 - 10 Gbps.
100000 - 100 Gbps.
+ example: 100000 + connectionDestinationType: + type: string + description: | + Where the Z-side terminates.
COLO - your own colocation space at another Equinix IBX.
BMMR - a Building Meet-Me Room.
REMOTE - another customer's colocation space at another Equinix IBX.
BMMR and REMOTE require a Letter of Authorization on the Z-side. + example: COLO + enum: + - COLO + - BMMR + - REMOTE + pathType: + type: string + description: | + Level of resilience for the connection.
UNPROTECTED - a single fiber path with no node redundancy.
PROTECTED - two diverse fiber paths between single nodes at each IBX.
DUAL_DIVERSE - two diverse fiber paths terminating on redundant nodes at both IBXs. + example: PROTECTED + enum: + - DUAL_DIVERSE + - PROTECTED + - UNPROTECTED + redundancy: + $ref: "#/components/schemas/OpticalConnectRedundancy" + aSide: + $ref: "#/components/schemas/OpticalConnectASideRequest" + zSide: + $ref: "#/components/schemas/OpticalConnectZSideRequest" + order: + $ref: "#/components/schemas/OpticalConnectOrder" + account: + $ref: "#/components/schemas/SimplifiedAccount" + notifications: + type: array + description: Contacts to notify about connection configuration and status changes + items: + $ref: "#/components/schemas/OpticalConnectNotification" + bmmrType: + type: string + description: | + BMMR infrastructure ownership type.
EQUINIX - Equinix-operated.
SELF - customer-operated.
Required only when connectionDestinationType is BMMR. + example: EQUINIX + enum: + - EQUINIX + - SELF + description: |- + Request to order a single connection. The A-side is always a patch panel + port in your own cage; the Z-side shape depends on + connectionDestinationType. + OpticalConnectResponse: + type: object + properties: + href: + type: string + description: URI of this Optical Connect resource. + format: uri + readOnly: true + example: https://api.equinix.com/fabric/v4/opticalConnects/06dbb0e3-e55d-4090-8aff-fc5654abaad0 + uuid: + type: string + description: Unique identifier of this Optical Connect. + format: uuid + readOnly: true + example: 06dbb0e3-e55d-4090-8aff-fc5654abaad0 + type: + type: string + description: | + Connection Type.
OC - Optical Connect. + example: OC + enum: + - OC + name: + type: string + description: | + Equinix-assigned name, derived from the account number and the two IBX locations. + readOnly: true + example: 123456-SV1-SV2-01 + state: + $ref: "#/components/schemas/OpticalConnectState" + bandwidth: + type: integer + description: Provisioned connection bandwidth in Mbps. + example: 10000 + connectionDestinationType: + type: string + description: | + Where the Z-side terminates.
COLO - your own colocation space at another Equinix IBX.
BMMR - a Building Meet-Me Room.
REMOTE - another customer's colocation space at another Equinix IBX.
+ enum: + - COLO + - BMMR + - REMOTE + pathType: + type: string + description: | + Level of resilience for the connection.
UNPROTECTED - a single fiber path with no node redundancy.
PROTECTED - two diverse fiber paths between single nodes at each IBX.
DUAL_DIVERSE - two diverse fiber paths terminating on redundant nodes at both IBXs. + enum: + - DUAL_DIVERSE + - PROTECTED + - UNPROTECTED + bmmrType: + type: string + description: | + BMMR infrastructure ownership type.
EQUINIX - Equinix-operated.
SELF - customer-operated.
Required only when connectionDestinationType is BMMR. + enum: + - EQUINIX + - SELF + redundancy: + $ref: "#/components/schemas/OpticalConnectRedundancy" + aSide: + $ref: "#/components/schemas/OpticalConnectASideResponse" + zSide: + $ref: "#/components/schemas/OpticalConnectZSideResponse" + order: + $ref: "#/components/schemas/OpticalConnectOrder" + account: + $ref: "#/components/schemas/SimplifiedAccount" + notifications: + type: array + description: Preferences for notifications on connection configuration or status changes + items: + $ref: "#/components/schemas/OpticalConnectNotification" + changeLog: + $ref: "#/components/schemas/Changelog" + description: |- + Optical Metro Connect connection with its current state and the resolved + physical termination points at both ends. + BulkOpticalConnectRequest: + type: object + properties: + data: + type: array + description: | + The two connections forming the diverse pair — one PRIMARY and one + SECONDARY. + items: + $ref: "#/components/schemas/OpticalConnectPostRequest" + description: Request to create a dual diverse pair of Optical Connect connections. + OpticalConnectBulk: + type: object + properties: + data: + type: array + items: + $ref: "#/components/schemas/OpticalConnectResponse" + description: Dual diverse pair Connection + OpticalConnectId: + type: string + description: Unique identifier of an Optical Connect. + format: uuid + example: 557400f8-d360-11e9-bb65-2a2ae2dbcce4 + OpticalConnectSearchRequest: + type: object + properties: + filter: + $ref: "#/components/schemas/OpticalConnectFilters" + pagination: + $ref: "#/components/schemas/PaginationRequest" + sort: + type: array + items: + $ref: "#/components/schemas/OpticalConnectSortCriteria" + description: |- + Search criteria for retrieving Optical Connects, with optional + filtering, pagination and sorting. + OpticalConnectFilters: + type: object + properties: + and: + maxItems: 8 + type: array + items: + $ref: "#/components/schemas/OpticalConnectFilter" + OpticalConnectFilter: + type: object + description: A single condition, or a group of conditions combined with logical OR. + anyOf: + - $ref: "#/components/schemas/OpticalConnectSimpleExpression" + - $ref: "#/components/schemas/OpticalConnectOrFilter" + OpticalConnectSimpleExpression: + type: object + properties: + property: + type: string + description: | + Possible field names to use on filters: + * `/name` - Connection name + * `/uuid` - Connection uuid + * `/type` - type + * `/state` - state + * `/bandwidth` - Bandwidth + example: /name + operator: + type: string + description: | + Possible operators to use on filters: + * `=` - equal + * `!=` - not equal + * `[NOT] BETWEEN` - (not) between + * `[NOT] LIKE` - (not) like + * `[NOT] IN` - (not) in + * `ILIKE` - case-insensitive like + example: = + values: + type: array + items: + type: string + example: 123456-SV1-SV2-01 + OpticalConnectOrFilter: + type: object + properties: + or: + maxItems: 3 + type: array + items: + $ref: "#/components/schemas/OpticalConnectSimpleExpression" + OpticalConnectSortCriteria: + type: object + properties: + direction: + $ref: "#/components/schemas/OpticalConnectSortDirection" + property: + $ref: "#/components/schemas/OpticalConnectSortBy" + description: Sorting to apply to search results. + OpticalConnectSortDirection: + type: string + description: | + Sorting direction.
ASC - ascending
DESC - descending + default: DESC + enum: + - DESC + - ASC + OpticalConnectSortBy: + type: string + description: Possible field names to use on sorting + default: /changeLog/updatedDateTime + enum: + - /name + - /uuid + - /state + - /type + - /bandwidth + - /aSide/location/ibxCode + - /zSide/location/ibxCode + - /changeLog/createdDateTime + - /changeLog/updatedDateTime + OpticalConnectServiceSearchResponse: + type: object + properties: + pagination: + $ref: "#/components/schemas/Pagination" + data: + type: array + description: Data returned from the API call. + items: + $ref: "#/components/schemas/OpticalConnectResponse" + Presence: + type: string + description: Presence + enum: + - MY_PORTS + MetroResponse: + type: object + properties: + pagination: + $ref: "#/components/schemas/Pagination" + data: + type: array + description: List of Fabric Metros. + items: + $ref: "#/components/schemas/Metro" + description: GET Metros retrieves all Equinix® Fabric™ metros, as well as latency data for each location.This performance data helps network planning engineers and administrators make strategic decisions about port locations and traffic routes. + Metro: + type: object + properties: + href: + type: string + description: The Canonical URL at which the resource resides. + type: + type: string + description: Indicator of a Fabric Metro + code: + type: string + description: Code Assigned to an Equinix IBX data center in a specified metropolitan area. + region: + type: string + description: Board geographic area in which the data center is located + name: + type: string + description: Name of the region in which the data center is located. + country: + type: string + description: Country code in which the data center is located. + equinixAsn: + type: integer + description: Autonomous system number (ASN) for a specified Fabric metro. The ASN is a unique identifier that carries the network routing protocol and exchanges that data with other internal systems via border gateway protocol. + format: int64 + localVCBandwidthMax: + type: integer + description: This field holds Max Connection speed with in the metro + format: int64 + geoCoordinates: + $ref: "#/components/schemas/GeoCoordinates" + connectedMetros: + type: array + items: + $ref: "#/components/schemas/ConnectedMetro" + services: + type: array + items: + $ref: "#/components/schemas/services" + geoScopes: + type: array + description: List of supported geographic boundaries of a Fabric Metro. + items: + $ref: "#/components/schemas/GeoScopeType" + geoZones: + type: array + description: List of supported geographic zones of a Fabric Metro. + items: + $ref: "#/components/schemas/GeoZone" + description: GET Metros retrieves all Equinix® Fabric™ metros, as well as latency data for each location.This performance data helps network planning engineers and administrators make strategic decisions about port locations and traffic routes. + GeoCoordinates: + type: object + properties: + latitude: + type: number + description: Latitude of a Fabric Metro + format: double + longitude: + type: number + description: Longitude of a Fabric Metro + format: double + description: Geographic location data of Fabric Metro + ConnectedMetro: + type: object + properties: + href: + type: string + description: The Canonical URL at which the resource resides. + code: + type: string + description: Code assigned to an Equinix International Business Exchange (IBX) data center in a specified metropolitan area. + avgLatency: + type: number + description: Average latency (in milliseconds[ms]) between two specified metros. + remoteVCBandwidthMax: + type: integer + description: This field holds the Max Connection speed with connected metros + format: int64 + description: Arrays of objects containing latency data for the specified metros + services: + type: object + properties: + type: + type: string + description: Type of Service + description: Arrays of objects containing type of services supported in the specified metros + GeoScopeType: + type: string + description: Geographic boundary types + enum: + - CANADA + - CONUS + - JAPAN + - UK + - AUSTRALIA + - BRAZIL + - SWITZERLAND + - EU + GeoZone: + type: object + properties: + code: + type: string + description: Code assigned to a geographic zone. + name: + type: string + description: Name of a geographic zone. + description: + type: string + description: Description of a geographic zone. + description: Geographic zone of a Fabric Metro + MetroErrorList: + type: array + items: + $ref: "#/components/schemas/MetroError" + MetroError: + required: + - errorCode + - errorMessage + type: object + properties: + errorCode: + type: string + enum: + - EQ-3036001 + - EQ-3036013 + - EQ-3036030 + - EQ-3036100 + errorMessage: + type: string + enum: + - Unauthorized + - Invalid Query Parameter + - Invalid Path Parameter + - Invalid Query or Path Parameter + - Internal Server Error + - Metro Not Found + correlationId: + type: string + details: + type: string + help: + type: string + additionalInfo: + type: array + items: + $ref: "#/components/schemas/PriceError_additionalInfo" + description: Error with details + discriminator: + propertyName: errorCode + MetroCode: + type: string + description: Metro Code + AllPortsResponse: + type: object + properties: + pagination: + $ref: "#/components/schemas/Pagination" + data: + type: array + description: GET All User Port Across Fabric Metros + items: + $ref: "#/components/schemas/Port" + description: GET All User Port Across Fabric Metros + Port: + type: object + properties: + href: + type: string + description: Equinix assigned response attribute for an absolute URL that is the subject of the link's context. + format: uri + readOnly: true + type: + $ref: "#/components/schemas/PortType" + uuid: + type: string + description: Equinix assigned response attribute for port identifier + format: uuid + name: + type: string + description: Equinix assigned response attribute for Port name + description: + type: string + description: Equinix assigned response attribute for Port description + physicalPortsSpeed: + minimum: 0 + type: integer + description: Physical Ports Speed in Mbps + connectionsCount: + minimum: 0 + type: integer + description: Equinix assigned response attribute for Connection count + physicalPortsType: + type: string + description: Physical Ports Type. 10GBASE_SMF and 400GBASE_LR4 are only used for IX ports + enum: + - 1000BASE_LX + - 10GBASE_LR + - 100GBASE_LR4 + - 10GBASE_ER + - 1000BASE_SX + - 10GBASE_SMF + - 400GBASE_LR4 + physicalPortsCount: + type: integer + connectivitySourceType: + type: string + description: Port connectivity type + enum: + - COLO + - BMMR + - REMOTE + bmmrType: + type: string + enum: + - SELF + - EQUINIX + project: + $ref: "#/components/schemas/Project" + state: + $ref: "#/components/schemas/PortState" + order: + $ref: "#/components/schemas/PortOrder" + operation: + allOf: + - $ref: "#/components/schemas/PortOperation" + account: + $ref: "#/components/schemas/SimplifiedAccount" + change: + $ref: "#/components/schemas/PortChange" + changeLog: + $ref: "#/components/schemas/Changelog" + serviceType: + type: string + description: Port service Type + deprecated: true + enum: + - EPL + - MSP + serviceCode: + $ref: "#/components/schemas/PortServiceCode" + bandwidth: + minimum: 0 + type: integer + description: Equinix assigned response attribute for Port bandwidth in Mbps + deprecated: true + availableBandwidth: + minimum: 0 + type: integer + description: Equinix assigned response attribute for Port available bandwidth in Mbps + usedBandwidth: + minimum: 0 + type: integer + description: Equinix assigned response attribute for Port used bandwidth in Mbps + location: + $ref: "#/components/schemas/SimplifiedLocation" + device: + $ref: "#/components/schemas/PortDevice" + interface: + $ref: "#/components/schemas/PortInterface" + demarcationPointIbx: + type: string + description: A-side/Equinix ibx + tetherIbx: + type: string + description: z-side/Equinix ibx + demarcationPoint: + $ref: "#/components/schemas/PortDemarcationPoint" + redundancy: + $ref: "#/components/schemas/PortRedundancy" + encapsulation: + $ref: "#/components/schemas/PortEncapsulation" + lagEnabled: + type: boolean + description: If LAG enabled + lag: + deprecated: true + allOf: + - $ref: "#/components/schemas/PortLag" + asn: + type: integer + description: Port ASN + package: + $ref: "#/components/schemas/Package" + settings: + $ref: "#/components/schemas/PortSettings" + physicalPortQuantity: + type: integer + description: Number of physical ports + notifications: + type: array + description: Notification preferences + items: + $ref: "#/components/schemas/PortNotification" + additionalInfo: + type: array + description: Port additional information + items: + $ref: "#/components/schemas/PortAdditionalInfo" + endCustomer: + $ref: "#/components/schemas/EndCustomer" + physicalPorts: + type: array + description: Physical ports that implement this port + items: + $ref: "#/components/schemas/PhysicalPort" + loas: + type: array + description: Port Loas + items: + $ref: "#/components/schemas/PortLoa" + marketplaceSubscription: + $ref: "#/components/schemas/marketplaceSubscription" + description: Port specification + PhysicalPort: + type: object + properties: + href: + type: string + description: Equinix assigned response attribute for an absolute URL that is the subject of the link's context. + format: uri + readOnly: true + type: + $ref: "#/components/schemas/PhysicalPortType" + id: + type: integer + description: Equinix assigned response attribute for Physical Port Id + deprecated: true + state: + $ref: "#/components/schemas/PortState" + account: + $ref: "#/components/schemas/SimplifiedAccount" + interfaceSpeed: + minimum: 0 + type: integer + description: Physical Port Speed in Mbps + interfaceType: + type: string + description: Physical Port Interface Type + uuid: + type: string + description: Equinix assigned response attribute for physical port identifier + format: uuid + tether: + $ref: "#/components/schemas/PortTether" + demarcationPoint: + $ref: "#/components/schemas/PortDemarcationPoint" + settings: + $ref: "#/components/schemas/PhysicalPortSettings" + interface: + $ref: "#/components/schemas/PortInterface" + notifications: + type: array + description: Notification preferences + items: + $ref: "#/components/schemas/PortNotification" + additionalInfo: + type: array + description: Physical Port additional information + items: + $ref: "#/components/schemas/PortAdditionalInfo" + order: + $ref: "#/components/schemas/PortOrder" + operation: + $ref: "#/components/schemas/PortOperation" + loas: + type: array + description: Port Loas + items: + $ref: "#/components/schemas/PortLoa" + description: Physical Port specification + PortRequest: + required: + - account + - connectivitySourceType + - encapsulation + - location + - physicalPortsSpeed + - physicalPortsType + - project + - type + type: object + properties: + type: + $ref: "#/components/schemas/PortType" + physicalPortsSpeed: + minimum: 0 + type: integer + description: Physical Ports Speed in Mbps + physicalPortsType: + type: string + description: Physical Ports Type. 10GBASE_SMF is only applicable for IX ports + enum: + - 1000BASE_LX + - 10GBASE_LR + - 100GBASE_LR4 + - 10GBASE_ER + - 1000BASE_SX + - 10GBASE_SMF + - 400GBASE_LR4 + physicalPortsCount: + type: integer + connectivitySourceType: + type: string + description: Port connectivity type + enum: + - COLO + - BMMR + - REMOTE + bmmrType: + type: string + description: BMMR Type is mandatory when connectivitySourceType is BMMR + enum: + - SELF + - EQUINIX + project: + $ref: "#/components/schemas/Project" + order: + $ref: "#/components/schemas/PortOrder" + account: + $ref: "#/components/schemas/SimplifiedAccountRequest" + serviceType: + type: string + description: Port service Type + deprecated: true + enum: + - EPL + - MSP + serviceCode: + $ref: "#/components/schemas/PortServiceCode" + bandwidth: + minimum: 0 + type: integer + description: Equinix assigned response attribute for Port bandwidth in Mbps + deprecated: true + location: + $ref: "#/components/schemas/SimplifiedLocationRequest" + demarcationPointIbx: + type: string + description: A-side/Equinix ibx + tetherIbx: + type: string + description: z-side/Equinix ibx + demarcationPoint: + $ref: "#/components/schemas/PortDemarcationPoint" + redundancy: + $ref: "#/components/schemas/PortRedundancy" + encapsulation: + $ref: "#/components/schemas/PortEncapsulation" + lagEnabled: + type: boolean + description: Indicates whether Link Aggregation Group (LAG) is enabled on this port + package: + $ref: "#/components/schemas/Package" + settings: + $ref: "#/components/schemas/PortSettings" + notifications: + type: array + description: Notification preferences + items: + $ref: "#/components/schemas/PortNotification" + physicalPorts: + type: array + description: Physical ports that implement this port + items: + $ref: "#/components/schemas/PhysicalPort" + loas: + type: array + description: Port Loas + items: + $ref: "#/components/schemas/PortLoa" + description: PortRequest is the Request Object for creating single and bulk fabric ports + BulkPhysicalPort: + type: object + properties: + data: + type: array + description: add physical ports to virtual port + items: + $ref: "#/components/schemas/PhysicalPort" + description: Add to Lag request + AllPhysicalPortsResponse: + type: object + properties: + pagination: + $ref: "#/components/schemas/Pagination" + data: + type: array + description: GET All Physical Ports + items: + $ref: "#/components/schemas/PhysicalPort" + description: GET All Physical Ports + PortUpdateRequest: + minItems: 1 + type: array + description: Port Update Request + items: + $ref: "#/components/schemas/PortChangeOperation" + Error: + required: + - errorCode + - errorMessage + type: object + properties: + errorCode: + pattern: ^EQ-\d{7}$ + type: string + errorMessage: + type: string + correlationId: + type: string + details: + type: string + help: + type: string + additionalInfo: + type: array + items: + $ref: "#/components/schemas/PriceError_additionalInfo" + description: Error Response with details + LinkProtocolGetResponse: + type: object + properties: + pagination: + $ref: "#/components/schemas/Pagination" + data: + type: array + items: + $ref: "#/components/schemas/LinkProtocolResponse" + description: List of Vlans + PortV4SearchRequest: + required: + - filter + type: object + properties: + filter: + $ref: "#/components/schemas/PortExpression" + pagination: + $ref: "#/components/schemas/PaginationRequest" + sort: + type: array + items: + $ref: "#/components/schemas/PortSortCriteria" + description: Search requests containing criteria + PortExpression: + type: object + properties: + and: + $ref: "#/components/schemas/PortExpressions" + or: + $ref: "#/components/schemas/PortExpressions" + property: + $ref: "#/components/schemas/PortSearchFieldName" + operator: + type: string + enum: + - = + - "!=" + - ">" + - ">=" + - < + - <= + - LIKE + - ILIKE + - IN + - NOT IN + - BETWEEN + values: + type: array + items: + type: string + description: | + Either use 'and' for AND operations, 'or' for OR operations, or specify 'property', 'operator', and 'values' for field filtering. Only one of these patterns should be used at a time. + PortExpressions: + type: array + items: + $ref: "#/components/schemas/PortExpression" + PortSearchFieldName: + type: string + description: Possible field names to use on filters + enum: + - /device/name + - /physicalPorts/tether/crossConnectId + - /physicalPorts/interface/name + - /state + - /project/projectId + - /uuid + - /name + - /account/orgId + - /account/accountNumber + - /location/metroCode + - /operation/maintenanceStatus + - /operation/lockEnabled + x-enum-deprecations: + /device/name: true + /physicalPorts/interface/name: true + PortSortCriteria: + type: object + properties: + direction: + $ref: "#/components/schemas/PortSortDirection" + property: + $ref: "#/components/schemas/PortSortBy" + AllPortPackagesResponse: + required: + - data + type: object + properties: + data: + type: array + description: List of Port Packages + items: + $ref: "#/components/schemas/PortPackage" + description: Port Packages response + GetAllConnectionRouteAggregationsResponse: + type: object + properties: + pagination: + $ref: "#/components/schemas/Pagination" + data: + type: array + description: List of Route Aggregations attached to a Connection + items: + $ref: "#/components/schemas/ConnectionRouteAggregationData" + RouteAggregationId: + type: string + description: Route Aggregations UUID + example: 695a8471-6595-4ac6-a2f4-b3d96ed3a59d + ConnectionRouteAggregationData: + type: object + properties: + href: + type: string + description: Route Aggregation URI + format: uri + example: https://api.equinix.com/fabric/v4/connections/81331c52-04c0-4656-a4a7-18c52669348f/routeAggregations/695a8471-6595-4ac6-a2f4-b3d96ed3a59d + type: + type: string + description: Route Aggregation type + enum: + - BGP_IPv4_PREFIX_AGGREGATION + uuid: + type: string + description: Route Aggregation identifier + format: uuid + example: 695a8471-6595-4ac6-a2f4-b3d96ed3a59d + attachmentStatus: + type: string + enum: + - ATTACHING + - ATTACHED + - DETACHED + - DETACHING + - FAILED + - PENDING_BGP_CONFIGURATION + changeLog: + $ref: "#/components/schemas/Changelog" + GetAllConnectionRouteFiltersResponse: + type: object + properties: + pagination: + $ref: "#/components/schemas/Pagination" + data: + type: array + description: List of Route Filters attached to a Connection + items: + $ref: "#/components/schemas/ConnectionRouteFilterData" + RouteFilterId: + type: string + description: Route Filters UUID + example: 695a8471-6595-4ac6-a2f4-b3d96ed3a59d + ConnectionRouteFilterData: + type: object + properties: + href: + type: string + description: Route filter URI + format: uri + example: https://api.equinix.com/fabric/v4/connections/81331c52-04c0-4656-a4a7-18c52669348f/routeFilters/695a8471-6595-4ac6-a2f4-b3d96ed3a59d + type: + type: string + description: Route filter type + enum: + - BGP_IPv4_PREFIX_FILTER + - BGP_IPv6_PREFIX_FILTER + uuid: + type: string + description: Route Filter identifier + format: uuid + example: 695a8471-6595-4ac6-a2f4-b3d96ed3a59d + attachmentStatus: + type: string + enum: + - ATTACHING + - ATTACHED + - DETACHED + - DETACHING + - FAILED + - PENDING_BGP_CONFIGURATION + direction: + type: string + enum: + - INBOUND + - OUTBOUND + changeLog: + $ref: "#/components/schemas/Changelog" + ConnectionRouteFiltersBase: + required: + - direction + type: object + properties: + direction: + type: string + description: Route Filter direction to attach to a connection + enum: + - INBOUND + - OUTBOUND + RouteFiltersBase: + required: + - name + - project + - type + type: object + properties: + type: + type: string + description: Route Filter type + enum: + - BGP_IPv4_PREFIX_FILTER + - BGP_IPv6_PREFIX_FILTER + name: + type: string + example: My-direct-route-1 + description: + type: string + description: Customer-provided connection description + project: + $ref: "#/components/schemas/Project" + RouteFiltersData: + type: object + properties: + href: + type: string + description: Route filter URI + format: uri + example: https://api.equinix.com/fabric/v4/routeFilters/695a8471-6595-4ac6-a2f4-b3d96ed3a59d + type: + type: string + description: Route Filter type + enum: + - BGP_IPv4_PREFIX_FILTER + - BGP_IPv6_PREFIX_FILTER + uuid: + type: string + description: Route filter identifier + format: uuid + example: 695a8471-6595-4ac6-a2f4-b3d96ed3a59d + name: + type: string + example: My-direct-route-1 + description: + type: string + description: Customer-provided connection description + state: + $ref: "#/components/schemas/RouteFilterState" + change: + $ref: "#/components/schemas/RouteFiltersChange" + notMatchedRuleAction: + type: string + enum: + - ALLOW + - DENY + connectionsCount: + type: integer + example: 0 + rulesCount: + type: integer + example: 0 + project: + $ref: "#/components/schemas/RouteFiltersData_project" + changelog: + $ref: "#/components/schemas/Changelog" + RouteFiltersPatchRequest: + minItems: 1 + type: array + description: Patch Route Filters request + items: + $ref: "#/components/schemas/RouteFiltersPatchRequestItem" + RouteFilterChangeDataResponse: + type: object + properties: + pagination: + $ref: "#/components/schemas/Pagination" + data: + type: array + items: + $ref: "#/components/schemas/RouteFilterChangeData" + description: List of route filter changes + ChangeId_1: + type: string + description: Route Filters Change UUID + format: uuid + example: 6d500177-9404-41f2-99e8-2bf1a84d8db5 + RouteFilterChangeData: + type: object + properties: + status: + type: string + description: Current outcome of the change flow + enum: + - COMPLETED + - FAILED + - REQUESTED + createdBy: + type: string + description: Created by user key + createdDateTime: + type: string + description: Set when change flow starts + format: date-time + updatedBy: + type: string + description: Updated by user key + updatedDateTime: + type: string + description: Set when change object is updated + format: date-time + information: + type: string + description: Additional information + data: + $ref: "#/components/schemas/RouteFiltersChangeOperation" + description: Current state of latest route filter change + allOf: + - $ref: "#/components/schemas/RouteFiltersChange" + GetRouteFilterGetConnectionsResponse: + type: object + properties: + pagination: + $ref: "#/components/schemas/Pagination" + data: + type: array + description: List of Connections using a Route Filter + items: + $ref: "#/components/schemas/RouteFilterConnectionsData" + RouteFiltersSearchRequest: + type: object + properties: + filter: + $ref: "#/components/schemas/SearchFilter" + pagination: + $ref: "#/components/schemas/PaginationRequest" + sort: + type: array + items: + $ref: "#/components/schemas/RouteFilterSortCriteria" + description: Search route filters + RouteFiltersSearchResponse: + type: object + properties: + pagination: + $ref: "#/components/schemas/Pagination" + data: + type: array + description: List of route filters + items: + $ref: "#/components/schemas/RouteFiltersData" + GetRouteFilterRulesResponse: + type: object + properties: + pagination: + $ref: "#/components/schemas/Pagination" + data: + type: array + description: List of Route Filter Rules + items: + $ref: "#/components/schemas/RouteFilterRulesData" + RouteFilterRulesBase: + required: + - prefix + type: object + properties: + name: + type: string + example: Private-subnet-filter + description: + type: string + description: Customer-provided Route Filter Rule description + prefix: + type: string + example: 192.168.0.0/24 + prefixMatch: + type: string + example: orlonger, exact + default: orlonger + RouteFilterRulesData: + type: object + properties: + href: + type: string + description: Route Filter Rules URI + format: uri + example: https://api.equinix.com/fabric/v4/routeFilters/695a8471-6595-4ac6-a2f4-b3d96ed3a59d/routeFilterRules/65b025ef-022b-4180-85cf-82cfc1ab655b + type: + type: string + description: Route filter type + enum: + - BGP_IPv4_PREFIX_FILTER_RULE + - BGP_IPv6_PREFIX_FILTER_RULE + uuid: + type: string + description: Route Filter Rule identifier + format: uuid + example: 65b025ef-022b-4180-85cf-82cfc1ab655b + name: + type: string + example: Private-subnet-filter-2 + description: + type: string + description: Customer-provided Route Filter Rule description + state: + $ref: "#/components/schemas/RouteFilterRuleState" + prefixMatch: + type: string + description: prefix matching operator + example: exact + default: orlonger + change: + $ref: "#/components/schemas/RouteFilterRulesChange" + action: + type: string + enum: + - PERMIT + - DENY + prefix: + type: string + example: 192.168.0.0/24 + changelog: + $ref: "#/components/schemas/Changelog" + RouteFilterRuleId: + type: string + description: Route Filter Rule UUID + example: 65b025ef-022b-4180-85cf-82cfc1ab655b + RouteFilterRulesPatchRequest: + minItems: 1 + type: array + description: Patch Route Filters Rule request + items: + $ref: "#/components/schemas/RouteFilterRulesPatchRequestItem" + RouteFilterRulesChangeDataResponse: + type: object + properties: + pagination: + $ref: "#/components/schemas/Pagination" + data: + type: array + items: + $ref: "#/components/schemas/RouteFilterRulesChangeData" + description: List of route filter rule changes + ChangeId_2: + type: string + description: Route Filter Rule Change UUID + format: uuid + example: 6d500177-9404-41f2-99e8-2bf1a84d8db5 + RouteFilterRulesChangeData: + type: object + properties: + status: + type: string + description: Current outcome of the change flow + enum: + - COMPLETED + - FAILED + - REQUESTED + createdBy: + type: string + description: Created by User Key + createdDateTime: + type: string + description: Set when change flow starts + format: date-time + updatedBy: + type: string + description: Updated by User Key + updatedDateTime: + type: string + description: Set when change object is updated + format: date-time + data: + $ref: "#/components/schemas/RouteFilterRulesChangeOperation" + description: Current state of latest route filter rules change + allOf: + - $ref: "#/components/schemas/RouteFilterRulesChange" + RouteFilterRulesPostRequest: + type: object + properties: + data: + type: array + description: Route Filter Rule configuration + items: + $ref: "#/components/schemas/RouteFilterRulesBase" + description: Create Route Filter Rule POST request + RouteFilterRulesSearchRequest: + type: object + properties: + filter: + $ref: "#/components/schemas/RouteFilterRulesFilter" + pagination: + $ref: "#/components/schemas/PaginationRequest" + sort: + type: array + items: + $ref: "#/components/schemas/RouteFilterRuleSortCriteria" + description: Search route filter rules + RouteFilterRulesFilter: + description: Top-level filter that can be either an AND expression or OR expression + anyOf: + - $ref: "#/components/schemas/RouteFilterRuleAndExpression" + - $ref: "#/components/schemas/RouteFilterRuleOrExpression" + RouteFilterRuleAndExpression: + type: object + properties: + and: + maxItems: 8 + minItems: 1 + type: array + items: + $ref: "#/components/schemas/RouteFilterRuleExpression" + description: AND expression containing multiple filter expressions + RouteFilterRuleExpression: + description: Filter expression that can be AND, OR, or a simple expression + anyOf: + - $ref: "#/components/schemas/RouteFilterRuleAndExpression" + - $ref: "#/components/schemas/RouteFilterRuleOrExpression" + - $ref: "#/components/schemas/RouteFilterRuleSimpleExpression" + RouteFilterRuleOrExpression: + type: object + properties: + or: + maxItems: 8 + minItems: 1 + type: array + items: + $ref: "#/components/schemas/RouteFilterRuleExpression" + description: OR expression containing multiple filter expressions + RouteFilterRuleSimpleExpression: + type: object + properties: + property: + type: string + description: | + Possible field names to use on filters: + * `/type` - Route Filter Rules Type + * `/name` - Route Filter Rules Name + * `/uuid` - Route Filter Rules uuid + * `/state` - Route Filter Rules status + * `/prefix` - Route Filter Rule Prefix + * `/prefixMatch` - Route Filter Rule Prefix Match + example: /name + operator: + type: string + description: | + Possible operators to use on filters: + * `=` - equal + * `!=` - not equal + * `[NOT] LIKE` - (not) like + * `[NOT] IN` - (not) in + * `ILIKE` - case-insensitive like + example: = + values: + maxItems: 8 + minItems: 1 + type: array + items: + type: string + example: Route_Filter_Rule_Demo + description: Simple filter expression with property, operator, and values + RouteFilterRuleSortCriteria: + type: object + properties: + direction: + $ref: "#/components/schemas/RouteFilterRuleSortDirection" + property: + $ref: "#/components/schemas/RouteFilterRuleSortBy" + RouteFilterRuleSortDirection: + type: string + description: Sorting direction + default: DESC + enum: + - DESC + - ASC + RouteFilterRuleSortBy: + type: string + description: Possible field names to use on sorting + default: /changeLog/updatedDateTime + enum: + - /type + - /uuid + - /name + - /state + - /prefix + - /prefixMatch + - /changeLog/createdDateTime + - /changeLog/updatedDateTime + RouteFilterRulesSearchResponse: + type: object + properties: + pagination: + $ref: "#/components/schemas/Pagination" + data: + type: array + description: List of route filter rules + items: + $ref: "#/components/schemas/RouteFilterRulesData" + RouteAggregationsBase: + required: + - name + - project + - type + type: object + properties: + type: + type: string + description: Route Aggregation type + enum: + - BGP_IPv4_PREFIX_AGGREGATION + - BGP_IPv6_PREFIX_AGGREGATION + name: + type: string + example: My-direct-route-1 + description: + type: string + description: Customer-provided connection description + project: + $ref: "#/components/schemas/Project" + RouteAggregationsData: + type: object + properties: + href: + type: string + description: Route Aggregation URI + format: uri + example: https://api.equinix.com/fabric/v4/routeAggregations/695a8471-6595-4ac6-a2f4-b3d96ed3a59d + type: + type: string + description: Route Aggregation type + enum: + - BGP_IPv4_PREFIX_AGGREGATION + - BGP_IPv6_PREFIX_AGGREGATION + uuid: + type: string + description: Route Aggregation identifier + format: uuid + example: 695a8471-6595-4ac6-a2f4-b3d96ed3a59d + name: + type: string + example: My-direct-route-1 + description: + type: string + description: Customer-provided connection description + state: + $ref: "#/components/schemas/RouteAggregationState" + change: + $ref: "#/components/schemas/RouteAggregationsChange" + connectionsCount: + type: integer + example: 0 + rulesCount: + type: integer + example: 0 + project: + $ref: "#/components/schemas/RouteAggregationsData_project" + changeLog: + $ref: "#/components/schemas/Changelog" + RouteAggregationsPatchRequest: + minItems: 1 + type: array + description: Patch Route Aggregations request + items: + $ref: "#/components/schemas/RouteAggregationsPatchRequestItem" + RouteAggregationChangeDataResponse: + type: object + properties: + pagination: + $ref: "#/components/schemas/Pagination" + data: + type: array + items: + $ref: "#/components/schemas/RouteAggregationChangeData" + description: List of Route Aggregation changes + ChangeId_3: + type: string + description: Route Aggregations Change UUID + format: uuid + example: 6d500177-9404-41f2-99e8-2bf1a84d8db5 + RouteAggregationChangeData: + type: object + properties: + status: + type: string + description: Current outcome of the change flow + enum: + - COMPLETED + - FAILED + - REQUESTED + createdBy: + type: string + description: Created by User Key + createdDateTime: + type: string + description: Set when change flow starts + format: date-time + updatedBy: + type: string + description: Updated by User Key + updatedDateTime: + type: string + description: Set when change object is updated + format: date-time + information: + type: string + description: Additional information + data: + $ref: "#/components/schemas/RouteAggregationsChangeOperation" + description: Current state of latest Route Aggregation change + allOf: + - $ref: "#/components/schemas/RouteAggregationsChange" + GetRouteAggregationGetConnectionsResponse: + type: object + properties: + pagination: + $ref: "#/components/schemas/Pagination" + data: + type: array + description: List of Connections using a Route Aggregation + items: + $ref: "#/components/schemas/RouteAggregationConnectionsData" + RouteAggregationsSearchRequest: + type: object + properties: + filter: + $ref: "#/components/schemas/SearchFilter" + pagination: + $ref: "#/components/schemas/PaginationRequest" + sort: + type: array + items: + $ref: "#/components/schemas/RouteAggregationSortCriteria" + description: Search route aggregations + RouteAggregationsSearchResponse: + type: object + properties: + pagination: + $ref: "#/components/schemas/Pagination" + data: + type: array + description: List of Route Aggregations + items: + $ref: "#/components/schemas/RouteAggregationsData" + GetRouteAggregationRulesResponse: + type: object + properties: + pagination: + $ref: "#/components/schemas/Pagination" + data: + type: array + description: List of Route Aggregation Rules + items: + $ref: "#/components/schemas/RouteAggregationRulesData" + RouteAggregationRulesBase: + required: + - prefix + type: object + properties: + name: + type: string + example: Private-subnet-Aggregation + description: + type: string + description: Customer-provided Route Aggregation Rule description + prefix: + type: string + example: 192.168.0.0/24 + RouteAggregationRulesData: + type: object + properties: + href: + type: string + description: Route Aggregation Rules URI + format: uri + example: https://api.equinix.com/fabric/v4/routeAggregations/695a8471-6595-4ac6-a2f4-b3d96ed3a59d/routeAggregationRules/65b025ef-022b-4180-85cf-82cfc1ab655b + type: + type: string + description: Route Aggregation type + enum: + - BGP_IPv4_PREFIX_AGGREGATION_RULE + uuid: + type: string + description: Route Aggregation Rule identifier + format: uuid + example: 65b025ef-022b-4180-85cf-82cfc1ab655b + name: + type: string + example: Private-subnet-aggregation-2 + description: + type: string + description: Customer-provided Route Aggregation Rule description + state: + $ref: "#/components/schemas/RouteAggregationRuleState" + change: + $ref: "#/components/schemas/RouteAggregationRulesChange" + prefix: + type: string + example: 192.168.0.0/24 + changeLog: + $ref: "#/components/schemas/Changelog" + RouteAggregationRuleId: + type: string + description: Route Aggregation Rule UUID + example: 65b025ef-022b-4180-85cf-82cfc1ab655b + RouteAggregationRulesPatchRequest: + minItems: 1 + type: array + description: Patch Route Aggregations Rule request + items: + $ref: "#/components/schemas/RouteAggregationRulesPatchRequestItem" + RouteAggregationRulesChangeDataResponse: type: object properties: pagination: $ref: "#/components/schemas/Pagination" data: type: array - description: Data returned from the API call. items: - $ref: "#/components/schemas/CloudEvent" - CloudEventId: + $ref: "#/components/schemas/RouteAggregationRulesChangeData" + description: List of Route Aggregation Rule changes + ChangeId_4: type: string - description: Cloud Event UUID + description: Route Aggregation Rule Change UUID format: uuid - example: 557400f8-d360-11e9-bb65-2a2ae2dbcce4 - CloudEvent: + example: 6d500177-9404-41f2-99e8-2bf1a84d8db5 + RouteAggregationRulesChangeData: type: object properties: - spec: - type: string - description: Cloud Event Open Telemetry specification - readOnly: true - source: + status: type: string - description: Cloud Event source - id: + description: Current outcome of the change flow + enum: + - COMPLETED + - FAILED + - REQUESTED + createdBy: type: string - description: Cloud Event identifier - format: uuid - type: + description: Created by User Key + createdDateTime: type: string - description: Equinix supported event type - subject: + description: Set when change flow starts + format: date-time + updatedBy: type: string - description: Cloud Event subject - time: + description: Updated by User Key + updatedDateTime: type: string - description: Cloud Event time the event occurred + description: Set when change object is updated format: date-time - dataschema: + data: + $ref: "#/components/schemas/RouteAggregationRulesChangeOperation" + description: Current state of latest Route Aggregation Rules change + allOf: + - $ref: "#/components/schemas/RouteAggregationRulesChange" + RouteAggregationRulesPostRequest: + type: object + properties: + data: + type: array + description: Route Aggregation Rule configuration + items: + $ref: "#/components/schemas/RouteAggregationRulesBase" + description: Create Route Aggregation Rule POST request + RouteAggregationRulesSearchRequest: + type: object + properties: + filter: + $ref: "#/components/schemas/RouteAggregationRulesFilter" + pagination: + $ref: "#/components/schemas/PaginationRequest" + sort: + type: array + items: + $ref: "#/components/schemas/RouteAggregationRuleSortCriteria" + description: Search route aggregation rules + RouteAggregationRulesFilter: + description: Top-level filter that can be either an AND expression or OR expression + anyOf: + - $ref: "#/components/schemas/RouteAggregationRuleAndExpression" + - $ref: "#/components/schemas/RouteAggregationRuleOrExpression" + RouteAggregationRuleAndExpression: + type: object + properties: + and: + maxItems: 8 + minItems: 1 + type: array + items: + $ref: "#/components/schemas/RouteAggregationRuleExpression" + description: AND expression containing multiple filter expressions + RouteAggregationRuleExpression: + description: Filter expression that can be AND, OR, or a simple expression + anyOf: + - $ref: "#/components/schemas/RouteAggregationRuleAndExpression" + - $ref: "#/components/schemas/RouteAggregationRuleOrExpression" + - $ref: "#/components/schemas/RouteAggregationRuleSimpleExpression" + RouteAggregationRuleOrExpression: + type: object + properties: + or: + maxItems: 8 + minItems: 1 + type: array + items: + $ref: "#/components/schemas/RouteAggregationRuleExpression" + description: OR expression containing multiple filter expressions + RouteAggregationRuleSimpleExpression: + type: object + properties: + property: type: string - description: Cloud Event dataschema reference - datacontenttype: + description: | + Possible field names to use on filters: + * `/type` - Route Aggregation Rules Type + * `/name` - Route Aggregation Rules Name + * `/uuid` - Route Aggregation Rules uuid + * `/state` - Route Aggregation Rules status + * `/prefix` - Route Aggregation Rule Prefix + example: /name + operator: type: string - description: Cloud Event data content type - severitynumber: + description: | + Possible operators to use on filters: + * `=` - equal + * `!=` - not equal + * `[NOT] LIKE` - (not) like + * `[NOT] IN` - (not) in + * `ILIKE` - case-insensitive like + example: = + values: + maxItems: 8 + minItems: 1 + type: array + items: + type: string + example: Route_Aggregation_Rule_Demo + description: Simple filter expression with property, operator, and values + RouteAggregationRuleSortCriteria: + type: object + properties: + direction: + $ref: "#/components/schemas/RouteAggregationRuleSortDirection" + property: + $ref: "#/components/schemas/RouteAggregationRuleSortBy" + RouteAggregationRuleSortDirection: + type: string + description: Sorting direction + default: DESC + enum: + - DESC + - ASC + RouteAggregationRuleSortBy: + type: string + description: Possible field names to use on sorting + default: /changeLog/updatedDateTime + enum: + - /type + - /uuid + - /name + - /state + - /prefix + - /changeLog/createdDateTime + - /changeLog/updatedDateTime + RouteAggregationRulesSearchResponse: + type: object + properties: + pagination: + $ref: "#/components/schemas/Pagination" + data: + type: array + description: List of route aggregation rules + items: + $ref: "#/components/schemas/RouteAggregationRulesData" + CloudRouterPostRequest: + required: + - location + - name + - notification + - package + - type + allOf: + - $ref: "#/components/schemas/CloudRouterPostRequestBase" + CloudRouterPostRequestBase: + type: object + properties: + type: type: string - description: Cloud Event severity number - severitytext: + enum: + - XF_ROUTER + name: type: string - description: Cloud Event severity text - equinixalert: + description: Customer-provided Cloud Router name + location: + $ref: "#/components/schemas/SimplifiedLocationWithoutIBX" + package: + $ref: "#/components/schemas/CloudRouterPostRequestPackage" + order: + $ref: "#/components/schemas/Order" + project: + $ref: "#/components/schemas/Project" + account: + $ref: "#/components/schemas/SimplifiedAccount" + notifications: + type: array + description: Preferences for notifications on connection configuration or status changes + items: + $ref: "#/components/schemas/SimplifiedNotification" + marketplaceSubscription: + $ref: "#/components/schemas/marketplaceSubscription" + description: Create Cloud Router + CloudRouter: + type: object + properties: + href: type: string - description: Equinix alert - equinixorganization: + description: Cloud Routers URI + format: uri + readOnly: true + example: https://api.equinix.com/fabric/v4/routers/3c9b8e7a2-f3b1-4576-a4a9-1366a63df170 + uuid: type: string - description: Equinix organization identifier - equinixproject: + description: Equinix-assigned access point identifier + format: uuid + example: c9b8e7a2-f3b1-4576-a4a9-1366a63df170 + name: type: string - description: Equinix project identifier - authtype: + description: Customer-provided Cloud Router name + format: string + example: test-fg-1 + state: + $ref: "#/components/schemas/CloudRouterAccessPointState" + equinixAsn: + type: integer + description: Equinix ASN + format: int64 + example: 30000 + connectionsCount: + minimum: 0 + type: integer + description: Number of connections associated with this Access point + marketplaceSubscription: + $ref: "#/components/schemas/marketplaceSubscription" + changeLog: + $ref: "#/components/schemas/Changelog" + change: + $ref: "#/components/schemas/CloudRouterChange" + description: Fabric Cloud Router object + allOf: + - $ref: "#/components/schemas/CloudRouterPostRequestBase" + RouterId: + type: string + description: Cloud Router UUID + format: uuid + example: 557400f8-d360-11e9-bb65-2a2ae2dbcce4 + CloudRouterReadResponse: + type: object + properties: + type: type: string - description: Cloud Event auth type - authid: + enum: + - IC_ROUTER + - XF_ROUTER + name: type: string - description: Cloud Event user identifier - traceparent: + description: Customer-provided Cloud Router name + location: + $ref: "#/components/schemas/SimplifiedLocationWithoutIBX" + package: + $ref: "#/components/schemas/CloudRouterPostRequestPackage" + order: + $ref: "#/components/schemas/Order" + project: + $ref: "#/components/schemas/Project" + account: + $ref: "#/components/schemas/SimplifiedAccount" + notifications: + type: array + description: Preferences for notifications on connection configuration or status changes + items: + $ref: "#/components/schemas/SimplifiedNotification" + href: type: string - description: Cloud Event traceparent - tracestate: + description: Cloud Routers URI + format: uri + readOnly: true + example: https://api.equinix.com/fabric/v4/routers/3c9b8e7a2-f3b1-4576-a4a9-1366a63df170 + uuid: type: string - description: Cloud Event tracestate + description: Equinix-assigned access point identifier + format: uuid + example: c9b8e7a2-f3b1-4576-a4a9-1366a63df170 + state: + $ref: "#/components/schemas/CloudRouterAccessPointState" + equinixAsn: + type: integer + description: Equinix ASN + format: int64 + example: 30000 + connectionsCount: + minimum: 0 + type: integer + description: Number of connections associated with this Access point + marketplaceSubscription: + $ref: "#/components/schemas/marketplaceSubscription" + changeLog: + $ref: "#/components/schemas/Changelog" + change: + $ref: "#/components/schemas/CloudRouterChange" + description: Fabric Cloud Router read response object + CloudRouterUpdateRequest: + minItems: 1 + type: array + description: Fabric Cloud Router Update Request + items: + $ref: "#/components/schemas/CloudRouterChangeOperation" + RouterId_1: + type: string + description: Router UUID + format: uuid + example: 557400f8-d360-11e9-bb65-2a2ae2dbcce4 + ActionState: + $ref: "#/components/schemas/CloudRouterActionState" + CloudRouterActionState: + type: string + description: Cloud router action state + enum: + - SUCCEEDED + - FAILED + - PENDING + CloudRouterActionsSearchResponse: + type: object + properties: + pagination: + $ref: "#/components/schemas/Pagination" data: - $ref: "#/components/schemas/CloudEventData" - description: Cloud Event object - CloudEventSearchRequest: + type: array + description: Data returned from the API call. + items: + $ref: "#/components/schemas/CloudRouterActionResponse" + CloudRouterActionRequest: required: - - filter + - type + type: object + properties: + type: + $ref: "#/components/schemas/CloudRouterActionType" + connection: + $ref: "#/components/schemas/RouterActionsConnection" + description: Cloud router action request + CloudRouterActionResponse: + required: + - changeLog + - state + - type + - uuid + type: object + properties: + type: + $ref: "#/components/schemas/CloudRouterActionType" + uuid: + type: string + format: uuid + example: 557400f8-d360-11e9-bb65-2a2ae2dbcce4 + description: + type: string + example: description + state: + $ref: "#/components/schemas/CloudRouterActionState" + changeLog: + $ref: "#/components/schemas/Changelog" + href: + type: string + example: https://api.equinix.com//fabric/v4/routers/a1c6b7fd-aead-410a-96b4-b1dfa1071700/actions/1e9414f1-763e-4c0a-86c6-0bc8336048d9 + connection: + $ref: "#/components/schemas/RouterActionsConnection" + router: + $ref: "#/components/schemas/RouterActionsRouter" + description: Cloud router actions response object + CloudRouterActionsSearchRequest: type: object properties: filter: - $ref: "#/components/schemas/CloudEventFilters" + $ref: "#/components/schemas/CloudRouterActionsSearchFilters" pagination: $ref: "#/components/schemas/PaginationRequest" + sort: + type: array + items: + $ref: "#/components/schemas/CloudRouterActionsSearchSortCriteria" description: Search requests containing criteria - CloudEventFilters: + CloudRouterActionsSearchFilters: type: object properties: and: + maxItems: 8 type: array items: - $ref: "#/components/schemas/CloudEventFilter" - CloudEventFilter: + $ref: "#/components/schemas/CloudRouterActionsSearchFilter" + CloudRouterActionsSearchFilter: type: object anyOf: - - $ref: "#/components/schemas/CloudEventSimpleExpression" - CloudEventSimpleExpression: + - $ref: "#/components/schemas/CloudRouterActionsSearchExpression" + - $ref: "#/components/schemas/CloudRouterActionsSearchOrFilter" + CloudRouterActionsSearchExpression: type: object properties: property: type: string description: | Possible field names to use on filters: - * `/id` - Cloud Event identifier - * `/subject` - Cloud Event subject description - * `/type` - Cloud Event type - * `/time` - Time of Cloud Events - * `/equinixproject` - Equinix Project of Cloud Events - * `/equinixorganization` - Equinix Organization of Cloud Events - * `/equinixalert` - Equinix Alert Identifier for raise/clear Cloud Events - * `/severitytext` - cloud event severity text - * `/authid` - Equinix user key to identify the user that performed the action that triggered the Cloud Event - * `/authtype` - Equinix user type either user or system - example: /subject + * `/type` - type of update + * `/state` - action state + * `/connection/uuid` - connection uuid associated + * `/*` - all-category search + example: /type operator: type: string description: | @@ -15392,307 +24558,244 @@ components: * `>=` - greater than or equal to * `<` - less than * `<=` - less than or equal to - * `BETWEEN` - between - * `IN` - in - * `LIKE` - like - * `ILIKE` - like case-insensitive - * `NOT IN` - not in - * `IS NULL` - is null - * `IS NOT NULL` - is not null + * `[NOT] BETWEEN` - (not) between + * `[NOT] LIKE` - (not) like + * `[NOT] IN` - (not) in + * `~*` - case-insensitive like example: = values: type: array items: type: string - example: equinix.fabric.port.status.* - MetricAssetType: + example: ROUTE_TABLE_ENTRY_UPDATE + CloudRouterActionsSearchOrFilter: + type: object + properties: + or: + maxItems: 3 + type: array + items: + $ref: "#/components/schemas/CloudRouterActionsSearchExpression" + CloudRouterActionsSearchSortCriteria: + type: object + properties: + direction: + $ref: "#/components/schemas/CloudRouterActionsSearchSortDirection" + property: + $ref: "#/components/schemas/CloudRouterActionsSearchSortBy" + CloudRouterActionsSearchSortDirection: type: string + description: Sorting direction + default: DESC enum: - - ports - - connections - - metros - Limit_1: - type: integer - description: Pagination limit - example: 20 - default: 20 - GetMetricsByAssetResponse: + - DESC + - ASC + CloudRouterActionsSearchSortBy: + type: string + description: Possible field names to use on sorting + default: /changeLog/updatedDateTime + enum: + - /changeLog/createdDateTime + - /changeLog/updatedDateTime + - /connection/name + - /type + ActionId_1: + type: string + description: Action UUID + format: uuid + example: 457400f8-d360-11e9-bb65-2a2ae2dbcced + GetAllCloudRouterCommands: type: object properties: pagination: $ref: "#/components/schemas/Pagination" data: type: array - description: Data returned from the API call. items: - $ref: "#/components/schemas/Metric" - Value: - type: string - description: Which value to retrieve - example: last - GetMetricsByNameResponse: + $ref: "#/components/schemas/CloudRouterCommand" + description: List of Fabric Cloud Router Command + CloudRouterCommandPostRequest: + required: + - project + - request + - type + type: object + properties: + type: + $ref: "#/components/schemas/CloudRouterCommandType" + name: + type: string + description: Customer-provided Cloud Router Command name + description: + type: string + description: Customer-provided Cloud Router Command description + project: + $ref: "#/components/schemas/Project" + request: + $ref: "#/components/schemas/CloudRouterCommandRequestPayload" + description: Execute Cloud Router Command Request + CloudRouterCommand: type: object properties: - pagination: - $ref: "#/components/schemas/Pagination" - data: - type: array - description: Data returned from the API call. - items: - $ref: "#/components/schemas/Metric" - MetricsSearchRequest: - required: - - filter + href: + type: string + example: https://api.equinix.com//fabric/v4/routers/a1c6b7fd-aead-410a-96b4-b1dfa1071700/commands/1e9414f1-763e-4c0a-86c6-0bc8336048d9 + type: + $ref: "#/components/schemas/CloudRouterCommandType" + uuid: + type: string + format: uuid + example: 557400f8-d360-11e9-bb65-2a2ae2dbcce4 + name: + type: string + description: Customer-provided Cloud Router name + format: string + example: test-fg-1 + description: + type: string + example: description + state: + $ref: "#/components/schemas/CloudRouterCommandState" + project: + $ref: "#/components/schemas/Project" + request: + $ref: "#/components/schemas/CloudRouterCommandRequestResponse" + response: + $ref: "#/components/schemas/CloudRouterCommandResponse" + changeLog: + $ref: "#/components/schemas/Changelog" + description: Get Fabric Cloud Router Command response object + CloudRouterCommandSearchRequest: type: object properties: filter: - $ref: "#/components/schemas/MetricFilters" + $ref: "#/components/schemas/CloudRouterCommandSearchFilters" pagination: $ref: "#/components/schemas/PaginationRequest" + sort: + type: array + items: + $ref: "#/components/schemas/CloudRouterCommandSearchSortCriteria" description: Search requests containing criteria - MetricFilters: + CloudRouterCommandSearchFilters: type: object properties: and: + maxItems: 8 type: array items: - $ref: "#/components/schemas/MetricFilter" - MetricFilter: + $ref: "#/components/schemas/CloudRouterCommandSearchFilter" + CloudRouterCommandSearchFilter: type: object anyOf: - - $ref: "#/components/schemas/MetricSimpleExpression" - MetricSimpleExpression: + - $ref: "#/components/schemas/CloudRouterCommandSearchExpression" + - $ref: "#/components/schemas/CloudRouterCommandSearchOrFilter" + CloudRouterCommandSearchExpression: type: object properties: property: type: string description: | Possible field names to use on filters: - * `/subject` - Metric subject description (required and limited to 1 value) - * `/name` - Metric names (required) - * `/dataPoints/endDateTime` - Time of Metrics - * `/time` - Time of Metrics - * `/interval` - ISO-8601 duration format to specify the interval of metrics data points - * `/value` - specific data points of the metric to return (e.g. 'last' - for metros only) - example: /subject + * `/type` - type of command + * `/name` - name of command + * `/state` - state of command + * `/request/destination` - destination of command request + * `/request/sourceConnection/uuid` - source connection uuid + * `/*` - all-category search + example: /state operator: type: string description: | Possible operators to use on filters: * `=` - equal + * `!=` - not equal * `>` - greater than * `>=` - greater than or equal to * `<` - less than * `<=` - less than or equal to - * `BETWEEN` - between - * `IN` - in + * `[NOT] BETWEEN` - (not) between + * `[NOT] LIKE` - (not) like + * `[NOT] IN` - (not) in + * `~*` - case-insensitive like example: = values: type: array items: type: string - example: equinix.fabric.port.bandwidth_rx.usage - ConnectionPostRequest: - required: - - aSide - - bandwidth - - name - - notifications - - type - - zSide + example: PING_COMMAND + CloudRouterCommandSearchOrFilter: type: object properties: - type: - $ref: "#/components/schemas/ConnectionType" - name: - type: string - description: Customer-provided connection name - order: - $ref: "#/components/schemas/Order" - notifications: - type: array - description: Preferences for notifications on connection configuration or status changes - items: - $ref: "#/components/schemas/SimplifiedNotification" - bandwidth: - maximum: 100000 - minimum: 0 - type: integer - description: Connection bandwidth in Mbps - geoScope: - $ref: "#/components/schemas/GeoScopeType" - redundancy: - $ref: "#/components/schemas/ConnectionRedundancy" - aSide: - $ref: "#/components/schemas/ConnectionSide" - zSide: - $ref: "#/components/schemas/ConnectionSide" - project: - $ref: "#/components/schemas/Project" - additionalInfo: + or: + maxItems: 3 type: array - description: Connection additional information items: - $ref: "#/components/schemas/ConnectionSideAdditionalInfo" - marketplaceSubscription: - $ref: "#/components/schemas/marketplaceSubscription" - endCustomer: - $ref: "#/components/schemas/EndCustomer" - description: Create connection post request - Connection: - required: - - aSide - - bandwidth - - name - - type - - zSide + $ref: "#/components/schemas/CloudRouterCommandSearchExpression" + CloudRouterCommandSearchSortCriteria: type: object properties: - href: - type: string - description: Connection URI - format: uri - readOnly: true - type: - $ref: "#/components/schemas/ConnectionType" - uuid: - type: string - description: Equinix-assigned connection identifier - name: - type: string - description: Customer-provided connection name - description: - type: string - description: Customer-provided connection description - state: - $ref: "#/components/schemas/ConnectionState" - change: - $ref: "#/components/schemas/Change" - operation: - $ref: "#/components/schemas/ConnectionOperation" - order: - $ref: "#/components/schemas/Order" - notifications: - type: array - description: Preferences for notifications on connection configuration or status changes - items: - $ref: "#/components/schemas/SimplifiedNotification" - account: - $ref: "#/components/schemas/SimplifiedAccount" - changeLog: - $ref: "#/components/schemas/Changelog" - bandwidth: - maximum: 10000 - minimum: 0 - type: integer - description: Connection bandwidth in Mbps - geoScope: - $ref: "#/components/schemas/GeoScopeType" - redundancy: - $ref: "#/components/schemas/ConnectionRedundancy" - isRemote: - type: boolean - description: Connection property derived from access point locations direction: - $ref: "#/components/schemas/ConnectionDirection" - aSide: - $ref: "#/components/schemas/ConnectionSide" - zSide: - $ref: "#/components/schemas/ConnectionSide" - marketplaceSubscription: - $ref: "#/components/schemas/marketplaceSubscription" - additionalInfo: - type: array - description: Connection additional information - items: - $ref: "#/components/schemas/ConnectionSideAdditionalInfo" - project: - $ref: "#/components/schemas/Project" - description: Connection specification - ConnectionId: - type: string - description: Connection UUID - example: 557400f8-d360-11e9-bb65-2a2ae2dbcce4 - ConnectionDirection: + $ref: "#/components/schemas/CloudRouterCommandSearchSortDirection" + property: + $ref: "#/components/schemas/CloudRouterCommandSearchSortBy" + CloudRouterCommandSearchSortDirection: type: string - description: Connection directionality from the requester point of view + description: Sorting direction + default: DESC enum: - - INTERNAL - - INCOMING - - OUTGOING - VirtualCircuitId: + - DESC + - ASC + CloudRouterCommandSearchSortBy: type: string - description: Virtual Circuit UUID - ConnectionUpdateRequest: - minItems: 1 - type: array - description: Connection Update Request - items: - $ref: "#/components/schemas/ConnectionChangeOperation" - ConnectionActionRequest: - required: - - type - type: object - properties: - type: - $ref: "#/components/schemas/Actions" - description: - type: string - description: Connection rejection reason detail - data: - $ref: "#/components/schemas/ConnectionAcceptanceData" - description: Connection action request - ConnectionAction: - required: - - data - - type - - uuid + description: Possible field names to use on sorting + default: /changeLog/updatedDateTime + enum: + - /changeLog/createdDateTime + - /changeLog/updatedDateTime + - /name + - /type + CloudRouterCommandSearchResponse: type: object properties: - type: - $ref: "#/components/schemas/Actions" - href: - type: string - description: Connection action URI - format: uri - readOnly: true - uuid: - type: string - description: Equinix-assigned connection identifier - description: - type: string - description: Connection rejection reason detail + pagination: + $ref: "#/components/schemas/Pagination" data: - $ref: "#/components/schemas/ConnectionAcceptanceData" - changeLog: - $ref: "#/components/schemas/Changelog" - description: Connection action - ConnectionRouteSearchRequest: + type: array + description: Data returned from the API call. + items: + $ref: "#/components/schemas/CloudRouterCommand" + CommandId: + type: string + description: Command UUID + format: uuid + example: 37c10edc-ba2e-4240-a850-8a48f9c47d00 + RouteTableEntrySearchRequest: type: object properties: filter: - $ref: "#/components/schemas/ConnectionRouteEntryFilters" + $ref: "#/components/schemas/RouteTableEntryFilters" pagination: $ref: "#/components/schemas/PaginationRequest" sort: type: array items: - $ref: "#/components/schemas/ConnectionRouteSortCriteria" + $ref: "#/components/schemas/RouteTableEntrySortCriteria" description: Search requests containing criteria - ConnectionRouteEntryFilters: + RouteTableEntryFilters: type: object properties: and: maxItems: 8 type: array items: - $ref: "#/components/schemas/ConnectionRouteEntryFilter" - ConnectionRouteEntryFilter: + $ref: "#/components/schemas/RouteTableEntryFilter" + RouteTableEntryFilter: type: object anyOf: - - $ref: "#/components/schemas/ConnectionRouteEntrySimpleExpression" - - $ref: "#/components/schemas/ConnectionRouteEntryOrFilter" - ConnectionRouteEntrySimpleExpression: + - $ref: "#/components/schemas/RouteTableEntrySimpleExpression" + - $ref: "#/components/schemas/RouteTableEntryOrFilter" + RouteTableEntrySimpleExpression: type: object properties: property: @@ -15700,9 +24803,10 @@ components: description: | Possible field names to use on filters: * `/type` - Route table entry type - * `/state` - Route table entry state * `/prefix` - Route table entry prefix * `/nextHop` - Route table entry nextHop + * `/state` - Route table entry state + * `/MED` - Route table entry med * `/*` - all-category search example: /type operator: @@ -15725,41 +24829,41 @@ components: items: type: string example: IPv4_BGP_ROUTE - ConnectionRouteEntryOrFilter: + RouteTableEntryOrFilter: type: object properties: or: maxItems: 3 type: array items: - $ref: "#/components/schemas/ConnectionRouteEntrySimpleExpression" - ConnectionRouteSortCriteria: + $ref: "#/components/schemas/RouteTableEntrySimpleExpression" + RouteTableEntrySortCriteria: type: object properties: direction: - $ref: "#/components/schemas/ConnectionRouteEntrySortDirection" + $ref: "#/components/schemas/RouteTableEntrySortDirection" property: - $ref: "#/components/schemas/ConnectionRouteEntrySortBy" - ConnectionRouteEntrySortDirection: + $ref: "#/components/schemas/RouteTableEntrySortBy" + RouteTableEntrySortDirection: type: string description: Sorting direction + default: DESC enum: - DESC - ASC - default: DESC - ConnectionRouteEntrySortBy: + RouteTableEntrySortBy: type: string description: Possible field names to use on sorting + default: /changeLog/updatedDateTime enum: - /changeLog/createdDateTime - /changeLog/updatedDateTime - - /med - - /connection/name - - /type - /prefix - /nextHop - default: /changeLog/updatedDateTime - ConnectionRouteTableEntrySearchResponse: + - /connection/name + - /type + - /MED + RouteTableEntrySearchResponse: type: object properties: pagination: @@ -15768,674 +24872,552 @@ components: type: array description: Data returned from the API call. items: - $ref: "#/components/schemas/ConnectionRouteTableEntry" - GetResponse: + $ref: "#/components/schemas/RouteTableEntry" + ValidateRequest: + type: object + properties: + filter: + $ref: "#/components/schemas/ValidateRequest_filter" + description: Validate connection auth api key or vlan + ValidateSubnetResponse: + type: object + properties: + additionalInfo: + type: array + description: Additional information + items: + $ref: "#/components/schemas/ConnectionSideAdditionalInfo" + description: ValidateResponse + CloudRouterRouteFiltersSearchBase: type: object properties: + filter: + $ref: "#/components/schemas/CloudRouterRouteFiltersFilter" pagination: $ref: "#/components/schemas/Pagination" - data: + sort: + maxItems: 3 + minItems: 1 type: array - description: List of Routing Protocols items: - $ref: "#/components/schemas/RoutingProtocolData" - RoutingProtocolBase: - required: - - type + $ref: "#/components/schemas/RfAttachmentSortItem" + CloudRouterRouteFiltersFilter: + description: Top-level filter that can be either an AND expression or OR expression + anyOf: + - $ref: "#/components/schemas/CloudRouterRouteFilterAndExpression" + - $ref: "#/components/schemas/CloudRouterRouteFilterOrExpression" + CloudRouterRouteFilterAndExpression: type: object properties: - type: - type: string - description: Routing protocol type - enum: - - BGP - - DIRECT - oneOf: - - $ref: "#/components/schemas/RoutingProtocolBGPType" - - $ref: "#/components/schemas/RoutingProtocolDirectType" - RoutingProtocolBGPType: - required: - - type + and: + maxItems: 8 + minItems: 1 + type: array + items: + $ref: "#/components/schemas/CloudRouterRouteFilterExpression" + description: AND expression containing multiple filter expressions + CloudRouterRouteFilterExpression: + description: Filter expression that can be AND, OR, or a simple expression + anyOf: + - $ref: "#/components/schemas/CloudRouterRouteFilterAndExpression" + - $ref: "#/components/schemas/CloudRouterRouteFilterOrExpression" + - $ref: "#/components/schemas/CloudRouterRouteFilterSimpleExpression" + CloudRouterRouteFilterOrExpression: type: object properties: - type: - type: string - description: Routing protocol type - enum: - - BGP - name: - type: string - example: My-BGP-route-1 - bgpIpv4: - $ref: "#/components/schemas/BGPConnectionIpv4" - bgpIpv6: - $ref: "#/components/schemas/BGPConnectionIpv6" - customerAsn: - type: integer - description: Customer asn - format: int64 - bgpAuthKey: - type: string - description: BGP authorization key - asOverrideEnabled: - type: boolean - description: Enable AS number override - bfd: - $ref: "#/components/schemas/RoutingProtocolBFD" - RoutingProtocolDirectType: - required: - - type + or: + maxItems: 8 + minItems: 1 + type: array + items: + $ref: "#/components/schemas/CloudRouterRouteFilterExpression" + description: OR expression containing multiple filter expressions + CloudRouterRouteFilterSimpleExpression: type: object properties: - type: + property: type: string - description: Routing protocol type enum: - - DIRECT - name: + - /type + - /direction + - /attachmentStatus + - /changeLog/createdDateTime + - /changeLog/updatedDateTime + operator: type: string - example: My-direct-route-1 - directIpv4: - $ref: "#/components/schemas/DirectConnectionIpv4" - directIpv6: - $ref: "#/components/schemas/DirectConnectionIpv6" - RoutingProtocolData: + values: + maxItems: 8 + minItems: 1 + type: array + items: + type: string + RfAttachmentSortItem: type: object properties: - type: + property: type: string - description: Routing protocol type + description: Possible field names to use on sorting + default: /changeLog/updatedDateTime enum: - - BGP - - DIRECT - oneOf: - - $ref: "#/components/schemas/RoutingProtocolBGPData" - - $ref: "#/components/schemas/RoutingProtocolDirectData" - ConnectionRoutingProtocolPostRequest: + - /type + - /uuid + - /direction + - /attachmentStatus + - /changeLog/createdDateTime + - /changeLog/updatedDateTime + direction: + type: string + description: Sorting direction + default: DESC + enum: + - DESC + - ASC + CloudRouterRouteFiltersSearchResponse: type: object properties: + pagination: + $ref: "#/components/schemas/Pagination" data: type: array - description: Connection routing protocol configuration + description: List of route filter attachments for a given cloud router items: - $ref: "#/components/schemas/RoutingProtocolBase" - description: Create connection routing protocolpost request - RoutingProtocolId: - type: string - description: Routing Protocol UUID - format: uuid - example: 557400f8-d360-11e9-bb65-2a2ae2dbcce4 - ConnectionRoutingProtocolPatchRequest: - minItems: 1 - type: array - description: Patch connection routing protocol request - items: - $ref: "#/components/schemas/ConnectionChangeOperation" - BGPActionsBulkData: + $ref: "#/components/schemas/ConnectionRouteFilterData" + CloudRouterRouteAggregationsSearchBase: type: object properties: + filter: + $ref: "#/components/schemas/CloudRouterRouteAggregationsFilter" pagination: $ref: "#/components/schemas/Pagination" - data: + sort: + maxItems: 3 + minItems: 1 + type: array + items: + $ref: "#/components/schemas/RaAttachmentSortItem" + CloudRouterRouteAggregationsFilter: + description: Top-level filter that can be either an AND expression or OR expression + anyOf: + - $ref: "#/components/schemas/CloudRouterRouteAggregationAndExpression" + - $ref: "#/components/schemas/CloudRouterRouteAggregationOrExpression" + CloudRouterRouteAggregationAndExpression: + type: object + properties: + and: + maxItems: 8 + minItems: 1 type: array items: - $ref: "#/components/schemas/BGPActionData" - description: List of BGP Actions - BGPActionRequest: - required: - - type + $ref: "#/components/schemas/CloudRouterRouteAggregationExpression" + description: AND expression containing multiple filter expressions + CloudRouterRouteAggregationExpression: + description: Filter expression that can be AND, OR, or a simple expression + anyOf: + - $ref: "#/components/schemas/CloudRouterRouteAggregationAndExpression" + - $ref: "#/components/schemas/CloudRouterRouteAggregationOrExpression" + - $ref: "#/components/schemas/CloudRouterRouteAggregationSimpleExpression" + CloudRouterRouteAggregationOrExpression: type: object properties: - type: - $ref: "#/components/schemas/BGPActions" - description: BGP action request - BGPActionData: + or: + maxItems: 8 + minItems: 1 + type: array + items: + $ref: "#/components/schemas/CloudRouterRouteAggregationExpression" + description: OR expression containing multiple filter expressions + CloudRouterRouteAggregationSimpleExpression: type: object properties: - href: - type: string - description: Routing Protocol URI - format: uri - example: https://api.equinix.com/fabric/v4/connections/81331c52-04c0-4656-a4a7-18c52669348f/routingProtocols/69762051-85ed-4d13-b6b4-e32e93c672b5/actions - uuid: + property: type: string - description: Routing protocol identifier - format: uuid - example: c9b8e7a2-f3b1-4576-a4a9-1366a63df170 - type: - $ref: "#/components/schemas/BGPActions" - description: + enum: + - /type + - /attachmentStatus + - /changeLog/createdDateTime + - /changeLog/updatedDateTime + operator: type: string - description: BGP action description - state: - $ref: "#/components/schemas/BGPActionStates" - changelog: - $ref: "#/components/schemas/Changelog" - ActionId: - type: string - description: BGP Action UUID - format: uuid - example: 86534014-34b4-53f6-45d6-4b94a92d8623 - ChangeId: - type: string - description: Routing Protocol Change UUID - format: uuid - example: 6d500177-9404-41f2-99e8-2bf1a84d8db5 - RoutingProtocolChangeData: + values: + type: array + items: + type: string + RaAttachmentSortItem: type: object properties: - status: + property: type: string - description: Current outcome of the change flow + description: Possible field names to use on sorting + default: /changeLog/updatedDateTime enum: - - COMPLETED - - FAILED - - REQUESTED - createdBy: - type: string - description: Created by User Key - createdDateTime: - type: string - description: Set when change flow starts - format: date-time - updatedBy: - type: string - description: Updated by User Key - updatedDateTime: - type: string - description: Set when change object is updated - format: date-time - information: + - /type + - /uuid + - /attachmentStatus + - /changeLog/createdDateTime + - /changeLog/updatedDateTime + direction: type: string - description: Additional information - data: - $ref: "#/components/schemas/RoutingProtocolChangeOperation" - description: Current state of latest Routing Protocol change - allOf: - - $ref: "#/components/schemas/RoutingProtocolChange" - RoutingProtocolChangeDataResponse: + description: Sorting direction + default: DESC + enum: + - DESC + - ASC + CloudRouterRouteAggregationsSearchResponse: type: object properties: pagination: $ref: "#/components/schemas/Pagination" data: type: array + description: List of route aggregation attachments for a given cloud router items: - $ref: "#/components/schemas/RoutingProtocolChangeData" - description: List of network changes - InternetAccessPostRequest: - required: - - account - - billing - - name - - project - - routingProtocol - - type - type: object - properties: - type: - $ref: "#/components/schemas/InternetAccessServiceType" - name: - type: string - description: The name of the EIA Service - bandwidth: - type: integer - description: Bandwidth of the service - bandwidthCommit: - type: integer - description: Minimum bandwidth commit for burst billing variant of the service - routingProtocol: - $ref: "#/components/schemas/InternetAccessRoutingProtocolRequest" - order: - $ref: "#/components/schemas/InternetAccessOrderRequest" - billing: - $ref: "#/components/schemas/InternetAccessPostRequest_billing" - project: - $ref: "#/components/schemas/Project" - account: - $ref: "#/components/schemas/InternetAccessAccount" - InternetAccessRoutingProtocolRequest: - required: - - customerRoutes - - type + $ref: "#/components/schemas/ConnectionRouteAggregationData" + CloudRouterSearchRequest: type: object properties: - type: - $ref: "#/components/schemas/InternetAccessRoutingProtocolType" - customerRoutes: - maxItems: 100 - minItems: 1 + filter: + $ref: "#/components/schemas/CloudRouterFilters" + pagination: + $ref: "#/components/schemas/PaginationRequest" + sort: type: array items: - $ref: "#/components/schemas/InternetAccessCustomerRouteRequest" - discriminator: - propertyName: type - mapping: - BGP: "#/components/schemas/InternetAccessRoutingProtocolBgpRequest" - DIRECT: "#/components/schemas/InternetAccessRoutingProtocolDirectRequest" - STATIC: "#/components/schemas/InternetAccessRoutingProtocolStaticRequest" - InternetAccessCustomerRouteRequest: - required: - - ipBlock + $ref: "#/components/schemas/CloudRouterSortCriteria" + description: Search requests containing criteria + CloudRouterFilters: type: object properties: - ipBlock: - $ref: "#/components/schemas/InternetAccessIpBlockRequest" - InternetAccessIpBlockRequest: - required: - - uuid + and: + maxItems: 8 + type: array + items: + $ref: "#/components/schemas/CloudRouterFilter" + CloudRouterFilter: type: object - properties: - uuid: - type: string - description: Unique identifier for the IP Block - format: uuid - InternetAccessRoutingProtocolBgpRequest: - allOf: - - $ref: "#/components/schemas/InternetAccessRoutingProtocolRequest" - - required: - - connections - - exportPolicy - type: object - properties: - connections: - maxItems: 2 - minItems: 1 - type: array - items: - $ref: "#/components/schemas/InternetAccessConnectionBgpRequest" - exportPolicy: - $ref: "#/components/schemas/InternetAccessExportPolicy" - customerAsn: - type: integer - description: Customer ASN. Valid range is 1-64495 or 65536-4199999999. - format: int64 - example: 16220 - bgpAuthKey: - type: string - description: BGP authentication key - example: SecretKey - customerAsnRange: - $ref: "#/components/schemas/InternetAccessCustomerAsnRange" - InternetAccessConnectionBgpRequest: - required: - - uuid + anyOf: + - $ref: "#/components/schemas/CloudRouterSimpleExpression" + - $ref: "#/components/schemas/CloudRouterOrFilter" + CloudRouterSimpleExpression: type: object properties: - uuid: + property: type: string - description: Unique identifier for the connection - format: uuid - InternetAccessRoutingProtocolDirectRequest: - allOf: - - $ref: "#/components/schemas/InternetAccessRoutingProtocolRequest" - - required: - - connections - type: object - properties: - connections: - maxItems: 2 - minItems: 1 - type: array - items: - $ref: "#/components/schemas/InternetAccessConnectionDirectRequest" - InternetAccessConnectionDirectRequest: - required: - - uuid - type: object - properties: - uuid: + description: | + Possible field names to use on filters: + * `/project/projectId` - project id (mandatory) + * `/name` - Fabric Cloud Router name + * `/uuid` - Fabric Cloud Router uuid + * `/state` - Fabric Cloud Router status + * `/location/metroCode` - Fabric Cloud Router metro code + * `/location/metroName` - Fabric Cloud Router metro name + * `/package/code` - Fabric Cloud Router package + * `/type` - Fabric Cloud Router type + * `/connectionsCount` - Fabric Cloud Router attached connections count + * `/changeLog/createdDateTime` - Fabric Cloud Router creation timestamp + * `/changeLog/updatedDateTime` - Fabric Cloud Router last updated timestamp + * `/changeLog/deletedDateTime` - Fabric Cloud Router deletion timestamp + * `/*` - all-category search + example: /name + operator: type: string - description: Unique identifier for the connection - format: uuid - peeringIpv4: - $ref: "#/components/schemas/InternetAccessPeeringIpv4Request" - peeringIpv6: - $ref: "#/components/schemas/InternetAccessPeeringIpv6Request" - InternetAccessPeeringIpv4Request: + description: | + Possible operators to use on filters: + * `=` - equal + * `!=` - not equal + * `>` - greater than + * `>=` - greater than or equal to + * `<` - less than + * `<=` - less than or equal to + * `[NOT] BETWEEN` - (not) between + * `[NOT] LIKE` - (not) like + * `[NOT] IN` - (not) in + * `ILIKE` - case-insensitive like + example: = + values: + type: array + items: + type: string + example: FabricCloudRouter-1 + CloudRouterOrFilter: type: object properties: - equinixPeerIp: - pattern: ^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$ - type: string - description: IPv4 address of the Equinix peering IP - equinixVrrpIp: - pattern: ^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$ - type: string - description: IPv4 address for Equinix VRRP IP - InternetAccessPeeringIpv6Request: + or: + maxItems: 3 + type: array + items: + $ref: "#/components/schemas/CloudRouterSimpleExpression" + CloudRouterSortCriteria: type: object properties: - equinixPeerIp: - pattern: ^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$ - type: string - description: IPv6 address of the Equinix peering IP - equinixVrrpIp: - pattern: ^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$ - type: string - description: IPv6 address for Equinix VRRP IP - InternetAccessRoutingProtocolStaticRequest: - allOf: - - $ref: "#/components/schemas/InternetAccessRoutingProtocolRequest" - - required: - - connections - type: object - properties: - connections: - maxItems: 2 - minItems: 1 - type: array - items: - $ref: "#/components/schemas/InternetAccessConnectionStaticRequest" - InternetAccessConnectionStaticRequest: - required: - - uuid + direction: + $ref: "#/components/schemas/CloudRouterSortDirection" + property: + $ref: "#/components/schemas/CloudRouterSortBy" + CloudRouterSortDirection: + type: string + description: Sorting direction + default: DESC + enum: + - DESC + - ASC + CloudRouterSortBy: + type: string + description: Possible field names to use on sorting + default: /changeLog/updatedDateTime + enum: + - /name + - /uuid + - /state + - /location/metroCode + - /location/metroName + - /package/code + - /type + - /connectionsCount + - /changeLog/createdDateTime + - /changeLog/updatedDateTime + - /changeLog/deletedDateTime + - /order/termLength + SearchResponse: type: object properties: - uuid: - type: string - description: Unique identifier for the connection - format: uuid - InternetAccessOrderRequest: + pagination: + $ref: "#/components/schemas/Pagination" + data: + type: array + description: Data returned from the API call. + items: + $ref: "#/components/schemas/CloudRouterReadResponse" + PackageResponse: type: object properties: - purchaseOrderNumber: - type: string - description: Purchase order number - nullable: true - orderNumber: - type: string - description: Order Number - nullable: true - orderLine: - type: string - description: Order Line Number - nullable: true - InternetAccessService: - required: - - account - - billing - - change - - changeLog - - href - - name - - project - - routingProtocol - - state - - type - - useCase - - uuid + pagination: + $ref: "#/components/schemas/Pagination" + data: + type: array + description: Data returned from the API call. + items: + $ref: "#/components/schemas/CloudRouterPackage" + RouterPackageCode: + type: string + description: Router package code + enum: + - LAB + - BASIC + - STANDARD + - ADVANCED + - PREMIUM + CloudRouterPackage: type: object properties: href: type: string - description: Service URL path + description: Cloud Router package URI format: uri - example: https://api.equinix.com/fabric/v4/internetAccessServices/673c6e6c-2c36-4488-b3f1-47064357b5b4 + readOnly: true + example: https://api.equinix.com/fabric/v4/routerPackages/LAB type: - $ref: "#/components/schemas/InternetAccessServiceType" - uuid: type: string - description: Unique identifier for the EIA Service - format: uuid - name: + description: Type of Router package + example: ROUTER_PACKAGE + enum: + - ROUTER_PACKAGE + code: + $ref: "#/components/schemas/code" + description: type: string - description: The name of the EIA Service - bandwidth: + description: Fabric Cloud Router Package description + totalIPv4RoutesMax: + minimum: 0 type: integer - description: Bandwidth of the service - bandwidthCommit: + description: Cloud Router package BGP IPv4 routes limit + example: 50 + totalIPv6RoutesMax: + minimum: 0 type: integer - description: Minimum bandwidth commit for burst billing variant of the service - state: - $ref: "#/components/schemas/InternetAccessServiceState" - change: - $ref: "#/components/schemas/InternetAccessChange" - locations: - type: array - description: List of locations associated with the service - items: - $ref: "#/components/schemas/InternetAccessLocation" - routingProtocol: - $ref: "#/components/schemas/InternetAccessRoutingProtocol" - billing: - $ref: "#/components/schemas/InternetAccessBilling" - account: - $ref: "#/components/schemas/InternetAccessAccount" - project: - $ref: "#/components/schemas/Project" - order: - $ref: "#/components/schemas/InternetAccessOrder" + description: Cloud Router package BGP IPv6 routes limit + example: 50 + routeFilterSupported: + type: boolean + description: CloudRouter package route filter support + vcCountMax: + minimum: 0 + type: integer + description: CloudRouter package Max Connection limit + example: 10 + crCountMax: + minimum: 0 + type: integer + description: CloudRouter package Max CloudRouter limit + example: 3 + vcBandwidthMax: + minimum: 0 + type: integer + description: CloudRouter package Max Bandwidth limit + example: 50 changeLog: - $ref: "#/components/schemas/Changelog" - useCase: - $ref: "#/components/schemas/InternetAccessUseCase" - InternetAccessServiceType: - type: string - description: Type of the service, either single or dual internet access - enum: - - SINGLE_IA - - DUAL_IA - x-enum-varnames: - - SINGLE_IA - - DUAL_IA - InternetAccessServiceState: - type: string - description: Current state of the service - enum: - - PROVISIONING - - PROVISIONED - - FAILED - - DEPROVISIONING - - DEPROVISIONED - x-enum-varnames: - - PROVISIONING - - PROVISIONED - - FAILED - - DEPROVISIONING - - DEPROVISIONED - InternetAccessSearchRequest: + $ref: "#/components/schemas/PackageChangeLog" + description: Fabric Cloud Router Package + HealthResponse: type: object properties: - pagination: - $ref: "#/components/schemas/PaginationRequest" - filter: - $ref: "#/components/schemas/SearchExpression" - sort: - $ref: "#/components/schemas/SearchSort" - InternetAccessServices: - required: - - data - - pagination - - sort + href: + type: string + description: The Canonical URL at which the resource resides. + version: + type: string + description: Indicator of a version + release: + type: string + description: release details. + state: + type: string + description: status of a service + apiServices: + $ref: "#/components/schemas/ApiServices" + description: GET Services Health + ConnectionResponse: type: object properties: - pagination: - $ref: "#/components/schemas/Pagination" - sort: - $ref: "#/components/schemas/SearchSort" + additionalInfo: + type: array + description: Additional information + items: + $ref: "#/components/schemas/ConnectionSideAdditionalInfo" data: type: array + description: Connection response data items: - $ref: "#/components/schemas/InternetAccessService" - InternetAccessPatchRequest: - maxItems: 100 - minItems: 1 - type: array - description: Only one replace operation allowed for '/bandwidth' path. - items: - $ref: "#/components/schemas/InternetAccessPatchOperationUpdate" - InternetAccessPatchOperationUpdate: + $ref: "#/components/schemas/ValidateConnectionResponse" + description: ValidateResponse + Pagination: required: - - op - - path + - limit + - total type: object properties: - op: - $ref: "#/components/schemas/InternetAccessPatchOperationUpdateAllowedOp" - path: - $ref: "#/components/schemas/InternetAccessPatchOperationUpdateAllowedPath" - value: - description: New value for updated parameter. Required for add and replace. - InternetAccessPatchOperationUpdateAllowedOp: - type: string - description: Allowed patch operations. - enum: - - replace - - add - - remove - InternetAccessPatchOperationUpdateAllowedPath: - pattern: ^(\/bandwidth|\/bandwidthCommit|\/routingProtocol\/customerRoutes(?:\[@\.ipBlock\.uuid=[A-Fa-f0-9-]+\])?|\/order\/purchaseOrderNumber)$ - type: string - description: Allowed patch paths for Internet Access update. - example: /bandwidth - SubmitIpBlockRequestBody: + offset: + minimum: 0 + type: integer + description: Index of the first item returned in the response. The default is 0. + default: 0 + limit: + minimum: 0 + type: integer + description: Maximum number of search results returned per page. Number must be between 1 and 100, and the default is 20. + default: 20 + total: + minimum: 0 + type: integer + description: Total number of elements returned. + next: + type: string + description: URL relative to the next item in the response. + previous: + type: string + description: URL relative to the previous item in the response. + description: Pagination response information + NetworkPostRequest: required: - - project + - name + - notifications + - scope - type type: object properties: - location: - $ref: "#/components/schemas/IpBlockLocation" type: - $ref: "#/components/schemas/TypeOfIpBlockProduct" - project: - $ref: "#/components/schemas/IpBlockProjectRequest" - account: - $ref: "#/components/schemas/IpBlockAccount" - order: - $ref: "#/components/schemas/IpBlockOrderRequest" - regulations: - $ref: "#/components/schemas/IpBlockRegulations" - prefixLength: - $ref: "#/components/schemas/IpBlockPrefixLength" - prefix: - $ref: "#/components/schemas/IpBlockPrefix" - IpBlock: - required: - - changeLog - - href - - ownership - - prefixLength - - project - - state - - type - - uuid - type: object - properties: - uuid: - type: string - description: Unique identifier for the Ip Block - format: uuid - href: + $ref: "#/components/schemas/NetworkType" + name: type: string - description: Resource URL path for the Ip Block - example: /fabric/v4/ipBlocks/31fbdb3f-8def-410d-868b-ef920878affb - type: - $ref: "#/components/schemas/TypeOfIpBlockProduct" - state: - $ref: "#/components/schemas/IpBlockState" - ownership: - $ref: "#/components/schemas/IpBlockOwnership" + description: Customer-provided network name + scope: + $ref: "#/components/schemas/NetworkScope" location: - $ref: "#/components/schemas/IpBlockLocation" - prefixLength: - $ref: "#/components/schemas/IpBlockPrefixLength" - prefix: - $ref: "#/components/schemas/IpBlockPrefix" - order: - $ref: "#/components/schemas/IpBlockOrderResponse" - account: - $ref: "#/components/schemas/IpBlockAccount" + $ref: "#/components/schemas/SimplifiedLocation" project: - $ref: "#/components/schemas/IpBlockProject" - regulations: - $ref: "#/components/schemas/IpBlockRegulations" - assets: + $ref: "#/components/schemas/Project" + notifications: type: array - description: Products using this Ip Block + description: Preferences for notifications on network configuration or status changes items: - $ref: "#/components/schemas/IpBlockAsset" - change: - $ref: "#/components/schemas/IpBlockChange" - changeLog: - $ref: "#/components/schemas/IpBlockChangeLog" - error: - $ref: "#/components/schemas/Error" - PatchIpBlockRequestBody: - maxItems: 1 + $ref: "#/components/schemas/SimplifiedNotification" + description: Create Network + Network: + type: object + description: Network specification + allOf: + - required: + - changeLog + - href + - state + - uuid + type: object + properties: + href: + type: string + description: Network URI + format: uri + readOnly: true + example: https://api.equinix.com/fabric/v4/networks/92dc376a-a932-43aa-a6a2-c806dedbd784 + uuid: + type: string + description: Equinix-assigned network identifier + format: uuid + example: 92dc376a-a932-43aa-a6a2-c806dedbd784 + state: + $ref: "#/components/schemas/NetworkState" + connectionsCount: + type: number + description: number of connections created on the network + account: + $ref: "#/components/schemas/SimplifiedAccount" + change: + $ref: "#/components/schemas/SimplifiedNetworkChange" + operation: + $ref: "#/components/schemas/NetworkOperation" + changeLog: + $ref: "#/components/schemas/Changelog" + links: + type: array + description: Network sub-resources links + readOnly: true + items: + $ref: "#/components/schemas/Link" + - $ref: "#/components/schemas/NetworkPostRequest" + NetworkId: + type: string + description: Network UUID + format: uuid + example: 557400f8-d360-11e9-bb65-2a2ae2dbcce4 + NetworkUpdateRequest: minItems: 1 type: array + description: Fabric Network Update Request items: - $ref: "#/components/schemas/PatchIpBlockRequestBodyItem" - IpBlocksSearchRequestBody: - properties: - pagination: - $ref: "#/components/schemas/PaginationRequest" - filter: - $ref: "#/components/schemas/IpBlockFilter" - sort: - $ref: "#/components/schemas/SearchSort" - IpBlockFilter: - type: object - properties: - and: - type: array - items: - $ref: "#/components/schemas/IpBlockAndQuery" - IpBlockAndQuery: - required: - - operator - - property - - values - type: object - properties: - property: - type: string - operator: - type: string - enum: - - = - values: - type: array - items: - type: string - IpBlockSearchResponseBody: - required: - - data - - pagination - properties: - pagination: - $ref: "#/components/schemas/Pagination" - sort: - $ref: "#/components/schemas/SearchSort" - data: - type: array - items: - $ref: "#/components/schemas/IpBlock" - SearchRequest: + $ref: "#/components/schemas/NetworkChangeOperation" + NetworkSearchRequest: type: object properties: filter: - $ref: "#/components/schemas/Expression" + $ref: "#/components/schemas/NetworkFilter" pagination: $ref: "#/components/schemas/PaginationRequest" sort: type: array items: - $ref: "#/components/schemas/SortCriteria" + $ref: "#/components/schemas/NetworkSortCriteria" description: Search requests containing criteria - Expression: + NetworkFilter: type: object properties: and: - $ref: "#/components/schemas/Expressions" + $ref: "#/components/schemas/NetworkSimpleExpression" or: - $ref: "#/components/schemas/Expressions" + $ref: "#/components/schemas/NetworkSimpleExpression" property: - $ref: "#/components/schemas/SearchFieldName" + $ref: "#/components/schemas/NetworkSearchFieldName" operator: type: string + example: = enum: - = - "!=" @@ -16443,83 +25425,71 @@ components: - ">=" - < - <= + - BETWEEN + - NOT BETWEEN - LIKE - - ILKE - - IS NOT NULL - - IS NULL + - NOT LIKE + - ILIKE + - NOT ILIKE - IN - - BETWEEN + - NOT IN values: type: array items: type: string - Expressions: + example: Network-1 + NetworkSimpleExpression: type: array items: - $ref: "#/components/schemas/Expression" - SearchFieldName: + $ref: "#/components/schemas/NetworkFilter" + NetworkSearchFieldName: type: string description: Possible field names to use on filters + example: /name enum: - - /isRemote - /name - /uuid + - /scope - /type - - /geoScope + - /state + - /operation/equinixStatus + - /location/region + - /location/metroCode + - /connectionsCount + - /project/projectId + - /account/globalCustId - /account/orgId - - /aSide/accessPoint/account/accountName - - /aSide/accessPoint/account/accountNumber - - /aSide/accessPoint/router/uuid - - /aSide/accessPoint/linkProtocol/vlanTagMin - - /aSide/accessPoint/linkProtocol/vlanTagMax - - /aSide/accessPoint/location/metroCode - - /aSide/accessPoint/location/metroName - - /aSide/accessPoint/name - - /aSide/accessPoint/port/uuid - - /aSide/accessPoint/port/name - - /aSide/accessPoint/type - - /aSide/accessPoint/virtualDevice/name - - /aSide/accessPoint/virtualDevice/uuid - - /aSide/serviceToken/uuid - - /bandwidth - - /change/status - - /changeLog/createdBy - /changeLog/createdDateTime - - /changeLog/deletedBy + - /changeLog/updatedDateTime - /changeLog/deletedDateTime - - /changeLog/lastUpdatedBy - - /operation/equinixStatus - - /operation/providerStatus - - /project/projectId - - /redundancy/group - - /redundancy/priority - - /zSide/accessPoint/account/accountName - - /zSide/accessPoint/authenticationKey - - /zSide/accessPoint/linkProtocol/vlanTagMin - - /zSide/accessPoint/linkProtocol/vlanTagMax - - /zSide/accessPoint/location/metroCode - - /zSide/accessPoint/location/metroName - - /zSide/accessPoint/sellerRegion - - /zSide/accessPoint/name - - /zSide/accessPoint/port/uuid - - /zSide/accessPoint/network/uuid - - /zSide/accessPoint/port/name - - /zSide/accessPoint/profile/uuid - - /zSide/accessPoint/type - - /zSide/accessPoint/role - - /zSide/accessPoint/virtualDevice/name - - /zSide/accessPoint/virtualDevice/uuid - - /zSide/serviceToken/uuid - - /zSide/internetAccess/uuid - - /state - SortCriteria: + - /* + NetworkSortCriteria: type: object properties: direction: - $ref: "#/components/schemas/SortDirection" + $ref: "#/components/schemas/NetworkSortDirection" property: - $ref: "#/components/schemas/SortBy" - ConnectionSearchResponse: + $ref: "#/components/schemas/NetworkSortBy" + NetworkSortDirection: + type: string + description: Sorting direction + default: DESC + enum: + - DESC + - ASC + NetworkSortBy: + type: string + description: Possible field names to use on sorting + default: /changeLog/updatedDateTime + enum: + - /name + - /uuid + - /scope + - /operation/equinixStatus + - /location/region + - /changeLog/createdDateTime + - /changeLog/updatedDateTime + NetworkSearchResponse: type: object properties: pagination: @@ -16527,3061 +25497,2810 @@ components: sort: type: array items: - $ref: "#/components/schemas/SortCriteriaResponse" - data: - type: array - items: - $ref: "#/components/schemas/Connection" - description: List of connections - FilterBody: - type: object - properties: - filter: - $ref: "#/components/schemas/SearchExpression" - description: Search requests containing criteria - SearchExpression: - type: object - properties: - and: - $ref: "#/components/schemas/SearchExpressions" - or: - $ref: "#/components/schemas/SearchExpressions" - property: - type: string - operator: - type: string - enum: - - = - - "!=" - - ">" - - ">=" - - < - - <= - - BETWEEN - - NOT BETWEEN - - LIKE - - NOT LIKE - - IN - - NOT IN - - IS NOT NULL - - IS NULL - values: - type: array - items: - type: string - SearchExpressions: - type: array - items: - $ref: "#/components/schemas/SearchExpression" - PriceSearchResponse: - type: object - properties: + $ref: "#/components/schemas/NetworkSortCriteriaResponse" data: type: array items: - $ref: "#/components/schemas/Price" - pagination: - $ref: "#/components/schemas/Pagination" - PriceErrorList: - type: array - items: - $ref: "#/components/schemas/PriceError" - PriceError: - required: - - errorCode - - errorMessage - type: object - properties: - errorCode: - type: string - enum: - - EQ-3038010 - - EQ-3038022 - - EQ-3038030 - errorMessage: - type: string - enum: - - Validation failure - - Invalid value - - Internal Server Error - correlationId: - type: string - details: - type: string - help: - type: string - additionalInfo: - type: array - items: - $ref: "#/components/schemas/PriceError_additionalInfo" - description: Error with details - discriminator: - propertyName: errorCode - PortUUID: - type: string - description: Port UUID - format: uuid - Statistics: - type: object - properties: - startDateTime: - type: string - description: Start and duration of the statistical analysis interval. - format: date-time - example: 2020-11-06T07:00:00Z - endDateTime: - type: string - description: End and duration of the statistical analysis interval. - format: date-time - example: 2020-11-06T07:00:00Z - viewPoint: - type: string - description: Point of view for connection metrics - aSide or zSide - enum: - - aSide - - zSide - bandwidthUtilization: - $ref: "#/components/schemas/BandwidthUtilization" - description: This API provides service-level traffic metrics so that you can view access and gather key information required to manage service subscription sizing and capacity. - BandwidthUtilization: + $ref: "#/components/schemas/Network" + description: List of networks + NetworkConnections: type: object properties: - unit: - type: string - description: Aggregated data transfer capacity. Possible values- Mbps, megabits (1 million bits) per second; Gbps, gigabits (1 billion bits) per second. - enum: - - Mbps - metricInterval: - type: string - description: An interval formatted value, indicating the time-interval the metric objects within the response represent - inbound: - $ref: "#/components/schemas/Direction" - outbound: - $ref: "#/components/schemas/Direction" - description: Bandwidth utilization statistics (octet counters-based) - Direction: + pagination: + $ref: "#/components/schemas/Pagination" + data: + type: array + items: + $ref: "#/components/schemas/Connection" + description: List of network changes + NetworkChangeResponse: type: object properties: - max: - type: number - description: Max bandwidth within request time range, represented in units specified by response "units" field - format: float - mean: - type: number - description: Mean bandwidth within request time range, represented in units specified by response "units" field - format: float - metrics: + pagination: + $ref: "#/components/schemas/Pagination" + data: type: array - description: Bandwidth utilization statistics for a specified interval. items: - $ref: "#/components/schemas/Metrics" - description: Directional statistics - Metrics: + $ref: "#/components/schemas/NetworkChange" + description: List of network changes + ChangeId_5: + type: string + description: Network Change UUID + format: uuid + example: 6d500177-9404-41f2-99e8-2bf1a84d8db5 + NetworkChange: type: object properties: - intervalEndTimestamp: + href: type: string - description: Interval end timestamp + description: Network URI + format: uri + readOnly: true + example: https://api.equinix.com/fabric/v4/networks/2a4fb415-5a7f-436f-bae6-02f5e403deec/changes/4b17da68-3d6b-436d-9c8f-2105f3b950d9 + uuid: + type: string + description: Uniquely identifies a change + format: uuid + example: 4b17da68-3d6b-436d-9c8f-2105f3b950d9 + type: + $ref: "#/components/schemas/NetworkChangeType" + status: + $ref: "#/components/schemas/NetworkChangeStatus" + createdDateTime: + type: string + description: Set when change flow starts + format: date-time + example: 2020-11-06T07:00:00Z + updatedDateTime: + type: string + description: Set when change object is updated format: date-time example: 2020-11-06T07:00:00Z - max: - type: number - description: Max bandwidth within statistics object time interval, represented in units specified by response "units" field - format: float - mean: - type: number - description: Mean bandwidth within statistics object time interval, represented in units specified by response "units" field - format: float - description: Bandwidth utilization statistics for a specified interval. - viewPoint: - type: string - description: viewPoint - enum: - - aSide - - zSide - ServiceProfiles: - type: object - properties: data: type: array items: - $ref: "#/components/schemas/ServiceProfile" - pagination: - $ref: "#/components/schemas/Pagination" - description: Service Profiles - ServiceProfileRequest: + $ref: "#/components/schemas/NetworkChangeOperation" + description: Current state of latest network change + precisionTimeServiceRequest: + title: precisionTimeServiceRequest required: - - description + - connections + - ipv4 - name + - package - type type: object properties: + type: + type: string + description: Precision Time Service Type refers to the corresponding Protocol. + enum: + - NTP + - PTP + name: + type: string + description: Precision Time Service name. + package: + $ref: "#/components/schemas/precisionTimePackageRequest" + connections: + type: array + items: + $ref: "#/components/schemas/virtualConnectionUuid" + ipv4: + $ref: "#/components/schemas/ipv4" + ntpAdvancedConfiguration: + $ref: "#/components/schemas/ntpAdvanceConfiguration" + ptpAdvancedConfiguration: + $ref: "#/components/schemas/ptpAdvanceConfiguration" project: $ref: "#/components/schemas/Project" - description: | - Service Profile is a software definition for a named provider service and it's network connectivity requirements. - This includes the basic marketing information and one - or more sets of access points (a set per each access point type) fulfilling the provider service. - allOf: - - $ref: "#/components/schemas/SimplifiedServiceProfile" - SimplifiedServiceProfile: + order: + $ref: "#/components/schemas/precisionTimeOrder" + description: Create Precision Time Service Request Schema. + precisionTimeServiceResponse: + title: precisionTimeServiceResponse + required: + - href + - package + - state + - type + - uuid type: object properties: href: type: string - description: Service Profile URI response attribute + description: Precision Time Service URI. format: uri - readOnly: true type: - $ref: "#/components/schemas/ServiceProfileTypeEnum" + type: string + description: Precision Time Service type refers to the corresponding protocol. + enum: + - NTP + - PTP name: - maxLength: 50 type: string - description: Customer-assigned service profile name - example: Sample Service Profile + description: Precision Time Service Name. uuid: type: string - description: Equinix-assigned service profile identifier + description: Precision Time Service UUID. format: uuid - description: + state: type: string - description: User-provided service description should be of maximum length 375 - example: offering connectivity to my-network - notifications: - type: array - description: Recipients of notifications on service profile change - items: - $ref: "#/components/schemas/SimplifiedNotification" - tags: - $ref: "#/components/schemas/Tags" - visibility: - $ref: "#/components/schemas/ServiceProfileVisibilityEnum" - allowedEmails: - type: array - items: - type: string - format: email - accessPointTypeConfigs: + description: Precision Time Service Status. + enum: + - CANCELLED + - CANCELLING + - CONFIGURING + - CONFIGURING_FAILED + - DRAFT + - DEPROVISIONING + - DEPROVISIONING_FAILED + - DEPROVISIONED + - PROVISIONED + - PROVISIONING + - PROVISIONING_FAILED + - REPROVISIONING + - REPROVISIONING_FAILED + operation: + $ref: "#/components/schemas/timeServiceOperation" + package: + $ref: "#/components/schemas/precisionTimePackagePostResponse" + connections: + maxItems: 2 minItems: 1 + uniqueItems: true type: array + description: Fabric Connections associated with Precision Time Service. items: - $ref: "#/components/schemas/ServiceProfileAccessPointType" - customFields: - type: array - items: - $ref: "#/components/schemas/CustomField" - marketingInfo: - $ref: "#/components/schemas/MarketingInfo" - ports: - type: array - items: - $ref: "#/components/schemas/ServiceProfileAccessPointCOLO" - virtualDevices: - type: array - items: - $ref: "#/components/schemas/ServiceProfileAccessPointVD" - metros: - type: array - description: Derived response attribute. - items: - $ref: "#/components/schemas/ServiceMetro" - environments: - type: array - description: Provider environments associated with this IC_PROFILE service profile. - items: - $ref: "#/components/schemas/ProviderEnvironment" - selfProfile: - type: boolean - description: response attribute indicates whether the profile belongs to the same organization as the api-invoker. - projectId: - type: string - lastMileConfig: - $ref: "#/components/schemas/ServiceProfileLastMileConfig" - description: | - Service Profile is a software definition for a named provider service and it's network connectivity requirements. - This includes the basic marketing information and one - or more sets of access points (a set per each access point type) fulfilling the provider service. - Tags: - type: array - items: - type: string - ServiceProfileAccessPointType: - type: object - description: Access Point Type - oneOf: - - $ref: "#/components/schemas/ServiceProfileAccessPointTypeCOLO" - - $ref: "#/components/schemas/ServiceProfileAccessPointTypeVD" - ServiceProfileAccessPointTypeCOLO: - required: - - type - type: object - properties: - uuid: - type: string - type: - $ref: "#/components/schemas/ServiceProfileAccessPointTypeEnum" - supportedBandwidths: - $ref: "#/components/schemas/Bandwidths" - allowRemoteConnections: - type: boolean - description: Setting to allow or prohibit remote connections to the service profile. - example: true - default: false - allowCustomBandwidth: - type: boolean - description: Setting to enable or disable the ability of the buyer to customize the bandwidth. - example: true - default: false - bandwidthAlertThreshold: - type: number - description: percentage of port bandwidth at which an allocation alert is generated - missing on wiki. - allowBandwidthAutoApproval: - type: boolean - description: Setting to enable or disable the ability of the buyer to change connection bandwidth without approval of the seller. - default: false - allowBandwidthUpgrade: - type: boolean - description: Availability of a bandwidth upgrade. The default is false. - linkProtocolConfig: - $ref: "#/components/schemas/ServiceProfileLinkProtocolConfig" - enableAutoGenerateServiceKey: - type: boolean - description: for verizon only. - connectionRedundancyRequired: - type: boolean - description: Mandate redundant connections - example: true - default: false - selectiveRedundancy: - type: boolean - description: Optional redundant connections - example: true - default: false - apiConfig: - $ref: "#/components/schemas/ApiConfig" - connectionLabel: - type: string - description: custom name for "Connection" - authenticationKey: - $ref: "#/components/schemas/AuthenticationKey" - metadata: - $ref: "#/components/schemas/ServiceProfileMetadata" - description: Colo Access Point Type - ServiceProfileAccessPointTypeEnum: + $ref: "#/components/schemas/virtualConnectionTimeServiceResponse" + ipv4: + $ref: "#/components/schemas/ipv4" + ntpAdvancedConfiguration: + $ref: "#/components/schemas/ntpAdvanceConfiguration" + ptpAdvancedConfiguration: + $ref: "#/components/schemas/ptpAdvanceConfiguration" + project: + $ref: "#/components/schemas/Project" + account: + $ref: "#/components/schemas/SimplifiedAccount" + order: + $ref: "#/components/schemas/precisionTimeOrder" + pricing: + $ref: "#/components/schemas/precisionTimePrice" + changeLog: + $ref: "#/components/schemas/Changelog" + description: Precision Time Service Response Schema. + ServiceId: type: string - description: Access point type - enum: - - VD - - COLO - Bandwidths: - type: array - items: - $ref: "#/components/schemas/Bandwidth" - Bandwidth: - type: integer - description: speed in Mbps - example: 50 - ServiceProfileLinkProtocolConfig: + description: Precision Time Service UUID + format: uuid + example: 557400f8-d360-11e9-bb65-2a2ae2dbcce4 + precisionTimeChangeOperation: + required: + - op + - path + - value type: object properties: - encapsulationStrategy: + op: type: string - description: was tagType - missing on wiki + description: Handy shortcut for operation name enum: - - CTAGED - - BOTH - - NAMED - namedTags: - maxItems: 64 - type: array - items: - type: string - vlanCTagLabel: - type: string - description: was ctagLabel - reuseVlanSTag: - type: boolean - example: true - default: false - encapsulation: + - replace + - add + - remove + path: type: string - description: Port encapsulation - Derived response attribute. Ignored on request payloads. + description: path inside document leading to updated parameter enum: - - QINQ - - DOT1Q - - UNTAGGED - description: Configuration for dot1q to qinq translation support - ApiConfig: + - /name + - /package/code + - /ipv4 + - /ntpAdvancedConfiguration + - /ptpAdvancedConfiguration + value: + type: object + description: new value for updated parameter + description: Fabric Precision Timing change operation data + TimeServicesSearchRequest: type: object properties: - apiAvailable: - type: boolean - description: Setting indicating whether the API is available (true) or not (false). - example: true - default: false - integrationId: - type: string - equinixManagedPort: - type: boolean - description: Setting indicating that the port is managed by Equinix (true) or not (false). - example: true - default: false - equinixManagedVlan: - type: boolean - description: Setting indicating that the VLAN is managed by Equinix (true) or not (false). - example: true - default: false - allowOverSubscription: - type: boolean - description: | - Setting showing that oversubscription support is available (true) or not (false). The default is false. - Oversubscription is the sale of more than the available network bandwidth. This practice is common - and legitimate. After all, many customers use less bandwidth than they've purchased. - And network users don't consume bandwidth all at the same time. The leftover bandwidth can be sold to - other customers. When demand surges, operational and engineering resources can be shifted to - accommodate the load. - example: false - default: false - overSubscriptionLimit: - maximum: 20 - minimum: 1 - type: integer - description: A cap on oversubscription. - example: 1 - default: 1 - bandwidthFromApi: - type: boolean - default: false - description: Configuration for API based Integration for Service Profile - AuthenticationKey: + filter: + $ref: "#/components/schemas/TimeServiceFilters" + pagination: + $ref: "#/components/schemas/PaginationRequest" + sort: + type: array + items: + $ref: "#/components/schemas/TimeServiceSortCriteria" + description: Search requests containing criteria + TimeServiceFilters: type: object properties: - required: - type: boolean - example: true - default: false - label: - type: string - example: Service Key - description: - type: string - example: description for the authentication key - description: Authentication Key Support and Customization - ServiceProfileMetadata: + and: + maxItems: 8 + type: array + items: + $ref: "#/components/schemas/TimeServiceFilter" + TimeServiceFilter: type: object - properties: - props: - type: string - regEx: - type: string - regExMsg: - type: string - vlanRangeMaxValue: - type: integer - vlanRangeMinValue: - type: integer - maxQinq: - type: string - maxDot1q: - type: integer - variableBilling: - type: boolean - globalOrganization: - type: string - limitAuthKeyConn: - type: boolean - allowSecondaryLocation: - type: boolean - redundantProfileId: - type: string - allowVcMigration: - type: boolean - connectionEditable: - type: boolean - releaseVlan: - type: boolean - maxConnectionsOnPort: - type: integer - portAssignmentStrategy: - type: string - eqxManagedPort: - type: boolean - connectionNameEditable: - type: boolean - description: Metadata. Response attribute. Ignored on request payload. - ServiceProfileAccessPointTypeVD: - required: - - type + anyOf: + - $ref: "#/components/schemas/TimeServiceSimpleExpression" + - $ref: "#/components/schemas/TimeServiceOrFilter" + TimeServiceSimpleExpression: type: object properties: - uuid: - type: string - type: - $ref: "#/components/schemas/ServiceProfileAccessPointTypeEnum" - supportedBandwidths: - $ref: "#/components/schemas/Bandwidths" - allowRemoteConnections: - type: boolean - description: Allow remote connections to Service Profile - example: true - allowCustomBandwidth: - type: boolean - example: true - additionalProperties: false - description: VirtualDevice Access Point Type - CustomField: - required: - - dataType - - isRequired - - label - properties: - label: - type: string - example: Account Number - description: - type: string - example: Provide a valid account number - required: - type: boolean - example: true - dataType: + property: type: string - enum: - - STRING - - LIST - - NUMBER - options: + description: | + Possible field names to use on filters: + * `/project/projectId` - project id (mandatory) + * `/name` - Precision Time Service name + * `/uuid` - Precision Time Service uuid + * `/type` - Precision Time Service protocol + * `/state` - Precision Time Service status + * `/account/accountNumber` - Precision Time Service account number + * `/package/code` - Precision Time Service package + * `/*` - all-category search + example: /name + operator: + type: string + description: | + Possible operators to use on filters: + * `=` - equal + * `!=` - not equal + * `[NOT] BETWEEN` - (not) between + * `[NOT] LIKE` - (not) like + * `[NOT] IN` - (not) in + * `ILIKE` - case-insensitive like + example: = + values: type: array items: type: string - captureInEmail: - type: boolean - description: capture this field as a part of email notification - description: Define Custom Attributes - MarketingInfo: + example: FabricPrecisionTimeService-1 + TimeServiceOrFilter: type: object properties: - logo: - type: string - description: Logo file name - promotion: - type: boolean - description: Profile promotion on marketplace - processSteps: + or: maxItems: 3 type: array items: - $ref: "#/components/schemas/ProcessStep" - ProcessStep: + $ref: "#/components/schemas/TimeServiceSimpleExpression" + TimeServiceSortCriteria: type: object properties: - title: - type: string - description: Service profile custom step title - subTitle: - type: string - description: Service profile custom step sub title - description: - type: string - description: Service profile custom step description - description: Definition of customized step while making connection - ServiceProfileAccessPointCOLO: - required: - - type - - uuid + direction: + $ref: "#/components/schemas/TimeServiceSortDirection" + property: + $ref: "#/components/schemas/TimeServiceSortBy" + TimeServiceSortDirection: + type: string + description: Sorting direction + default: DESC + enum: + - DESC + - ASC + TimeServiceSortBy: + type: string + description: Possible field names to use on sorting + default: /changeLog/updatedDateTime + enum: + - /name + - /uuid + - /state + - /type + - /package/code + - /changeLog/createdDateTime + - /changeLog/updatedDateTime + ServiceSearchResponse: type: object properties: - type: - type: string - enum: - - XF_PORT - - IX_PORT - - XF_INTERCONNECT_PORT - uuid: - type: string - format: uuid - example: 94662143-e21b-4098-bfcf-e9416f47eae1 - location: - $ref: "#/components/schemas/SimplifiedLocation" - sellerRegion: - type: string - sellerRegionDescription: - type: string - crossConnectId: - type: string - description: Colo Access Point - ServiceProfileAccessPointVD: + pagination: + $ref: "#/components/schemas/Pagination" + data: + type: array + description: Data returned from the API call. + items: + $ref: "#/components/schemas/precisionTimeServiceResponse" + precisionTimeServiceConnectionsResponse: + title: precisionTimeServiceConnectionResponse + type: object + properties: + pagination: + $ref: "#/components/schemas/Pagination" + data: + type: array + description: Data returned from the API call + items: + $ref: "#/components/schemas/connectionLink" + description: EPT service instance's L2 connections + precisionTimeServicePackagesResponse: + title: precisionTimeServicePackagesResponse + type: object + properties: + pagination: + $ref: "#/components/schemas/Pagination" + data: + type: array + description: Data returned from the API call + items: + $ref: "#/components/schemas/precisionTimePackageResponse" + description: Precision Packages + precisionTimePackageResponse: + title: precisionTimePackageRespose required: + - bandwidth + - code - type - - uuid type: object properties: + href: + type: string + format: uri type: type: string enum: - - VD - uuid: - type: string - format: uuid - example: 94662143-e21b-4098-bfcf-e9416f47eae1 - location: - $ref: "#/components/schemas/SimplifiedLocation" - interfaceUuid: - type: string - format: uuid - example: 94662143-e21b-4098-bfcf-e9416f47eae1 - description: Virtual Device Point - ServiceMetro: - type: object - properties: + - TIME_SERVICE_PACKAGE code: type: string - description: metro code - name: - type: string - description: metro name - vcBandwidthMax: + enum: + - NTP_STANDARD + - NTP_ENTERPRISE + - PTP_STANDARD + - PTP_ENTERPRISE + bandwidth: type: integer - description: max VC speed supported in Mbps - ibxs: - type: array - items: - type: string - description: ibx codes - inTrail: + description: Connection bandwidth in Mbps. + example: 10 + clientsPerSecondMax: + minimum: 0 + type: integer + description: Max. number of clients that can be synchronized per second at a packet rate of 1 per second. + example: 100 + redundancySupported: type: boolean - displayName: + description: Is Redundant virtual connection supported for the package code. + example: false + multiSubnetSupported: + type: boolean + description: Is Multiple subnet supported for the package code. + example: true + accuracySlaUnit: type: string - description: service metro display name - sellerRegions: - type: object - additionalProperties: - type: string - ProviderEnvironment: + description: Accuracy SLA unit. + example: microseconds + accuracySla: + type: integer + description: Accuracy SLA for the package code, -1 value denotes the accuracySla is not published. + example: 50 + accuracySlaMin: + minimum: 1 + type: integer + description: Typical minimum Accuracy for the package code. + example: 1 + accuracySlaMax: + minimum: 1 + type: integer + description: Typical maximum Accuracy for the package code. + example: 10 + changelog: + $ref: "#/components/schemas/Changelog" + description: EPT Service Package Information + example: + href: https://api.equinix.com/fabric/v4/timeServicePackage/NTP_STANDARD + type: TIME_SERVICE_PACKAGE + code: NTP_STANDARD + bandwidth: 10 + accuracySlaUnit: microseconds + accuracySla: 50 + accuracySlaMin: 1 + accuracySlaMax: 10 + clientsPerSecondMax: 100 + redundancySupported: true + multiSubnetSupported: true + changeLog: + createdDateTime: 2023-05-16T07:50:49.749Z + updatedDateTime: 2023-05-17T07:50:49.749Z + SubscriptionId: + type: string + description: Subscription Id + format: uuid + example: 557400f8-d360-11e9-bb65-2a2ae2dbcce4 + SubscriptionResponse: + required: + - entitlements + - marketplace + - state type: object properties: href: type: string - description: Provider Environment URI + description: Subscription URL format: uri - readOnly: true uuid: type: string - description: Equinix-assigned provider environment identifier + description: Unique identifier of the Subscription format: uuid - type: - $ref: "#/components/schemas/ProviderEnvironmentTypeEnum" - name: + state: + $ref: "#/components/schemas/SubscriptionState" + marketplace: type: string - description: Provider environment name - example: US West 1 – Production - description: + description: Marketplace Type + enum: + - AWS + - GCP + - AZURE + - REDHAT + offerType: type: string - description: Provider environment description - example: Primary production environment - region: + description: Marketplace Offer Type + enum: + - PUBLIC + - PRIVATE_OFFER + isAutoRenew: + type: boolean + description: Is Auto Renewal Enabled + example: true + offerId: type: string - description: Cloud provider region identifier - example: us-west-1 - supportedBandwidths: + description: Marketplace Offer Id + trial: + $ref: "#/components/schemas/SubscriptionTrial" + metroCodes: type: array - description: Supported bandwidths in Mbps - example: - - 1000 - - 10000 - - 100000 + description: List of available metro items: - type: integer - changeLog: + type: string + entitlements: + type: array + description: List of entitlements associated with the subscription + items: + $ref: "#/components/schemas/SubscriptionEntitlementResponse" + changelog: $ref: "#/components/schemas/Changelog" - description: Provider Environment associated with an IC_PROFILE service profile - ProviderEnvironmentTypeEnum: + description: Subscription Response + SubscriptionState: type: string - description: Provider environment type + description: Subscription State enum: - - IC_ENV - ServiceProfileLastMileConfig: - type: object - properties: - address: - $ref: "#/components/schemas/ServiceProfileLastMileAddress" - productCatalogs: - type: array - description: Last-mile provider catalogs. - items: - $ref: "#/components/schemas/ServiceProfileLastMileProductCatalog" - notifications: - type: array - description: Contact details for notifications related to last-mile provisioning and ordering. - items: - $ref: "#/components/schemas/ServiceProfileLastMileNotification" - description: Last-mile configuration for the service profile. - ServiceProfileLastMileAddress: + - ACTIVE + - EXPIRED + - CANCELLED + - GRACE_PERIOD + SubscriptionTrial: type: object properties: - require: + enabled: type: boolean - description: Whether the address is required for provisioning and ordering. - dataType: - type: string - description: Expected format of the address. - description: - type: string - description: Additional information about the address requirement. - description: Last-mile provisioning address. - ServiceProfileLastMileProductCatalog: - type: object - properties: - name: - type: string - description: Last-mile provider or catalog name. - example: att fiber - webUrl: + description: Free Trial Enabled + expiryDateTime: type: string - description: Last-mile catalog or provider website URL. - example: att.com/lastmile - deliveryDate: - $ref: "#/components/schemas/ServiceProfileLastMileDeliveryDateRange" - offerings: - type: array - description: Available last-mile offerings. - items: - $ref: "#/components/schemas/ServiceProfileLastMileOffering" - description: Last-mile provider catalog details. - ServiceProfileLastMileDeliveryDateRange: + description: Free Trial Expiry Date + format: date-time + description: Free Trial Subscription + SubscriptionEntitlementResponse: type: object properties: - unit: + uuid: type: string - description: Unit for this range is DAYS. - example: USD - min: + description: Subscription Entitlement Id + format: uuid + quantityEntitled: + minimum: 0 type: integer - description: Minimum value for the range. - example: 1 - max: + description: Quantity entitled for the subscription + quantityConsumed: + minimum: 0 type: integer - description: Maximum value for the range. - example: 10 - description: Range details for delivery window. - ServiceProfileLastMileOffering: + description: Quantity consumed from the entitlement + quantityAvailable: + minimum: 0 + type: integer + description: Quantity available from the entitlement + asset: + $ref: "#/components/schemas/SubscriptionAsset" + description: Subscription entitlement + SubscriptionAsset: type: object properties: + type: + type: string + description: Type of the subscription asset ( XF_ROUTER ,IP_VC, IPWAN_VC ) + package: + $ref: "#/components/schemas/SubscriptionRouterPackageType" bandwidth: type: integer - description: Offered bandwidth in Mbps. - example: 10 - price: - $ref: "#/components/schemas/ServiceProfileLastMilePriceRange" - description: Last-mile offering details. - ServiceProfileLastMilePriceRange: + description: Bandwidth of the asset in Mbps + description: Asset information + SubscriptionRouterPackageType: type: object properties: - unit: + code: type: string - description: Unit for this range, such as USD or DAYS. - example: USD - min: - type: number - description: Minimum value for the range. - format: double - example: 10 - max: - type: number - description: Maximum value for the range. - format: double - example: 100 - description: Range details for price or delivery window. - ServiceProfileLastMileNotification: + description: Cloud Router package code + description: Cloud Router Package Type + GetAllStreamResponse: type: object properties: - dataType: - type: string - description: Expected format of the contact information, such as email or phone number. - label: - type: string - description: Type of contact information, such as ordering or technical support. - required: - type: boolean - description: Whether this contact information is required for provisioning and ordering. - description: Last-mile notification contact details. - ServiceProfile: + pagination: + $ref: "#/components/schemas/Pagination" + data: + type: array + description: Data returned from the API call. + items: + $ref: "#/components/schemas/Stream" + StreamPostRequest: + required: + - name + - project + - type type: object properties: - state: - $ref: "#/components/schemas/ServiceProfileStateEnum" - account: - description: Seller Account for Service Profile. - allOf: - - $ref: "#/components/schemas/SimplifiedAccount" - - type: object + type: + type: string + enum: + - TELEMETRY_STREAM + name: + type: string + description: Customer-provided stream name + description: + type: string + description: Customer-provided stream description project: $ref: "#/components/schemas/Project" - change: - $ref: "#/components/schemas/ServiceProfileChange" - changeLog: - description: Seller Account for Service Profile. - allOf: - - $ref: "#/components/schemas/Changelog" - - type: object - description: | - Service Profile is a software definition for a named provider service and it's network connectivity requirements. - This includes the basic marketing information and one - or more sets of access points (a set per each access point type) fulfilling the provider service. - allOf: - - $ref: "#/components/schemas/SimplifiedServiceProfile" - ServiceProfileChange: - required: - - createdDateTime - - type + description: Create Stream + Stream: type: object properties: + href: + type: string + description: Stream URI + format: uri + readOnly: true + example: https://api.equinix.com/fabric/v4/streams/3c9b8e7a2-f3b1-4576-a4a9-1366a63df170 uuid: type: string - description: Uniquely identifies a change + description: Equinix-assigned access point identifier + format: uuid + example: c9b8e7a2-f3b1-4576-a4a9-1366a63df170 type: type: string - description: Type of change - example: SERVICE_PROFILE_VISIBILITY_UPDATE - status: - type: string - description: Current outcome of the change flow + description: type enum: - - APPROVED - - COMPLETED - - FAILED - - REJECTED - - REQUESTED - - SUBMITTED_FOR_APPROVAL - createdDateTime: - type: string - description: Set when change flow starts - format: date-time - example: 2020-11-06T07:00:00Z - updatedDateTime: + - TELEMETRY_STREAM + name: type: string - description: Set when change object is updated - format: date-time - example: 2020-11-06T07:00:00Z - information: + description: Customer-provided stream name + description: type: string - description: Additional information - data: - $ref: "#/components/schemas/JsonPatch_1" - description: Current state of latest service profile change - ServiceProfileSearchRequest: + description: Customer-provided stream description + project: + $ref: "#/components/schemas/Project" + state: + type: string + description: Stream provision state + enum: + - PROVISIONING + - PROVISIONED + - REPROVISIONING + - DEPROVISIONING + - DEPROVISIONED + - FAILED + assetsCount: + type: integer + description: Stream assets count + example: 1 + streamSubscriptionsCount: + type: integer + description: Stream subscriptions count + example: 2 + alertRulesCount: + type: integer + description: Stream alert rules count + example: 3 + changeLog: + $ref: "#/components/schemas/Changelog" + description: Stream object + StreamSearchRequest: type: object properties: filter: - $ref: "#/components/schemas/ServiceProfileFilter" + $ref: "#/components/schemas/StreamSearchFilters" pagination: $ref: "#/components/schemas/PaginationRequest" sort: type: array items: - $ref: "#/components/schemas/ServiceProfileSortCriteria" + $ref: "#/components/schemas/StreamSearchSortCriteria" description: Search requests containing criteria - ServiceProfileFilter: + StreamSearchFilters: + required: + - and + type: object + properties: + and: + maxItems: 10 + minItems: 1 + type: array + items: + $ref: "#/components/schemas/StreamSearchFilter" + StreamSearchFilter: type: object anyOf: - - $ref: "#/components/schemas/ServiceProfileSimpleExpression" - - $ref: "#/components/schemas/ServiceProfileAndFilter" - ServiceProfileSimpleExpression: + - $ref: "#/components/schemas/StreamSearchSimpleExpression" + - $ref: "#/components/schemas/StreamSearchOrFilter" + StreamSearchSimpleExpression: type: object properties: property: type: string description: | Possible field names to use on filters: - * `/name` - Service Profile name - * `/uuid` - Service Profile uuid - * `/state` - Service Profile status - * `/metros/code` - Service Profile metro code - * `/visibility` - Service Profile package - * `/type` - Service Profile package - * `/project/projectId` - Service Profile project id + * `/uuid` - Stream uuid + * `/name` - Stream name + * `/state` - Stream state (`DEPROVISIONED` returned only when explicitly requested) + * `/type` - Stream type + * `/description` - Stream description + * `/project/projectId` - Stream project id + * `/changeLog/createdDateTime` - Stream created date time + * `/changeLog/updatedDateTime` - Stream updated date time example: /name operator: type: string description: | Possible operators to use on filters: * `=` - equal + * `!=` - not equal + * `>` - greater than + * `>=` - greater than or equal to + * `<` - less than + * `<=` - less than or equal to + * `BETWEEN` - between + * `NOT BETWEEN` - not between + * `LIKE` - like + * `ILIKE` - like case-insensitive + * `IN` - in + * `NOT IN` - not in example: = values: + maxItems: 100 + minItems: 1 type: array items: type: string - example: ServiceProfile-1 - ServiceProfileAndFilter: + example: stream-dev-01 + StreamSearchOrFilter: type: object properties: - and: + or: + maxItems: 10 type: array items: - $ref: "#/components/schemas/ServiceProfileSimpleExpression" - ServiceProfileSortCriteria: + $ref: "#/components/schemas/StreamSearchSimpleExpression" + StreamSearchSortCriteria: + required: + - direction + - property type: object properties: direction: - $ref: "#/components/schemas/ServiceProfileSortDirection" + $ref: "#/components/schemas/StreamSearchSortDirection" property: - $ref: "#/components/schemas/ServiceProfileSortBy" - ServiceProfileSortDirection: + $ref: "#/components/schemas/StreamSearchSortBy" + StreamSearchSortDirection: type: string description: Sorting direction + default: DESC enum: - DESC - ASC - default: DESC - ServiceProfileSortBy: + StreamSearchSortBy: type: string description: Possible field names to use on sorting + default: /changeLog/createdDateTime enum: - - /name - - /state - /changeLog/createdDateTime - /changeLog/updatedDateTime - default: /changeLog/updatedDateTime - ServiceProfileId: - type: string - description: Service Profile UUID - format: uuid - JsonPatch_1: - type: array - items: - $ref: "#/components/schemas/JsonPatchOperation" - JsonPatchOperation: - type: object - description: Service Profile Access Points - oneOf: - - $ref: "#/components/schemas/AddOperation" - - $ref: "#/components/schemas/RemoveOperation" - - $ref: "#/components/schemas/ReplaceOperation" - AddOperation: - required: - - op - - path - - value - type: object - properties: - op: - $ref: "#/components/schemas/OpEnum" - path: - $ref: "#/components/schemas/Path" - value: - type: object - description: value to add - description: Add Sub-Resource to the existing model - OpEnum: - type: string - description: the operation to be performed - enum: - - add - - remove - - replace - Path: - type: string - description: A JSON Pointer path. - RemoveOperation: - required: - - op - - path - type: object - properties: - op: - $ref: "#/components/schemas/OpEnum" - path: - $ref: "#/components/schemas/Path" - description: Remove sub-resource from an existing model - ReplaceOperation: - required: - - op - - path - - value - type: object - properties: - op: - $ref: "#/components/schemas/OpEnum" - path: - $ref: "#/components/schemas/Path" - value: - type: object - description: value to replace with - description: Replace attribute value or sub-resource in the existing model - ServiceProfileActionRequest: - required: - - type - type: object - properties: - type: - type: string - description: "Action type. Example values: PROFILE_UPDATE_ACCEPTANCE, PROFILE_UPDATE_REJECTION" - example: PROFILE_UPDATE_ACCEPTANCE - description: - type: string - description: Action description - example: Approved to migrate to public - description: Service Profile Action Request - ServiceProfileActionResponse: - type: object - properties: - href: - type: string - description: Service Profile Action URI - format: uri - readOnly: true - type: - type: string - description: "Action type. Example values: PROFILE_UPDATE_ACCEPTANCE, PROFILE_UPDATE_REJECTION" - example: PROFILE_UPDATE_ACCEPTANCE - uuid: - type: string - description: Equinix-assigned action identifier - format: uuid - comments: - type: string - description: Action comments - example: Approved to migrate to public - changeLog: - $ref: "#/components/schemas/Changelog" - description: Service Profile Action Response - ServiceMetros: + SearchStreamResponse: type: object properties: + pagination: + $ref: "#/components/schemas/Pagination" data: type: array + description: Data returned from the API call. items: - $ref: "#/components/schemas/ServiceMetro" - pagination: - $ref: "#/components/schemas/Pagination" - description: Service Profile Metros - ServiceTokenUUID: + $ref: "#/components/schemas/Stream" + StreamId: type: string - description: Service Token UUID + description: Stream UUID format: uuid - ServiceToken: + example: 657400f8-d360-11e9-bb65-2a2ae2dbcce5 + StreamPutRequest: + required: + - name type: object properties: - type: - $ref: "#/components/schemas/ServiceTokenType" - href: - type: string - description: An absolute URL that is the subject of the link's context. - format: uri - readOnly: true - expiry: - type: integer - deprecated: true - uuid: - type: string - description: Equinix-assigned service token identifier - format: uuid - issuerSide: - type: string - description: information about token side - deprecated: true name: type: string - description: Customer-provided service token name + description: Customer-provided stream name description: type: string - description: Customer-provided service token description - expirationDateTime: - type: string - description: Expiration date and time of the service token. - format: date-time - example: 2020-11-06T07:00:00Z - connection: - $ref: "#/components/schemas/ServiceTokenConnection" - state: - $ref: "#/components/schemas/ServiceTokenState" - notifications: - type: array - description: Service token related notifications - items: - $ref: "#/components/schemas/SimplifiedNotification" - account: - $ref: "#/components/schemas/SimplifiedAccount" - changelog: - $ref: "#/components/schemas/Changelog" - project: - $ref: "#/components/schemas/Project" - description: Create Service Tokens (v4) generates Equinix Fabric service tokens. These tokens authorize users to access protected resources and services. The tokens remove sensitive content from the environment, rather than just masking it, making the protected data impossible to unencrypt or decrypt. Resource owners can distribute the tokens to trusted partners and vendors, allowing selected third parties to work directly with Equinix network assets. - ServiceTokenUpdateRequest: - minItems: 1 - type: array - description: Service Token Update Request - items: - $ref: "#/components/schemas/ServiceTokenChangeOperation" - ServiceTokens: - type: object - properties: - data: - type: array - description: List of Service Tokens - items: - $ref: "#/components/schemas/ServiceToken" - pagination: - $ref: "#/components/schemas/Pagination" - description: Service tokens authorize a user to access protected resources and services available on the Equinix Fabric network. The owner of the resources can distribute service tokens to third-party users (trusted partners and vendors), allowing them to directly access and work with the resources on the network without involving the resource owners. - ServiceTokenActionRequest: - required: - - type - type: object - properties: - type: - $ref: "#/components/schemas/ServiceTokenActions" - description: Service Token action request - ServiceTokenSearchRequest: + description: Customer-provided stream description + description: Update Stream + StreamAssetSearchRequest: type: object properties: filter: - $ref: "#/components/schemas/ServiceTokenSearchExpression" + $ref: "#/components/schemas/StreamAssetFilters" pagination: $ref: "#/components/schemas/PaginationRequest" + sort: + type: array + items: + $ref: "#/components/schemas/StreamAssetSortCriteria" description: Search requests containing criteria - ServiceTokenSearchExpression: + StreamAssetFilters: type: object properties: and: - $ref: "#/components/schemas/ServiceTokenSearchExpressions" - or: - $ref: "#/components/schemas/ServiceTokenSearchExpressions" + maxItems: 8 + type: array + items: + $ref: "#/components/schemas/StreamAssetFilter" + StreamAssetFilter: + type: object + anyOf: + - $ref: "#/components/schemas/StreamAssetSimpleExpression" + - $ref: "#/components/schemas/StreamAssetOrFilter" + StreamAssetSimpleExpression: + type: object + properties: property: - $ref: "#/components/schemas/ServiceTokenSearchFieldName" + type: string + description: | + Possible field names to use on filters: + * `/uuid` - Asset uuid (`=` and `IN` only) + * `/streamUuid` - Stream uuid (`=` and `IN` only) + * `/attachmentStatus` - Asset attachment status (`=`, `IN`, and `NOT IN`) + example: /streamUuid operator: type: string - enum: - - = - - "!=" - - LIKE - - ILIKE - - < - - ">" - - <= - - ">=" - - IN - - NOT IN - - BETWEEN - - NOT BETWEEN + description: | + Possible operators to use on filters: + * `=` - equal + * `IN` - in + * `NOT IN` - not in + example: = values: + minItems: 1 type: array items: type: string - ServiceTokenSearchExpressions: - type: array - items: - $ref: "#/components/schemas/ServiceTokenSearchExpression" - ServiceTokenSearchFieldName: + example: 4719e319-65ae-4001-aabf-ca5f107b9b29 + StreamAssetOrFilter: + type: object + properties: + or: + maxItems: 3 + type: array + items: + $ref: "#/components/schemas/StreamAssetSimpleExpression" + StreamAssetSortCriteria: + required: + - direction + - property + type: object + properties: + direction: + $ref: "#/components/schemas/StreamAssetSortDirection" + property: + $ref: "#/components/schemas/StreamAssetSortBy" + StreamAssetSortDirection: type: string - description: Possible field names to use on filters + description: Sorting direction + default: DESC enum: - - /uuid - - /state - - /name - - /project/projectId - - /type - - /expirationDateTime - - /changeLog/createdDateTime - - /changeLog/updatedDateTime - - /connection/aSide/accessPointSelectors/port/uuid - - /connection/zSide/accessPointSelectors/port/uuid - Presence: + - DESC + - ASC + StreamAssetSortBy: type: string - description: Presence + description: Possible field names to use on sorting + default: /uuid enum: - - MY_PORTS - MetroResponse: + - /uuid + - /streamUuid + SearchStreamAssetResponse: type: object properties: pagination: $ref: "#/components/schemas/Pagination" data: type: array - description: List of Fabric Metros. + description: Data returned from the API call. items: - $ref: "#/components/schemas/Metro" - description: GET Metros retrieves all Equinix® Fabric™ metros, as well as latency data for each location.This performance data helps network planning engineers and administrators make strategic decisions about port locations and traffic routes. - Metro: + $ref: "#/components/schemas/StreamSearchAsset" + AssetId_1: + type: string + description: Stream Asset UUID + format: uuid + example: 757400f8-d360-11e9-bb65-2a2ae2dbcce6 + Asset: + type: string + enum: + - ports + - connections + - routers + - metros + - organizations + - projects + - networkEdgeDevices + - companyProfiles + StreamAsset: type: object properties: href: type: string - description: The Canonical URL at which the resource resides. - type: - type: string - description: Indicator of a Fabric Metro - code: - type: string - description: Code Assigned to an Equinix IBX data center in a specified metropolitan area. - region: + description: Stream Asset URI + format: uri + readOnly: true + uuid: type: string - description: Board geographic area in which the data center is located - name: + description: Equinix-assigned access point identifier + format: uuid + example: c9b8e7a2-f3b1-4576-a4a9-1366a63df170 + type: type: string - description: Name of the region in which the data center is located. - country: + description: Asset types + enum: + - XF_PORT + - IP_VC + - EVPLAN_VC + - EVPL_VC + - XF_METRO + - XF_ROUTER + - ORGANIZATION + - PROJECT + - DATA + - MGMT + - SSH + - FAB + - CTRL + metricsEnabled: + type: boolean + description: enable metric + example: false + attachmentStatus: type: string - description: Country code in which the data center is located. - equinixAsn: - type: integer - description: Autonomous system number (ASN) for a specified Fabric metro. The ASN is a unique identifier that carries the network routing protocol and exchanges that data with other internal systems via border gateway protocol. - format: int64 - localVCBandwidthMax: - type: integer - description: This field holds Max Connection speed with in the metro - format: int64 - geoCoordinates: - $ref: "#/components/schemas/GeoCoordinates" - connectedMetros: - type: array - items: - $ref: "#/components/schemas/ConnectedMetro" - services: - type: array - items: - $ref: "#/components/schemas/services" - geoScopes: - type: array - description: List of supported geographic boundaries of a Fabric Metro. - items: - $ref: "#/components/schemas/GeoScopeType" - geoZones: - type: array - description: List of supported geographic zones of a Fabric Metro. - items: - $ref: "#/components/schemas/GeoZone" - description: GET Metros retrieves all Equinix® Fabric™ metros, as well as latency data for each location.This performance data helps network planning engineers and administrators make strategic decisions about port locations and traffic routes. - GeoCoordinates: - type: object - properties: - latitude: - type: number - description: Latitude of a Fabric Metro - format: double - longitude: - type: number - description: Longitude of a Fabric Metro - format: double - description: Geographic location data of Fabric Metro - ConnectedMetro: + description: asset status + enum: + - ATTACHING + - ATTACHED + - DETACHED + - DETACHING + - FAILED + description: Stream object + StreamAssetPutRequest: type: object properties: - href: - type: string - description: The Canonical URL at which the resource resides. - code: - type: string - description: Code assigned to an Equinix International Business Exchange (IBX) data center in a specified metropolitan area. - avgLatency: - type: number - description: Average latency (in milliseconds[ms]) between two specified metros. - remoteVCBandwidthMax: - type: integer - description: This field holds the Max Connection speed with connected metros - format: int64 - description: Arrays of objects containing latency data for the specified metros - services: + metricsEnabled: + type: boolean + description: enable metric + example: false + default: false + description: Update Stream Asset + InterfaceId: + type: integer + description: Network Edge Device Interface identifier + format: int32 + example: 5 + GetAllStreamSubscriptionResponse: type: object properties: - type: - type: string - description: Type of Service - description: Arrays of objects containing type of services supported in the specified metros - GeoScopeType: - type: string - description: Geographic boundary types - enum: - - CANADA - - CONUS - - JAPAN - - UK - - AUSTRALIA - - BRAZIL - - SWITZERLAND - - EU - GeoZone: + pagination: + $ref: "#/components/schemas/Pagination" + data: + type: array + description: Data returned from the API call. + items: + $ref: "#/components/schemas/StreamSubscription" + StreamSubscriptionPostRequest: + required: + - name + - sink + - type type: object properties: - code: + type: type: string - description: Code assigned to a geographic zone. + enum: + - STREAM_SUBSCRIPTION name: type: string - description: Name of a geographic zone. + description: Customer-provided stream subscription name description: type: string - description: Description of a geographic zone. - description: Geographic zone of a Fabric Metro - MetroErrorList: - type: array - items: - $ref: "#/components/schemas/MetroError" - MetroError: - required: - - errorCode - - errorMessage + description: Customer-provided stream subscription description + enabled: + type: boolean + description: Stream subscription enabled status + example: true + default: true + metricSelector: + $ref: "#/components/schemas/StreamSubscriptionSelector" + eventSelector: + $ref: "#/components/schemas/StreamSubscriptionSelector" + sink: + $ref: "#/components/schemas/StreamSubscriptionSink" + description: Create Stream Subscription + StreamSubscriptionSelector: type: object properties: - errorCode: - type: string - enum: - - EQ-3036001 - - EQ-3036013 - - EQ-3036030 - - EQ-3036100 - errorMessage: - type: string - enum: - - Unauthorized - - Invalid Query Parameter - - Invalid Path Parameter - - Invalid Query or Path Parameter - - Internal Server Error - - Metro Not Found - correlationId: - type: string - details: - type: string - help: - type: string - additionalInfo: + include: + maxItems: 8 type: array items: - $ref: "#/components/schemas/PriceError_additionalInfo" - description: Error with details - discriminator: - propertyName: errorCode - MetroCode: - type: string - description: Metro Code - AllPortsResponse: - type: object - properties: - pagination: - $ref: "#/components/schemas/Pagination" - data: + $ref: "#/components/schemas/StreamSubscriptionSelectorExpression" + except: + maxItems: 8 type: array - description: GET All User Port Across Fabric Metros items: - $ref: "#/components/schemas/Port" - description: GET All User Port Across Fabric Metros - Port: + $ref: "#/components/schemas/StreamSubscriptionSelectorExpression" + StreamSubscriptionSelectorExpression: + type: string + description: | + Supported event or metric types to use on event and metric selectors: + * `*` - all events or metrics + * `equinix.fabric.port.*` - port events or metrics + * `equinix.fabric.connection.*` - connection events or metrics + * `equinix.fabric.router.*` - cloud router events + * `equinix.fabric.metro.*` - metro metrics + * `equinix.fabric.network.*` - network events + * `equinix.fabric.service_token.*` - service token events + * `equinix.network_edge.*` - network edge events + * `equinix.network_edge.acl.*` - network edge acl events + * `equinix.network_edge.device.*` - network edge device events + * `equinix.access_manager.*` - identity access manager events + * `equinix.access_manager.user.role.*` - identity access manager user role events + example: equinix.fabric.connection.* + StreamSubscriptionSink: + required: + - type type: object properties: - href: + uri: type: string - description: Equinix assigned response attribute for an absolute URL that is the subject of the link's context. - format: uri - readOnly: true + description: any publicly reachable http endpoint type: - $ref: "#/components/schemas/PortType" - uuid: - type: string - description: Equinix assigned response attribute for port identifier - format: uuid - name: - type: string - description: Equinix assigned response attribute for Port name - description: type: string - description: Equinix assigned response attribute for Port description - physicalPortsSpeed: - minimum: 0 + description: destination type + enum: + - DATADOG + - GOOGLE_PUBSUB + - PAGERDUTY + - SERVICENOW + - SLACK + - SPLUNK_HEC + - TEAMS + - WEBHOOK + batchEnabled: + type: boolean + description: batch mode on/off + example: false + batchSizeMax: type: integer - description: Physical Ports Speed in Mbps - connectionsCount: - minimum: 0 + description: maximum batch size + batchWaitTimeMax: type: integer - description: Equinix assigned response attribute for Connection count - physicalPortsType: + description: maximum batch waiting time + credential: + $ref: "#/components/schemas/StreamSubscriptionSinkCredential" + settings: + $ref: "#/components/schemas/StreamSubscriptionSinkSetting" + host: type: string - description: Physical Ports Type. 10GBASE_SMF and 400GBASE_LR4 are only used for IX ports - enum: - - 1000BASE_LX - - 10GBASE_LR - - 100GBASE_LR4 - - 10GBASE_ER - - 1000BASE_SX - - 10GBASE_SMF - - 400GBASE_LR4 - physicalPortsCount: - type: integer - connectivitySourceType: + description: sink host + description: Create Stream destination + StreamSubscriptionSinkCredential: + type: object + properties: + type: type: string - description: Port connectivity type + description: credential type enum: - - COLO - - BMMR - - REMOTE - bmmrType: + - ACCESS_TOKEN + - INTEGRATION_KEY + - API_KEY + - USERNAME_PASSWORD + accessToken: type: string - enum: - - SELF - - EQUINIX - project: - $ref: "#/components/schemas/Project" - state: - $ref: "#/components/schemas/PortState" - order: - $ref: "#/components/schemas/PortOrder" - operation: - allOf: - - $ref: "#/components/schemas/PortOperation" - account: - $ref: "#/components/schemas/SimplifiedAccount" - change: - $ref: "#/components/schemas/PortChange" - changeLog: - $ref: "#/components/schemas/Changelog" - serviceType: + description: passed as Authorization header value + integrationKey: type: string - description: Port service Type - deprecated: true - enum: - - EPL - - MSP - serviceCode: - $ref: "#/components/schemas/PortServiceCode" - bandwidth: - minimum: 0 - type: integer - description: Equinix assigned response attribute for Port bandwidth in Mbps - deprecated: true - availableBandwidth: - minimum: 0 - type: integer - description: Equinix assigned response attribute for Port available bandwidth in Mbps - usedBandwidth: - minimum: 0 - type: integer - description: Equinix assigned response attribute for Port used bandwidth in Mbps - location: - $ref: "#/components/schemas/SimplifiedLocation" - device: - $ref: "#/components/schemas/PortDevice" - interface: - $ref: "#/components/schemas/PortInterface" - demarcationPointIbx: + description: passed as Authorization header value + apiKey: type: string - description: A-side/Equinix ibx - tetherIbx: + description: passed as Authorization header value + username: type: string - description: z-side/Equinix ibx - demarcationPoint: - $ref: "#/components/schemas/PortDemarcationPoint" - redundancy: - $ref: "#/components/schemas/PortRedundancy" - encapsulation: - $ref: "#/components/schemas/PortEncapsulation" - lagEnabled: - type: boolean - description: If LAG enabled - lag: - deprecated: true - allOf: - - $ref: "#/components/schemas/PortLag" - asn: - type: integer - description: Port ASN - package: - $ref: "#/components/schemas/Package" - settings: - $ref: "#/components/schemas/PortSettings" - physicalPortQuantity: - type: integer - description: Number of physical ports - notifications: - type: array - description: Notification preferences - items: - $ref: "#/components/schemas/PortNotification" - additionalInfo: - type: array - description: Port additional information - items: - $ref: "#/components/schemas/PortAdditionalInfo" - endCustomer: - $ref: "#/components/schemas/EndCustomer" - physicalPorts: - type: array - description: Physical ports that implement this port - items: - $ref: "#/components/schemas/PhysicalPort" - loas: - type: array - description: Port Loas - items: - $ref: "#/components/schemas/PortLoa" - marketplaceSubscription: - $ref: "#/components/schemas/marketplaceSubscription" - description: Port specification - PhysicalPort: + description: passed as Authorization header value + password: + type: string + description: passed as Authorization header value + description: Stream subscription sink credentials + StreamSubscriptionSinkSetting: + type: object + properties: + eventIndex: + type: string + description: event index + metricIndex: + type: string + description: metric index + source: + type: string + description: source + applicationKey: + type: string + description: Application key + eventUri: + type: string + description: event uri + metricUri: + type: string + description: metric uri + format: + type: string + description: webhook message format + enum: + - CLOUDEVENT + - OPENTELEMETRY + default: CLOUDEVENT + description: Stream subscription sink settings + StreamSubscription: type: object properties: href: type: string - description: Equinix assigned response attribute for an absolute URL that is the subject of the link's context. + description: Stream Subscription URI format: uri readOnly: true - type: - $ref: "#/components/schemas/PhysicalPortType" - id: - type: integer - description: Equinix assigned response attribute for Physical Port Id - deprecated: true - state: - $ref: "#/components/schemas/PortState" - account: - $ref: "#/components/schemas/SimplifiedAccount" - interfaceSpeed: - minimum: 0 - type: integer - description: Physical Port Speed in Mbps - interfaceType: - type: string - description: Physical Port Interface Type + example: https://api.equinix.com/fabric/v4/streams/d684aa26-8276-48b7-bb42-a6d9def0a418/subscriptions/3c9b8e7a2-f3b1-4576-a4a9-1366a63df170 uuid: type: string - description: Equinix assigned response attribute for physical port identifier + description: Equinix-assigned access point identifier format: uuid - tether: - $ref: "#/components/schemas/PortTether" - demarcationPoint: - $ref: "#/components/schemas/PortDemarcationPoint" - settings: - $ref: "#/components/schemas/PhysicalPortSettings" - interface: - $ref: "#/components/schemas/PortInterface" - notifications: - type: array - description: Notification preferences - items: - $ref: "#/components/schemas/PortNotification" - additionalInfo: - type: array - description: Physical Port additional information - items: - $ref: "#/components/schemas/PortAdditionalInfo" - order: - $ref: "#/components/schemas/PortOrder" - operation: - $ref: "#/components/schemas/PortOperation" - loas: - type: array - description: Port Loas - items: - $ref: "#/components/schemas/PortLoa" - description: Physical Port specification - PortRequest: - required: - - account - - connectivitySourceType - - encapsulation - - location - - physicalPortsSpeed - - physicalPortsType - - project - - type - type: object - properties: + example: c9b8e7a2-f3b1-4576-a4a9-1366a63df170 type: - $ref: "#/components/schemas/PortType" - physicalPortsSpeed: - minimum: 0 - type: integer - description: Physical Ports Speed in Mbps - physicalPortsType: type: string - description: Physical Ports Type. 10GBASE_SMF is only applicable for IX ports + description: type enum: - - 1000BASE_LX - - 10GBASE_LR - - 100GBASE_LR4 - - 10GBASE_ER - - 1000BASE_SX - - 10GBASE_SMF - - 400GBASE_LR4 - physicalPortsCount: - type: integer - connectivitySourceType: + - STREAM_SUBSCRIPTION + name: type: string - description: Port connectivity type - enum: - - COLO - - BMMR - - REMOTE - bmmrType: + description: Customer-provided subscription name + description: type: string - description: BMMR Type is mandatory when connectivitySourceType is BMMR - enum: - - SELF - - EQUINIX - project: - $ref: "#/components/schemas/Project" - order: - $ref: "#/components/schemas/PortOrder" - account: - $ref: "#/components/schemas/SimplifiedAccountRequest" - serviceType: + description: Customer-provided subscription description + state: type: string - description: Port service Type - deprecated: true + description: Steam subscription provision state enum: - - EPL - - MSP - serviceCode: - $ref: "#/components/schemas/PortServiceCode" - bandwidth: - minimum: 0 - type: integer - description: Equinix assigned response attribute for Port bandwidth in Mbps - deprecated: true - location: - $ref: "#/components/schemas/SimplifiedLocationRequest" - demarcationPointIbx: - type: string - description: A-side/Equinix ibx - tetherIbx: - type: string - description: z-side/Equinix ibx - demarcationPoint: - $ref: "#/components/schemas/PortDemarcationPoint" - redundancy: - $ref: "#/components/schemas/PortRedundancy" - encapsulation: - $ref: "#/components/schemas/PortEncapsulation" - lagEnabled: + - PROVISIONING + - PROVISIONED + - REPROVISIONING + - DEPROVISIONING + - DEPROVISIONED + - FAILED + enabled: type: boolean - description: Indicates whether Link Aggregation Group (LAG) is enabled on this port - package: - $ref: "#/components/schemas/Package" - settings: - $ref: "#/components/schemas/PortSettings" - notifications: - type: array - description: Notification preferences - items: - $ref: "#/components/schemas/PortNotification" - physicalPorts: - type: array - description: Physical ports that implement this port - items: - $ref: "#/components/schemas/PhysicalPort" - loas: - type: array - description: Port Loas - items: - $ref: "#/components/schemas/PortLoa" - description: PortRequest is the Request Object for creating single and bulk fabric ports - BulkPortRequest: - type: object - properties: - data: - type: array - items: - $ref: "#/components/schemas/PortRequest" - description: Create bulk port request - BulkPhysicalPort: - type: object - properties: - data: - type: array - description: add physical ports to virtual port - items: - $ref: "#/components/schemas/PhysicalPort" - description: Add to Lag request - AllPhysicalPortsResponse: - type: object - properties: - pagination: - $ref: "#/components/schemas/Pagination" - data: - type: array - description: GET All Physical Ports - items: - $ref: "#/components/schemas/PhysicalPort" - description: GET All Physical Ports - PortUpdateRequest: - minItems: 1 - type: array - description: Port Update Request - items: - $ref: "#/components/schemas/PortChangeOperation" - Error: + description: Stream subscription enabled status + metricSelector: + $ref: "#/components/schemas/StreamSubscriptionSelector" + eventSelector: + $ref: "#/components/schemas/StreamSubscriptionSelector" + sink: + $ref: "#/components/schemas/StreamSubscriptionSinkResponse" + operation: + $ref: "#/components/schemas/StreamSubscriptionOperation" + changeLog: + $ref: "#/components/schemas/Changelog" + description: Stream Subscription object + StreamSubscriptionId: + type: string + description: Stream Subscription UUID + format: uuid + example: 557400f8-d360-11e9-bb65-2a2ae2dbcce4 + StreamSubscriptionPutRequest: required: - - errorCode - - errorMessage + - name + - sink + - type type: object properties: - errorCode: - pattern: ^EQ-\d{7}$ - type: string - errorMessage: - type: string - correlationId: + type: type: string - details: + enum: + - STREAM_SUBSCRIPTION + name: type: string - help: + description: Customer-provided stream subscription name + description: type: string - additionalInfo: - type: array - items: - $ref: "#/components/schemas/PriceError_additionalInfo" - description: Error Response with details - LinkProtocolGetResponse: - type: object - properties: - pagination: - $ref: "#/components/schemas/Pagination" - data: - type: array - items: - $ref: "#/components/schemas/LinkProtocolResponse" - description: List of Vlans - PortV4SearchRequest: + description: Customer-provided stream subscription description + enabled: + type: boolean + description: Stream subscription enabled status + example: true + filters: + $ref: "#/components/schemas/StreamSubscriptionFilter" + metricSelector: + $ref: "#/components/schemas/StreamSubscriptionSelector" + eventSelector: + $ref: "#/components/schemas/StreamSubscriptionSelector" + sink: + $ref: "#/components/schemas/StreamSubscriptionSink" + description: Update Stream Subscription + StreamSubscriptionSearchRequest: required: - filter type: object properties: filter: - $ref: "#/components/schemas/PortExpression" + $ref: "#/components/schemas/StreamSubscriptionSearchFilters" pagination: $ref: "#/components/schemas/PaginationRequest" sort: type: array items: - $ref: "#/components/schemas/PortSortCriteria" + $ref: "#/components/schemas/StreamSubscriptionSearchSortCriteria" description: Search requests containing criteria - PortExpression: + StreamSubscriptionSearchFilters: + required: + - and type: object properties: and: - $ref: "#/components/schemas/PortExpressions" - or: - $ref: "#/components/schemas/PortExpressions" + minItems: 1 + type: array + items: + $ref: "#/components/schemas/StreamSubscriptionSearchFilter" + StreamSubscriptionSearchFilter: + type: object + anyOf: + - $ref: "#/components/schemas/StreamSubscriptionSearchSimpleExpression" + - $ref: "#/components/schemas/StreamSubscriptionSearchOrFilter" + StreamSubscriptionSearchSimpleExpression: + type: object + properties: property: - $ref: "#/components/schemas/PortSearchFieldName" + type: string + description: | + Possible field names to use on filters: + * `/uuid` - Subscription uuid + * `/streamUuid` - Stream uuid the subscription belongs to + * `/state` - Subscription state (`DEPROVISIONED` returned only when explicitly requested) + * `/name` - Subscription name + * `/project/projectId` - Subscription project id + * `/description` - Subscription description + * `/changeLog/createdDateTime` - Subscription created date time + * `/changeLog/updatedDateTime` - Subscription updated date time + example: /streamUuid operator: type: string - enum: - - = + description: | + Possible operators to use on filters: + * `=` - equal + * `!=` - not equal + * `>` - greater than + * `>=` - greater than or equal to + * `<` - less than + * `<=` - less than or equal to + * `BETWEEN` - between + * `NOT BETWEEN` - not between + * `LIKE` - like + * `ILIKE` - like case-insensitive + * `IN` - in + * `NOT IN` - not in + example: = values: + minItems: 1 type: array items: type: string - description: | - Either use 'and' for AND operations, 'or' for OR operations, or specify 'property', 'operator', and 'values' for field filtering. Only one of these patterns should be used at a time. - PortExpressions: - type: array - items: - $ref: "#/components/schemas/PortExpression" - PortSearchFieldName: - type: string - description: Possible field names to use on filters - enum: - - /device/name - - /physicalPorts/tether/crossConnectId - - /physicalPorts/interface/name - - /state - - /project/projectId - - /uuid - - /name - - /account/orgId - - /account/accountNumber - - /location/metroCode - x-enum-deprecations: - /device/name: true - /physicalPorts/interface/name: true - PortSortCriteria: + example: 12f4d4a1-c7cb-4def-9f77-5ce93c19d999 + StreamSubscriptionSearchOrFilter: + type: object + properties: + or: + type: array + items: + $ref: "#/components/schemas/StreamSubscriptionSearchSimpleExpression" + StreamSubscriptionSearchSortCriteria: + required: + - direction + - property type: object properties: direction: - $ref: "#/components/schemas/PortSortDirection" + $ref: "#/components/schemas/StreamSubscriptionSearchSortDirection" property: - $ref: "#/components/schemas/PortSortBy" - AllPortPackagesResponse: - required: - - data + $ref: "#/components/schemas/StreamSubscriptionSearchSortBy" + StreamSubscriptionSearchSortDirection: + type: string + description: Sorting direction + default: DESC + enum: + - DESC + - ASC + StreamSubscriptionSearchSortBy: + type: string + description: Possible field names to use on sorting + default: /changeLog/createdDateTime + enum: + - /changeLog/createdDateTime + - /changeLog/updatedDateTime + SearchStreamSubscriptionResponse: type: object properties: + pagination: + $ref: "#/components/schemas/Pagination" data: type: array - description: List of Port Packages + description: Data returned from the API call. items: - $ref: "#/components/schemas/PortPackage" - description: Port Packages response - GetAllConnectionRouteAggregationsResponse: + $ref: "#/components/schemas/StreamSubscription" + GetAllStreamAlertRuleResponse: type: object properties: pagination: $ref: "#/components/schemas/Pagination" data: type: array - description: List of Route Aggregations attached to a Connection + description: Data returned from the API call. items: - $ref: "#/components/schemas/ConnectionRouteAggregationData" - RouteAggregationId: - type: string - description: Route Aggregations UUID - example: 695a8471-6595-4ac6-a2f4-b3d96ed3a59d - ConnectionRouteAggregationData: + $ref: "#/components/schemas/StreamAlertRule" + AlertRulePostRequest: + required: + - detectionMethod + - metricSelector + - name + - resourceSelector + - type type: object properties: - href: - type: string - description: Route Aggregation URI - format: uri - example: https://api.equinix.com/fabric/v4/connections/81331c52-04c0-4656-a4a7-18c52669348f/routeAggregations/695a8471-6595-4ac6-a2f4-b3d96ed3a59d type: type: string - description: Route Aggregation type enum: - - BGP_IPv4_PREFIX_AGGREGATION - uuid: + - METRIC_ALERT + name: type: string - description: Route Aggregation identifier - format: uuid - example: 695a8471-6595-4ac6-a2f4-b3d96ed3a59d - attachmentStatus: + description: Customer-provided stream name + description: type: string - enum: - - ATTACHING - - ATTACHED - - DETACHED - - DETACHING - - FAILED - - PENDING_BGP_CONFIGURATION - changeLog: - $ref: "#/components/schemas/Changelog" - GetAllConnectionRouteFiltersResponse: + description: Customer-provided stream description + enabled: + type: boolean + description: Stream alert rule enabled status + example: true + default: true + metricSelector: + $ref: "#/components/schemas/MetricSelector" + resourceSelector: + $ref: "#/components/schemas/ResourceSelector" + detectionMethod: + $ref: "#/components/schemas/DetectionMethod" + description: Create Stream Alert Rules + MetricSelector: + required: + - include type: object properties: - pagination: - $ref: "#/components/schemas/Pagination" - data: + include: type: array - description: List of Route Filters attached to a Connection + description: Stream alert rule filtered by metric name items: - $ref: "#/components/schemas/ConnectionRouteFilterData" - RouteFilterId: - type: string - description: Route Filters UUID - example: 695a8471-6595-4ac6-a2f4-b3d96ed3a59d - ConnectionRouteFilterData: - type: object - properties: - href: - type: string - description: Route filter URI - format: uri - example: https://api.equinix.com/fabric/v4/connections/81331c52-04c0-4656-a4a7-18c52669348f/routeFilters/695a8471-6595-4ac6-a2f4-b3d96ed3a59d - type: - type: string - description: Route filter type - enum: - - BGP_IPv4_PREFIX_FILTER - - BGP_IPv6_PREFIX_FILTER - uuid: - type: string - description: Route Filter identifier - format: uuid - example: 695a8471-6595-4ac6-a2f4-b3d96ed3a59d - attachmentStatus: - type: string - enum: - - ATTACHING - - ATTACHED - - DETACHED - - DETACHING - - FAILED - - PENDING_BGP_CONFIGURATION - direction: - type: string - enum: - - INBOUND - - OUTBOUND - changeLog: - $ref: "#/components/schemas/Changelog" - ConnectionRouteFiltersBase: + type: string + example: equinix.fabric.metro.sv_da.latency + ResourceSelector: required: - - direction + - include type: object properties: - direction: - type: string - description: Route Filter direction to attach to a connection - enum: - - INBOUND - - OUTBOUND - RouteFiltersBase: + include: + type: array + description: | + ### Supported metric names to use on filters with property /subject: + * `/fabric/v4/ports/` - port metrics + * `/fabric/v4/connections/` - connection metrics + * `/fabric/v4/metros/` - metro latency metrics + items: + type: string + DetectionMethod: required: - - name - - project - type type: object properties: type: type: string - description: Route Filter type + description: | + * THRESHOLD - Alert when a metric crosses a defined threshold by user. + * OUTLIER - Intelligent Alert that has an outlier behavior. This option is currently supported for metro latency metric. enum: - - BGP_IPv4_PREFIX_FILTER - - BGP_IPv6_PREFIX_FILTER - name: + - THRESHOLD + - OUTLIER + windowSize: type: string - example: My-direct-route-1 - description: + description: Stream alert rule metric window size + example: PT15M + operand: type: string - description: Customer-provided connection description - project: - $ref: "#/components/schemas/Project" - RouteFiltersData: + description: Stream alert rule metric operand + enum: + - ABOVE + - BELOW + warningThreshold: + type: string + description: Stream alert rule metric warning threshold + criticalThreshold: + type: string + description: Stream alert rule metric critical threshold + StreamAlertRule: type: object properties: href: type: string - description: Route filter URI + description: Stream Alert Rule URI format: uri - example: https://api.equinix.com/fabric/v4/routeFilters/695a8471-6595-4ac6-a2f4-b3d96ed3a59d - type: - type: string - description: Route Filter type - enum: - - BGP_IPv4_PREFIX_FILTER - - BGP_IPv6_PREFIX_FILTER + readOnly: true uuid: type: string - description: Route filter identifier + description: Equinix-assigned access point identifier format: uuid - example: 695a8471-6595-4ac6-a2f4-b3d96ed3a59d + example: c9b8e7a2-f3b1-4576-a4a9-1366a63df170 + type: + type: string + description: Stream subscription type + enum: + - METRIC_ALERT name: type: string - example: My-direct-route-1 + description: Customer-provided stream alert rule name description: type: string - description: Customer-provided connection description + description: Customer-provided stream alert rule description state: - $ref: "#/components/schemas/RouteFilterState" - change: - $ref: "#/components/schemas/RouteFiltersChange" - notMatchedRuleAction: type: string + description: Steam subscription provision state enum: - - ALLOW - - DENY - connectionsCount: - type: integer - example: 0 - rulesCount: - type: integer - example: 0 - project: - $ref: "#/components/schemas/RouteFiltersData_project" - changelog: + - ACTIVE + - INACTIVE + enabled: + type: boolean + description: Stream alert rule enabled status + default: true + metricSelector: + $ref: "#/components/schemas/MetricSelectorResponse" + resourceSelector: + $ref: "#/components/schemas/ResourceSelectorResponse" + detectionMethod: + $ref: "#/components/schemas/DetectionMethodResponse" + changeLog: $ref: "#/components/schemas/Changelog" - RouteFiltersPatchRequest: - minItems: 1 - type: array - description: Patch Route Filters request - items: - $ref: "#/components/schemas/RouteFiltersPatchRequestItem" - RouteFilterChangeDataResponse: - type: object - properties: - pagination: - $ref: "#/components/schemas/Pagination" - data: - type: array - items: - $ref: "#/components/schemas/RouteFilterChangeData" - description: List of route filter changes - ChangeId_1: + description: Stream object + AlertRuleId: type: string - description: Route Filters Change UUID + description: Stream Alert Rule UUID format: uuid - example: 6d500177-9404-41f2-99e8-2bf1a84d8db5 - RouteFilterChangeData: + example: 0bbcea48-1333-4ad5-a7ea-e4d58a5fbd15 + AlertRulePutRequest: + required: + - detectionMethod + - metricSelector + - name + - resourceSelector + - type type: object properties: - status: + name: + type: string + description: Customer-provided stream name + type: type: string - description: Current outcome of the change flow enum: - - COMPLETED - - FAILED - - REQUESTED - createdBy: + - METRIC_ALERT + description: type: string - description: Created by user key - createdDateTime: + description: Customer-provided stream description + enabled: + type: boolean + description: Stream alert rule enabled status + default: true + metricSelector: + $ref: "#/components/schemas/MetricSelector" + resourceSelector: + $ref: "#/components/schemas/ResourceSelector" + detectionMethod: + $ref: "#/components/schemas/DetectionMethod" + description: Create Stream Alert Rules + CompanyProfileRequest: + required: + - description + - name + - summary + - type + - webUrl + type: object + properties: + type: type: string - description: Set when change flow starts - format: date-time - updatedBy: + example: COMPANY_PROFILE + name: + maxLength: 50 + minLength: 1 type: string - description: Updated by user key - updatedDateTime: + example: Equinix + summary: + maxLength: 125 + minLength: 1 type: string - description: Set when change object is updated - format: date-time - information: + example: Global interconnection and data center company + description: + maxLength: 450 + minLength: 1 type: string - description: Additional information - data: - $ref: "#/components/schemas/RouteFiltersChangeOperation" - description: Current state of latest route filter change - allOf: - - $ref: "#/components/schemas/RouteFiltersChange" - GetRouteFilterGetConnectionsResponse: - type: object - properties: - pagination: - $ref: "#/components/schemas/Pagination" - data: - type: array - description: List of Connections using a Route Filter - items: - $ref: "#/components/schemas/RouteFilterConnectionsData" - RouteFiltersSearchRequest: - type: object - properties: - filter: - $ref: "#/components/schemas/SearchFilter" - pagination: - $ref: "#/components/schemas/PaginationRequest" - sort: - type: array - items: - $ref: "#/components/schemas/RouteFilterSortCriteria" - description: Search route filters - RouteFiltersSearchResponse: - type: object - properties: - pagination: - $ref: "#/components/schemas/Pagination" - data: + example: Equinix, Inc. connects the world's leading businesses to their customers, employees and partners inside the most interconnected data centers. + pointOfContacts: type: array - description: List of route filters + example: + - type: SUPPORT + contacts: + - name: Peter Griffin + role: Vice President of Sales + email: example1@example.com + - name: Taylor Swift + role: Director of Marketing + email: example2@example.com + - name: Darth Vader + role: Head of Engineering + email: example3@example.com items: - $ref: "#/components/schemas/RouteFiltersData" - GetRouteFilterRulesResponse: - type: object - properties: - pagination: - $ref: "#/components/schemas/Pagination" - data: + $ref: "#/components/schemas/CompanyProfileContact" + notifications: type: array - description: List of Route Filter Rules + example: + - type: NOTIFICATION + emails: + - example1@example.com + - example2@example.com items: - $ref: "#/components/schemas/RouteFilterRulesData" - RouteFilterRulesBase: - required: - - prefix - type: object - properties: - name: - type: string - example: Private-subnet-filter - description: + $ref: "#/components/schemas/SimplifiedNotification" + overview: type: string - description: Customer-provided Route Filter Rule description - prefix: + example: About Initech Corp

lorem ipsum

+ webUrl: type: string - example: 192.168.0.0/24 - prefixMatch: + example: https://www.equinix.com + contactUrl: type: string - example: orlonger, exact - default: orlonger - RouteFilterRulesData: + example: https://www.equinix.com/contact-us + CompanyProfileResponse: type: object properties: href: type: string - description: Route Filter Rules URI - format: uri - example: https://api.equinix.com/fabric/v4/routeFilters/695a8471-6595-4ac6-a2f4-b3d96ed3a59d/routeFilterRules/65b025ef-022b-4180-85cf-82cfc1ab655b - type: - type: string - description: Route filter type - enum: - - BGP_IPv4_PREFIX_FILTER_RULE - - BGP_IPv6_PREFIX_FILTER_RULE + example: https://api.equinix.com/fabric/v4/companyProfiles/123e4567-e89b-12d3-a456-426614174000 uuid: type: string - description: Route Filter Rule identifier - format: uuid - example: 65b025ef-022b-4180-85cf-82cfc1ab655b + example: 123e4567-e89b-12d3-a456-426614174000 + type: + type: string + example: COMPANY_PROFILE name: + maxLength: 50 + minLength: 1 type: string - example: Private-subnet-filter-2 + example: Equinix + summary: + maxLength: 125 + minLength: 1 + type: string + example: Global interconnection and data center company description: + maxLength: 450 + minLength: 1 type: string - description: Customer-provided Route Filter Rule description + example: Equinix, Inc. connects the world's leading businesses to their customers, employees and partners inside the most interconnected data centers. state: - $ref: "#/components/schemas/RouteFilterRuleState" - prefixMatch: + $ref: "#/components/schemas/CompanyProfileState" + account: + $ref: "#/components/schemas/CompanyProfileResponse_account" + metros: + type: array + example: + - href: https://api.equinix.com/fabric/v4/metros/SV + code: SV + name: Silicon Valley + items: + $ref: "#/components/schemas/CompanyMetro" + logo: + $ref: "#/components/schemas/CompanyLogo" + tags: + type: array + example: + - href: https://api.equinix.com/fabric/v4/tags/260af68b-42f0-4f2e-9c5c-2fbd44b4b387 + uuid: 260af68b-42f0-4f2e-9c5c-2fbd44b4b387 + type: RESOURCE_TAG + name: environment + displayName: Environment + items: + $ref: "#/components/schemas/TagResponse" + serviceProfiles: + type: array + example: + - href: https://api.equinix.com/fabric/v4/serviceProfiles/423af68b-42f0-4f2e-9c5c-2fbd44b4b387 + uuid: 423af68b-42f0-4f2e-9c5c-2fbd44b4b387 + items: + $ref: "#/components/schemas/CompanyServiceProfile" + privateServices: + type: array + example: + - href: https://api.equinix.com/fabric/v4/privateServices/460af68b-42f0-4f2e-9c5c-2fbd44b4b387 + uuid: 460af68b-42f0-4f2e-9c5c-2fbd44b4b387 + - href: https://api.equinix.com/fabric/v4/privateServices/8a5685a6-063d-41ac-9279-d32431e8d8f6 + uuid: 8a5685a6-063d-41ac-9279-d32431e8d8f6 + items: + $ref: "#/components/schemas/PrivateService" + pointOfContacts: + type: array + example: + - type: SUPPORT + contacts: + - name: Peter Griffin + role: Vice President of Sales + email: example1@example.com + - name: Taylor Swift + role: Director of Marketing + email: example2@example.com + - name: Darth Vader + role: Head of Engineering + email: example3@example.com + items: + $ref: "#/components/schemas/CompanyProfileContact" + notifications: + type: array + example: + - type: NOTIFICATION + emails: + - example1@example.com + - example2@example.com + items: + $ref: "#/components/schemas/SimplifiedNotification" + overview: type: string - description: prefix matching operator - example: exact - default: orlonger - change: - $ref: "#/components/schemas/RouteFilterRulesChange" - action: + example: About Initech Corp

lorem ipsum

+ webUrl: type: string - enum: - - PERMIT - - DENY - prefix: + example: https://www.equinix.com + contactUrl: type: string - example: 192.168.0.0/24 - changelog: + example: https://www.equinix.com/contact-us + change: + $ref: "#/components/schemas/CompanyProfileChange" + changeLog: $ref: "#/components/schemas/Changelog" - RouteFilterRuleId: - type: string - description: Route Filter Rule UUID - example: 65b025ef-022b-4180-85cf-82cfc1ab655b - RouteFilterRulesPatchRequest: - minItems: 1 - type: array - description: Patch Route Filters Rule request - items: - $ref: "#/components/schemas/RouteFilterRulesPatchRequestItem" - RouteFilterRulesChangeDataResponse: + CompanyProfileSearchRequest: type: object properties: + filter: + $ref: "#/components/schemas/CompanyProfileSearchFilters" pagination: $ref: "#/components/schemas/Pagination" - data: - type: array - items: - $ref: "#/components/schemas/RouteFilterRulesChangeData" - description: List of route filter rule changes - ChangeId_2: - type: string - description: Route Filter Rule Change UUID - format: uuid - example: 6d500177-9404-41f2-99e8-2bf1a84d8db5 - RouteFilterRulesChangeData: - type: object - properties: - status: - type: string - description: Current outcome of the change flow - enum: - - COMPLETED - - FAILED - - REQUESTED - createdBy: - type: string - description: Created by User Key - createdDateTime: - type: string - description: Set when change flow starts - format: date-time - updatedBy: - type: string - description: Updated by User Key - updatedDateTime: - type: string - description: Set when change object is updated - format: date-time - data: - $ref: "#/components/schemas/RouteFilterRulesChangeOperation" - description: Current state of latest route filter rules change - allOf: - - $ref: "#/components/schemas/RouteFilterRulesChange" - RouteFilterRulesPostRequest: - type: object - properties: - data: - type: array - description: Route Filter Rule configuration - items: - $ref: "#/components/schemas/RouteFilterRulesBase" - description: Create Route Filter Rule POST request - RouteFilterRulesSearchRequest: - type: object - properties: + sort: + $ref: "#/components/schemas/Sort" + example: filter: - $ref: "#/components/schemas/RouteFilterRulesFilter" + and: + - property: /state + operator: = + values: + - PROVISIONED + - or: + - property: /name + operator: ILIKE + values: + - equinix + - property: /tags/name + operator: = + values: + - environment pagination: - $ref: "#/components/schemas/PaginationRequest" + offset: 0 + limit: 20 + total: 0 sort: - type: array - items: - $ref: "#/components/schemas/RouteFilterRuleSortCriteria" - description: Search route filter rules - RouteFilterRulesFilter: - description: Top-level filter that can be either an AND expression or OR expression - anyOf: - - $ref: "#/components/schemas/RouteFilterRuleAndExpression" - - $ref: "#/components/schemas/RouteFilterRuleOrExpression" - RouteFilterRuleAndExpression: + property: /changeLog/updatedDateTime + direction: DESC + CompanyProfileSearchFilters: type: object properties: and: - maxItems: 8 - minItems: 1 type: array items: - $ref: "#/components/schemas/RouteFilterRuleExpression" - description: AND expression containing multiple filter expressions - RouteFilterRuleExpression: - description: Filter expression that can be AND, OR, or a simple expression - anyOf: - - $ref: "#/components/schemas/RouteFilterRuleAndExpression" - - $ref: "#/components/schemas/RouteFilterRuleOrExpression" - - $ref: "#/components/schemas/RouteFilterRuleSimpleExpression" - RouteFilterRuleOrExpression: + $ref: "#/components/schemas/CompanyProfileSearchFilter" + description: | + Filter criteria for company profile search. The `and` array combines conditions where all must match. Each item in `and` is either a simple expression (property/operator/values) or an `or` group. At most one `or` group is allowed per request. + CompanyProfileSearchFilter: type: object - properties: - or: - maxItems: 8 - minItems: 1 - type: array - items: - $ref: "#/components/schemas/RouteFilterRuleExpression" - description: OR expression containing multiple filter expressions - RouteFilterRuleSimpleExpression: + oneOf: + - $ref: "#/components/schemas/CompanyProfileSearchSimpleExpression" + - $ref: "#/components/schemas/CompanyProfileSearchOrFilter" + CompanyProfileSearchSimpleExpression: + required: + - operator + - property + - values type: object properties: property: - type: string description: | - Possible field names to use on filters: - * `/type` - Route Filter Rules Type - * `/name` - Route Filter Rules Name - * `/uuid` - Route Filter Rules uuid - * `/state` - Route Filter Rules status - * `/prefix` - Route Filter Rule Prefix - * `/prefixMatch` - Route Filter Rule Prefix Match - example: /name + Searchable field name. Properties are grouped by their supported operators: + String properties (support all operators): + * `/name` - Company profile name + * `/uuid` - Company profile UUID + * `/tags/name` - Tag name + * `/tags/uuid` - Tag UUID + * `/tags/displayName` - Tag display name + + Discrete value properties (only support `=`, `!=`, `IN`, `NOT IN`): + * `/state` - Company profile state (`PENDING`, `PROVISIONED`, `DEPROVISIONED`, `REJECTED`) + * `/metros/metroCode` - Metro code (e.g. `SV`, `NY`, `DC`) + * `/change/status` - Change status (`PENDING`, `COMPLETED`, `REJECTED`) — seller and admin users only + example: /state + allOf: + - $ref: "#/components/schemas/CompanyProfileSearchFieldName" operator: - type: string description: | - Possible operators to use on filters: - * `=` - equal - * `!=` - not equal - * `[NOT] LIKE` - (not) like - * `[NOT] IN` - (not) in - * `ILIKE` - case-insensitive like - example: = + Comparison operator. `LIKE`, `NOT LIKE`, `ILIKE`, and `NOT ILIKE` require exactly one value. All other operators accept one or more values. + * `=` - equal; equivalent to `IN` when multiple values are provided + * `!=` - not equal; equivalent to `NOT IN` when multiple values are provided + * `LIKE` - case-sensitive partial match (single value) + * `NOT LIKE` - case-sensitive partial non-match (single value) + * `ILIKE` - case-insensitive partial match (single value) + * `NOT ILIKE` - case-insensitive partial non-match (single value) + * `IN` - matches any of the provided values + * `NOT IN` - does not match any of the provided values + example: IN + allOf: + - $ref: "#/components/schemas/OperatorEnum" values: - maxItems: 8 minItems: 1 type: array + example: + - PROVISIONED + - PENDING items: type: string - example: Route_Filter_Rule_Demo - description: Simple filter expression with property, operator, and values - RouteFilterRuleSortCriteria: - type: object - properties: - direction: - $ref: "#/components/schemas/RouteFilterRuleSortDirection" - property: - $ref: "#/components/schemas/RouteFilterRuleSortBy" - RouteFilterRuleSortDirection: - type: string - description: Sorting direction - enum: - - DESC - - ASC - default: DESC - RouteFilterRuleSortBy: + CompanyProfileSearchFieldName: type: string - description: Possible field names to use on sorting + description: Searchable field names in company profile + example: /tags/name enum: - - /type - - /uuid - /name + - /uuid + - /tags/name + - /tags/uuid + - /tags/displayName - /state - - /prefix - - /prefixMatch - - /changeLog/createdDateTime - - /changeLog/updatedDateTime - default: /changeLog/updatedDateTime - RouteFilterRulesSearchResponse: + - /metros/metroCode + - /change/status + OperatorEnum: + type: string + description: Comparison operators for filtering + example: = + enum: + - = + - "!=" + - LIKE + - NOT LIKE + - ILIKE + - NOT ILIKE + - IN + - NOT IN + CompanyProfileSearchOrFilter: + required: + - or + type: object + properties: + or: + minItems: 1 + type: array + items: + $ref: "#/components/schemas/CompanyProfileSearchSimpleExpression" + description: | + Groups multiple simple expressions with OR logic. At most one `or` group is allowed within the top-level `and` array. + Sort: + type: object + properties: + property: + type: string + description: | + Property to sort by. Supported values: + * `/name` - Company profile name + * `/state` - Company profile state + * `/changeLog/updatedDateTime` - Date and time the profile was last updated + * `/changeLog/createdDateTime` - Date and time the profile was created + example: /changeLog/updatedDateTime + direction: + $ref: "#/components/schemas/CompanyProfileSortDirection" + CompanyProfileSearchResponse: + required: + - data + - pagination type: object properties: pagination: $ref: "#/components/schemas/Pagination" data: type: array - description: List of route filter rules items: - $ref: "#/components/schemas/RouteFilterRulesData" - RouteAggregationsBase: - required: - - name - - project - - type + $ref: "#/components/schemas/CompanyProfileResponse" + ServiceProfileListResponse: type: object properties: - type: - type: string - description: Route Aggregation type - enum: - - BGP_IPv4_PREFIX_AGGREGATION - - BGP_IPv6_PREFIX_AGGREGATION - name: - type: string - example: My-direct-route-1 - description: - type: string - description: Customer-provided connection description - project: - $ref: "#/components/schemas/Project" - RouteAggregationsData: + data: + type: array + description: List of service profiles + example: + - href: https://api.equinix.com/fabric/v4/serviceProfiles/423af68b-42f0-4f2e-9c5c-2fbd44b4b387 + uuid: 423af68b-42f0-4f2e-9c5c-2fbd44b4b387 + items: + $ref: "#/components/schemas/CompanyServiceProfile" + AttachServiceProfileResponse: + required: + - type + - uuid type: object properties: href: type: string - description: Route Aggregation URI - format: uri - example: https://api.equinix.com/fabric/v4/routeAggregations/695a8471-6595-4ac6-a2f4-b3d96ed3a59d + description: URL to the attached service profile + example: https://api.equinix.com/fabric/v4/serviceProfiles/423af68b-42f0-4f2e-9c5c-2fbd44b4b387 type: type: string - description: Route Aggregation type - enum: - - BGP_IPv4_PREFIX_AGGREGATION - - BGP_IPv6_PREFIX_AGGREGATION + description: Type of the service or attachment + example: SERVICE_PROFILE uuid: type: string - description: Route Aggregation identifier - format: uuid - example: 695a8471-6595-4ac6-a2f4-b3d96ed3a59d - name: - type: string - example: My-direct-route-1 - description: + description: Unique identifier for the service profile + example: 423af68b-42f0-4f2e-9c5c-2fbd44b4b387 + attachmentStatus: type: string - description: Customer-provided connection description - state: - $ref: "#/components/schemas/RouteAggregationState" - change: - $ref: "#/components/schemas/RouteAggregationsChange" - connectionsCount: - type: integer - example: 0 - rulesCount: - type: integer - example: 0 - project: - $ref: "#/components/schemas/RouteAggregationsData_project" - changeLog: - $ref: "#/components/schemas/Changelog" - RouteAggregationsPatchRequest: - minItems: 1 - type: array - description: Patch Route Aggregations request - items: - $ref: "#/components/schemas/RouteAggregationsPatchRequestItem" - RouteAggregationChangeDataResponse: + description: Status of the attachment operation + example: ATTACHED + TagListResponse: type: object properties: - pagination: - $ref: "#/components/schemas/Pagination" data: type: array items: - $ref: "#/components/schemas/RouteAggregationChangeData" - description: List of Route Aggregation changes - ChangeId_3: - type: string - description: Route Aggregations Change UUID - format: uuid - example: 6d500177-9404-41f2-99e8-2bf1a84d8db5 - RouteAggregationChangeData: + $ref: "#/components/schemas/TagResponse" + pagination: + $ref: "#/components/schemas/Pagination" + description: Equinix Fabric Tag List Response Object + TagResponse: type: object properties: - status: + href: type: string - description: Current outcome of the change flow - enum: - - COMPLETED - - FAILED - - REQUESTED - createdBy: + format: uri + example: https://api.equinix.com/fabric/v4/tags/18a127ad-9d0c-46e2-a66d-8ed85d1858b0 + uuid: type: string - description: Created by User Key - createdDateTime: + format: uuid + example: 18a127ad-9d0c-46e2-a66d-8ed85d1858b0 + type: type: string - description: Set when change flow starts - format: date-time - updatedBy: + example: PREDEFINED_TAG + name: type: string - description: Updated by User Key - updatedDateTime: + example: equinix.fabric.spotlight.ai.llm + displayName: type: string - description: Set when change object is updated - format: date-time - information: + example: LLM + state: type: string - description: Additional information - data: - $ref: "#/components/schemas/RouteAggregationsChangeOperation" - description: Current state of latest Route Aggregation change - allOf: - - $ref: "#/components/schemas/RouteAggregationsChange" - GetRouteAggregationGetConnectionsResponse: - type: object - properties: - pagination: - $ref: "#/components/schemas/Pagination" - data: + description: Status of the Tag request. Can be APPROVED, PENDING_APPROVAL, REJECT + example: PENDING_APPROVAL + enum: + - APPROVED + - PENDING_APPROVAL + - REJECTED + notifications: type: array - description: List of Connections using a Route Aggregation + example: + - type: NOTIFICATION + emails: + - example1@example.com + - example2@example.com items: - $ref: "#/components/schemas/RouteAggregationConnectionsData" - RouteAggregationsSearchRequest: + $ref: "#/components/schemas/SimplifiedNotification" + changeLog: + $ref: "#/components/schemas/Changelog" + description: Equinix Fabric Tag Response Object + AttachTagResponse: + required: + - type + - uuid type: object properties: - filter: - $ref: "#/components/schemas/SearchFilter" - pagination: - $ref: "#/components/schemas/PaginationRequest" - sort: - type: array - items: - $ref: "#/components/schemas/RouteAggregationSortCriteria" - description: Search route aggregations - RouteAggregationsSearchResponse: + href: + type: string + description: URL to the attached tag + example: https://api.equinix.com/fabric/v4/tags/260af68b-42f0-4f2e-9c5c-2fbd44b4b387 + type: + type: string + description: Type of the tag or attachment + example: TAG + uuid: + type: string + description: Unique identifier for the tag + example: 260af68b-42f0-4f2e-9c5c-2fbd44b4b387 + attachmentStatus: + type: string + description: Status of the attachment operation + example: ATTACHED + PrivateServiceListResponse: type: object properties: - pagination: - $ref: "#/components/schemas/Pagination" data: type: array - description: List of Route Aggregations + description: List of private services + example: + - href: https://api.equinix.com/fabric/v4/privateServices/460af68b-42f0-4f2e-9c5c-2fbd44b4b387 + uuid: 460af68b-42f0-4f2e-9c5c-2fbd44b4b387 items: - $ref: "#/components/schemas/RouteAggregationsData" - GetRouteAggregationRulesResponse: + $ref: "#/components/schemas/PrivateService" + AttachPrivateServiceResponse: + required: + - type + - uuid type: object properties: - pagination: - $ref: "#/components/schemas/Pagination" - data: - type: array - description: List of Route Aggregation Rules - items: - $ref: "#/components/schemas/RouteAggregationRulesData" - RouteAggregationRulesBase: + href: + type: string + description: URL to the attached private service + example: https://api.equinix.com/fabric/v4/privateServices/460af68b-42f0-4f2e-9c5c-2fbd44b4b387 + type: + type: string + description: Type of the private service or attachment + example: PRIVATE_SERVICE + uuid: + type: string + description: Unique identifier for the private service + example: 460af68b-42f0-4f2e-9c5c-2fbd44b4b387 + attachmentStatus: + type: string + description: Status of the attachment operation + example: ATTACHED + LogoRequest: required: - - prefix + - description + - logo + - name + - type type: object properties: + logo: + type: string + description: Logo image file + format: binary name: + maxLength: 24 + minLength: 1 type: string - example: Private-subnet-Aggregation + description: Name of the Logo + example: Equinix Logo description: + maxLength: 125 + minLength: 1 type: string - description: Customer-provided Route Aggregation Rule description - prefix: + description: Description of the logo + example: Company branding logo + type: type: string - example: 192.168.0.0/24 - RouteAggregationRulesData: + description: Type of logo + example: COMPANY_LOGO + description: Equinix Fabric Logo Request Object + LogoResponse: type: object properties: href: type: string - description: Route Aggregation Rules URI format: uri - example: https://api.equinix.com/fabric/v4/routeAggregations/695a8471-6595-4ac6-a2f4-b3d96ed3a59d/routeAggregationRules/65b025ef-022b-4180-85cf-82cfc1ab655b + example: https://api.equinix.com/fabric/v4/logos/18a127ad-9d0c-46e2-a66d-8ed85d1858b0 + uuid: + type: string + format: uuid + example: 18a127ad-9d0c-46e2-a66d-8ed85d1858b0 type: type: string - description: Route Aggregation type - enum: - - BGP_IPv4_PREFIX_AGGREGATION_RULE + description: Type of logo + example: COMPANY_LOGO + name: + type: string + example: Equinix Logo + description: + type: string + example: Company branding logo + status: + type: string + example: CREATED + extensionType: + type: string + example: .png + changelog: + $ref: "#/components/schemas/Changelog" + description: Equinix Fabric Logo Response Object + CreateLoa: + description: Create Loa + oneOf: + - $ref: "#/components/schemas/IssueLoa" + - $ref: "#/components/schemas/RequestLoa" + LoaResponse: + type: object + properties: + href: + type: string + description: URI of this LOA resource. + format: uri + example: https://api.equinix.com/fabric/v4/loas/29cc7878-54e3-4e1a-8651-87a61354bac2 uuid: type: string - description: Route Aggregation Rule identifier + description: Unique identifier of this LOA. format: uuid - example: 65b025ef-022b-4180-85cf-82cfc1ab655b + example: 29cc7878-54e3-4e1a-8651-87a61354bac2 + type: + $ref: "#/components/schemas/LoaType" name: type: string - example: Private-subnet-aggregation-2 + description: A short, descriptive name for this LOA + example: LOA-Equinix-SV1-2026 description: type: string - description: Customer-provided Route Aggregation Rule description + description: Additional context about this LOA + example: Authorization for patch panel port access to Equinix at SV1 + authorizedProductType: + $ref: "#/components/schemas/LoaProductType" state: - $ref: "#/components/schemas/RouteAggregationRuleState" - change: - $ref: "#/components/schemas/RouteAggregationRulesChange" - prefix: - type: string - example: 192.168.0.0/24 + $ref: "#/components/schemas/LoaState" + operation: + $ref: "#/components/schemas/LoaResponse_operation" + requestor: + $ref: "#/components/schemas/LoaRequestor" + issuer: + $ref: "#/components/schemas/LoaIssuer" + demarcationPoint: + $ref: "#/components/schemas/LoaDemarcationPoint" + location: + $ref: "#/components/schemas/LoaLocation" + expirationDateTime: + $ref: "#/components/schemas/LoaExpiration" changeLog: - $ref: "#/components/schemas/Changelog" - RouteAggregationRuleId: + $ref: "#/components/schemas/LoaChangelog" + description: Loa Response + LoaId: type: string - description: Route Aggregation Rule UUID - example: 65b025ef-022b-4180-85cf-82cfc1ab655b - RouteAggregationRulesPatchRequest: - minItems: 1 + description: Loa UUID + format: uuid + example: 29cc7878-54e3-4e1a-8651-87a61354bac2 + LoaUpdate: type: array - description: Patch Route Aggregations Rule request items: - $ref: "#/components/schemas/RouteAggregationRulesPatchRequestItem" - RouteAggregationRulesChangeDataResponse: + $ref: "#/components/schemas/LoaReplaceOperation" + LoaReplaceOperation: + required: + - op + - path + - value type: object properties: - pagination: - $ref: "#/components/schemas/Pagination" + op: + $ref: "#/components/schemas/LoaOpEnum" + path: + $ref: "#/components/schemas/LoaPath" + value: + type: object + description: New value for updated parameter + description: Replace attribute value or sub-resource in the existing model + LoaOpEnum: + type: string + description: Operation to be performed + enum: + - replace + - add + - remove + LoaPath: + type: string + description: | + ### A JSON Pointer path. + * `/name` - Name of the Loa + * `/description` - Description of the Loa + * `/requestor/email` - Email of the requestor contact + * `/requestor/orgName` - Organization name of the requestor + * `/issuer/email` - Email of the issuer contact + * `/issuer/orgName` - Organization name of the issuer + * `/demarcationPoint/patchPanelId` - Patch Panel Identifier + * `/demarcationPoint/patchPanelPortA` - Patch Panel Port A + * `/demarcationPoint/patchPanelPortB` - Patch Panel Port B + * `/demarcationPoint/connectorType` - Connector Type + * `/demarcationPoint/cageUniqueSpaceId` - Cage Unique Space Identifier + * `/expirationDateTime` - Expiration date and time of the Loa + * `/location/ibxCode` - IBX code of the Eligible location + LoaActionRequest: + title: AuthorizeLoa + required: + - type + type: object + properties: + type: + $ref: "#/components/schemas/LoaActionType" data: - type: array - items: - $ref: "#/components/schemas/RouteAggregationRulesChangeData" - description: List of Route Aggregation Rule changes - ChangeId_4: + $ref: "#/components/schemas/LoaActionData" + description: Action Request + LoaActionResponse: + type: object + properties: + href: + type: string + description: Action URI + format: uri + example: https://api.equinix.com/fabric/v4/loas/29cc7878-54e3-4e1a-8651-87a61354bac2/actions/30cc7878-54e3-4e1a-8651-87a61354bad4 + uuid: + type: string + description: Action Identifier + format: uuid + example: 30cc7878-54e3-4e1a-8651-87a61354bad4 + state: + $ref: "#/components/schemas/LoaActionState" + type: + $ref: "#/components/schemas/LoaActionType" + data: + $ref: "#/components/schemas/LoaActionData" + changeLog: + $ref: "#/components/schemas/LoaChangelog" + description: Action Response + ActionId_2: type: string - description: Route Aggregation Rule Change UUID + description: Action UUID format: uuid - example: 6d500177-9404-41f2-99e8-2bf1a84d8db5 - RouteAggregationRulesChangeData: + example: 30cc7878-54e3-4e1a-8651-87a61354bad4 + LoaSearchRequest: type: object properties: - status: + filter: + $ref: "#/components/schemas/LoaSearchFilters" + pagination: + $ref: "#/components/schemas/PaginationRequest" + sort: + type: array + items: + $ref: "#/components/schemas/LoaSortCriteria" + description: Search loas based on filter criteria + LoaSearchFilters: + type: object + properties: + and: + maxItems: 8 + type: array + items: + $ref: "#/components/schemas/LoaFilter" + LoaFilter: + type: object + anyOf: + - $ref: "#/components/schemas/LoaSimpleExpression" + - $ref: "#/components/schemas/LoaOrFilter" + LoaSimpleExpression: + type: object + properties: + property: + $ref: "#/components/schemas/LoaFieldName" + operator: type: string - description: Current outcome of the change flow + example: = enum: - - COMPLETED - - FAILED - - REQUESTED - createdBy: - type: string - description: Created by User Key - createdDateTime: - type: string - description: Set when change flow starts - format: date-time - updatedBy: + - = + - "!=" + - LIKE + - ILIKE + - BETWEEN + - NOT BETWEEN + - IN + - NOT IN + - ">" + - < + - ">=" + - <= + values: + type: array + example: + - Loa-2026 + items: + type: string + LoaFieldName: + type: string + description: Possible field names to use on filters + example: /name + enum: + - /uuid + - /state + - /type + - /name + - /authorizedProductType + - /expirationDateTime + - /requestor/email + - /requestor/orgId + - /requestor/orgName + - /issuer/email + - /issuer/orgId + - /issuer/orgName + - /demarcationPoint/patchPanelId + - /demarcationPoint/patchPanelPortA + - /demarcationPoint/patchPanelPortB + - /demarcationPoint/connectorType + - /demarcationPoint/cageUniqueSpaceId + - /location/ibxCode + - /changeLog/createdDateTime + - /changeLog/updatedDateTime + LoaOrFilter: + type: object + properties: + or: + type: array + items: + $ref: "#/components/schemas/LoaSimpleExpression" + LoaSortCriteria: + type: object + properties: + direction: type: string - description: Updated by User Key - updatedDateTime: + description: Sorting direction + default: DESC + enum: + - DESC + - ASC + property: type: string - description: Set when change object is updated - format: date-time - data: - $ref: "#/components/schemas/RouteAggregationRulesChangeOperation" - description: Current state of latest Route Aggregation Rules change - allOf: - - $ref: "#/components/schemas/RouteAggregationRulesChange" - RouteAggregationRulesPostRequest: + description: Possible field names to use on sorting + default: /changeLog/updatedDateTime + enum: + - /name + - /expirationDateTime + - /changeLog/createdDateTime + - /changeLog/updatedDateTime + LoaSearchResponse: type: object properties: + pagination: + $ref: "#/components/schemas/Pagination" + sort: + type: array + items: + $ref: "#/components/schemas/LoaSortCriteria" data: type: array - description: Route Aggregation Rule configuration items: - $ref: "#/components/schemas/RouteAggregationRulesBase" - description: Create Route Aggregation Rule POST request - RouteAggregationRulesSearchRequest: + $ref: "#/components/schemas/LoaResponse" + description: List of LOAs + LoaActionSearchRequest: type: object properties: filter: - $ref: "#/components/schemas/RouteAggregationRulesFilter" + $ref: "#/components/schemas/LoaActionSearchFilters" pagination: $ref: "#/components/schemas/PaginationRequest" sort: type: array items: - $ref: "#/components/schemas/RouteAggregationRuleSortCriteria" - description: Search route aggregation rules - RouteAggregationRulesFilter: - description: Top-level filter that can be either an AND expression or OR expression - anyOf: - - $ref: "#/components/schemas/RouteAggregationRuleAndExpression" - - $ref: "#/components/schemas/RouteAggregationRuleOrExpression" - RouteAggregationRuleAndExpression: + $ref: "#/components/schemas/LoaActionSortCriteria" + description: Search loa actions based on filter criteria + LoaActionSearchFilters: type: object properties: and: maxItems: 8 - minItems: 1 type: array items: - $ref: "#/components/schemas/RouteAggregationRuleExpression" - description: AND expression containing multiple filter expressions - RouteAggregationRuleExpression: - description: Filter expression that can be AND, OR, or a simple expression - anyOf: - - $ref: "#/components/schemas/RouteAggregationRuleAndExpression" - - $ref: "#/components/schemas/RouteAggregationRuleOrExpression" - - $ref: "#/components/schemas/RouteAggregationRuleSimpleExpression" - RouteAggregationRuleOrExpression: + $ref: "#/components/schemas/LoaActionFilter" + LoaActionFilter: type: object - properties: - or: - maxItems: 8 - minItems: 1 - type: array - items: - $ref: "#/components/schemas/RouteAggregationRuleExpression" - description: OR expression containing multiple filter expressions - RouteAggregationRuleSimpleExpression: + anyOf: + - $ref: "#/components/schemas/LoaActionSearchSimpleExpressions" + - $ref: "#/components/schemas/LoaActionOrFilter" + LoaActionSearchSimpleExpressions: type: object properties: property: - type: string - description: | - Possible field names to use on filters: - * `/type` - Route Aggregation Rules Type - * `/name` - Route Aggregation Rules Name - * `/uuid` - Route Aggregation Rules uuid - * `/state` - Route Aggregation Rules status - * `/prefix` - Route Aggregation Rule Prefix - example: /name + $ref: "#/components/schemas/LoaActionFieldName" operator: type: string - description: | - Possible operators to use on filters: - * `=` - equal - * `!=` - not equal - * `[NOT] LIKE` - (not) like - * `[NOT] IN` - (not) in - * `ILIKE` - case-insensitive like - example: = + enum: + - = + - "!=" + - LIKE + - ILIKE + - BETWEEN + - NOT BETWEEN + - IN + - NOT IN + - ">" + - < + - ">=" + - <= values: - maxItems: 8 - minItems: 1 type: array items: type: string - example: Route_Aggregation_Rule_Demo - description: Simple filter expression with property, operator, and values - RouteAggregationRuleSortCriteria: - type: object - properties: - direction: - $ref: "#/components/schemas/RouteAggregationRuleSortDirection" - property: - $ref: "#/components/schemas/RouteAggregationRuleSortBy" - RouteAggregationRuleSortDirection: - type: string - description: Sorting direction - enum: - - DESC - - ASC - default: DESC - RouteAggregationRuleSortBy: + example: LOA_ACCEPTANCE + LoaActionFieldName: type: string - description: Possible field names to use on sorting + description: Possible field names to use on filters enum: - /type - - /uuid - - /name - /state - - /prefix - - /changeLog/createdDateTime - - /changeLog/updatedDateTime - default: /changeLog/updatedDateTime - RouteAggregationRulesSearchResponse: + - /uuid + LoaActionOrFilter: type: object properties: - pagination: - $ref: "#/components/schemas/Pagination" - data: + or: type: array - description: List of route aggregation rules items: - $ref: "#/components/schemas/RouteAggregationRulesData" - CloudRouterPostRequest: - required: - - location - - name - - notification - - package - - type - allOf: - - $ref: "#/components/schemas/CloudRouterPostRequestBase" - CloudRouterPostRequestBase: + $ref: "#/components/schemas/LoaActionSearchSimpleExpressions" + LoaActionSortCriteria: type: object properties: - type: + direction: type: string + description: Sorting direction + default: DESC enum: - - XF_ROUTER - name: + - DESC + - ASC + property: type: string - description: Customer-provided Cloud Router name - location: - $ref: "#/components/schemas/SimplifiedLocationWithoutIBX" - package: - $ref: "#/components/schemas/CloudRouterPostRequestPackage" - order: - $ref: "#/components/schemas/Order" - project: - $ref: "#/components/schemas/Project" - account: - $ref: "#/components/schemas/SimplifiedAccount" - notifications: + description: Possible field names to use on sorting + default: /changeLog/createdDateTime + enum: + - /changeLog/createdDateTime + LoaActionSearchResponse: + type: object + properties: + pagination: + $ref: "#/components/schemas/Pagination" + sort: type: array - description: Preferences for notifications on connection configuration or status changes items: - $ref: "#/components/schemas/SimplifiedNotification" - marketplaceSubscription: - $ref: "#/components/schemas/marketplaceSubscription" - description: Create Cloud Router - CloudRouter: + $ref: "#/components/schemas/LoaActionSortCriteria" + data: + type: array + items: + $ref: "#/components/schemas/LoaActionResponse" + description: List of LOA Actions + LoaConsumersResponse: + type: object + properties: + pagination: + $ref: "#/components/schemas/Pagination" + data: + type: array + items: + $ref: "#/components/schemas/LoaConsumer" + description: List of Consumers associated with a LOA + LoaNotesResponse: + type: object + properties: + data: + type: array + items: + $ref: "#/components/schemas/LoaNoteDetails" + description: List of Loa note details + CreateLoaNote: + required: + - comments + type: object + properties: + comments: + maxLength: 4000 + minLength: 0 + type: string + description: | + The note content to add to this LOA. Notes are visible to both the issuer and requestor organizations. Use notes to communicate updates, clarifications, or additional context about the LOA. + example: LOA under review by our team. Expected response within 2 business days + description: Create Loa Note + LoaNoteDetails: type: object properties: + type: + type: string + description: | + Indicates which party added the note.
ISSUER — note was added by a user from the issuer organization.
REQUESTOR — note was added by a user from the requestor organization. + example: ISSUER + enum: + - ISSUER + - REQUESTOR href: type: string - description: Cloud Routers URI + description: URI to note resource. format: uri - readOnly: true - example: https://api.equinix.com/fabric/v4/routers/3c9b8e7a2-f3b1-4576-a4a9-1366a63df170 + example: https://api.equinix.com/fabric/v4/loas/b7e14c2d-93f8-4a61-8d5b-c29f71e4a306/notes/e41f485e-3094-42de-8797-0ef19a51df79 uuid: type: string - description: Equinix-assigned access point identifier + description: Unique identifier of this note. format: uuid - example: c9b8e7a2-f3b1-4576-a4a9-1366a63df170 - name: + example: e41f485e-3094-42de-8797-0ef19a51df79 + comments: type: string - description: Customer-provided Cloud Router name - format: string - example: test-fg-1 - state: - $ref: "#/components/schemas/CloudRouterAccessPointState" - equinixAsn: - type: integer - description: Equinix ASN - format: int64 - example: 30000 - connectionsCount: - minimum: 0 - type: integer - description: Number of connections associated with this Access point - marketplaceSubscription: - $ref: "#/components/schemas/marketplaceSubscription" - changeLog: - $ref: "#/components/schemas/Changelog" - change: - $ref: "#/components/schemas/CloudRouterChange" - description: Fabric Cloud Router object - allOf: - - $ref: "#/components/schemas/CloudRouterPostRequestBase" - RouterId: - type: string - description: Cloud Router UUID - format: uuid - example: 557400f8-d360-11e9-bb65-2a2ae2dbcce4 - CloudRouterUpdateRequest: - minItems: 1 - type: array - description: Fabric Cloud Router Update Request - items: - $ref: "#/components/schemas/CloudRouterChangeOperation" - RouterId_1: - type: string - description: Router UUID - format: uuid - example: 557400f8-d360-11e9-bb65-2a2ae2dbcce4 - ActionState: - $ref: "#/components/schemas/CloudRouterActionState" - CloudRouterActionState: - type: string - description: Cloud router action state - enum: - - SUCCEEDED - - FAILED - - PENDING - CloudRouterActionsSearchResponse: + description: Content of the note as submitted by the user. + example: LOA under review by our team. Expected response within 2 business days + createdDateTime: + type: string + description: Date and time when the note was created. + format: date-time + example: 2023-08-01T12:34:56Z + description: | + Represents a note added to a LOA by an authorized user from either the issuer or requestor organization + TagRequest: + required: + - displayName + - type type: object properties: - pagination: - $ref: "#/components/schemas/Pagination" - data: + type: + type: string + description: Type of tag + example: PREDEFINED_TAG + displayName: + maxLength: 24 + minLength: 1 + type: string + description: Display name of the Tag + example: LLM + notifications: type: array - description: Data returned from the API call. + example: + - type: NOTIFICATION + emails: + - example1@example.com + - example2@example.com items: - $ref: "#/components/schemas/CloudRouterActionResponse" - CloudRouterActionRequest: + $ref: "#/components/schemas/SimplifiedNotification" + description: Equinix Fabric Tag Request Object + AppDomainPostRequest: required: + - name + - project - type type: object properties: type: - $ref: "#/components/schemas/CloudRouterActionType" - connection: - $ref: "#/components/schemas/RouterActionsConnection" - description: Cloud router action request - CloudRouterActionResponse: + $ref: "#/components/schemas/AppDomainType" + name: + maxLength: 50 + minLength: 1 + type: string + description: Customer-provided App Domain name + format: string + example: atlassian.net + description: + type: string + description: Customer-provided App Domain description + format: string + example: Atlassian Domain + project: + $ref: "#/components/schemas/Project" + description: Create App Domain + AppDomain: required: - - changeLog - - state + - name + - project - type - - uuid type: object properties: + href: + type: string + description: Resource URI + format: uri + readOnly: true + example: https://api.equinix.com/fabric/v4/appDomains/20f3ef8e-d670-4236-86fa-bb0038adcfc3 + x-order: 1 type: - $ref: "#/components/schemas/CloudRouterActionType" + $ref: "#/components/schemas/AppDomainType" uuid: type: string + description: Equinix-assigned access point identifier format: uuid - example: 557400f8-d360-11e9-bb65-2a2ae2dbcce4 + example: 20f3ef8e-d670-4236-86fa-bb0038adcfc3 + x-order: 3 + name: + type: string + description: Customer-provided App Domain name + format: string + example: atlassian.net + x-order: 4 description: type: string - example: description + description: Customer-provided App Domain description + format: string + example: Atlassian Domain + x-order: 5 state: - $ref: "#/components/schemas/CloudRouterActionState" + $ref: "#/components/schemas/AppDomainState" + project: + $ref: "#/components/schemas/Project" changeLog: $ref: "#/components/schemas/Changelog" - href: - type: string - example: https://api.equinix.com//fabric/v4/routers/a1c6b7fd-aead-410a-96b4-b1dfa1071700/actions/1e9414f1-763e-4c0a-86c6-0bc8336048d9 - connection: - $ref: "#/components/schemas/RouterActionsConnection" - router: - $ref: "#/components/schemas/RouterActionsRouter" - description: Cloud router actions response object - CloudRouterActionsSearchRequest: + change: + $ref: "#/components/schemas/AppDomainChange" + description: App Domain object + AppDomainId: + type: string + description: App Domain UUID + format: uuid + example: 20f3ef8e-d670-4236-86fa-bb0038adcfc3 + AppDomainUpdateRequest: + maxItems: 1 + minItems: 1 + type: array + description: App Domain Update Request + items: + $ref: "#/components/schemas/AppDomainChangeOperation" + AppDomainSearchRequest: type: object properties: filter: - $ref: "#/components/schemas/CloudRouterActionsSearchFilters" + $ref: "#/components/schemas/AppDomainFilters" pagination: $ref: "#/components/schemas/PaginationRequest" sort: type: array items: - $ref: "#/components/schemas/CloudRouterActionsSearchSortCriteria" + $ref: "#/components/schemas/AppDomainSortCriteria" description: Search requests containing criteria - CloudRouterActionsSearchFilters: + AppDomainFilters: type: object properties: and: maxItems: 8 type: array items: - $ref: "#/components/schemas/CloudRouterActionsSearchFilter" - CloudRouterActionsSearchFilter: + $ref: "#/components/schemas/AppDomainFilter" + AppDomainFilter: type: object anyOf: - - $ref: "#/components/schemas/CloudRouterActionsSearchExpression" - - $ref: "#/components/schemas/CloudRouterActionsSearchOrFilter" - CloudRouterActionsSearchExpression: + - $ref: "#/components/schemas/AppDomainSimpleExpression" + - $ref: "#/components/schemas/AppDomainOrFilter" + AppDomainSimpleExpression: type: object properties: property: type: string description: | Possible field names to use on filters: - * `/type` - type of update - * `/state` - action state - * `/connection/uuid` - connection uuid associated - * `/*` - all-category search - example: /type + * `/project/projectId` - project id + * `/uuid` - App Domain uuid + * `/name` - App Domain name + * `/description` - App Domain description + * `/state` - App Domain status + * `/changeLog/createdDateTime` - App Domain creation timestamp + * `/changeLog/updatedDateTime` - App Domain last updated timestamp + * `/changeLog/deletedDateTime` - App Domain deletion timestamp + example: /name operator: type: string description: | Possible operators to use on filters: - * `=` - equal - * `!=` - not equal - * `>` - greater than - * `>=` - greater than or equal to - * `<` - less than - * `<=` - less than or equal to - * `[NOT] BETWEEN` - (not) between - * `[NOT] LIKE` - (not) like - * `[NOT] IN` - (not) in - * `~*` - case-insensitive like + * `=` - equal + * `!=` - not equal + * `>` - greater than + * `<` - less than + * `IN` - in + * `NOT IN` - not in + * `LIKE` - like + * `ILIKE` - case-insensitive like + * `BETWEEN` - between + * `NOT BETWEEN` - not between example: = values: type: array items: type: string - example: ROUTE_TABLE_ENTRY_UPDATE - CloudRouterActionsSearchOrFilter: + example: Gateway + AppDomainOrFilter: type: object properties: or: maxItems: 3 type: array items: - $ref: "#/components/schemas/CloudRouterActionsSearchExpression" - CloudRouterActionsSearchSortCriteria: + $ref: "#/components/schemas/AppDomainSimpleExpression" + AppDomainSortCriteria: type: object properties: direction: - $ref: "#/components/schemas/CloudRouterActionsSearchSortDirection" + $ref: "#/components/schemas/AppDomainSortDirection" property: - $ref: "#/components/schemas/CloudRouterActionsSearchSortBy" - CloudRouterActionsSearchSortDirection: + $ref: "#/components/schemas/AppDomainSortBy" + AppDomainSortDirection: type: string description: Sorting direction + default: DESC enum: - DESC - ASC - default: DESC - CloudRouterActionsSearchSortBy: + AppDomainSortBy: type: string - description: Possible field names to use on sorting - enum: - - /changeLog/createdDateTime - - /changeLog/updatedDateTime - - /connection/name - - /type + description: | + Possible field names to use on '400_InvalidSorting': + * `/name` - App Domain name + * `/uuid` - App Domain uuid + * `/state` - App Domain status + * `/changeLog/createdDateTime` - Date and time when change flow starts + * `/changeLog/updatedDateTime` - Date and time when change object is updated + format: string + example: /changeLog/updatedDateTime default: /changeLog/updatedDateTime - ActionId_1: + AppDomainSearchResponse: + type: object + properties: + pagination: + $ref: "#/components/schemas/Pagination" + data: + type: array + description: Data returned from the API call. + items: + $ref: "#/components/schemas/AppDomain" + AttachedAppLinkState: + type: array + description: Filter attached App Links by lifecycle state. + example: + - PROVISIONED + - PROVISIONING + items: + $ref: "#/components/schemas/AppLinkState" + AttachedAppLinkOrder: type: string - description: Action UUID - format: uuid - example: 457400f8-d360-11e9-bb65-2a2ae2dbcced - GetAllCloudRouterCommands: + description: Sort order for attached App Links. + example: DESC + default: DESC + enum: + - DESC + - ASC + Style: + type: string + description: Detail level of the response. + example: MEDIUM + default: MEDIUM + enum: + - MIN + - MEDIUM + - FULL + AppDomainAttachedAppLinks: type: object properties: pagination: $ref: "#/components/schemas/Pagination" data: type: array + description: Data returned from the API call. items: - $ref: "#/components/schemas/CloudRouterCommand" - description: List of Fabric Cloud Router Command - CloudRouterCommandPostRequest: + $ref: "#/components/schemas/AppDomainAttachedAppLink" + AppLinkPostRequest: required: + - bandwidth + - ipv4 + - name - project - - request + - router - type type: object properties: type: - $ref: "#/components/schemas/CloudRouterCommandType" + $ref: "#/components/schemas/AppLinkType" name: + maxLength: 50 + minLength: 1 type: string - description: Customer-provided Cloud Router Command name + description: Customer-provided App Link name + format: string + example: Atlassian App Link description: type: string - description: Customer-provided Cloud Router Command description + description: Customer-provided App Link description + format: string + example: Atlassian App Link in SV + router: + $ref: "#/components/schemas/AppLinkPostRequestRouter" + ipv4Address: + type: string + description: AppLink IP address + format: ipv4 + example: 192.168.10.1 + bandwidth: + type: integer + description: App Link aggregated data transfer capacity in Mbps + example: 1000 project: $ref: "#/components/schemas/Project" - request: - $ref: "#/components/schemas/CloudRouterCommandRequestPayload" - description: Execute Cloud Router Command Request - CloudRouterCommand: + description: Create App Link + AppLink: + required: + - bandwidth + - name + - project + - router + - type type: object properties: href: type: string - example: https://api.equinix.com//fabric/v4/routers/a1c6b7fd-aead-410a-96b4-b1dfa1071700/commands/1e9414f1-763e-4c0a-86c6-0bc8336048d9 + description: Resource URI + format: uri + readOnly: true + example: https://api.equinix.com/fabric/v4/appLinks/23cd19ab-d3bb-478b-9f25-bd12a3af1914 + x-order: 1 type: - $ref: "#/components/schemas/CloudRouterCommandType" + $ref: "#/components/schemas/AppLinkType" uuid: type: string + description: Equinix-assigned access point identifier format: uuid - example: 557400f8-d360-11e9-bb65-2a2ae2dbcce4 + example: 23cd19ab-d3bb-478b-9f25-bd12a3af1914 + x-order: 3 name: type: string - description: Customer-provided Cloud Router name + description: Customer-provided App Link name format: string - example: test-fg-1 + example: Atlassian App Link + x-order: 4 description: type: string - example: description + description: Customer-provided App Link description + format: string + example: Atlassian App Link in SV + x-order: 5 state: - $ref: "#/components/schemas/CloudRouterCommandState" + $ref: "#/components/schemas/AppLinkState" + router: + $ref: "#/components/schemas/AppLinkCloudRouter" + ipv4Address: + type: string + description: App Link IP address + format: ipv4 + example: 192.168.10.1 + x-order: 8 + bandwidth: + type: integer + description: App Link aggregated data transfer capacity in Mbps + example: 1000 + x-order: 9 project: $ref: "#/components/schemas/Project" - request: - $ref: "#/components/schemas/CloudRouterCommandRequestResponse" - response: - $ref: "#/components/schemas/CloudRouterCommandResponse" changeLog: $ref: "#/components/schemas/Changelog" - description: Get Fabric Cloud Router Command response object - CloudRouterCommandSearchRequest: + change: + $ref: "#/components/schemas/AppLinkChange" + description: App Link object + AppLinkId: + type: string + description: App Link UUID + format: uuid + example: 23cd19ab-d3bb-478b-9f25-bd12a3af1914 + AppLinkUpdateRequest: + maxItems: 1 + minItems: 1 + type: array + description: App Link Update Request + items: + $ref: "#/components/schemas/AppLinkChangeOperation" + AppLinkSearchRequest: type: object properties: filter: - $ref: "#/components/schemas/CloudRouterCommandSearchFilters" + $ref: "#/components/schemas/AppLinkFilters" pagination: $ref: "#/components/schemas/PaginationRequest" sort: type: array items: - $ref: "#/components/schemas/CloudRouterCommandSearchSortCriteria" + $ref: "#/components/schemas/AppLinkSortCriteria" description: Search requests containing criteria - CloudRouterCommandSearchFilters: + AppLinkFilters: type: object properties: and: maxItems: 8 type: array items: - $ref: "#/components/schemas/CloudRouterCommandSearchFilter" - CloudRouterCommandSearchFilter: + $ref: "#/components/schemas/AppLinkFilter" + AppLinkFilter: type: object anyOf: - - $ref: "#/components/schemas/CloudRouterCommandSearchExpression" - - $ref: "#/components/schemas/CloudRouterCommandSearchOrFilter" - CloudRouterCommandSearchExpression: + - $ref: "#/components/schemas/AppLinkSimpleExpression" + - $ref: "#/components/schemas/AppLinkOrFilter" + AppLinkSimpleExpression: type: object properties: property: type: string description: | Possible field names to use on filters: - * `/type` - type of command - * `/name` - name of command - * `/state` - state of command - * `/request/destination` - destination of command request - * `/request/sourceConnection/uuid` - source connection uuid - * `/*` - all-category search - example: /state + * `/project/projectId` - project id + * `/uuid` - App Link uuid + * `/name` - App Link name + * `/description` - App Link description + * `/state` - App Link status + * `/ipv4Address` - App Link ipv4 address + * `/bandwidth` - App Link bandwidth + * `/changeLog/createdDateTime` - App Link creation timestamp + * `/changeLog/updatedDateTime` - App Link last updated timestamp + * `/changeLog/deletedDateTime` - App Link deletion timestamp + example: /name operator: type: string description: | Possible operators to use on filters: - * `=` - equal - * `!=` - not equal - * `>` - greater than - * `>=` - greater than or equal to - * `<` - less than - * `<=` - less than or equal to - * `[NOT] BETWEEN` - (not) between - * `[NOT] LIKE` - (not) like - * `[NOT] IN` - (not) in - * `~*` - case-insensitive like + * `=` - equal + * `!=` - not equal + * `>` - greater than + * `<` - less than + * `IN` - in + * `NOT IN` - not in + * `LIKE` - like + * `ILIKE` - case-insensitive like + * `BETWEEN` - between + * `NOT BETWEEN` - not between example: = values: type: array items: type: string - example: PING_COMMAND - CloudRouterCommandSearchOrFilter: + example: Gateway + AppLinkOrFilter: type: object properties: or: maxItems: 3 type: array items: - $ref: "#/components/schemas/CloudRouterCommandSearchExpression" - CloudRouterCommandSearchSortCriteria: + $ref: "#/components/schemas/AppLinkSimpleExpression" + AppLinkSortCriteria: type: object properties: direction: - $ref: "#/components/schemas/CloudRouterCommandSearchSortDirection" + $ref: "#/components/schemas/AppLinkSortDirection" property: - $ref: "#/components/schemas/CloudRouterCommandSearchSortBy" - CloudRouterCommandSearchSortDirection: + $ref: "#/components/schemas/AppLinkSortBy" + AppLinkSortDirection: type: string description: Sorting direction + default: DESC enum: - DESC - ASC - default: DESC - CloudRouterCommandSearchSortBy: + AppLinkSortBy: type: string - description: Possible field names to use on sorting - enum: - - /changeLog/createdDateTime - - /changeLog/updatedDateTime - - /name - - /type + description: | + Possible field names to use on '400_InvalidSorting': + * `/name` - App Link name + * `/uuid` - App Link uuid + * `/state` - App Link status + * `/changeLog/createdDateTime` - Date and time when change flow starts + * `/changeLog/updatedDateTime` - Date and time when change object is updated + format: string + example: /changeLog/updatedDateTime default: /changeLog/updatedDateTime - CloudRouterCommandSearchResponse: + AppLinkSearchResponse: type: object properties: pagination: @@ -19590,106 +28309,120 @@ components: type: array description: Data returned from the API call. items: - $ref: "#/components/schemas/CloudRouterCommand" - CommandId: - type: string - description: Command UUID - format: uuid - example: 37c10edc-ba2e-4240-a850-8a48f9c47d00 - RouteTableEntrySearchRequest: + $ref: "#/components/schemas/AppLink" + AppLinkAppDomainAttachment: + required: + - uuid + type: object + properties: + href: + type: string + description: Resource URI + format: uri + readOnly: true + example: https://api.equinix.com/fabric/v4/appLinks/23cd19ab-d3bb-478b-9f25-bd12a3af1914/appDomains/20f3ef8e-d670-4236-86fa-bb0038adcfc3 + x-order: 1 + type: + $ref: "#/components/schemas/AppDomainType" + uuid: + type: string + description: Equinix-assigned access point identifier + format: uuid + example: 20f3ef8e-d670-4236-86fa-bb0038adcfc3 + x-order: 3 + name: + type: string + description: Customer-provided App Domain name + example: atlassian.net + x-order: 4 + attachmentStatus: + $ref: "#/components/schemas/AppLinkAttachState" + changeLog: + $ref: "#/components/schemas/Changelog" + description: App Link Attached App Domain object + AppLinkAttachDomainSearchRequest: type: object properties: filter: - $ref: "#/components/schemas/RouteTableEntryFilters" + $ref: "#/components/schemas/AppLinkAttachDomainFilters" pagination: $ref: "#/components/schemas/PaginationRequest" sort: type: array items: - $ref: "#/components/schemas/RouteTableEntrySortCriteria" + $ref: "#/components/schemas/AppLinkAttachDomainSortCriteria" description: Search requests containing criteria - RouteTableEntryFilters: + AppLinkAttachDomainFilters: type: object properties: and: maxItems: 8 type: array items: - $ref: "#/components/schemas/RouteTableEntryFilter" - RouteTableEntryFilter: + $ref: "#/components/schemas/AppLinkAttachDomainFilter" + AppLinkAttachDomainFilter: type: object anyOf: - - $ref: "#/components/schemas/RouteTableEntrySimpleExpression" - - $ref: "#/components/schemas/RouteTableEntryOrFilter" - RouteTableEntrySimpleExpression: + - $ref: "#/components/schemas/AppLinkAttachDomainSimpleExpression" + - $ref: "#/components/schemas/AppLinkAttachDomainOrFilter" + AppLinkAttachDomainSimpleExpression: type: object properties: property: type: string description: | Possible field names to use on filters: - * `/type` - Route table entry type - * `/prefix` - Route table entry prefix - * `/nextHop` - Route table entry nextHop - * `/state` - Route table entry state - * `/MED` - Route table entry med - * `/*` - all-category search - example: /type + * `/uuid` - App Domain attach to App Link uuid + * `/attachmentStatus` - App Domain attach to App Link status + example: /attachmentStatus operator: type: string description: | Possible operators to use on filters: - * `=` - equal - * `!=` - not equal - * `>` - greater than - * `>=` - greater than or equal to - * `<` - less than - * `<=` - less than or equal to - * `[NOT] BETWEEN` - (not) between - * `[NOT] LIKE` - (not) like - * `[NOT] IN` - (not) in - * `~*` - case-insensitive like + * `=` - equal + * `!=` - not equal + * `IN` - in + * `NOT IN` - not in example: = values: type: array items: type: string - example: IPv4_BGP_ROUTE - RouteTableEntryOrFilter: + example: Gateway + AppLinkAttachDomainOrFilter: type: object properties: or: maxItems: 3 type: array items: - $ref: "#/components/schemas/RouteTableEntrySimpleExpression" - RouteTableEntrySortCriteria: + $ref: "#/components/schemas/AppLinkAttachDomainSimpleExpression" + AppLinkAttachDomainSortCriteria: type: object properties: direction: - $ref: "#/components/schemas/RouteTableEntrySortDirection" + $ref: "#/components/schemas/AppLinkAttachDomainSortDirection" property: - $ref: "#/components/schemas/RouteTableEntrySortBy" - RouteTableEntrySortDirection: + $ref: "#/components/schemas/AppLinkAttachDomainSortBy" + AppLinkAttachDomainSortDirection: type: string description: Sorting direction + default: DESC enum: - DESC - ASC - default: DESC - RouteTableEntrySortBy: + AppLinkAttachDomainSortBy: type: string - description: Possible field names to use on sorting - enum: - - /changeLog/createdDateTime - - /changeLog/updatedDateTime - - /prefix - - /nextHop - - /connection/name - - /type - - /MED + description: | + Possible field names to use on '400_InvalidSorting': + * `/uuid` - App Domain attach to App Link uuid + * `/attachmentStatus` - App Domain attach to App Link status + * `/changeLog/createdDateTime` - Date and time when change flow starts + * `/changeLog/updatedDateTime` - Date and time when change object is updated + format: string + example: /changeLog/updatedDateTime default: /changeLog/updatedDateTime - RouteTableEntrySearchResponse: + AppLinkAttachDomainSearchResponse: type: object properties: pagination: @@ -19698,357 +28431,184 @@ components: type: array description: Data returned from the API call. items: - $ref: "#/components/schemas/RouteTableEntry" - ValidateRequest: - type: object - properties: - filter: - $ref: "#/components/schemas/ValidateRequest_filter" - description: Validate connection auth api key or vlan - ValidateSubnetResponse: - type: object - properties: - additionalInfo: - type: array - description: Additional information - items: - $ref: "#/components/schemas/ConnectionSideAdditionalInfo" - description: ValidateResponse - GatewayAttachmentListResponse: - required: - - data - - pagination + $ref: "#/components/schemas/AppLinkAppDomainAttachment" + AttachedAppDomainAttachmentStatus: + type: array + description: Filter attached App Domains by attachment lifecycle state. + example: + - ATTACHED + - ATTACHING + items: + $ref: "#/components/schemas/AppLinkAttachState" + AttachedAppDomainOrder: + type: string + description: Sort order for attached App Domains. + example: DESC + default: DESC + enum: + - DESC + - ASC + AppLinkAttachedAppDomains: type: object properties: pagination: $ref: "#/components/schemas/Pagination" data: type: array + description: Data returned from the API call. items: - $ref: "#/components/schemas/GatewayAttachmentResponse" - GatewayId: + $ref: "#/components/schemas/AppLinkAttachedAppDomain" + AppServiceId: type: string - description: Gateway UUID + description: App Service UUID format: uuid - example: 6658cc3b-18e0-437c-b972-62b51a419a1e - GatewayAttachmentResponse: + example: 557400f8-d360-11e9-bb65-2a2ae2dbcce4 + AppLinkAppServiceAttachment: + required: + - destinationIp + - geoScope + - uuid type: object properties: href: type: string + description: Resource URI format: uri + readOnly: true + example: https://api.equinix.com/fabric/v4/appLinks/23cd19ab-d3bb-478b-9f25-bd12a3af1914/appServices/5008a109-9d1c-485c-b0ba-de9736f283c2 + x-order: 1 type: - type: string - enum: - - VPN_GATEWAY + $ref: "#/components/schemas/AppServiceType" uuid: type: string + description: Equinix-assigned access point identifier format: uuid - attachmentStatus: + example: 5008a109-9d1c-485c-b0ba-de9736f283c2 + x-order: 3 + geoScope: type: string - enum: - - ATTACHING - - ATTACHED - - DETACHING - - DETACHED - - FAILED - errors: - type: array - items: - $ref: "#/components/schemas/Error" + description: Geo scope for the App Service + example: GLOBAL + x-order: 4 + destinationIp: + type: string + description: Target IP for forwarding API requests + format: ipv4 + example: 10.10.1.110 + x-order: 5 + attachmentStatus: + $ref: "#/components/schemas/AppLinkAttachState" changeLog: $ref: "#/components/schemas/Changelog" - description: Schema representing a Gateway attaching or detaching on a Cloud Router. This schema defines the structure of the response returned when a Gateway is attached or detached to a Cloud Router. - CloudRouterRouteFiltersSearchBase: - type: object - properties: - filter: - $ref: "#/components/schemas/CloudRouterRouteFiltersFilter" - pagination: - $ref: "#/components/schemas/Pagination" - sort: - maxItems: 3 - minItems: 1 - type: array - items: - $ref: "#/components/schemas/RfAttachmentSortItem" - CloudRouterRouteFiltersFilter: - description: Top-level filter that can be either an AND expression or OR expression - anyOf: - - $ref: "#/components/schemas/CloudRouterRouteFilterAndExpression" - - $ref: "#/components/schemas/CloudRouterRouteFilterOrExpression" - CloudRouterRouteFilterAndExpression: - type: object - properties: - and: - maxItems: 8 - minItems: 1 - type: array - items: - $ref: "#/components/schemas/CloudRouterRouteFilterExpression" - description: AND expression containing multiple filter expressions - CloudRouterRouteFilterExpression: - description: Filter expression that can be AND, OR, or a simple expression - anyOf: - - $ref: "#/components/schemas/CloudRouterRouteFilterAndExpression" - - $ref: "#/components/schemas/CloudRouterRouteFilterOrExpression" - - $ref: "#/components/schemas/CloudRouterRouteFilterSimpleExpression" - CloudRouterRouteFilterOrExpression: - type: object - properties: - or: - maxItems: 8 - minItems: 1 - type: array - items: - $ref: "#/components/schemas/CloudRouterRouteFilterExpression" - description: OR expression containing multiple filter expressions - CloudRouterRouteFilterSimpleExpression: - type: object - properties: - property: - type: string - enum: - - /type - - /direction - - /attachmentStatus - - /changeLog/createdDateTime - - /changeLog/updatedDateTime - operator: - type: string - values: - maxItems: 8 - minItems: 1 - type: array - items: - type: string - RfAttachmentSortItem: - type: object - properties: - property: - type: string - description: Possible field names to use on sorting - enum: - - /type - - /uuid - - /direction - - /attachmentStatus - - /changeLog/createdDateTime - - /changeLog/updatedDateTime - default: /changeLog/updatedDateTime - direction: - type: string - description: Sorting direction - enum: - - DESC - - ASC - default: DESC - CloudRouterRouteFiltersSearchResponse: - type: object - properties: - pagination: - $ref: "#/components/schemas/Pagination" - data: - type: array - description: List of route filter attachments for a given cloud router - items: - $ref: "#/components/schemas/ConnectionRouteFilterData" - CloudRouterRouteAggregationsSearchBase: - type: object - properties: - filter: - $ref: "#/components/schemas/CloudRouterRouteAggregationsFilter" - pagination: - $ref: "#/components/schemas/Pagination" - sort: - maxItems: 3 - minItems: 1 - type: array - items: - $ref: "#/components/schemas/RaAttachmentSortItem" - CloudRouterRouteAggregationsFilter: - description: Top-level filter that can be either an AND expression or OR expression - anyOf: - - $ref: "#/components/schemas/CloudRouterRouteAggregationAndExpression" - - $ref: "#/components/schemas/CloudRouterRouteAggregationOrExpression" - CloudRouterRouteAggregationAndExpression: - type: object - properties: - and: - maxItems: 8 - minItems: 1 - type: array - items: - $ref: "#/components/schemas/CloudRouterRouteAggregationExpression" - description: AND expression containing multiple filter expressions - CloudRouterRouteAggregationExpression: - description: Filter expression that can be AND, OR, or a simple expression - anyOf: - - $ref: "#/components/schemas/CloudRouterRouteAggregationAndExpression" - - $ref: "#/components/schemas/CloudRouterRouteAggregationOrExpression" - - $ref: "#/components/schemas/CloudRouterRouteAggregationSimpleExpression" - CloudRouterRouteAggregationOrExpression: - type: object - properties: - or: - maxItems: 8 - minItems: 1 - type: array - items: - $ref: "#/components/schemas/CloudRouterRouteAggregationExpression" - description: OR expression containing multiple filter expressions - CloudRouterRouteAggregationSimpleExpression: - type: object - properties: - property: - type: string - enum: - - /type - - /attachmentStatus - - /changeLog/createdDateTime - - /changeLog/updatedDateTime - operator: - type: string - values: - type: array - items: - type: string - RaAttachmentSortItem: - type: object - properties: - property: - type: string - description: Possible field names to use on sorting - enum: - - /type - - /uuid - - /attachmentStatus - - /changeLog/createdDateTime - - /changeLog/updatedDateTime - default: /changeLog/updatedDateTime - direction: - type: string - description: Sorting direction - enum: - - DESC - - ASC - default: DESC - CloudRouterRouteAggregationsSearchResponse: + change: + $ref: "#/components/schemas/AppLinkAppServiceAttachmentChange" + description: App Link Attached App Service object + AppLinkAttachServiceRequest: + required: + - destinationIp + - geoScope type: object properties: - pagination: - $ref: "#/components/schemas/Pagination" - data: - type: array - description: List of route aggregation attachments for a given cloud router - items: - $ref: "#/components/schemas/ConnectionRouteAggregationData" - CloudRouterSearchRequest: + geoScope: + type: string + description: Geo scope for the App Service + example: GLOBAL + destinationIp: + type: string + description: Target IP for forwarding API requests + format: ipv4 + example: 10.10.1.110 + description: Attach App Service to App Link + AppLinkAttachServiceUpdateRequest: + maxItems: 1 + minItems: 1 + type: array + description: App Service attachment Update Request + items: + $ref: "#/components/schemas/AppLinkAppServiceAttachmentChangeOperation" + AppLinkAttachServiceSearchRequest: type: object properties: filter: - $ref: "#/components/schemas/CloudRouterFilters" + $ref: "#/components/schemas/AppLinkAttachServiceFilters" pagination: $ref: "#/components/schemas/PaginationRequest" sort: type: array items: - $ref: "#/components/schemas/CloudRouterSortCriteria" + $ref: "#/components/schemas/AppLinkAttachServiceSortCriteria" description: Search requests containing criteria - CloudRouterFilters: + AppLinkAttachServiceFilters: type: object properties: and: maxItems: 8 type: array items: - $ref: "#/components/schemas/CloudRouterFilter" - CloudRouterFilter: + $ref: "#/components/schemas/AppLinkAttachServiceFilter" + AppLinkAttachServiceFilter: type: object anyOf: - - $ref: "#/components/schemas/CloudRouterSimpleExpression" - - $ref: "#/components/schemas/CloudRouterOrFilter" - CloudRouterSimpleExpression: + - $ref: "#/components/schemas/AppLinkAttachServiceSimpleExpression" + - $ref: "#/components/schemas/AppLinkAttachServiceOrFilter" + AppLinkAttachServiceSimpleExpression: type: object properties: property: type: string description: | Possible field names to use on filters: - * `/project/projectId` - project id (mandatory) - * `/name` - Fabric Cloud Router name - * `/uuid` - Fabric Cloud Router uuid - * `/state` - Fabric Cloud Router status - * `/location/metroCode` - Fabric Cloud Router metro code - * `/location/metroName` - Fabric Cloud Router metro name - * `/package/code` - Fabric Cloud Router package - * `/type` - Fabric Cloud Router type - * `/connectionsCount` - Fabric Cloud Router attached connections count - * `/changeLog/createdDateTime` - Fabric Cloud Router creation timestamp - * `/changeLog/updatedDateTime` - Fabric Cloud Router last updated timestamp - * `/changeLog/deletedDateTime` - Fabric Cloud Router deletion timestamp - * `/*` - all-category search - example: /name + * `/uuid` - App Service attach to App Link uuid + * `/attachmentStatus` - App Service attach to App Link status + example: /attachmentStatus operator: type: string description: | Possible operators to use on filters: - * `=` - equal - * `!=` - not equal - * `>` - greater than - * `>=` - greater than or equal to - * `<` - less than - * `<=` - less than or equal to - * `[NOT] BETWEEN` - (not) between - * `[NOT] LIKE` - (not) like - * `[NOT] IN` - (not) in - * `ILIKE` - case-insensitive like + * `=` - equal + * `!=` - not equal + * `IN` - in + * `NOT IN` - not in example: = values: type: array items: type: string - example: FabricCloudRouter-1 - CloudRouterOrFilter: + example: Gateway + AppLinkAttachServiceOrFilter: type: object properties: or: maxItems: 3 type: array items: - $ref: "#/components/schemas/CloudRouterSimpleExpression" - CloudRouterSortCriteria: + $ref: "#/components/schemas/AppLinkAttachServiceSimpleExpression" + AppLinkAttachServiceSortCriteria: type: object properties: direction: - $ref: "#/components/schemas/CloudRouterSortDirection" + $ref: "#/components/schemas/AppLinkAttachServiceSortDirection" property: - $ref: "#/components/schemas/CloudRouterSortBy" - CloudRouterSortDirection: + $ref: "#/components/schemas/AppLinkAttachServiceSortBy" + AppLinkAttachServiceSortDirection: type: string description: Sorting direction + default: DESC enum: - DESC - ASC - default: DESC - CloudRouterSortBy: + AppLinkAttachServiceSortBy: type: string - description: Possible field names to use on sorting - enum: - - /name - - /uuid - - /state - - /location/metroCode - - /location/metroName - - /package/code - - /type - - /connectionsCount - - /changeLog/createdDateTime - - /changeLog/updatedDateTime - - /changeLog/deletedDateTime - - /order/termLength + description: | + Possible field names to use on '400_InvalidSorting': + * `/uuid` - App Service attach to App Link uuid + * `/attachmentStatus` - App Service attach to App Link status + * `/changeLog/createdDateTime` - Date and time when change flow starts + * `/changeLog/updatedDateTime` - Date and time when change object is updated + format: string + example: /changeLog/updatedDateTime default: /changeLog/updatedDateTime - SearchResponse: + AppLinkAttachServiceSearchResponse: type: object properties: pagination: @@ -20057,8 +28617,24 @@ components: type: array description: Data returned from the API call. items: - $ref: "#/components/schemas/CloudRouter" - PackageResponse: + $ref: "#/components/schemas/AppLinkAppServiceAttachment" + AttachedAppServiceAttachmentStatus: + type: array + description: Filter attached App Services by attachment lifecycle state. + example: + - ATTACHED + - ATTACHING + items: + $ref: "#/components/schemas/AppLinkAttachState" + AttachedAppServiceOrder: + type: string + description: Sort order for attached App Services. + example: DESC + default: DESC + enum: + - DESC + - ASC + AppLinkAttachedAppServices: type: object properties: pagination: @@ -20067,604 +28643,506 @@ components: type: array description: Data returned from the API call. items: - $ref: "#/components/schemas/CloudRouterPackage" - RouterPackageCode: - type: string - description: Router package code - enum: - - LAB - - BASIC - - STANDARD - - ADVANCED - - PREMIUM - CloudRouterPackage: + $ref: "#/components/schemas/AppLinkAttachedAppService" + AppServicePostRequest: + required: + - endpoint + - name + - project + - type type: object properties: - href: - type: string - description: Cloud Router package URI - format: uri - readOnly: true - example: https://api.equinix.com/fabric/v4/routerPackages/LAB type: + $ref: "#/components/schemas/AppServiceType" + name: + maxLength: 50 + minLength: 1 type: string - description: Type of Router package - example: ROUTER_PACKAGE - enum: - - ROUTER_PACKAGE - code: - $ref: "#/components/schemas/code" + description: Customer-provided App Service name + format: string + example: Atlassian App Service description: type: string - description: Fabric Cloud Router Package description - totalIPv4RoutesMax: - minimum: 0 - type: integer - description: Cloud Router package BGP IPv4 routes limit - example: 50 - totalIPv6RoutesMax: - minimum: 0 - type: integer - description: Cloud Router package BGP IPv6 routes limit - example: 50 - routeFilterSupported: - type: boolean - description: CloudRouter package route filter support - vcCountMax: - minimum: 0 - type: integer - description: CloudRouter package Max Connection limit - example: 10 - crCountMax: - minimum: 0 - type: integer - description: CloudRouter package Max CloudRouter limit - example: 3 - vcBandwidthMax: - minimum: 0 - type: integer - description: CloudRouter package Max Bandwidth limit - example: 50 - changeLog: - $ref: "#/components/schemas/PackageChangeLog" - description: Fabric Cloud Router Package - HealthResponse: - type: object - properties: - href: - type: string - description: The Canonical URL at which the resource resides. - version: - type: string - description: Indicator of a version - release: - type: string - description: release details. - state: + description: Customer-provided App Service description + format: string + example: Atlassian App Service in SV + endpoint: type: string - description: status of a service - apiServices: - $ref: "#/components/schemas/ApiServices" - description: GET Services Health - ConnectionResponse: - type: object - properties: - additionalInfo: - type: array - description: Additional information - items: - $ref: "#/components/schemas/ConnectionSideAdditionalInfo" - data: + description: Accessible endpoint through this service + example: equinixjira.atlassian.net + sourceDomains: type: array - description: Connection response data + description: List of source domains from where traffic is allowed items: - $ref: "#/components/schemas/ValidateConnectionResponse" - description: ValidateResponse - Pagination: - required: - - limit - - total - type: object - properties: - offset: - minimum: 0 - type: integer - description: Index of the first item returned in the response. The default is 0. - default: 0 - limit: - minimum: 0 - type: integer - description: Maximum number of search results returned per page. Number must be between 1 and 100, and the default is 20. - default: 20 - total: - minimum: 0 - type: integer - description: Total number of elements returned. - next: - type: string - description: URL relative to the next item in the response. - previous: - type: string - description: URL relative to the previous item in the response. - description: Pagination response information - NetworkPostRequest: + type: string + example: equinix.com + project: + $ref: "#/components/schemas/Project" + description: Create App Service + AppService: required: - name - - notifications - - scope - type type: object properties: + href: + type: string + description: Resource URI + format: uri + readOnly: true + example: https://api.equinix.com/fabric/v4/appServices/5008a109-9d1c-485c-b0ba-de9736f283c2 + x-order: 1 type: - $ref: "#/components/schemas/NetworkType" + $ref: "#/components/schemas/AppServiceType" + uuid: + type: string + description: Equinix-assigned access point identifier + format: uuid + example: 5008a109-9d1c-485c-b0ba-de9736f283c2 + x-order: 3 name: type: string - description: Customer-provided network name - scope: - $ref: "#/components/schemas/NetworkScope" - location: - $ref: "#/components/schemas/SimplifiedLocation" - project: - $ref: "#/components/schemas/Project" - notifications: + description: Customer-provided App Service name + format: string + example: Atlassian App Service + x-order: 4 + description: + type: string + description: Customer-provided App Service description + format: string + example: Atlassian App Service in SV + x-order: 5 + state: + $ref: "#/components/schemas/AppServiceState" + endpoint: + type: string + description: Accessible endpoint through this service + example: equinixjira.atlassian.net + x-order: 7 + sourceDomains: type: array - description: Preferences for notifications on network configuration or status changes + description: List of source domains from where traffic is allowed items: - $ref: "#/components/schemas/SimplifiedNotification" - description: Create Network - Network: - type: object - description: Network specification - allOf: - - required: - - changeLog - - href - - state - - uuid - type: object - properties: - href: - type: string - description: Network URI - format: uri - readOnly: true - example: https://api.equinix.com/fabric/v4/networks/92dc376a-a932-43aa-a6a2-c806dedbd784 - uuid: - type: string - description: Equinix-assigned network identifier - format: uuid - example: 92dc376a-a932-43aa-a6a2-c806dedbd784 - state: - $ref: "#/components/schemas/NetworkState" - connectionsCount: - type: number - description: number of connections created on the network - account: - $ref: "#/components/schemas/SimplifiedAccount" - change: - $ref: "#/components/schemas/SimplifiedNetworkChange" - operation: - $ref: "#/components/schemas/NetworkOperation" - changeLog: - $ref: "#/components/schemas/Changelog" - links: - type: array - description: Network sub-resources links - readOnly: true - items: - $ref: "#/components/schemas/Link" - - $ref: "#/components/schemas/NetworkPostRequest" - NetworkId: - type: string - description: Network UUID - format: uuid - example: 557400f8-d360-11e9-bb65-2a2ae2dbcce4 - NetworkUpdateRequest: + type: string + example: equinix.com + x-order: 8 + account: + $ref: "#/components/schemas/SimplifiedAccount" + project: + $ref: "#/components/schemas/Project" + changeLog: + $ref: "#/components/schemas/Changelog" + change: + $ref: "#/components/schemas/AppServiceChange" + description: App Service object + AppServiceUpdateRequest: + maxItems: 1 minItems: 1 type: array - description: Fabric Network Update Request + description: App Service Update Request items: - $ref: "#/components/schemas/NetworkChangeOperation" - NetworkSearchRequest: + $ref: "#/components/schemas/AppServiceChangeOperation" + AppServiceSearchRequest: type: object properties: filter: - $ref: "#/components/schemas/NetworkFilter" + $ref: "#/components/schemas/AppServiceFilters" pagination: $ref: "#/components/schemas/PaginationRequest" sort: type: array items: - $ref: "#/components/schemas/NetworkSortCriteria" + $ref: "#/components/schemas/AppServiceSortCriteria" description: Search requests containing criteria - NetworkFilter: + AppServiceFilters: type: object properties: and: - $ref: "#/components/schemas/NetworkSimpleExpression" - or: - $ref: "#/components/schemas/NetworkSimpleExpression" + maxItems: 8 + type: array + items: + $ref: "#/components/schemas/AppServiceFilter" + AppServiceFilter: + type: object + anyOf: + - $ref: "#/components/schemas/AppServiceSimpleExpression" + - $ref: "#/components/schemas/AppServiceOrFilter" + AppServiceSimpleExpression: + type: object + properties: property: - $ref: "#/components/schemas/NetworkSearchFieldName" + type: string + description: | + Possible field names to use on filters: + * `/project/projectId` - project id + * `/uuid` - App Service uuid + * `/name` - App Service name + * `/description` - App Service description + * `/state` - App Service status + * `/endpoint` - App Service endpoint + * `/sourceDomains` - App Service source domains + * `/changeLog/createdDateTime` - App Service creation timestamp + * `/changeLog/updatedDateTime` - App Service last updated timestamp + * `/changeLog/deletedDateTime` - App Service deletion timestamp + example: /name operator: type: string + description: | + Possible operators to use on filters: + * `=` - equal + * `!=` - not equal + * `>` - greater than + * `<` - less than + * `IN` - in + * `NOT IN` - not in + * `LIKE` - like + * `ILIKE` - case-insensitive like + * `BETWEEN` - between + * `NOT BETWEEN` - not between example: = - enum: - - = - - "!=" - - ">" - - ">=" - - < - - <= - - BETWEEN - - NOT BETWEEN - - LIKE - - NOT LIKE - - ILIKE - - NOT ILIKE - - IN - - NOT IN values: type: array items: type: string - example: Network-1 - NetworkSimpleExpression: - type: array - items: - $ref: "#/components/schemas/NetworkFilter" - NetworkSearchFieldName: - type: string - description: Possible field names to use on filters - example: /name - enum: - - /name - - /uuid - - /scope - - /type - - /state - - /operation/equinixStatus - - /location/region - - /location/metroCode - - /connectionsCount - - /project/projectId - - /account/globalCustId - - /account/orgId - - /changeLog/createdDateTime - - /changeLog/updatedDateTime - - /changeLog/deletedDateTime - - /* - NetworkSortCriteria: + example: Gateway + AppServiceOrFilter: + type: object + properties: + or: + maxItems: 3 + type: array + items: + $ref: "#/components/schemas/AppServiceSimpleExpression" + AppServiceSortCriteria: type: object properties: direction: - $ref: "#/components/schemas/NetworkSortDirection" + $ref: "#/components/schemas/AppServiceSortDirection" property: - $ref: "#/components/schemas/NetworkSortBy" - NetworkSortDirection: + $ref: "#/components/schemas/AppServiceSortBy" + AppServiceSortDirection: type: string description: Sorting direction + default: DESC enum: - DESC - ASC - default: DESC - NetworkSortBy: + AppServiceSortBy: type: string - description: Possible field names to use on sorting - enum: - - /name - - /uuid - - /scope - - /operation/equinixStatus - - /location/region - - /changeLog/createdDateTime - - /changeLog/updatedDateTime + description: | + Possible field names to use on '400_InvalidSorting': + * `/name` - App Service name + * `/uuid` - App Service uuid + * `/state` - App Service status + * `/changeLog/createdDateTime` - Date and time when change flow starts + * `/changeLog/updatedDateTime` - Date and time when change object is updated + format: string + example: /changeLog/updatedDateTime default: /changeLog/updatedDateTime - NetworkSearchResponse: + AppServiceSearchResponse: type: object properties: pagination: $ref: "#/components/schemas/Pagination" - sort: - type: array - items: - $ref: "#/components/schemas/NetworkSortCriteriaResponse" data: type: array + description: Data returned from the API call. items: - $ref: "#/components/schemas/Network" - description: List of networks - NetworkConnections: + $ref: "#/components/schemas/AppService" + AttachedAppLinkState_1: + type: array + description: Filter attached App Links by lifecycle state. + example: + - PROVISIONED + - PROVISIONING + items: + $ref: "#/components/schemas/AppLinkState" + AppServiceAttachedAppLinks: type: object properties: pagination: $ref: "#/components/schemas/Pagination" data: type: array + description: Data returned from the API call. items: - $ref: "#/components/schemas/Connection" - description: List of network changes - NetworkChangeResponse: + $ref: "#/components/schemas/AppServiceAttachedAppLink" + AttachedAppSubscriptionState: + type: array + description: Filter attached App Subscriptions by lifecycle state. + example: + - PROVISIONED + - PROVISIONING + items: + $ref: "#/components/schemas/AppSubscriptionState" + AttachedAppSubscriptionOrder: + type: string + description: Sort order for attached App Subscriptions. + example: DESC + default: DESC + enum: + - DESC + - ASC + AppServiceAttachedAppSubscriptions: type: object properties: pagination: $ref: "#/components/schemas/Pagination" data: type: array + description: Data returned from the API call. items: - $ref: "#/components/schemas/NetworkChange" - description: List of network changes - ChangeId_5: - type: string - description: Network Change UUID - format: uuid - example: 6d500177-9404-41f2-99e8-2bf1a84d8db5 - NetworkChange: + $ref: "#/components/schemas/AppServiceAttachedAppSubscription" + AppServiceAttachedAppSubscriptionSearchRequest: type: object properties: - href: - type: string - description: Network URI - format: uri - readOnly: true - example: https://api.equinix.com/fabric/v4/networks/2a4fb415-5a7f-436f-bae6-02f5e403deec/changes/4b17da68-3d6b-436d-9c8f-2105f3b950d9 - uuid: - type: string - description: Uniquely identifies a change - format: uuid - example: 4b17da68-3d6b-436d-9c8f-2105f3b950d9 - type: - $ref: "#/components/schemas/NetworkChangeType" - status: - $ref: "#/components/schemas/NetworkChangeStatus" - createdDateTime: - type: string - description: Set when change flow starts - format: date-time - example: 2020-11-06T07:00:00Z - updatedDateTime: - type: string - description: Set when change object is updated - format: date-time - example: 2020-11-06T07:00:00Z - data: + filter: + $ref: "#/components/schemas/AppServiceAttachedAppSubscriptionFilters" + pagination: + $ref: "#/components/schemas/PaginationRequest" + sort: type: array items: - $ref: "#/components/schemas/NetworkChangeOperation" - description: Current state of latest network change - precisionTimeServiceRequest: - title: precisionTimeServiceRequest - required: - - connections - - ipv4 - - name - - package - - type + $ref: "#/components/schemas/AppServiceAttachedAppSubscriptionSortCriteria" + description: Search requests containing criteria + AppServiceAttachedAppSubscriptionFilters: type: object properties: - type: + and: + maxItems: 8 + type: array + items: + $ref: "#/components/schemas/AppServiceAttachedAppSubscriptionFilter" + AppServiceAttachedAppSubscriptionFilter: + type: object + anyOf: + - $ref: "#/components/schemas/AppServiceAttachedAppSubscriptionSimpleExpression" + - $ref: "#/components/schemas/AppServiceAttachedAppSubscriptionOrFilter" + AppServiceAttachedAppSubscriptionSimpleExpression: + type: object + properties: + property: type: string - description: Precision Time Service Type refers to the corresponding Protocol. - enum: - - NTP - - PTP - name: + description: | + Possible field names to use on filters: + * `/uuid` - App Subscription UUID + * `/state` - App Subscription lifecycle state + example: /state + operator: type: string - description: Precision Time Service name. - package: - $ref: "#/components/schemas/precisionTimePackageRequest" - connections: + description: | + Possible operators to use on filters: + * `=` - equal + * `!=` - not equal + * `IN` - in + * `NOT IN` - not in + example: IN + values: + type: array + items: + type: string + example: PROVISIONED + AppServiceAttachedAppSubscriptionOrFilter: + type: object + properties: + or: + maxItems: 3 + type: array + items: + $ref: "#/components/schemas/AppServiceAttachedAppSubscriptionSimpleExpression" + AppServiceAttachedAppSubscriptionSortCriteria: + type: object + properties: + direction: + $ref: "#/components/schemas/AppServiceAttachedAppSubscriptionSortDirection" + property: + $ref: "#/components/schemas/AppServiceAttachedAppSubscriptionSortBy" + AppServiceAttachedAppSubscriptionSortDirection: + type: string + description: Sorting direction + default: DESC + enum: + - DESC + - ASC + AppServiceAttachedAppSubscriptionSortBy: + type: string + description: | + Possible field names to use on '400_InvalidSorting': + * `/uuid` - App Subscription UUID + * `/state` - App Subscription lifecycle state + format: string + example: /uuid + default: /uuid + AppServiceAttachedAppSubscriptionSearchResponse: + type: object + properties: + pagination: + $ref: "#/components/schemas/Pagination" + data: type: array + description: Data returned from the API call. items: - $ref: "#/components/schemas/virtualConnectionUuid" - ipv4: - $ref: "#/components/schemas/ipv4" - ntpAdvancedConfiguration: - $ref: "#/components/schemas/ntpAdvanceConfiguration" - ptpAdvancedConfiguration: - $ref: "#/components/schemas/ptpAdvanceConfiguration" + $ref: "#/components/schemas/AppServiceAttachedAppSubscription" + AppSubscriptionPostRequest: + required: + - project + - type + type: object + properties: + type: + $ref: "#/components/schemas/AppSubscriptionType" + source: + $ref: "#/components/schemas/AppSubscriptionSourceRequest" + target: + $ref: "#/components/schemas/AppSubscriptionTargetRequest" project: $ref: "#/components/schemas/Project" - order: - $ref: "#/components/schemas/precisionTimeOrder" - description: Create Precision Time Service Request Schema. - precisionTimeServiceResponse: - title: precisionTimeServiceResponse + description: Create App Subscription + AppSubscription: required: - - href - - package - - state + - project + - source + - target - type - - uuid type: object properties: href: type: string - description: Precision Time Service URI. + description: Resource URI format: uri + readOnly: true + example: https://api.equinix.com/fabric/v4/appSubscriptions/20f3ef8e-d670-4236-86fa-bb0038adcfc3 + x-order: 1 type: - type: string - description: Precision Time Service type refers to the corresponding protocol. - enum: - - NTP - - PTP - name: - type: string - description: Precision Time Service Name. + $ref: "#/components/schemas/AppSubscriptionType" uuid: type: string - description: Precision Time Service UUID. + description: Equinix-assigned access point identifier format: uuid + example: 20f3ef8e-d670-4236-86fa-bb0038adcfc3 + x-order: 3 + source: + $ref: "#/components/schemas/AppSubscriptionSource" + target: + $ref: "#/components/schemas/AppSubscriptionTarget" state: - type: string - description: Precision Time Service Status. - enum: - - CANCELLED - - CANCELLING - - CONFIGURING - - CONFIGURING_FAILED - - DRAFT - - DEPROVISIONING - - DEPROVISIONING_FAILED - - DEPROVISIONED - - PROVISIONED - - PROVISIONING - - PROVISIONING_FAILED - - REPROVISIONING - - REPROVISIONING_FAILED - operation: - $ref: "#/components/schemas/timeServiceOperation" - package: - $ref: "#/components/schemas/precisionTimePackagePostResponse" - connections: - maxItems: 2 - minItems: 1 - uniqueItems: true - type: array - description: Fabric Connections associated with Precision Time Service. - items: - $ref: "#/components/schemas/virtualConnectionTimeServiceResponse" - ipv4: - $ref: "#/components/schemas/ipv4" - ntpAdvancedConfiguration: - $ref: "#/components/schemas/ntpAdvanceConfiguration" - ptpAdvancedConfiguration: - $ref: "#/components/schemas/ptpAdvanceConfiguration" + $ref: "#/components/schemas/AppSubscriptionState" project: $ref: "#/components/schemas/Project" - account: - $ref: "#/components/schemas/SimplifiedAccount" - order: - $ref: "#/components/schemas/precisionTimeOrder" - pricing: - $ref: "#/components/schemas/precisionTimePrice" changeLog: $ref: "#/components/schemas/Changelog" - description: Precision Time Service Response Schema. - ServiceId: + change: + $ref: "#/components/schemas/AppSubscriptionChange" + description: App Subscription object + AppSubscriptionId: type: string - description: Precision Time Service UUID + description: App Subscription UUID format: uuid - example: 557400f8-d360-11e9-bb65-2a2ae2dbcce4 - precisionTimeChangeOperation: - required: - - op - - path - - value - type: object - properties: - op: - type: string - description: Handy shortcut for operation name - enum: - - replace - - add - - remove - path: - type: string - description: path inside document leading to updated parameter - enum: - - /name - - /package/code - - /ipv4 - - /ntpAdvancedConfiguration - - /ptpAdvancedConfiguration - value: - type: object - description: new value for updated parameter - description: Fabric Precision Timing change operation data - TimeServicesSearchRequest: + example: 20f3ef8e-d670-4236-86fa-bb0038adcfc3 + AppSubscriptionUpdateRequest: + minItems: 1 + type: array + description: App Subscription Update Request + items: + $ref: "#/components/schemas/AppSubscriptionChangeOperation" + AppSubscriptionSearchRequest: type: object properties: filter: - $ref: "#/components/schemas/TimeServiceFilters" + $ref: "#/components/schemas/AppSubscriptionFilters" pagination: $ref: "#/components/schemas/PaginationRequest" sort: type: array items: - $ref: "#/components/schemas/TimeServiceSortCriteria" + $ref: "#/components/schemas/AppSubscriptionSortCriteria" description: Search requests containing criteria - TimeServiceFilters: + AppSubscriptionFilters: type: object properties: and: maxItems: 8 type: array items: - $ref: "#/components/schemas/TimeServiceFilter" - TimeServiceFilter: + $ref: "#/components/schemas/AppSubscriptionFilter" + AppSubscriptionFilter: type: object anyOf: - - $ref: "#/components/schemas/TimeServiceSimpleExpression" - - $ref: "#/components/schemas/TimeServiceOrFilter" - TimeServiceSimpleExpression: + - $ref: "#/components/schemas/AppSubscriptionSimpleExpression" + - $ref: "#/components/schemas/AppSubscriptionOrFilter" + AppSubscriptionSimpleExpression: type: object properties: property: type: string description: | Possible field names to use on filters: - * `/project/projectId` - project id (mandatory) - * `/name` - Precision Time Service name - * `/uuid` - Precision Time Service uuid - * `/type` - Precision Time Service protocol - * `/state` - Precision Time Service status - * `/account/accountNumber` - Precision Time Service account number - * `/package/code` - Precision Time Service package - * `/*` - all-category search + * `/project/projectId` - project id + * `/uuid` - App Subscription uuid + * `/state` - App Subscription status + * `/source/appLink/uuid` - Source App Link uuid + * `/source/ipSubnets` - Source App Link ip subnets + * `/target/appService/uuid` - Target App Service uuid + * `/target/geoScope` - Target App Service geo scope + * `/target/prioritization` - Target App Service prioritization + * `/changeLog/createdDateTime` - App Subscription creation timestamp + * `/changeLog/updatedDateTime` - App Subscription last updated timestamp + * `/changeLog/deletedDateTime` - App Subscription deletion timestamp example: /name operator: type: string description: | Possible operators to use on filters: - * `=` - equal - * `!=` - not equal - * `[NOT] BETWEEN` - (not) between - * `[NOT] LIKE` - (not) like - * `[NOT] IN` - (not) in - * `ILIKE` - case-insensitive like + * `=` - equal + * `!=` - not equal + * `>` - greater than + * `<` - less than + * `IN` - in + * `NOT IN` - not in + * `LIKE` - like + * `ILIKE` - case-insensitive like + * `BETWEEN` - between + * `NOT BETWEEN` - not between example: = values: type: array items: type: string - example: FabricPrecisionTimeService-1 - TimeServiceOrFilter: + example: Gateway + AppSubscriptionOrFilter: type: object properties: or: maxItems: 3 type: array items: - $ref: "#/components/schemas/TimeServiceSimpleExpression" - TimeServiceSortCriteria: + $ref: "#/components/schemas/AppSubscriptionSimpleExpression" + AppSubscriptionSortCriteria: type: object properties: direction: - $ref: "#/components/schemas/TimeServiceSortDirection" + $ref: "#/components/schemas/AppSubscriptionSortDirection" property: - $ref: "#/components/schemas/TimeServiceSortBy" - TimeServiceSortDirection: + $ref: "#/components/schemas/AppSubscriptionSortBy" + AppSubscriptionSortDirection: type: string description: Sorting direction + default: DESC enum: - DESC - ASC - default: DESC - TimeServiceSortBy: + AppSubscriptionSortBy: type: string - description: Possible field names to use on sorting - enum: - - /name - - /uuid - - /state - - /type - - /package/code - - /changeLog/createdDateTime - - /changeLog/updatedDateTime + description: | + Possible field names to use on '400_InvalidSorting': + * `/uuid` - App Subscription uuid + * `/state` - App Subscription status + * `/changeLog/createdDateTime` - Date and time when change flow starts + * `/changeLog/updatedDateTime` - Date and time when change object is updated + format: string + example: /changeLog/updatedDateTime default: /changeLog/updatedDateTime - ServiceSearchResponse: + AppSubscriptionSearchResponse: type: object properties: pagination: @@ -20673,1606 +29151,1741 @@ components: type: array description: Data returned from the API call. items: - $ref: "#/components/schemas/precisionTimeServiceResponse" - precisionTimeServiceConnectionsResponse: - title: precisionTimeServiceConnectionResponse - type: object - properties: - pagination: - $ref: "#/components/schemas/Pagination" - data: - type: array - description: Data returned from the API call - items: - $ref: "#/components/schemas/connectionLink" - description: EPT service instance's L2 connections - precisionTimeServicePackagesResponse: - title: precisionTimeServicePackagesResponse - type: object - properties: - pagination: - $ref: "#/components/schemas/Pagination" - data: - type: array - description: Data returned from the API call - items: - $ref: "#/components/schemas/precisionTimePackageResponse" - description: Precision Packages - precisionTimePackageResponse: - title: precisionTimePackageRespose + $ref: "#/components/schemas/AppSubscription" + GatewayPostRequest: required: + - account - bandwidth - - code + - localAsn + - name + - project + - router - type type: object properties: - href: - type: string - format: uri type: + $ref: "#/components/schemas/GatewayType" + name: + maxLength: 50 + minLength: 1 type: string - enum: - - TIME_SERVICE_PACKAGE - code: + description: Customer-provided Gateway name + format: string + example: test-gateway + description: type: string - enum: - - NTP_STANDARD - - NTP_ENTERPRISE - - PTP_STANDARD - - PTP_ENTERPRISE + description: Customer-provided Gateway description + format: string + example: test gateway description bandwidth: - type: integer - description: Connection bandwidth in Mbps. - example: 10 - clientsPerSecondMax: + maximum: 10000 minimum: 0 type: integer - description: Max. number of clients that can be synchronized per second at a packet rate of 1 per second. - example: 100 - redundancySupported: - type: boolean - description: Is Redundant virtual connection supported for the package code. - example: false - multiSubnetSupported: - type: boolean - description: Is Multiple subnet supported for the package code. - example: true - accuracySlaUnit: - type: string - description: Accuracy SLA unit. - example: microseconds - accuracySla: - type: integer - description: Accuracy SLA for the package code, -1 value denotes the accuracySla is not published. - example: 50 - accuracySlaMin: - minimum: 1 - type: integer - description: Typical minimum Accuracy for the package code. - example: 1 - accuracySlaMax: - minimum: 1 + description: Gateway bandwidth in Mbps + localAsn: type: integer - description: Typical maximum Accuracy for the package code. - example: 10 - changelog: - $ref: "#/components/schemas/Changelog" - description: EPT Service Package Information - example: - href: https://api.equinix.com/fabric/v4/timeServicePackage/NTP_STANDARD - type: TIME_SERVICE_PACKAGE - code: NTP_STANDARD - bandwidth: 10 - accuracySlaUnit: microseconds - accuracySla: 50 - accuracySlaMin: 1 - accuracySlaMax: 10 - clientsPerSecondMax: 100 - redundancySupported: true - multiSubnetSupported: true - changeLog: - createdDateTime: 2023-05-16T07:50:49.749Z - updatedDateTime: 2023-05-17T07:50:49.749Z - SubscriptionId: - type: string - description: Subscription Id - format: uuid - example: 557400f8-d360-11e9-bb65-2a2ae2dbcce4 - SubscriptionResponse: - required: - - entitlements - - marketplace - - state + description: Gateway local Autonomous System Number + router: + $ref: "#/components/schemas/Router" + haEnabled: + type: boolean + description: High availability enabled + default: false + account: + $ref: "#/components/schemas/SimplifiedAccount" + project: + $ref: "#/components/schemas/Project" + order: + $ref: "#/components/schemas/Order" + description: Create Gateway + Gateway: type: object properties: href: type: string - description: Subscription URL + description: Gateways URI format: uri + readOnly: true + example: https://api.equinix.com/fabric/v4/gateways/c93a9ca0-bb56-490b-8bce-4b2bdaeb4d46 + type: + $ref: "#/components/schemas/GatewayType" uuid: type: string - description: Unique identifier of the Subscription + description: Equinix-assigned access point identifier format: uuid - state: - $ref: "#/components/schemas/SubscriptionState" - marketplace: - type: string - description: Marketplace Type - enum: - - AWS - - GCP - - AZURE - - REDHAT - offerType: + example: c93a9ca0-bb56-490b-8bce-4b2bdaeb4d46 + name: type: string - description: Marketplace Offer Type - enum: - - PUBLIC - - PRIVATE_OFFER - isAutoRenew: - type: boolean - description: Is Auto Renewal Enabled - example: true - offerId: + description: Customer-provided Gateway name + format: string + example: test-gateway + description: type: string - description: Marketplace Offer Id - trial: - $ref: "#/components/schemas/SubscriptionTrial" - metroCodes: - type: array - description: List of available metro - items: - type: string - entitlements: - type: array - description: List of entitlements associated with the subscription - items: - $ref: "#/components/schemas/SubscriptionEntitlementResponse" - changelog: + description: Customer-provided Gateway description + format: string + example: test gateway description + state: + $ref: "#/components/schemas/GatewayState" + bandwidth: + maximum: 100000 + minimum: 0 + type: integer + description: Gateway bandwidth in Mbps + localAsn: + type: integer + description: Gateway local Autonomous System Number + router: + $ref: "#/components/schemas/Router" + ipv4: + $ref: "#/components/schemas/Gateway_ipv4" + project: + $ref: "#/components/schemas/Project" + account: + $ref: "#/components/schemas/Account" + order: + $ref: "#/components/schemas/Order" + changeLog: $ref: "#/components/schemas/Changelog" - description: Subscription Response - SubscriptionState: + description: Gateway object + GatewayId: type: string - description: Subscription State - enum: - - ACTIVE - - EXPIRED - - CANCELLED - - GRACE_PERIOD - SubscriptionTrial: + description: Gateway UUID + format: uuid + example: 6658cc3b-18e0-437c-b972-62b51a419a1e + GatewayUpdateRequest: + minItems: 1 + type: array + description: Gateway Update Request + items: + $ref: "#/components/schemas/GatewayChangeOperation" + Changelog: type: object properties: - enabled: - type: boolean - description: Free Trial Enabled - expiryDateTime: + createdBy: type: string - description: Free Trial Expiry Date + description: Created by User Key + example: johnsmith + createdByFullName: + type: string + description: Created by User Full Name + example: John Smith + createdByEmail: + type: string + description: Created by User Email Address + example: john.smith@example.com + createdDateTime: + type: string + description: Created by Date and Time format: date-time - description: Free Trial Subscription - SubscriptionEntitlementResponse: + example: 2020-11-06T07:00:00Z + updatedBy: + type: string + description: Updated by User Key + example: johnsmith + updatedByFullName: + type: string + description: Updated by User Full Name + example: John Smith + updatedByEmail: + type: string + description: Updated by User Email Address + example: john.smith@example.com + updatedDateTime: + type: string + description: Updated by Date and Time + format: date-time + example: 2020-11-06T07:00:00Z + deletedBy: + type: string + description: Deleted by User Key + example: johnsmith + deletedByFullName: + type: string + description: Deleted by User Full Name + example: John Smith + deletedByEmail: + type: string + description: Deleted by User Email Address + example: john.smith@example.com + deletedDateTime: + type: string + description: Deleted by Date and Time + format: date-time + example: 2020-11-06T07:00:00Z + description: Change log + PaginationRequest: type: object properties: - uuid: - type: string - description: Subscription Entitlement Id - format: uuid - quantityEntitled: - minimum: 0 - type: integer - description: Quantity entitled for the subscription - quantityConsumed: + offset: minimum: 0 type: integer - description: Quantity consumed from the entitlement - quantityAvailable: - minimum: 0 + description: Index of the first element. + default: 0 + limit: + minimum: 1 type: integer - description: Quantity available from the entitlement - asset: - $ref: "#/components/schemas/SubscriptionAsset" - description: Subscription entitlement - SubscriptionAsset: + description: Number of elements to be requested per page. Number must be between 1 and 100, and the default is 20. + default: 20 + description: Pagination request information + Project: + required: + - projectId type: object properties: - type: + projectId: type: string - description: Type of the subscription asset ( XF_ROUTER ,IP_VC, IPWAN_VC ) - package: - $ref: "#/components/schemas/SubscriptionRouterPackageType" - bandwidth: - type: integer - description: Bandwidth of the asset in Mbps - description: Asset information - SubscriptionRouterPackageType: + description: Subscriber-assigned project ID + example: 44f4c4f8-2f39-494e-838c-d8e640591be5 + SimplifiedLocation: type: object properties: - code: + metroHref: type: string - description: Cloud Router package code - description: Cloud Router Package Type - GetAllStreamResponse: + example: https://api.equinix.com/fabric/v4/metros/AM + region: + type: string + example: AMER, APAC, EMEA + metroName: + type: string + example: Amsterdam + metroCode: + type: string + example: AM + ibx: + type: string + example: AM1 + deprecated: true + CloudEventData: type: object properties: - pagination: - $ref: "#/components/schemas/Pagination" - data: - type: array - description: Data returned from the API call. - items: - $ref: "#/components/schemas/Stream" - StreamPostRequest: - required: - - name - - project - - type + message: + type: string + description: Cloud Event message + resource: + $ref: "#/components/schemas/ResourceData" + auth: + $ref: "#/components/schemas/AuthContext" + ResourceData: type: object properties: + href: + type: string + description: Cloud Event asset href + uuid: + type: string + description: Cloud Event asset uuid type: type: string - enum: - - TELEMETRY_STREAM + description: Cloud Event asset type name: type: string - description: Customer-provided stream name - description: + description: Cloud Event asset name + state: type: string - description: Customer-provided stream description - project: - $ref: "#/components/schemas/Project" - description: Create Stream - Stream: + description: Cloud Event asset state + operation: + $ref: "#/components/schemas/OperationalStatus" + OperationalStatus: type: object properties: - href: + operationalStatus: type: string - description: Stream URI - format: uri - readOnly: true - example: https://api.equinix.com/fabric/v4/streams/3c9b8e7a2-f3b1-4576-a4a9-1366a63df170 - uuid: + description: Operational status for the resource target of the event + AuthContext: + type: object + properties: + authtype: type: string - description: Equinix-assigned access point identifier - format: uuid - example: c9b8e7a2-f3b1-4576-a4a9-1366a63df170 - type: + description: Cloud Event auth type + enum: + - system + - user + authid: type: string - description: type + description: Cloud Event auth identifier enum: - - TELEMETRY_STREAM + - equinix + - userId name: type: string - description: Customer-provided stream name - description: - type: string - description: Customer-provided stream description - project: - $ref: "#/components/schemas/Project" - state: + description: Cloud Event username + email: type: string - description: Stream provision state - enum: - - PROVISIONING - - PROVISIONED - - REPROVISIONING - - DEPROVISIONING - - DEPROVISIONED - - FAILED - assetsCount: - type: integer - description: Stream assets count - example: 1 - streamSubscriptionsCount: - type: integer - description: Stream subscriptions count - example: 2 - alertRulesCount: - type: integer - description: Stream alert rules count - example: 3 - changeLog: - $ref: "#/components/schemas/Changelog" - description: Stream object - StreamId: - type: string - description: Stream UUID - format: uuid - example: 657400f8-d360-11e9-bb65-2a2ae2dbcce5 - StreamPutRequest: - required: - - name + description: Cloud Event email + Metric: type: object properties: + type: + type: string + description: Equinix supported metric type name: type: string - description: Customer-provided stream name - description: + description: Metric name + unit: type: string - description: Customer-provided stream description - description: Update Stream - StreamAssetSearchRequest: + description: Metric unit + interval: + type: string + description: Metric interval (set automatically based on search range) + resource: + $ref: "#/components/schemas/Metric_resource" + summary: + type: string + description: Metric summary + datapoints: + type: array + description: Metric data points + items: + $ref: "#/components/schemas/Metric_datapoints" + description: Metric object + maintenanceState: + type: string + description: Maintenance lifecycle state + example: SCHEDULED + enum: + - SCHEDULED + - IN_PROGRESS + - COMPLETED + - DEFERRED + SearchFilter: + description: Top-level filter that can be either an AND expression or OR expression + oneOf: + - $ref: "#/components/schemas/SearchAndExpression" + - $ref: "#/components/schemas/SearchOrExpression" + SearchAndExpression: required: - - filter + - and type: object properties: - filter: - $ref: "#/components/schemas/StreamAssetFilters" - pagination: - $ref: "#/components/schemas/PaginationRequest" - sort: + and: + maxItems: 8 + minItems: 1 type: array items: - $ref: "#/components/schemas/StreamAssetSortCriteria" - description: Search requests containing criteria - StreamAssetFilters: + $ref: "#/components/schemas/SearchFilterExpression" + SearchFilterExpression: + description: Filter expression that can be AND, OR, or a simple expression + oneOf: + - $ref: "#/components/schemas/SearchAndExpression" + - $ref: "#/components/schemas/SearchOrExpression" + - $ref: "#/components/schemas/SearchSimpleExpression" + SearchOrExpression: + required: + - or type: object properties: - and: + or: maxItems: 8 + minItems: 1 type: array items: - $ref: "#/components/schemas/StreamAssetFilter" - StreamAssetFilter: - type: object - anyOf: - - $ref: "#/components/schemas/StreamAssetSimpleExpression" - - $ref: "#/components/schemas/StreamAssetOrFilter" - StreamAssetSimpleExpression: + $ref: "#/components/schemas/SearchFilterExpression" + SearchSimpleExpression: + required: + - operator + - property + - values type: object properties: property: type: string - description: | - Possible field names to use on filters: - * `/uuid` - Asset uuid - * `/streamUuid` - Stream uuid - * `/projectId` - Asset projectId - * `/*` - all-category search - example: /name operator: type: string - description: | - Possible operators to use on filters: - * `=` - equal - * `!=` - not equal - * `>` - greater than - * `>=` - greater than or equal to - * `<` - less than - * `<=` - less than or equal to - * `[NOT] BETWEEN` - (not) between - * `[NOT] LIKE` - (not) like - * `[NOT] IN` - (not) in - * `ILIKE` - case-insensitive like example: = + enum: + - = + - "!=" + - IN + - NOT IN + - LIKE + - ILIKE + - BETWEEN + - ">" + - ">=" + - < + - <= values: + maxItems: 8 + minItems: 1 type: array items: type: string - example: FabricStreamAsset-1 - StreamAssetOrFilter: + description: Simple filter expression with property, operator, and values + ConnectionType: + type: string + description: Connection type + enum: + - EVPL_VC + - EPL_VC + - EC_VC + - IP_VC + - ACCESS_EPL_VC + - EIA_VC + - EVPLAN_VC + - EPLAN_VC + - EVPTREE_VC + - EPTREE_VC + - IPWAN_VC + - IA_VC + - MC_VC + - IX_VC + - GW_VC + - IPX_VC + Order: type: object properties: - or: - maxItems: 3 + purchaseOrderNumber: + type: string + description: Purchase order number + customerReferenceNumber: + type: string + description: Customer reference number + billingTier: + type: string + description: Billing tier for connection bandwidth + orderId: + type: string + description: Order Identification + orderNumber: + type: string + description: Order Reference Number + termLength: + maximum: 36 + minimum: 1 + type: integer + description: Term length in months, valid values are 1, 12, 24, 36 where 1 is the default value (for on-demand case). + default: 1 + contractedBandwidth: + type: integer + description: Contracted bandwidth + SimplifiedNotification: + required: + - emails + - type + type: object + properties: + type: + type: string + description: Notification Type + example: BANDWIDTH_ALERT + enum: + - NOTIFICATION + - BANDWIDTH_ALERT + - CONNECTION_APPROVAL + - PROFILE_LIFECYCLE + - ALL + - SALES_REP_NOTIFICATIONS + - TECHNICAL + - ORDERING + - QUOTE_NOTIFICATIONS + sendInterval: + type: string + emails: type: array + description: Array of contact emails items: - $ref: "#/components/schemas/StreamAssetSimpleExpression" - StreamAssetSortCriteria: + type: string + format: email + registeredUsers: + type: array + description: Array of registered users + items: + type: string + phone: + type: array + description: Array of contact phone numbers + items: + $ref: "#/components/schemas/Phone" + ConnectionRedundancy: type: object properties: - direction: - $ref: "#/components/schemas/StreamAssetSortDirection" - property: - $ref: "#/components/schemas/StreamAssetSortBy" - StreamAssetSortDirection: - type: string - description: Sorting direction - enum: - - DESC - - ASC - default: DESC - StreamAssetSortBy: - type: string - description: Possible field names to use on sorting - enum: - - /uuid - default: /uuid - GetAllStreamAssetResponse: + group: + type: string + description: Redundancy group identifier (UUID of primary connection) + priority: + $ref: "#/components/schemas/ConnectionPriority" + description: Connection redundancy configuration + ConnectionSide: type: object properties: - pagination: - $ref: "#/components/schemas/Pagination" - data: + serviceToken: + $ref: "#/components/schemas/ServiceToken" + accessPoint: + $ref: "#/components/schemas/AccessPoint" + additionalInfo: type: array - description: Data returned from the API call. + description: Any additional information, which is not part of connection metadata or configuration items: - $ref: "#/components/schemas/StreamAsset" - AssetId_1: - type: string - description: Stream Asset UUID - format: uuid - example: 757400f8-d360-11e9-bb65-2a2ae2dbcce6 - Asset: - type: string - enum: - - ports - - connections - - routers - - metros - - organizations - - projects - - networkEdgeDevices - - companyProfiles - StreamAsset: + $ref: "#/components/schemas/ConnectionSideAdditionalInfo" + description: Connection configuration object for each side of multi-segment connection + ConnectionSideAdditionalInfo: + type: object + properties: + key: + type: string + description: Key + value: + type: string + description: Value + description: Additional information + marketplaceSubscription: type: object properties: href: type: string - description: Stream Asset URI + description: Marketplace Subscription URI format: uri readOnly: true - uuid: - type: string - description: Equinix-assigned access point identifier - format: uuid - example: c9b8e7a2-f3b1-4576-a4a9-1366a63df170 + example: https://api.equinix.com/fabric/v4/marketplaceSubscriptions/20d32a80-0d61-4333-bc03-707b591ae2f5 type: type: string - description: Asset types + description: Marketplace Subscription type + example: AWS_MARKETPLACE_SUBSCRIPTION enum: - - XF_PORT - - IP_VC - - EVPLAN_VC - - EVPL_VC - - XF_METRO - - XF_ROUTER - - ORGANIZATION - - PROJECT - metricsEnabled: - type: boolean - description: enable metric - example: false - attachmentStatus: + - AWS_MARKETPLACE_SUBSCRIPTION + - GCP_MARKETPLACE_SUBSCRIPTION + - AZURE_MARKETPLACE_SUBSCRIPTION + uuid: type: string - description: asset status - enum: - - ATTACHING - - ATTACHED - - DETACHED - - DETACHING - - FAILED - description: Stream object - StreamAssetPutRequest: + description: Equinix-assigned Marketplace Subscription identifier + example: 20d32a80-0d61-4333-bc03-707b591ae2f5 + description: Equinix Fabric Entity for Marketplace Subscription + EndCustomer: type: object properties: - metricsEnabled: + isDisclosed: type: boolean - description: enable metric - example: false + description: Indicate if endCustomer info should be disclosed or not default: false - description: Update Stream Asset - GetAllStreamSubscriptionResponse: - type: object - properties: - pagination: - $ref: "#/components/schemas/Pagination" - data: - type: array - description: Data returned from the API call. - items: - $ref: "#/components/schemas/StreamSubscription" - StreamSubscriptionPostRequest: - required: - - name - - sink - - type - type: object - properties: - type: - type: string - enum: - - STREAM_SUBSCRIPTION name: type: string - description: Customer-provided stream subscription name - description: + mdmId: type: string - description: Customer-provided stream subscription description - enabled: - type: boolean - description: Stream subscription enabled status - example: true - default: true - metricSelector: - $ref: "#/components/schemas/StreamSubscriptionSelector" - eventSelector: - $ref: "#/components/schemas/StreamSubscriptionSelector" - sink: - $ref: "#/components/schemas/StreamSubscriptionSink" - description: Create Stream Subscription - StreamSubscriptionSelector: - type: object - properties: - include: - maxItems: 8 - type: array - items: - $ref: "#/components/schemas/StreamSubscriptionSelectorExpression" - except: - maxItems: 8 - type: array - items: - $ref: "#/components/schemas/StreamSubscriptionSelectorExpression" - StreamSubscriptionSelectorExpression: + ConnectionState: type: string - description: | - Supported event or metric types to use on event and metric selectors: - * `*` - all events or metrics - * `equinix.fabric.port.*` - port events or metrics - * `equinix.fabric.connection.*` - connection events or metrics - * `equinix.fabric.router.*` - cloud router events - * `equinix.fabric.metro.*` - metro metrics - * `equinix.fabric.network.*` - network events - * `equinix.fabric.service_token.*` - service token events - * `equinix.network_edge.*` - network edge events - * `equinix.network_edge.acl.*` - network edge acl events - * `equinix.network_edge.device.*` - network edge device events - * `equinix.access_manager.*` - identity access manager events - * `equinix.access_manager.user.role.*` - identity access manager user role events - example: equinix.fabric.connection.* - StreamSubscriptionSink: + description: Connection status + enum: + - ACTIVE + - CANCELLED + - DEPROVISIONED + - DEPROVISIONING + - DRAFT + - FAILED + - PENDING + - PROVISIONING + - "" + Change: required: + - createdDateTime - type type: object properties: - uri: + uuid: type: string - description: any publicly reachable http endpoint + description: Uniquely identifies a change type: type: string - description: destination type + description: Type of change enum: - - DATADOG - - GOOGLE_PUBSUB - - PAGERDUTY - - SERVICENOW - - SLACK - - SPLUNK_HEC - - TEAMS - - WEBHOOK - batchEnabled: - type: boolean - description: batch mode on/off - example: false - batchSizeMax: - type: integer - description: maximum batch size - batchWaitTimeMax: - type: integer - description: maximum batch waiting time - credential: - $ref: "#/components/schemas/StreamSubscriptionSinkCredential" - settings: - $ref: "#/components/schemas/StreamSubscriptionSinkSetting" - host: - type: string - description: sink host - description: Create Stream destination - StreamSubscriptionSinkCredential: - type: object - properties: - type: + - CONNECTION_CREATION + - CONNECTION_UPDATE + - CONNECTION_DELETION + - CONNECTION_PROVIDER_STATUS_REQUEST + status: type: string - description: credential type + description: Current outcome of the change flow enum: - - ACCESS_TOKEN - - INTEGRATION_KEY - - API_KEY - - USERNAME_PASSWORD - accessToken: + - APPROVED + - COMPLETED + - FAILED + - REJECTED + - REQUESTED + - SUBMITTED_FOR_APPROVAL + createdDateTime: type: string - description: passed as Authorization header value - integrationKey: + description: Set when change flow starts + format: date-time + example: 2020-11-06T07:00:00Z + updatedDateTime: type: string - description: passed as Authorization header value - apiKey: + description: Set when change object is updated + format: date-time + example: 2020-11-06T07:00:00Z + information: type: string - description: passed as Authorization header value - username: + description: Additional information + data: + $ref: "#/components/schemas/ConnectionChangeOperation" + description: Current state of latest connection change + ConnectionOperation: + type: object + properties: + providerStatus: + $ref: "#/components/schemas/ProviderStatus" + equinixStatus: + $ref: "#/components/schemas/EquinixStatus" + operationalStatus: type: string - description: passed as Authorization header value - password: + description: Connection operational status + enum: + - UP + - DOWN + errors: + type: array + items: + $ref: "#/components/schemas/Error" + opStatusChangedAt: type: string - description: passed as Authorization header value - description: Stream subscription sink credentials - StreamSubscriptionSinkSetting: + description: When connection transitioned into current operational status + format: date-time + example: 2020-11-06T07:00:00Z + maintenanceStatus: + $ref: "#/components/schemas/maintenanceState" + description: Connection type-specific operational data + SimplifiedAccount: type: object properties: - eventIndex: + accountNumber: + type: integer + description: Account number + format: int64 + accountName: type: string - description: event index - metricIndex: + description: Account name + orgId: + type: integer + description: Customer organization identifier + format: int64 + organizationName: type: string - description: metric index - source: + description: Customer organization name + globalOrgId: type: string - description: source - applicationKey: + description: Global organization identifier + globalOrganizationName: type: string - description: Application key - eventUri: + description: Global organization name + ucmId: type: string - description: event uri - metricUri: + description: Account ucmId + globalCustId: type: string - description: metric uri - format: + description: Account name + resellerAccountNumber: + type: integer + description: Reseller account number + format: int64 + resellerAccountName: type: string - description: webhook message format - enum: - - CLOUDEVENT - - OPENTELEMETRY - default: CLOUDEVENT - description: Stream subscription sink settings - StreamSubscription: + description: Reseller account name + resellerUcmId: + type: string + description: Reseller account ucmId + resellerOrgId: + type: integer + description: Reseller customer organization identifier + format: int64 + ConnectionChangeOperation: + required: + - op + - path + - value type: object properties: - href: + op: type: string - description: Stream Subscription URI - format: uri - readOnly: true - example: https://api.equinix.com/fabric/v4/streams/d684aa26-8276-48b7-bb42-a6d9def0a418/subscriptions/3c9b8e7a2-f3b1-4576-a4a9-1366a63df170 - uuid: + description: Handy shortcut for operation name + example: add + path: type: string - description: Equinix-assigned access point identifier - format: uuid - example: c9b8e7a2-f3b1-4576-a4a9-1366a63df170 + description: path inside document leading to updated parameter + example: /ipv6 + value: + type: object + description: new value for updated parameter + description: Connection change operation data + Actions: + type: string + description: Connection action type + enum: + - CONNECTION_CREATION_ACCEPTANCE + - CONNECTION_CREATION_REJECTION + - CONNECTION_UPDATE_ACCEPTANCE + - CONNECTION_UPDATE_REJECTION + - CONNECTION_DELETION_ACCEPTANCE + - CONNECTION_REJECTION_ACCEPTANCE + - CONNECTION_UPDATE_REQUEST + - MIGRATION_EVPL_VC + - CONNECTION_PROVIDER_STATUS_REQUEST + - CONNECTION_PROVIDER_BANDWIDTH_REQUEST + - ACCEPT_HOSTED_CONNECTION + - CANCEL_EVPL_VC_DRAFT_ORDERS + - CONNECTION_CREATION_RETRY + - CONNECTION_DELETION_RETRY + ConnectionAcceptanceData: + type: object + properties: + zSide: + $ref: "#/components/schemas/ConnectionSide" + providerBandwidth: + type: integer + description: Authorization key bandwidth in Mbps + readOnly: true + description: Connection acceptance data + ConnectionRouteTableEntry: + required: + - changeLog + - type + type: object + properties: type: + $ref: "#/components/schemas/RouteTableEntryType" + protocolType: + $ref: "#/components/schemas/RouteTableEntryProtocolType" + state: type: string - description: type + example: ACTIVE enum: - - STREAM_SUBSCRIPTION - name: - type: string - description: Customer-provided subscription name - description: + - ACTIVE + - INACTIVE + prefix: type: string - description: Customer-provided subscription description - state: + example: 192.168.10.0/24 + nextHop: type: string - description: Steam subscription provision state - enum: - - PROVISIONING - - PROVISIONED - - REPROVISIONING - - DEPROVISIONING - - DEPROVISIONED - - FAILED - enabled: - type: boolean - description: Stream subscription enabled status - metricSelector: - $ref: "#/components/schemas/StreamSubscriptionSelector" - eventSelector: - $ref: "#/components/schemas/StreamSubscriptionSelector" - sink: - $ref: "#/components/schemas/StreamSubscriptionSinkResponse" - operation: - $ref: "#/components/schemas/StreamSubscriptionOperation" + example: 10.10.10.5 + MED: + type: integer + example: 5 + localPreference: + type: integer + example: 200 + asPath: + type: array + items: + type: string + connection: + $ref: "#/components/schemas/ConnectionRouteTableEntry_connection" changeLog: $ref: "#/components/schemas/Changelog" - description: Stream Subscription object - StreamSubscriptionId: - type: string - description: Stream Subscription UUID - format: uuid - example: 557400f8-d360-11e9-bb65-2a2ae2dbcce4 - StreamSubscriptionPutRequest: + description: Advertised and received route table entry object + BGPConnectionIpv4: required: - - name - - sink - - type + - customerPeerIp + - enabled type: object properties: - type: - type: string - enum: - - STREAM_SUBSCRIPTION - name: + customerPeerIp: type: string - description: Customer-provided stream subscription name - description: + description: Customer side peering ip + example: 10.1.1.2 + equinixPeerIp: type: string - description: Customer-provided stream subscription description + description: Equinix side peering ip + example: 10.1.1.3 enabled: type: boolean - description: Stream subscription enabled status - example: true - filters: - $ref: "#/components/schemas/StreamSubscriptionFilter" - metricSelector: - $ref: "#/components/schemas/StreamSubscriptionSelector" - eventSelector: - $ref: "#/components/schemas/StreamSubscriptionSelector" - sink: - $ref: "#/components/schemas/StreamSubscriptionSink" - description: Update Stream Subscription - GetAllStreamAlertRuleResponse: - type: object - properties: - pagination: - $ref: "#/components/schemas/Pagination" - data: - type: array - description: Data returned from the API call. - items: - $ref: "#/components/schemas/StreamAlertRule" - AlertRulePostRequest: + description: Admin status for the BGP session + outboundASPrependCount: + type: integer + description: AS path prepend count + format: int64 + example: 3 + inboundMED: + type: integer + description: Inbound Multi Exit Discriminator attribute + format: int64 + example: 1000 + outboundMED: + type: integer + description: Outbound Multi Exit Discriminator attribute + format: int64 + example: 2000 + routesMax: + type: integer + description: Maximum learnt prefixes limit + format: int64 + example: 1000 + operation: + $ref: "#/components/schemas/BGPConnectionOperation" + BGPConnectionIpv6: required: - - detectionMethod - - metricSelector - - name - - resourceSelector - - type + - customerPeerIp + - enabled type: object properties: - type: - type: string - enum: - - METRIC_ALERT - name: + customerPeerIp: type: string - description: Customer-provided stream name - description: + description: Customer side peering ip + example: 2001:db8:c59b::1 + equinixPeerIp: type: string - description: Customer-provided stream description + description: Equinix side peering ip + example: 2001:db8:c59b::1 enabled: type: boolean - description: Stream alert rule enabled status - example: true - default: true - metricSelector: - $ref: "#/components/schemas/MetricSelector" - resourceSelector: - $ref: "#/components/schemas/ResourceSelector" - detectionMethod: - $ref: "#/components/schemas/DetectionMethod" - description: Create Stream Alert Rules - MetricSelector: + description: Admin status for the BGP session + outboundASPrependCount: + type: integer + description: AS path prepend count + format: int64 + example: 3 + inboundMED: + type: integer + description: Inbound Multi Exit Discriminator attribute + format: int64 + example: 1000 + outboundMED: + type: integer + description: Outbound Multi Exit Discriminator attribute + format: int64 + example: 2000 + routesMax: + type: integer + description: Maximum learnt prefixes limit + format: int64 + example: 1000 + operation: + $ref: "#/components/schemas/BGPConnectionOperation" + RoutingProtocolBFD: required: - - include + - enabled type: object properties: - include: - type: array - description: Stream alert rule filtered by metric name - items: - type: string - example: equinix.fabric.metro.sv_da.latency - ResourceSelector: - required: - - include + enabled: + type: boolean + interval: + type: string + example: "100" + DirectConnectionIpv4: type: object properties: - include: - type: array - description: | - ### Supported metric names to use on filters with property /subject: - * `/fabric/v4/ports/` - port metrics - * `/fabric/v4/connections/` - connection metrics - * `/fabric/v4/metros/` - metro latency metrics - items: - type: string - DetectionMethod: + equinixIfaceIp: + type: string + description: Equinix side Interface IP address + example: 192.168.100.0/30 + DirectConnectionIpv6: required: - - type + - equinixIfaceIp type: object properties: - type: - type: string - description: | - * THRESHOLD - Alert when a metric crosses a defined threshold by user. - * OUTLIER - Intelligent Alert that has an outlier behavior. This option is currently supported for metro latency metric. - enum: - - THRESHOLD - - OUTLIER - windowSize: + equinixIfaceIp: type: string - description: Stream alert rule metric window size - example: PT15M - operand: + description: Equinix side Interface IP address + example: 2001:db8:c59b::/1 + RoutingProtocolBGPData: + type: object + properties: + type: type: string - description: Stream alert rule metric operand + description: Routing protocol type enum: - - ABOVE - - BELOW - warningThreshold: + - BGP + name: type: string - description: Stream alert rule metric warning threshold - criticalThreshold: + example: My-BGP-route-1 + bgpIpv4: + $ref: "#/components/schemas/BGPConnectionIpv4" + bgpIpv6: + $ref: "#/components/schemas/BGPConnectionIpv6" + customerAsn: + type: integer + description: Customer asn + format: int64 + example: 65002 + equinixAsn: + type: integer + description: Equinix asn + format: int64 + example: 65002 + bgpAuthKey: type: string - description: Stream alert rule metric critical threshold - StreamAlertRule: - type: object - properties: + description: BGP authorization key + example: testAuthKey + asOverrideEnabled: + type: boolean + description: Enable AS number override + bfd: + $ref: "#/components/schemas/RoutingProtocolBFD" href: type: string - description: Stream Alert Rule URI + description: Routing Protocol URI format: uri - readOnly: true + example: https://api.equinix.com/fabric/v4/connections/81331c52-04c0-4656-a4a7-18c52669348f/routingProtocols/69762051-85ed-4d13-b6b4-e32e93c672b5 uuid: type: string - description: Equinix-assigned access point identifier + description: Routing protocol identifier format: uuid example: c9b8e7a2-f3b1-4576-a4a9-1366a63df170 + state: + type: string + enum: + - PROVISIONED + - DEPROVISIONED + - PROVISIONING + - DEPROVISIONING + - REPROVISIONING + - FAILED + operation: + $ref: "#/components/schemas/RoutingProtocolOperation" + change: + $ref: "#/components/schemas/RoutingProtocolChange" + changelog: + $ref: "#/components/schemas/Changelog" + project: + $ref: "#/components/schemas/RoutingProtocolProject" + connection: + $ref: "#/components/schemas/RoutingProtocolConnection" + RoutingProtocolDirectData: + type: object + properties: type: type: string - description: Stream subscription type + description: Routing protocol type enum: - - METRIC_ALERT + - DIRECT name: type: string - description: Customer-provided stream alert rule name - description: + example: My-direct-route-1 + directIpv4: + $ref: "#/components/schemas/DirectConnectionIpv4" + directIpv6: + $ref: "#/components/schemas/DirectConnectionIpv6" + href: type: string - description: Customer-provided stream alert rule description + description: Routing Protocol URI + format: uri + example: https://api.equinix.com/fabric/v4/connections/81331c52-04c0-4656-a4a7-18c52669348f/routingProtocols/69762051-85ed-4d13-b6b4-e32e93c672b5 + uuid: + type: string + description: Routing protocol identifier + format: uuid + example: c9b8e7a2-f3b1-4576-a4a9-1366a63df170 state: type: string - description: Steam subscription provision state enum: - - ACTIVE - - INACTIVE - enabled: - type: boolean - description: Stream alert rule enabled status - default: true - metricSelector: - $ref: "#/components/schemas/MetricSelectorResponse" - resourceSelector: - $ref: "#/components/schemas/ResourceSelectorResponse" - detectionMethod: - $ref: "#/components/schemas/DetectionMethodResponse" - changeLog: + - PROVISIONED + - DEPROVISIONED + - PROVISIONING + - DEPROVISIONING + - REPROVISIONING + - FAILED + operation: + $ref: "#/components/schemas/RoutingProtocolOperation" + change: + $ref: "#/components/schemas/RoutingProtocolChange" + changelog: $ref: "#/components/schemas/Changelog" - description: Stream object - AlertRuleId: + project: + $ref: "#/components/schemas/RoutingProtocolProject" + connection: + $ref: "#/components/schemas/RoutingProtocolConnection" + BGPActions: type: string - description: Stream Alert Rule UUID - format: uuid - example: 0bbcea48-1333-4ad5-a7ea-e4d58a5fbd15 - AlertRulePutRequest: + description: BGP action type + enum: + - CLEAR_BGPIPV4 + - CLEAR_BGPIPV6 + - CLEAR_BGPIPV4_INBOUND + - CLEAR_BGPIPV6_INBOUND + - RESET_BGPIPV4 + - RESET_BGPIPV6 + BGPActionStates: + type: string + description: BGP action state + enum: + - PENDING + - FAILED + - SUCCEEDED + RoutingProtocolChange: required: - - detectionMethod - - metricSelector - - name - - resourceSelector - type + - uuid type: object properties: - name: + uuid: type: string - description: Customer-provided stream name + description: Uniquely identifies a change type: type: string + description: Type of change enum: - - METRIC_ALERT - description: + - ROUTING_PROTOCOL_UPDATE + - ROUTING_PROTOCOL_CREATION + - ROUTING_PROTOCOL_DELETION + href: type: string - description: Customer-provided stream description - enabled: - type: boolean - description: Stream alert rule enabled status - default: true - metricSelector: - $ref: "#/components/schemas/MetricSelector" - resourceSelector: - $ref: "#/components/schemas/ResourceSelector" - detectionMethod: - $ref: "#/components/schemas/DetectionMethod" - description: Create Stream Alert Rules - CompanyProfileRequest: + description: Routing Protocol Change URI + format: uri + description: Current state of latest Routing Protocol change + RoutingProtocolChangeOperation: required: - - description - - name - - summary - - type + - op + - path + - value type: object properties: - type: - type: string - example: COMPANY_PROFILE - name: - maxLength: 50 - minLength: 1 + op: type: string - example: Equinix - summary: - maxLength: 125 - minLength: 1 + description: Handy shortcut for operation name + enum: + - add + - replace + - remove + path: type: string - example: Global interconnection and data center company - description: - maxLength: 450 - minLength: 1 + description: path inside document leading to updated parameter + example: / + value: + $ref: "#/components/schemas/RoutingProtocolBase" + description: Routing Protocol change operation data + ExchangeServiceNotification: + required: + - registeredUsers + - type + type: object + properties: + type: type: string - example: Equinix, Inc. connects the world's leading businesses to their customers, employees and partners inside the most interconnected data centers. - notifications: + description: Internet Exchange Service Notification Type + enum: + - NOTIFICATION + - TECHNICAL + - PEERING + - ESCALATION + - ORDERING + registeredUsers: type: array - example: - - type: CONTACT - emails: - - example@example.com - - type: NOTIFICATION - emails: - - example@example.com + description: Array of registered users items: - $ref: "#/components/schemas/Notification" - webUrl: - type: string - example: https://www.equinix.com - contactUrl: - type: string - example: https://www.equinix.com/contact-us - CompanyProfileResponse: + type: string + PublicPeeringConnectionResponse: type: object properties: + type: + type: string + description: Connection type IX_VC + format: enum + example: "[IX_VC]" href: type: string - example: https://api.equinix.com/fabric/v4/companyProfiles/123e4567-e89b-12d3-a456-426614174000 + description: URI + format: string + example: https://api.equinix.com/fabric/v4/connections/b44c6e6c-2c36-4488-b3f1-47064357b5b4 uuid: type: string - example: 123e4567-e89b-12d3-a456-426614174000 - type: + description: uuid + format: uuid + example: b44c6e6c-2c36-4488-b3f1-47064357b5b4 + RoutingProtocolResponse: + type: object + properties: + customerAsn: type: string - example: COMPANY_PROFILE - name: - maxLength: 50 - minLength: 1 + example: "1100" + macAddress: type: string - example: Equinix - summary: - maxLength: 125 - minLength: 1 + example: 00:11:22:33:44:55 + vlan: + type: integer + description: VLAN ID + format: int64 + example: 3292 + routeServerAsn: + type: integer + description: Equinix Route Server ASN + format: int64 + example: 1100 + bgpIpv4: + $ref: "#/components/schemas/ExchangeServiceResponseBgp" + bgpIpv6: + $ref: "#/components/schemas/ExchangeServiceResponseBgp" + routeCollector: + $ref: "#/components/schemas/RouteCollector" + PlatformChangelog: + type: object + properties: + createdBy: type: string - example: Global interconnection and data center company - description: - maxLength: 450 - minLength: 1 + description: Created by User Key + example: johnsmith + createdDateTime: type: string - example: Equinix, Inc. connects the world's leading businesses to their customers, employees and partners inside the most interconnected data centers. - state: - $ref: "#/components/schemas/CompanyProfileState" - account: - $ref: "#/components/schemas/CompanyProfileResponse_account" - metros: - type: array - example: - - href: https://api.equinix.com/fabric/v4/metros/SV - code: SV - name: Silicon Valley - items: - $ref: "#/components/schemas/CompanyMetro" - logo: - $ref: "#/components/schemas/CompanyLogo" - tags: - type: array - example: - - href: https://api.equinix.com/fabric/v4/tags/260af68b-42f0-4f2e-9c5c-2fbd44b4b387 - uuid: 260af68b-42f0-4f2e-9c5c-2fbd44b4b387 - items: - $ref: "#/components/schemas/TagResponse" - serviceProfiles: - type: array - example: - - href: https://api.equinix.com/fabric/v4/serviceProfiles/423af68b-42f0-4f2e-9c5c-2fbd44b4b387 - uuid: 423af68b-42f0-4f2e-9c5c-2fbd44b4b387 - items: - $ref: "#/components/schemas/CompanyServiceProfile" - privateServices: - type: array - example: - - href: https://api.equinix.com/fabric/v4/privateServices/460af68b-42f0-4f2e-9c5c-2fbd44b4b387 - uuid: 460af68b-42f0-4f2e-9c5c-2fbd44b4b387 - - href: https://api.equinix.com/fabric/v4/privateServices/8a5685a6-063d-41ac-9279-d32431e8d8f6 - uuid: 8a5685a6-063d-41ac-9279-d32431e8d8f6 - items: - $ref: "#/components/schemas/PrivateService" - notifications: - type: array - example: - - type: CONTACT - emails: - - example@example.com - - type: NOTIFICATION - emails: - - example@example.com - items: - $ref: "#/components/schemas/Notification" - webUrl: + description: Created by Date and Time + format: date-time + example: 2020-11-06T07:00:00Z + updatedBy: type: string - example: https://www.equinix.com - contactUrl: + description: Updated by User Key + example: johnsmith + updatedDateTime: type: string - example: https://www.equinix.com/contact-us - change: - $ref: "#/components/schemas/CompanyProfileChange" - changeLog: - $ref: "#/components/schemas/Changelog" - PatchOperation: + description: Updated by Date and Time + format: date-time + example: 2020-11-06T07:00:00Z + deletedBy: + type: string + description: Deleted by User Key + example: johnsmith + deletedDateTime: + type: string + description: Deleted by Date and Time + format: date-time + example: 2020-11-06T07:00:00Z + description: Change log + InternetAccessBillingType: + type: string + enum: + - FIXED + - USAGE_BASED + - BURST_BASED + x-enum-varnames: + - FIXED + - USAGE_BASED + - BURST_BASED + InternetAccessAccount: required: - - op - - path - - value + - accountNumber type: object properties: - op: - minLength: 1 + accountNumber: type: string - description: The operation to perform - example: replace - enum: - - replace - - add - - remove - x-enum-varnames: - - REPLACE - - ADD - - REMOVE - path: - minLength: 1 - pattern: ^/ + description: Account number + href: type: string - description: JSON Pointer path to the field to modify (e.g., /name, /description, /summary, /webUrl, /notifications) - example: /logo - value: - type: object - description: The value to update the field to - example: - uuid: 4cd19a0b-049c-4dfd-a626-ce25bf312495 - CompanyProfileSearchRequest: - type: object - properties: - filter: - $ref: "#/components/schemas/CompanyProfileSearchFilter" - pagination: - $ref: "#/components/schemas/Pagination" - sort: - $ref: "#/components/schemas/Sort" - CompanyProfileSearchFilter: - type: object - properties: - and: - type: array - items: - $ref: "#/components/schemas/CompanyProfileSearchFilter" - or: - type: array - items: - $ref: "#/components/schemas/CompanyProfileSearchFilter" - property: - $ref: "#/components/schemas/CompanyProfileSearchFieldName" - operator: - $ref: "#/components/schemas/OperatorEnum" - values: - type: array - description: Values to compare against - example: - - PENDING - - PROVISIONED - items: - type: string - CompanyProfileSearchFieldName: + description: Account URL path + format: uri + example: https://api.equinix.com/billing/v2/billingAccounts/accountNumber/57689234 + InternetAccessRoutingProtocolType: type: string - description: Searchable field names in company profile - example: /tags/name - OperatorEnum: + enum: + - BGP + - DIRECT + - STATIC + x-enum-varnames: + - BGP + - DIRECT + - STATIC + InternetAccessExportPolicy: type: string - description: Comparison operators for filtering - example: = - Sort: + description: Denotes which routes should be advertised to the internet + example: FULL + enum: + - FULL + - DEFAULT + - FULL_DEFAULT + - PARTIAL + x-enum-varnames: + - FULL + - DEFAULT + - FULL_DEFAULT + - PARTIAL + InternetAccessCustomerAsnRange: + type: string + description: Customer Autonomous System Number range. Based on the value a proper private ASN will be generated. + enum: + - BITS_16 + - BITS_32 + x-enum-varnames: + - BITS_16 + - BITS_32 + InternetAccessChange: + required: + - href type: object properties: - property: + href: type: string - description: Property to sort by((currently supports tags with filter syntax) - example: /tags/@name=equinix.fabric.spotlight.category.featured - direction: - $ref: "#/components/schemas/CompanyProfileSortDirection" - CompanyProfileSearchResponse: + description: URI of the change object + format: uri + InternetAccessLocation: required: - - data - - pagination + - ibx + - metroCode + - metroHref + - region type: object properties: - pagination: - $ref: "#/components/schemas/Pagination" - data: - type: array - items: - $ref: "#/components/schemas/CompanyProfileResponse" - CompanyProfileActionRequest: + metroHref: + type: string + description: Metro URL path for the linked resource + format: uri + example: https://api.equinix.com/fabric/v4/metros/WA + metroCode: + pattern: ^[A-Z]{2}$ + type: string + description: Code representing the metro + example: WA + region: + type: string + description: Geographic region + example: EMEA + enum: + - APAC + - EMEA + - AMER + ibx: + type: string + description: IBX data center code + example: WA1 + InternetAccessRoutingProtocol: required: + - connections + - customerRoutes - type type: object properties: type: - type: string - description: CompanyProfile Action Type - example: COMPANY_PROFILE_CREATION_ACCEPTANCE - comments: - type: string - description: Optional comments for the action - example: Approving company profile - ServiceProfileListResponse: - type: object - properties: - data: + $ref: "#/components/schemas/InternetAccessRoutingProtocolType" + customerRoutes: type: array - description: List of service profiles - example: - - href: https://api.equinix.com/fabric/v4/serviceProfiles/423af68b-42f0-4f2e-9c5c-2fbd44b4b387 - uuid: 423af68b-42f0-4f2e-9c5c-2fbd44b4b387 items: - $ref: "#/components/schemas/CompanyServiceProfile" - AttachServiceProfileResponse: + $ref: "#/components/schemas/InternetAccessCustomerRoute" + connections: + type: array + items: + $ref: "#/components/schemas/InternetAccessConnection" + discriminator: + propertyName: type + mapping: + BGP: "#/components/schemas/InternetAccessRoutingProtocolBgp" + DIRECT: "#/components/schemas/InternetAccessRoutingProtocolDirect" + STATIC: "#/components/schemas/InternetAccessRoutingProtocolStatic" + InternetAccessCustomerRoute: + type: object + properties: + ipBlock: + $ref: "#/components/schemas/InternetAccessIpBlock" + InternetAccessRoutingProtocolBgp: + allOf: + - $ref: "#/components/schemas/InternetAccessRoutingProtocol" + - required: + - customerAsnRange + - exportPolicy + type: object + properties: + exportPolicy: + $ref: "#/components/schemas/InternetAccessExportPolicy" + asn: + $ref: "#/components/schemas/InternetAccessRoutingProtocolBgp_asn" + customerAsn: + type: integer + description: Customer ASN. Valid range is 1-64495 or 131072-4199999999. Currently this option is only available for EIA over dedicated port. + format: int64 + example: 11111 + deprecated: true + bgpAuthKey: + type: string + description: BGP authentication key + example: SecretKey + customerAsnRange: + $ref: "#/components/schemas/InternetAccessCustomerAsnRange" + InternetAccessRoutingProtocolDirect: + allOf: + - $ref: "#/components/schemas/InternetAccessRoutingProtocol" + InternetAccessRoutingProtocolStatic: + allOf: + - $ref: "#/components/schemas/InternetAccessRoutingProtocol" + InternetAccessBilling: required: - type - - uuid type: object properties: - href: - type: string - description: URL to the attached service profile - example: https://api.equinix.com/fabric/v4/serviceProfiles/423af68b-42f0-4f2e-9c5c-2fbd44b4b387 type: + $ref: "#/components/schemas/InternetAccessBillingType" + enabled: + type: boolean + description: Indicates whether the billing is enabled + startDate: type: string - description: Type of the service or attachment - example: SERVICE_PROFILE - uuid: + description: The start date for the billing period + format: date-time + InternetAccessOrder: + allOf: + - $ref: "#/components/schemas/Order" + - type: object + properties: + href: + type: string + description: Order URI + format: uri + example: https://api.equinix.com/colocations/v2/orders/100200300 + InternetAccessUseCase: + type: string + enum: + - MAIN + - MANAGEMENT_ACCESS + x-enum-varnames: + - MAIN + - MANAGEMENT_ACCESS + SearchSort: + type: array + items: + $ref: "#/components/schemas/SearchSortItem" + SearchSortItem: + required: + - direction + - property + type: object + properties: + direction: type: string - description: Unique identifier for the service profile - example: 423af68b-42f0-4f2e-9c5c-2fbd44b4b387 - attachmentStatus: + example: ASC + enum: + - ASC + - DESC + property: type: string - description: Status of the attachment operation - example: ATTACHED - TagListResponse: + InterconnectSortCriteriaResponse: type: object properties: - data: - type: array - items: - $ref: "#/components/schemas/TagResponse" - pagination: - $ref: "#/components/schemas/Pagination" - description: Equinix Fabric Tag List Response Object - TagResponse: + direction: + $ref: "#/components/schemas/InterconnectSortDirectionResponse" + property: + $ref: "#/components/schemas/InterconnectSortByResponse" + IpBlockLocation: + required: + - metroCode type: object properties: - href: - type: string - format: uri - example: https://api.equinix.com/fabric/v4/tags/18a127ad-9d0c-46e2-a66d-8ed85d1858b0 - uuid: - type: string - format: uuid - example: 18a127ad-9d0c-46e2-a66d-8ed85d1858b0 - type: + metroHref: type: string - example: RESOURCE_TAG - name: + description: Metro URL path for the linked resource + example: https://api.equinix.com/fabric/v4/metros/WA + metroCode: + pattern: ^[A-Z]{2}$ type: string - example: environment - displayName: + example: WA + TypeOfIpBlockProduct: + type: string + enum: + - IPV4_IP_BLOCK + - IPV6_IP_BLOCK + x-enum-varnames: + - IPV4_IP_BLOCK + - IPV6_IP_BLOCK + IpBlockProjectRequest: + required: + - projectId + type: object + properties: + projectId: type: string - example: Environment - weight: - type: integer - example: 10000 - description: Equinix Fabric Tag Response Object - AttachTagResponse: + description: project id + IpBlockAccount: required: - - type - - uuid + - accountNumber type: object properties: - href: + accountNumber: type: string - description: URL to the attached tag - example: https://api.equinix.com/fabric/v4/tags/260af68b-42f0-4f2e-9c5c-2fbd44b4b387 - type: + description: account number + IpBlockOrderRequest: + type: object + properties: + purchaseOrderNumber: type: string - description: Type of the tag or attachment - example: TAG - uuid: + description: Purchase order number + nullable: true + orderNumber: type: string - description: Unique identifier for the tag - example: 260af68b-42f0-4f2e-9c5c-2fbd44b4b387 - attachmentStatus: + description: Order Number + nullable: true + orderLine: type: string - description: Status of the attachment operation - example: ATTACHED - PrivateServiceListResponse: + description: Order Line Number + nullable: true + IpBlockRegulations: + required: + - addressingPlans + - questions type: object properties: - data: + addressingPlans: type: array - description: List of private services - example: - - href: https://api.equinix.com/fabric/v4/privateServices/460af68b-42f0-4f2e-9c5c-2fbd44b4b387 - uuid: 460af68b-42f0-4f2e-9c5c-2fbd44b4b387 + description: List of addressing plans items: - $ref: "#/components/schemas/PrivateService" - AttachPrivateServiceResponse: + $ref: "#/components/schemas/IpBlockAddressingPlan" + questions: + $ref: "#/components/schemas/IpBlockRegulations_questions" + IpBlockAddressingPlan: required: - - type - - uuid + - purpose + - size type: object properties: - href: - type: string - description: URL to the attached private service - example: https://api.equinix.com/fabric/v4/privateServices/460af68b-42f0-4f2e-9c5c-2fbd44b4b387 - type: - type: string - description: Type of the private service or attachment - example: PRIVATE_SERVICE - uuid: - type: string - description: Unique identifier for the private service - example: 460af68b-42f0-4f2e-9c5c-2fbd44b4b387 - attachmentStatus: + purpose: type: string - description: Status of the attachment operation - example: ATTACHED - AttachLogoResponse: + description: purpose + size: + type: integer + description: size + format: int32 + IpBlockPrefixLength: + maximum: 128 + minimum: 1 + type: integer + description: IpBlockPrefix length + IpBlockPrefix: + type: string + description: CIDR prefix + IpBlockState: + type: string + description: Current state of the IP Block + enum: + - PENDING + - ACTIVE + - DELETING + - DELETED + - FAILED + IpBlockOwnership: + type: string + description: IpBlockOwnership of the IP Block + enum: + - EQUINIX + - CUSTOMER + IpBlockOrderResponse: required: - - type - - uuid + - href + - orderNumber type: object properties: href: type: string - description: URL to the attached logo - example: https://api.equinix.com/fabric/v4/companyProfiles/123e4567-e89b-12d3-a456-426614174000/logos/logo-uuid - type: - type: string - description: Type of the logo or attachment - example: COMPANY_LOGO - uuid: - type: string - description: Unique identifier for the logo - example: 789e0123-e89b-12d3-a456-426614174000 - attachmentStatus: - type: string - description: Status of the attachment operation - example: ATTACHED - extensionType: + description: Order URI + format: uri + example: https://api.equinix.com/colocations/v2/orders/1-34834234 + orderNumber: type: string - description: Extension type of logo - example: .png - LogoRequest: + description: Order number + IpBlockProject: required: - - description - - logo - - name - - type - type: object - properties: - logo: - type: string - description: Logo image file - format: binary - name: - maxLength: 24 - minLength: 1 - type: string - description: Name of the Logo - example: Equinix Logo - description: - maxLength: 125 - minLength: 1 - type: string - description: Description of the logo - example: Company branding logo - type: - type: string - description: Type of logo - example: COMPANY_LOGO - description: Equinix Fabric Logo Request Object - LogoResponse: + - projectId type: object properties: href: type: string + description: URI of the project format: uri - example: https://api.equinix.com/fabric/v4/logos/18a127ad-9d0c-46e2-a66d-8ed85d1858b0 - uuid: - type: string - format: uuid - example: 18a127ad-9d0c-46e2-a66d-8ed85d1858b0 - type: - type: string - description: Type of logo - example: COMPANY_LOGO - name: - type: string - example: Equinix Logo - description: - type: string - example: Company branding logo - status: - type: string - example: CREATED - extensionType: + projectId: type: string - example: .png - changelog: - $ref: "#/components/schemas/Changelog" - description: Equinix Fabric Logo Response Object - TagRequest: + description: project id + IpBlockAsset: required: - - displayName - - name + - href - type + - uuid type: object properties: type: + $ref: "#/components/schemas/IpBlockProductType" + uuid: type: string - description: Type of tag - example: RESOURCE_TAG - name: - minLength: 1 - type: string - description: Name of the Tag - displayName: - maxLength: 24 - minLength: 1 + description: Unique identifier for the asset + format: uuid + href: type: string - description: Display name of the Tag - description: Equinix Fabric Tag Request Object - AgentDefinition: + description: Resource URL path for the linked resource + example: https://api.equinix.com/fabric/v4/internetAccesses/fd8c5042-b553-4d5e-a2ac-c73bf6d4fd92 + IpBlockChange: + required: + - href type: object properties: - url: + href: type: string - description: Agent Template ReadMe (.md) Definition - Changelog: + description: URI of the IpBlockChange object + format: uri + IpBlockChangeLog: + required: + - createdDateTime type: object properties: - createdBy: - type: string - description: Created by User Key - example: johnsmith - createdByFullName: - type: string - description: Created by User Full Name - example: John Smith - createdByEmail: - type: string - description: Created by User Email Address - example: john.smith@example.com createdDateTime: type: string - description: Created by Date and Time format: date-time - example: 2020-11-06T07:00:00Z - updatedBy: - type: string - description: Updated by User Key - example: johnsmith - updatedByFullName: - type: string - description: Updated by User Full Name - example: John Smith - updatedByEmail: - type: string - description: Updated by User Email Address - example: john.smith@example.com updatedDateTime: type: string - description: Updated by Date and Time format: date-time - example: 2020-11-06T07:00:00Z - deletedBy: - type: string - description: Deleted by User Key - example: johnsmith - deletedByFullName: - type: string - description: Deleted by User Full Name - example: John Smith - deletedByEmail: - type: string - description: Deleted by User Email Address - example: john.smith@example.com deletedDateTime: type: string - description: Deleted by Date and Time format: date-time - example: 2020-11-06T07:00:00Z - description: Change log - Project: + PatchIpBlockRequestBodyItem: required: - - projectId - type: object - properties: - projectId: - type: string - description: Subscriber-assigned project ID - example: 44f4c4f8-2f39-494e-838c-d8e640591be5 - AgentActivities: + - op + - path type: object properties: - href: - type: string - description: Agent Activities URI - format: uuid - type: - type: string - description: type - example: AGENT_ACTIVITY - uuid: + op: type: string - description: Equinix-assigned agent operation identifier - format: uuid - readOnly: true - agent: - $ref: "#/components/schemas/Agent" - status: + description: operation + enum: + - add + - remove + path: type: string - description: Agent activities state COMPLETED, PENDING, PENDING_USER_INPUT, FAILED - example: COMPLETED - metadata: - $ref: "#/components/schemas/AgentActivities_metadata" - changeLog: - $ref: "#/components/schemas/Changelog" - description: Agent Activities object - CloudEventData: + description: path + value: + $ref: "#/components/schemas/PatchIpBlockRequestBodyItem_value" + SortDirection: + type: string + description: Sorting direction + default: DESC + enum: + - DESC + - ASC + SortBy: + type: string + description: Possible field names to use on sorting + default: /changeLog/updatedDateTime + enum: + - /name + - /direction + - /aSide/accessPoint/name + - /aSide/accessPoint/type + - /aSide/accessPoint/account/accountName + - /aSide/accessPoint/location/metroName + - /aSide/accessPoint/location/metroCode + - /aSide/accessPoint/linkProtocol/vlanCTag + - /aSide/accessPoint/linkProtocol/vlanSTag + - /zSide/accessPoint/name + - /zSide/accessPoint/type + - /zSide/accessPoint/role + - /zSide/accessPoint/account/accountName + - /zSide/accessPoint/location/metroName + - /zSide/accessPoint/location/metroCode + - /zSide/accessPoint/linkProtocol/vlanCTag + - /zSide/accessPoint/linkProtocol/vlanSTag + - /zSide/accessPoint/authenticationKey + - /bandwidth + - /geoScope + - /uuid + - /changeLog/createdDateTime + - /changeLog/updatedDateTime + - /operation/equinixStatus + - /operation/providerStatus + - /redundancy/priority + SortCriteriaResponse: type: object properties: - message: - type: string - description: Cloud Event message - resource: - $ref: "#/components/schemas/ResourceData" - auth: - $ref: "#/components/schemas/AuthContext" - ResourceData: + direction: + $ref: "#/components/schemas/SortDirection" + property: + $ref: "#/components/schemas/SortBy" + Price: type: object properties: href: type: string - description: Cloud Event asset href - uuid: - type: string - description: Cloud Event asset uuid + description: An absolute URL that returns specified pricing data + format: url type: + $ref: "#/components/schemas/ProductType" + code: type: string - description: Cloud Event asset type + description: Equinix-assigned product code name: type: string - description: Cloud Event asset name - state: + description: Full product name + description: type: string - description: Cloud Event asset state - operation: - $ref: "#/components/schemas/OperationalStatus" - OperationalStatus: - type: object - properties: - operationalStatus: + description: Product description + account: + $ref: "#/components/schemas/SimplifiedAccount" + charges: + type: array + items: + $ref: "#/components/schemas/PriceCharge" + currency: type: string - description: Operational status for the resource target of the event - AuthContext: + description: Product offering price currency + termLength: + type: integer + description: In months. No value or value of 1 means on-demand + enum: + - 1 + - 12 + - 24 + - 36 + catgory: + $ref: "#/components/schemas/PriceCategory" + connection: + $ref: "#/components/schemas/VirtualConnectionPrice" + ipBlock: + $ref: "#/components/schemas/IpBlockPrice" + router: + $ref: "#/components/schemas/FabricCloudRouterPrice" + port: + $ref: "#/components/schemas/VirtualPortPrice" + timeService: + $ref: "#/components/schemas/TimeServicePrice" + opticalConnect: + allOf: + - $ref: "#/components/schemas/OpticalConnectPrice" + ServiceProfileTypeEnum: + type: string + description: Service profile type + example: L2_PROFILE + enum: + - L2_PROFILE + - L3_PROFILE + - IA_PROFILE + - IX_PROFILE + - IC_PROFILE + - LMAAS_PROFILE + x-eqx-api-linter-skip-rules: + - 40 + ServiceProfileVisibilityEnum: + type: string + enum: + - PRIVATE + - PUBLIC + ServiceProfileStateEnum: + type: string + description: Equinix assigned state. + example: ACTIVE + enum: + - ACTIVE + - PENDING_APPROVAL + - DELETED + - REJECTED + ServiceTokenType: + type: string + description: Type of Service Token + enum: + - VC_TOKEN + - EPL_TOKEN + ServiceTokenConnection: type: object properties: - authtype: - type: string - description: Cloud Event auth type - enum: - - system - - user - authid: + type: type: string - description: Cloud Event auth identifier + description: Type of Connection enum: - - equinix - - userId - name: + - EVPL_VC + - EPL_VC + - EVPLAN_VC + - EPLAN_VC + - IPWAN_VC + - IP_VC + - EVPTREE_VC + - EPTREE_VC + href: type: string - description: Cloud Event username - email: + description: An absolute URL that is the subject of the link's context. + format: uri + readOnly: true + uuid: type: string - description: Cloud Event email - PaginationRequest: - type: object - properties: - offset: + description: Equinix-assigned connection identifier + format: uuid + allowRemoteConnection: + type: boolean + description: Authorization to connect remotely + default: false + allowCustomBandwidth: + type: boolean + description: Allow custom bandwidth value + default: false + bandwidthLimit: + maximum: 100000 minimum: 0 type: integer - description: Index of the first element. - default: 0 - limit: - minimum: 1 - type: integer - description: Number of elements to be requested per page. Number must be between 1 and 100, and the default is 20. - default: 20 - description: Pagination request information - Metric: - type: object - properties: - type: - type: string - description: Equinix supported metric type - name: - type: string - description: Metric name - unit: - type: string - description: Metric unit - interval: + description: Connection bandwidth limit in Mbps + supportedBandwidths: + type: array + description: List of permitted bandwidths. + items: + type: integer + aSide: + $ref: "#/components/schemas/ServiceTokenSide" + zSide: + $ref: "#/components/schemas/ServiceTokenSide" + description: Service Token Connection Type Information + ServiceTokenState: + type: string + description: Service token state + enum: + - ACTIVE + - INACTIVE + - EXPIRED + - DELETED + ServiceTokenChangeOperation: + required: + - op + - path + - value + type: object + properties: + op: type: string - description: Metric interval (set automatically based on search range) - resource: - $ref: "#/components/schemas/Metric_resource" - summary: + description: Handy shortcut for operation name + enum: + - replace + - add + - remove + path: type: string - description: Metric summary - datapoints: - type: array - description: Metric data points - items: - $ref: "#/components/schemas/Metric_datapoints" - description: Metric object - ConnectionType: + description: path inside document leading to updated parameter + example: /expirationDateTime + value: + type: object + description: new value for updated parameter + description: Service Token change operation data + ServiceTokenActions: type: string - description: Connection type + description: Service Token action type enum: - - EVPL_VC - - EPL_VC - - EC_VC - - IP_VC - - ACCESS_EPL_VC - - EIA_VC - - EVPLAN_VC - - EPLAN_VC - - EVPTREE_VC - - EPTREE_VC - - IPWAN_VC - - IA_VC - - MC_VC - - IX_VC - - IC_VC - Order: + - RESEND_EMAIL_NOTIFICATION + OpticalConnectRedundancy: type: object properties: - purchaseOrderNumber: + priority: type: string - description: Purchase order number - customerReferenceNumber: + description: | + Role within the diverse pair.
PRIMARY - first connection of the pair.
SECONDARY - the diverse connection on a separate path. + example: PRIMARY + enum: + - PRIMARY + - SECONDARY + group: type: string - description: Customer reference number - billingTier: + description: Redundancy group identifier + format: uuid + description: | + Optical Connect redundancy configuration.
Required only for DUAL_DIVERSE connection. + OpticalConnectASideRequest: + description: | + A-Side configuration. Always a patch panel port from your cage. + allOf: + - $ref: "#/components/schemas/OpticalConnectPatchPanelFields" + OpticalConnectZSideRequest: + description: | + Z-Side configuration.
For COLO, specify the destination patch panel and ports.
For BMMR and REMOTE, specify the location and Letter of Authorization. + allOf: + - $ref: "#/components/schemas/OpticalConnectPatchPanelFields" + - type: object + properties: + location: + $ref: "#/components/schemas/OpticalConnectLocation" + loa: + $ref: "#/components/schemas/OpticalConnectLOA" + OpticalConnectOrder: + type: object + properties: + purchaseOrderNumber: type: string - description: Billing tier for connection bandwidth - orderId: + description: Purchase order number reference. + example: PO-156576 + customerReferenceId: type: string - description: Order Identification + description: Your own reference for this connection. orderNumber: type: string - description: Order Reference Number - termLength: - maximum: 36 - minimum: 1 - type: integer - description: Term length in months, valid values are 1, 12, 24, 36 where 1 is the default value (for on-demand case). - default: 1 - contractedBandwidth: - type: integer - description: Contracted bandwidth - SimplifiedNotification: + description: Equinix order reference number. + example: 1-129105284100 + description: Ordering and billing reference details for this connection. + OpticalConnectNotification: required: - emails - type @@ -22280,112 +30893,140 @@ components: properties: type: type: string - description: Notification Type - example: BANDWIDTH_ALERT + description: | + Notification category.
NOTIFICATION - states and configuration updates.
ORDERING - order and fulfilment correspondence.
TECHNICAL - maintenance and technical advisories. + example: NOTIFICATION enum: - NOTIFICATION - - BANDWIDTH_ALERT - - CONNECTION_APPROVAL - - PROFILE_LIFECYCLE - - ALL - - SALES_REP_NOTIFICATIONS - - TECHNICAL - ORDERING - sendInterval: - type: string + - TECHNICAL emails: type: array - description: Array of contact emails + description: Email addresses to notify. items: type: string format: email registeredUsers: type: array - description: Array of registered users + description: Usernames of registered Equinix Portal users to notify. items: type: string - ConnectionRedundancy: - type: object - properties: - group: - type: string - description: Redundancy group identifier (UUID of primary connection) - priority: - $ref: "#/components/schemas/ConnectionPriority" - description: Connection redundancy configuration - ConnectionSide: - type: object - properties: - serviceToken: - $ref: "#/components/schemas/ServiceToken" - accessPoint: - $ref: "#/components/schemas/AccessPoint" - additionalInfo: - type: array - description: Any additional information, which is not part of connection metadata or configuration - items: - $ref: "#/components/schemas/ConnectionSideAdditionalInfo" - description: Connection configuration object for each side of multi-segment connection - ConnectionSideAdditionalInfo: + description: Notification preferences for this connection. + OpticalConnectState: + type: string + description: Optical Connect lifecycle states. + readOnly: true + example: PROVISIONED + enum: + - PROVISIONING + - PROVISIONED + - PROVISIONING_FAILED + - REPROVISIONING + - REPROVISIONING_FAILED + - DEPROVISIONING + - DEPROVISIONED + OpticalConnectASideResponse: + description: Originating end as provisioned, with the cage, cabinet and IBX location. + allOf: + - $ref: "#/components/schemas/OpticalConnectPatchPanelFields" + - type: object + properties: + cageUniqueSpaceId: + type: string + description: Unique identifier of the cage. + example: SV1:01:002174 + cabinetUniqueSpaceId: + type: string + description: Unique identifier of the cabinet. + example: Demarc + location: + $ref: "#/components/schemas/OpticalConnectLocation" + OpticalConnectZSideResponse: + description: Terminating end as provisioned, with the cage, cabinet and IBX location. + allOf: + - $ref: "#/components/schemas/OpticalConnectPatchPanelFields" + - type: object + properties: + cageUniqueSpaceId: + type: string + description: Unique identifier of the cage. + example: SV1:01:002174 + cabinetUniqueSpaceId: + type: string + description: Unique identifier of the cabinet. + example: Demarc + location: + $ref: "#/components/schemas/OpticalConnectLocation" + loa: + $ref: "#/components/schemas/OpticalConnectLOA" + PortType: + type: string + description: Type of Port + enum: + - XF_PORT + PortState: + type: string + description: Port lifecycle state + enum: + - PENDING + - PROVISIONING + - REPROVISIONING + - PENDING_CROSS_CONNECT + - PROVISIONED + - ACTIVE + - DEPROVISIONING + - DEPROVISIONED + - INACTIVE + - FAILED + - ADDED + - DELETED + - TO_BE_ADDED + - TO_BE_DELETED + PortOrder: type: object properties: - key: - type: string - description: Key - value: + purchaseOrder: + $ref: "#/components/schemas/PortOrderPurchaseOrder" + customerReferenceId: type: string - description: Value - description: Additional information - marketplaceSubscription: + description: Customer order reference Id + signature: + $ref: "#/components/schemas/PortOrderSignature" + PortOperation: type: object properties: - href: - type: string - description: Marketplace Subscription URI - format: uri - readOnly: true - example: https://api.equinix.com/fabric/v4/marketplaceSubscriptions/20d32a80-0d61-4333-bc03-707b591ae2f5 - type: + operationalStatus: type: string - description: Marketplace Subscription type - example: AWS_MARKETPLACE_SUBSCRIPTION + description: Availability of a given physical port. enum: - - AWS_MARKETPLACE_SUBSCRIPTION - - GCP_MARKETPLACE_SUBSCRIPTION - - AZURE_MARKETPLACE_SUBSCRIPTION - uuid: - type: string - description: Equinix-assigned Marketplace Subscription identifier - example: 20d32a80-0d61-4333-bc03-707b591ae2f5 - description: Equinix Fabric Entity for Marketplace Subscription - EndCustomer: - type: object - properties: - isDisclosed: - type: boolean - description: Indicate if endCustomer info should be disclosed or not - default: false - name: - type: string - mdmId: + - UP + - DOWN + - PARTIAL + connectionCount: + type: integer + description: Total number of connections. + format: int64 + evplVCCount: + type: integer + description: Total number of connections. + format: int64 + fgVCCount: + type: integer + description: Total number of connections. + format: int64 + accessVCCount: + type: integer + description: Total number of connections. + format: int64 + opStatusChangedAt: type: string - ConnectionState: - type: string - description: Connection status - enum: - - ACTIVE - - CANCELLED - - DEPROVISIONED - - DEPROVISIONING - - DRAFT - - FAILED - - PENDING - - PROVISIONING - - "" - Change: - required: - - createdDateTime - - type + description: Date and time at which port availability changed. + format: date-time + example: 2020-11-06T07:00:00Z + maintenanceStatus: + $ref: "#/components/schemas/maintenanceState" + description: Operational specifications for ports. + PortChange: type: object properties: uuid: @@ -22395,20 +31036,21 @@ components: type: string description: Type of change enum: - - CONNECTION_CREATION - - CONNECTION_UPDATE - - CONNECTION_DELETION - - CONNECTION_PROVIDER_STATUS_REQUEST + - PORT_CREATION + - PORT_UPDATE + - PORT_DELETION status: type: string description: Current outcome of the change flow enum: - - APPROVED - COMPLETED - FAILED - - REJECTED - REQUESTED - - SUBMITTED_FOR_APPROVAL + information: + type: string + description: Additional information + data: + $ref: "#/components/schemas/PortChangeOperation" createdDateTime: type: string description: Set when change flow starts @@ -22419,1047 +31061,746 @@ components: description: Set when change object is updated format: date-time example: 2020-11-06T07:00:00Z - information: - type: string - description: Additional information - data: - $ref: "#/components/schemas/ConnectionChangeOperation" - description: Current state of latest connection change - ConnectionOperation: - type: object - properties: - providerStatus: - $ref: "#/components/schemas/ProviderStatus" - equinixStatus: - $ref: "#/components/schemas/EquinixStatus" - operationalStatus: - type: string - description: Connection operational status - enum: - - UP - - DOWN - errors: - type: array - items: - $ref: "#/components/schemas/Error" - opStatusChangedAt: - type: string - description: When connection transitioned into current operational status - format: date-time - example: 2020-11-06T07:00:00Z - description: Connection type-specific operational data - SimplifiedAccount: - type: object - properties: - accountNumber: - type: integer - description: Account number - format: int64 - accountName: - type: string - description: Account name - orgId: - type: integer - description: Customer organization identifier - format: int64 - organizationName: - type: string - description: Customer organization name - globalOrgId: - type: string - description: Global organization identifier - globalOrganizationName: - type: string - description: Global organization name - ucmId: - type: string - description: Account ucmId - globalCustId: - type: string - description: Account name - resellerAccountNumber: - type: integer - description: Reseller account number - format: int64 - resellerAccountName: - type: string - description: Reseller account name - resellerUcmId: - type: string - description: Reseller account ucmId - resellerOrgId: - type: integer - description: Reseller customer organization identifier - format: int64 - ConnectionChangeOperation: - required: - - op - - path - - value - type: object - properties: - op: - type: string - description: Handy shortcut for operation name - example: add - path: - type: string - description: path inside document leading to updated parameter - example: /ipv6 - value: - type: object - description: new value for updated parameter - description: Connection change operation data - Actions: + description: Current state of latest port change + PortServiceCode: type: string - description: Connection action type + description: Identifies the service type associated with this port enum: - - CONNECTION_CREATION_ACCEPTANCE - - CONNECTION_CREATION_REJECTION - - CONNECTION_UPDATE_ACCEPTANCE - - CONNECTION_UPDATE_REJECTION - - CONNECTION_DELETION_ACCEPTANCE - - CONNECTION_REJECTION_ACCEPTANCE - - CONNECTION_UPDATE_REQUEST - - MIGRATION_EVPL_VC - - CONNECTION_PROVIDER_STATUS_REQUEST - - CONNECTION_PROVIDER_BANDWIDTH_REQUEST - - ACCEPT_HOSTED_CONNECTION - - CANCEL_EVPL_VC_DRAFT_ORDERS - - CONNECTION_CREATION_RETRY - - CONNECTION_DELETION_RETRY - ConnectionAcceptanceData: - type: object - properties: - zSide: - $ref: "#/components/schemas/ConnectionSide" - providerBandwidth: - type: integer - description: Authorization key bandwidth in Mbps - readOnly: true - description: Connection acceptance data - ConnectionRouteTableEntry: - required: - - changeLog - - type - type: object - properties: - type: - $ref: "#/components/schemas/RouteTableEntryType" - protocolType: - $ref: "#/components/schemas/RouteTableEntryProtocolType" - state: - type: string - example: ACTIVE - enum: - - ACTIVE - - INACTIVE - prefix: - type: string - example: 192.168.10.0/24 - nextHop: - type: string - example: 10.10.10.5 - MED: - type: integer - example: 5 - localPreference: - type: integer - example: 200 - asPath: - type: array - items: - type: string - connection: - $ref: "#/components/schemas/ConnectionRouteTableEntry_connection" - changeLog: - $ref: "#/components/schemas/Changelog" - description: Advertised and received route table entry object - BGPConnectionIpv4: - required: - - customerPeerIp - - enabled - type: object - properties: - customerPeerIp: - type: string - description: Customer side peering ip - example: 10.1.1.2 - equinixPeerIp: - type: string - description: Equinix side peering ip - example: 10.1.1.3 - enabled: - type: boolean - description: Admin status for the BGP session - outboundASPrependCount: - type: integer - description: AS path prepend count - format: int64 - example: 3 - inboundMED: - type: integer - description: Inbound Multi Exit Discriminator attribute - format: int64 - example: 1000 - outboundMED: - type: integer - description: Outbound Multi Exit Discriminator attribute - format: int64 - example: 2000 - routesMax: - type: integer - description: Maximum learnt prefixes limit - format: int64 - example: 1000 - operation: - $ref: "#/components/schemas/BGPConnectionOperation" - BGPConnectionIpv6: - required: - - customerPeerIp - - enabled + - CX + - IX + - IA + - MC + PortDevice: type: object properties: - customerPeerIp: - type: string - description: Customer side peering ip - example: 2001:db8:c59b::1 - equinixPeerIp: + name: type: string - description: Equinix side peering ip - example: 2001:db8:c59b::1 - enabled: - type: boolean - description: Admin status for the BGP session - outboundASPrependCount: - type: integer - description: AS path prepend count - format: int64 - example: 3 - inboundMED: - type: integer - description: Inbound Multi Exit Discriminator attribute - format: int64 - example: 1000 - outboundMED: - type: integer - description: Outbound Multi Exit Discriminator attribute - format: int64 - example: 2000 - routesMax: + description: Device name + deprecated: true + redundancy: + $ref: "#/components/schemas/PortDeviceRedundancy" + vcBandwidthMax: type: integer - description: Maximum learnt prefixes limit - format: int64 - example: 1000 - operation: - $ref: "#/components/schemas/BGPConnectionOperation" - RoutingProtocolBFD: - required: - - enabled + description: Maximum bandwidth allowed for connection. + format: int64 + description: Port device + PortInterface: type: object properties: - enabled: - type: boolean - interval: + type: type: string - example: "100" - DirectConnectionIpv4: + description: Port interface type + description: Port interface + PortDemarcationPoint: type: object properties: - equinixIfaceIp: + cabinetUniqueSpaceId: type: string - description: Equinix side Interface IP address - example: 192.168.100.0/30 - DirectConnectionIpv6: - required: - - equinixIfaceIp + description: Port cabinet unique space id + cageUniqueSpaceId: + type: string + description: Port cage unique space id + patchPanel: + type: string + description: Port patch panel + patchPanelName: + type: string + description: Port patch panel + deprecated: true + patchPanelPortA: + type: string + description: Port patch panel port A + patchPanelPortB: + type: string + description: Port patch panel port B + connectorType: + type: string + description: Port connector type + ibx: + type: string + description: Port ibx identifier + description: Customer physical Port + PortRedundancy: type: object properties: - equinixIfaceIp: + enabled: + type: boolean + description: Access point redundancy + group: type: string - description: Equinix side Interface IP address - example: 2001:db8:c59b::/1 - RoutingProtocolBGPData: + description: Port UUID of respective primary port + deprecated: true + priority: + $ref: "#/components/schemas/PortPriority" + description: Port redundancy configuration + PortEncapsulation: type: object properties: type: type: string - description: Routing protocol type + description: Port encapsulation protocol type enum: - - BGP - name: + - DOT1Q + - QINQ + - UNTAGGED + tagProtocolId: type: string - example: My-BGP-route-1 - bgpIpv4: - $ref: "#/components/schemas/BGPConnectionIpv4" - bgpIpv6: - $ref: "#/components/schemas/BGPConnectionIpv6" - customerAsn: - type: integer - description: Customer asn - format: int64 - example: 65002 - equinixAsn: - type: integer - description: Equinix asn - format: int64 - example: 65002 - bgpAuthKey: + description: Port encapsulation tag protocol identifier + description: Port encapsulation configuration + PortLag: + type: object + properties: + id: type: string - description: BGP authorization key - example: testAuthKey - asOverrideEnabled: + description: id + enabled: type: boolean - description: Enable AS number override - bfd: - $ref: "#/components/schemas/RoutingProtocolBFD" - href: - type: string - description: Routing Protocol URI - format: uri - example: https://api.equinix.com/fabric/v4/connections/81331c52-04c0-4656-a4a7-18c52669348f/routingProtocols/69762051-85ed-4d13-b6b4-e32e93c672b5 - uuid: + description: enabled + deprecated: true + name: type: string - description: Routing protocol identifier - format: uuid - example: c9b8e7a2-f3b1-4576-a4a9-1366a63df170 - state: + description: name + memberStatus: type: string - enum: - - PROVISIONED - - DEPROVISIONED - - PROVISIONING - - DEPROVISIONING - - REPROVISIONING - - FAILED - operation: - $ref: "#/components/schemas/RoutingProtocolOperation" - change: - $ref: "#/components/schemas/RoutingProtocolChange" - changelog: - $ref: "#/components/schemas/Changelog" - project: - $ref: "#/components/schemas/RoutingProtocolProject" - connection: - $ref: "#/components/schemas/RoutingProtocolConnection" - RoutingProtocolDirectData: + description: member status + description: Port Lag + Package: type: object properties: - type: + code: type: string - description: Routing protocol type + description: Type of Port Package enum: - - DIRECT - name: - type: string - example: My-direct-route-1 - directIpv4: - $ref: "#/components/schemas/DirectConnectionIpv4" - directIpv6: - $ref: "#/components/schemas/DirectConnectionIpv6" - href: - type: string - description: Routing Protocol URI - format: uri - example: https://api.equinix.com/fabric/v4/connections/81331c52-04c0-4656-a4a7-18c52669348f/routingProtocols/69762051-85ed-4d13-b6b4-e32e93c672b5 - uuid: - type: string - description: Routing protocol identifier - format: uuid - example: c9b8e7a2-f3b1-4576-a4a9-1366a63df170 - state: + - STANDARD + - UNLIMITED + - UNLIMITED_PLUS + description: Package settings for port + PortSettings: + type: object + properties: + buyout: + type: boolean + deprecated: true + viewPortPermission: + type: boolean + deprecated: true + placeVcOrderPermission: + type: boolean + deprecated: true + layer3Enabled: + type: boolean + deprecated: true + packageType: type: string + description: Type of Port Package + deprecated: true enum: - - PROVISIONED - - DEPROVISIONED - - PROVISIONING - - DEPROVISIONING - - REPROVISIONING - - FAILED - operation: - $ref: "#/components/schemas/RoutingProtocolOperation" - change: - $ref: "#/components/schemas/RoutingProtocolChange" - changelog: - $ref: "#/components/schemas/Changelog" - project: - $ref: "#/components/schemas/RoutingProtocolProject" - connection: - $ref: "#/components/schemas/RoutingProtocolConnection" - BGPActions: - type: string - description: BGP action type - enum: - - CLEAR_BGPIPV4 - - CLEAR_BGPIPV6 - - CLEAR_BGPIPV4_INBOUND - - CLEAR_BGPIPV6_INBOUND - - RESET_BGPIPV4 - - RESET_BGPIPV6 - BGPActionStates: - type: string - description: BGP action state - enum: - - PENDING - - FAILED - - SUCCEEDED - RoutingProtocolChange: + - STANDARD + - UNLIMITED + - UNLIMITED_PLUS + description: Port configuration settings + PortNotification: required: + - registeredUsers - type - - uuid type: object properties: - uuid: - type: string - description: Uniquely identifies a change type: type: string - description: Type of change + description: Notification Type enum: - - ROUTING_PROTOCOL_UPDATE - - ROUTING_PROTOCOL_CREATION - - ROUTING_PROTOCOL_DELETION - href: - type: string - description: Routing Protocol Change URI - format: uri - description: Current state of latest Routing Protocol change - RoutingProtocolChangeOperation: - required: - - op - - path - - value + - NOTIFICATION + - TECHNICAL + - PEERING + - ESCALATION + registeredUsers: + type: array + description: Array of registered users + items: + type: string + PortAdditionalInfo: type: object properties: - op: - type: string - description: Handy shortcut for operation name - enum: - - add - - replace - - remove - path: + key: type: string - description: path inside document leading to updated parameter - example: / + description: Key value: - $ref: "#/components/schemas/RoutingProtocolBase" - description: Routing Protocol change operation data - SimplifiedLocation: + type: string + description: Value + description: Additional information + PortLoa: type: object properties: - metroHref: + uuid: type: string - example: https://api.equinix.com/fabric/v4/metros/AM - region: + description: uuid + type: type: string - example: AMER, APAC, EMEA - metroName: + description: Loa type + example: DIGITAL_LOA + description: Port Loas + PhysicalPortType: + type: string + description: Type of Port + enum: + - XF_PHYSICAL_PORT + PortTether: + type: object + properties: + crossConnectId: type: string - example: Amsterdam - metroCode: + description: Port cross connect identifier + cabinetNumber: type: string - example: AM - ibx: + description: Port cabinet number + systemName: type: string - example: AM1 - deprecated: true - PlatformChangelog: - type: object - properties: - createdBy: + description: Port system name + patchPanel: type: string - description: Created by User Key - example: johnsmith - createdDateTime: + description: Port patch panel + patchPanelPortA: type: string - description: Created by Date and Time - format: date-time - example: 2020-11-06T07:00:00Z - updatedBy: + description: Port patch panel port A + patchPanelPortB: type: string - description: Updated by User Key - example: johnsmith - updatedDateTime: + description: Port patch panel port B + ibx: type: string - description: Updated by Date and Time - format: date-time - example: 2020-11-06T07:00:00Z - deletedBy: + description: z-side/Equinix IBX + description: Port physical connection + PhysicalPortSettings: + type: object + properties: + errorMessage: type: string - description: Deleted by User Key - example: johnsmith - deletedDateTime: + packageType: type: string - description: Deleted by Date and Time - format: date-time - example: 2020-11-06T07:00:00Z - description: Change log - InternetAccessBillingType: - type: string - enum: - - FIXED - - USAGE_BASED - - BURST_BASED - x-enum-varnames: - - FIXED - - USAGE_BASED - - BURST_BASED - InternetAccessAccount: + deprecated: true + description: Physical Port configuration settings + SimplifiedAccountRequest: required: - accountNumber type: object properties: accountNumber: - type: string + type: integer description: Account number - href: - type: string - description: Account URL path - format: uri - example: https://api.equinix.com/billing/v2/billingAccounts/accountNumber/57689234 - InternetAccessRoutingProtocolType: - type: string - enum: - - BGP - - DIRECT - - STATIC - x-enum-varnames: - - BGP - - DIRECT - - STATIC - InternetAccessExportPolicy: - type: string - description: Denotes which routes should be advertised to the internet - example: FULL - enum: - - FULL - - DEFAULT - - FULL_DEFAULT - - PARTIAL - x-enum-varnames: - - FULL - - DEFAULT - - FULL_DEFAULT - - PARTIAL - InternetAccessCustomerAsnRange: - type: string - description: Customer Autonomous System Number range. Based on the value a proper private ASN will be generated. - enum: - - BITS_16 - - BITS_32 - x-enum-varnames: - - BITS_16 - - BITS_32 - InternetAccessChange: + format: int64 + SimplifiedLocationRequest: required: - - href + - metroCode type: object properties: - href: + metroCode: type: string - description: URI of the change object - format: uri - InternetAccessLocation: + example: AM + PortChangeOperation: required: - - ibx - - metroCode - - metroHref - - region + - op + - path + - value type: object properties: - metroHref: + op: type: string - description: Metro URL path for the linked resource - format: uri - example: https://api.equinix.com/fabric/v4/metros/WA - metroCode: - pattern: ^[A-Z]{2}$ + description: Handy shortcut for operation name + example: replace + path: type: string - description: Code representing the metro - example: WA - region: + description: path inside document leading to updated parameter + example: /name + value: + type: object + description: new value for updated parameter + description: Port change operation data + LinkProtocolResponse: + type: object + properties: + href: type: string - description: Geographic region - example: EMEA - enum: - - APAC - - EMEA - - AMER - ibx: + description: LinkProtocol URI + format: uri + readOnly: true + uuid: type: string - description: IBX data center code - example: WA1 - InternetAccessRoutingProtocol: + description: Equinix-assigned network identifier + format: uuid + example: 92dc376a-a932-43aa-a6a2-c806dedbd784 + state: + $ref: "#/components/schemas/LinkProtocolState" + type: + $ref: "#/components/schemas/LinkProtocolRequestType" + vlanTag: + type: integer + example: 20 + vni: + type: integer + example: 20 + vlanTagMin: + type: integer + example: 20 + vlanTagMax: + type: integer + example: 200 + vlanSTag: + type: integer + example: 20 + vlanCTag: + type: integer + example: 20 + vlanCTagMin: + type: integer + example: 20 + vlanCTagMax: + type: integer + example: 200 + subInterface: + $ref: "#/components/schemas/SubInterface" + asset: + $ref: "#/components/schemas/LinkProtocolConnection" + serviceToken: + $ref: "#/components/schemas/LinkProtocolServiceToken" + changeLog: + $ref: "#/components/schemas/Changelog" + description: Link Protocol response + PortSortDirection: + type: string + description: Sorting direction + default: DESC + enum: + - DESC + - ASC + PortSortBy: + type: string + description: Possible field names to use on sorting + default: /device/name + enum: + - /device/name + - /name + - /state + - /location/metroName + - /demarcationPointIbx + - /device/redundancy/priority + - /lagEnabled + - /physicalPortsSpeed + - /encapsulation/type + - /physicalPorts/tether/crossConnectId + - /package/code + - /changeLog/updatedDateTime + - /changeLog/createdDateTime + - /bandwidth + - /serviceCode + PortPackage: required: - - connections - - customerRoutes + - code - type type: object properties: + href: + type: string + description: Port Package URI + readOnly: true type: - $ref: "#/components/schemas/InternetAccessRoutingProtocolType" - customerRoutes: + type: string + description: Port Package Type + enum: + - PORT_PACKAGE + code: + type: string + description: Port Package code + vcBandwidthMax: + type: integer + description: Maximum virtual connection bandwidth in Mbps + vcRemoteSupported: + type: boolean + description: Indicates if remote virtual connections are supported + supportedServiceTypes: type: array + description: List of supported service types items: - $ref: "#/components/schemas/InternetAccessCustomerRoute" - connections: + type: string + description: Port Package Service Type + enum: + - MSP + supportedSourceTypes: type: array + description: List of supported source types items: - $ref: "#/components/schemas/InternetAccessConnection" - discriminator: - propertyName: type - mapping: - BGP: "#/components/schemas/InternetAccessRoutingProtocolBgp" - DIRECT: "#/components/schemas/InternetAccessRoutingProtocolDirect" - STATIC: "#/components/schemas/InternetAccessRoutingProtocolStatic" - InternetAccessCustomerRoute: - type: object - properties: - ipBlock: - $ref: "#/components/schemas/InternetAccessIpBlock" - InternetAccessRoutingProtocolBgp: - allOf: - - $ref: "#/components/schemas/InternetAccessRoutingProtocol" - - required: - - customerAsnRange - - exportPolicy - type: object - properties: - exportPolicy: - $ref: "#/components/schemas/InternetAccessExportPolicy" - customerAsn: - type: integer - description: Customer ASN. Valid range is 1-64495 or 131072-4199999999. Currently this option is only available for EIA over dedicated port. - format: int64 - example: 11111 - bgpAuthKey: - type: string - description: BGP authentication key - example: SecretKey - customerAsnRange: - $ref: "#/components/schemas/InternetAccessCustomerAsnRange" - InternetAccessRoutingProtocolDirect: - allOf: - - $ref: "#/components/schemas/InternetAccessRoutingProtocol" - InternetAccessRoutingProtocolStatic: - allOf: - - $ref: "#/components/schemas/InternetAccessRoutingProtocol" - InternetAccessBilling: - required: - - type - type: object - properties: - type: - $ref: "#/components/schemas/InternetAccessBillingType" - enabled: - type: boolean - description: Indicates whether the billing is enabled - startDate: - type: string - description: The start date for the billing period - format: date-time - InternetAccessOrder: - allOf: - - $ref: "#/components/schemas/Order" - - type: object - properties: - href: - type: string - description: Order URI - format: uri - example: https://api.equinix.com/colocations/v2/orders/100200300 - InternetAccessUseCase: + $ref: "#/components/schemas/PortPackageSourceType" + supportedMetros: + type: array + description: List of supported metros + items: + type: string + description: Port Package details + RouteFilterState: type: string + description: Route Filter status enum: - - MAIN - - MANAGEMENT_ACCESS - x-enum-varnames: - - MAIN - - MANAGEMENT_ACCESS - SearchSort: - type: array - items: - $ref: "#/components/schemas/SearchSortItem" - SearchSortItem: + - PROVISIONING + - REPROVISIONING + - DEPROVISIONING + - PROVISIONED + - DEPROVISIONED + - NOT_PROVISIONED + - NOT_DEPROVISIONED + RouteFiltersChange: required: - - direction - - property + - type + - uuid type: object properties: - direction: + uuid: type: string - example: ASC + description: Uniquely identifies a change + type: + type: string + description: Type of change enum: - - ASC - - DESC - property: + - BGP_IPv4_PREFIX_FILTER_UPDATE + - BGP_IPv4_PREFIX_FILTER_CREATION + - BGP_IPv4_PREFIX_FILTER_DELETION + - BGP_IPv6_PREFIX_FILTER_UPDATE + - BGP_IPv6_PREFIX_FILTER_CREATION + - BGP_IPv6_PREFIX_FILTER_DELETION + href: type: string - IpBlockLocation: + description: Route filter change URI + format: uri + description: Current state of latest route filter change + RouteFiltersPatchRequestItem: required: - - metroCode + - op + - path + - value type: object properties: - metroHref: + op: type: string - description: Metro URL path for the linked resource - example: https://api.equinix.com/fabric/v4/metros/WA - metroCode: - pattern: ^[A-Z]{2}$ + description: Handy shortcut for operation name + example: replace + path: type: string - example: WA - TypeOfIpBlockProduct: - type: string - enum: - - IPV4_IP_BLOCK - - IPV6_IP_BLOCK - x-enum-varnames: - - IPV4_IP_BLOCK - - IPV6_IP_BLOCK - IpBlockProjectRequest: + description: path to change + example: /name + value: + type: object + description: new value for updated parameter + description: Route filter change operation data + RouteFiltersChangeOperation: required: - - projectId + - op + - path + - value type: object properties: - projectId: + op: type: string - description: project id - IpBlockAccount: - required: - - accountNumber - type: object - properties: - accountNumber: + description: Handy shortcut for operation name + enum: + - add + - replace + - remove + path: type: string - description: account number - IpBlockOrderRequest: + description: path inside document leading to updated parameter + example: / + value: + $ref: "#/components/schemas/RouteFiltersBase" + description: Route filter change operation data + RouteFilterConnectionsData: type: object properties: - purchaseOrderNumber: + href: type: string - description: Purchase order number - nullable: true - orderNumber: + description: Connection URI + format: uri + example: https://api.equinix.com/fabric/v4/connections/81331c52-04c0-4656-a4a7-18c52669348f + type: + $ref: "#/components/schemas/ConnectionType" + uuid: type: string - description: Order Number - nullable: true - orderLine: + description: Route filter identifier + format: uuid + example: 695a8471-6595-4ac6-a2f4-b3d96ed3a59d + name: type: string - description: Order Line Number - nullable: true - IpBlockRegulations: - required: - - addressingPlans - - questions - type: object - properties: - addressingPlans: - type: array - description: List of addressing plans - items: - $ref: "#/components/schemas/IpBlockAddressingPlan" - questions: - $ref: "#/components/schemas/IpBlockRegulations_questions" - IpBlockAddressingPlan: - required: - - purpose - - size + example: connection-1 + RouteFilterSortCriteria: type: object properties: - purpose: - type: string - description: purpose - size: - type: integer - description: size - format: int32 - IpBlockPrefixLength: - maximum: 128 - minimum: 1 - type: integer - description: IpBlockPrefix length - IpBlockPrefix: + direction: + $ref: "#/components/schemas/RouteFilterSortDirection" + property: + $ref: "#/components/schemas/RouteFilterSortBy" + RouteFilterSortDirection: type: string - description: CIDR prefix - IpBlockState: + description: Sorting direction + default: DESC + enum: + - DESC + - ASC + RouteFilterSortBy: type: string - description: Current state of the Ip Block + description: Possible field names to use on sorting + default: /changeLog/updatedDateTime enum: - - PENDING - - ACTIVE - - DELETING - - DELETED - - FAILED - IpBlockOwnership: + - /type + - /uuid + - /name + - /project/projectId + - /state + - /changeLog/createdDateTime + - /changeLog/updatedDateTime + - /changeLog/deletedDateTime + RouteFilterRuleState: type: string - description: IpBlockOwnership of the Ip Block + description: Route filter rule status enum: - - EQUINIX - - CUSTOMER - IpBlockOrderResponse: + - PROVISIONING + - REPROVISIONING + - DEPROVISIONING + - PROVISIONED + - DEPROVISIONED + - NOT_PROVISIONED + - NOT_DEPROVISIONED + RouteFilterRulesChange: required: - - href - - orderNumber + - type + - uuid type: object properties: + uuid: + type: string + description: Uniquely identifies a change + type: + type: string + description: Type of change + enum: + - BGP_IPv4_PREFIX_FILTER_RULE_UPDATE + - BGP_IPv4_PREFIX_FILTER_RULE_CREATION + - BGP_IPv4_PREFIX_FILTER_RULE_DELETION + - BGP_IPv6_PREFIX_FILTER_RULE_UPDATE + - BGP_IPv6_PREFIX_FILTER_RULE_CREATION + - BGP_IPv6_PREFIX_FILTER_RULE_DELETION href: type: string - description: Order URI + description: Route Filter Change URI format: uri - example: https://api.equinix.com/colocations/v2/orders/1-34834234 - orderNumber: + description: Current state of latest route filter rule change + RouteFilterRulesPatchRequestItem: + required: + - op + - path + - value + type: object + properties: + op: type: string - description: Order number - IpBlockProject: + description: Handy shortcut for operation name + example: replace + path: + type: string + description: path to change + example: /prefixMatch + value: + type: object + description: new value for updated parameter + description: Route filter rule change operation data + RouteFilterRulesChangeOperation: required: - - projectId + - op + - path + - value type: object properties: - href: + op: type: string - description: URI of the project - format: uri - projectId: + description: Handy shortcut for operation name + enum: + - add + - replace + - remove + path: type: string - description: project id - IpBlockAsset: + description: path inside document leading to updated parameter + example: / + value: + $ref: "#/components/schemas/RouteFilterRulesBase" + description: Route filter rule change operation data + RouteAggregationState: + type: string + description: Route Aggregation status + enum: + - PROVISIONING + - REPROVISIONING + - DEPROVISIONING + - PROVISIONED + - DEPROVISIONED + - NOT_PROVISIONED + - NOT_DEPROVISIONED + RouteAggregationsChange: required: - - href - type - uuid type: object properties: - type: - $ref: "#/components/schemas/IpBlockProductType" uuid: type: string - description: Unique identifier for the asset - format: uuid - href: + description: Uniquely identifies a change + type: type: string - description: Resource URL path for the linked resource - example: https://api.equinix.com/fabric/v4/internetAccesses/fd8c5042-b553-4d5e-a2ac-c73bf6d4fd92 - IpBlockChange: - required: - - href - type: object - properties: + description: Type of change + enum: + - BGP_IPv4_PREFIX_AGGREGATION_UPDATE + - BGP_IPv4_PREFIX_AGGREGATION_CREATION + - BGP_IPv4_PREFIX_AGGREGATION_DELETION + - BGP_IPv6_PREFIX_AGGREGATION_UPDATE + - BGP_IPv6_PREFIX_AGGREGATION_CREATION + - BGP_IPv6_PREFIX_AGGREGATION_DELETION href: type: string - description: URI of the IpBlockChange object + description: Route AGGREGATION Change URI format: uri - IpBlockChangeLog: + description: Current state of latest Route Aggregation change + RouteAggregationsPatchRequestItem: required: - - createdDateTime + - op + - path + - value type: object properties: - createdDateTime: - type: string - format: date-time - updatedDateTime: + op: type: string - format: date-time - deletedDateTime: + description: Handy shortcut for operation name + example: replace + path: type: string - format: date-time - PatchIpBlockRequestBodyItem: + description: path to change + example: /name + value: + type: object + description: new value for updated parameter + description: Route Aggregation change operation data + RouteAggregationsChangeOperation: required: - op - path + - value type: object properties: op: type: string - description: operation + description: Handy shortcut for operation name enum: - add + - replace - remove path: type: string - description: path + description: path inside document leading to updated parameter + example: / value: - $ref: "#/components/schemas/PatchIpBlockRequestBodyItem_value" - SortDirection: - type: string - description: Sorting direction - enum: - - DESC - - ASC - default: DESC - SortBy: - type: string - description: Possible field names to use on sorting - enum: - - /name - - /direction - - /aSide/accessPoint/name - - /aSide/accessPoint/type - - /aSide/accessPoint/account/accountName - - /aSide/accessPoint/location/metroName - - /aSide/accessPoint/location/metroCode - - /aSide/accessPoint/linkProtocol/vlanCTag - - /aSide/accessPoint/linkProtocol/vlanSTag - - /zSide/accessPoint/name - - /zSide/accessPoint/type - - /zSide/accessPoint/role - - /zSide/accessPoint/account/accountName - - /zSide/accessPoint/location/metroName - - /zSide/accessPoint/location/metroCode - - /zSide/accessPoint/linkProtocol/vlanCTag - - /zSide/accessPoint/linkProtocol/vlanSTag - - /zSide/accessPoint/authenticationKey - - /bandwidth - - /geoScope - - /uuid - - /changeLog/createdDateTime - - /changeLog/updatedDateTime - - /operation/equinixStatus - - /operation/providerStatus - - /redundancy/priority - default: /changeLog/updatedDateTime - SortCriteriaResponse: - type: object - properties: - direction: - $ref: "#/components/schemas/SortDirection" - property: - $ref: "#/components/schemas/SortBy" - Price: + $ref: "#/components/schemas/RouteAggregationsBase" + description: Route Aggregation change operation data + RouteAggregationConnectionsData: type: object properties: href: type: string - description: An absolute URL that returns specified pricing data - format: url + description: Connection URI + format: uri + example: https://api.equinix.com/fabric/v4/connections/81331c52-04c0-4656-a4a7-18c52669348f type: - $ref: "#/components/schemas/ProductType" - code: - type: string - description: Equinix-assigned product code - name: - type: string - description: Full product name - description: + $ref: "#/components/schemas/ConnectionType" + uuid: type: string - description: Product description - account: - $ref: "#/components/schemas/SimplifiedAccount" - charges: - type: array - items: - $ref: "#/components/schemas/PriceCharge" - currency: + description: Route Aggregation identifier + format: uuid + example: 695a8471-6595-4ac6-a2f4-b3d96ed3a59d + name: type: string - description: Product offering price currency - termLength: - type: integer - description: In months. No value or value of 1 means on-demand - enum: - - 1 - - 12 - - 24 - - 36 - catgory: - $ref: "#/components/schemas/PriceCategory" - connection: - $ref: "#/components/schemas/VirtualConnectionPrice" - ipBlock: - $ref: "#/components/schemas/IpBlockPrice" - router: - $ref: "#/components/schemas/FabricCloudRouterPrice" - port: - $ref: "#/components/schemas/VirtualPortPrice" - timeService: - $ref: "#/components/schemas/TimeServicePrice" - ServiceProfileTypeEnum: - type: string - description: Service profile type - example: L2_PROFILE - enum: - - L2_PROFILE - - L3_PROFILE - - IA_PROFILE - - IX_PROFILE - - IC_PROFILE - - LMAAS_PROFILE - x-eqx-api-linter-skip-rules: - - 40 - ServiceProfileVisibilityEnum: + example: connection-1 + RouteAggregationSortCriteria: + type: object + properties: + direction: + $ref: "#/components/schemas/RouteAggregationSortDirection" + property: + $ref: "#/components/schemas/RouteAggregationSortBy" + RouteAggregationSortDirection: type: string + description: Sorting direction enum: - - PRIVATE - - PUBLIC - ServiceProfileStateEnum: + - DESC + - ASC + default: DESC + RouteAggregationSortBy: type: string - description: Equinix assigned state. - example: ACTIVE + description: Possible field names to use on sorting enum: - - ACTIVE - - PENDING_APPROVAL - - DELETED - - REJECTED - ServiceTokenType: + - /type + - /uuid + - /name + - /project/projectId + - /state + - /changeLog/createdDateTime + - /changeLog/updatedDateTime + - /changeLog/deletedDateTime + default: /changeLog/updatedDateTime + RouteAggregationRuleState: type: string - description: Type of Service Token + description: Route Aggregation Rule status enum: - - VC_TOKEN - - EPL_TOKEN - ServiceTokenConnection: + - PROVISIONING + - REPROVISIONING + - DEPROVISIONING + - PROVISIONED + - DEPROVISIONED + - NOT_PROVISIONED + - NOT_DEPROVISIONED + RouteAggregationRulesChange: + required: + - type + - uuid type: object properties: + uuid: + type: string + description: Uniquely identifies a change type: type: string - description: Type of Connection + description: Type of change enum: - - EVPL_VC - - EPL_VC - - EVPLAN_VC - - EPLAN_VC - - IPWAN_VC - - IP_VC - - EVPTREE_VC - - EPTREE_VC + - BGP_IPv4_PREFIX_AGGREGATION_RULE_UPDATE + - BGP_IPv4_PREFIX_AGGREGATION_RULE_CREATION + - BGP_IPv4_PREFIX_AGGREGATION_RULE_DELETION href: type: string - description: An absolute URL that is the subject of the link's context. + description: Route Aggregation Change URI format: uri - readOnly: true - uuid: + description: Current state of latest Route Aggregation Rule change + RouteAggregationRulesPatchRequestItem: + required: + - op + - path + - value + type: object + properties: + op: type: string - description: Equinix-assigned connection identifier - format: uuid - allowRemoteConnection: - type: boolean - description: Authorization to connect remotely - default: false - allowCustomBandwidth: - type: boolean - description: Allow custom bandwidth value - default: false - bandwidthLimit: - maximum: 100000 - minimum: 0 - type: integer - description: Connection bandwidth limit in Mbps - supportedBandwidths: - type: array - description: List of permitted bandwidths. - items: - type: integer - aSide: - $ref: "#/components/schemas/ServiceTokenSide" - zSide: - $ref: "#/components/schemas/ServiceTokenSide" - description: Service Token Connection Type Information - ServiceTokenState: - type: string - description: Service token state - enum: - - ACTIVE - - INACTIVE - - EXPIRED - - DELETED - ServiceTokenChangeOperation: + description: Handy shortcut for operation name + example: replace + path: + type: string + description: path to change + example: /prefix + value: + type: object + description: new value for updated parameter + description: Route Aggregation Rule change operation data + RouteAggregationRulesChangeOperation: required: - op - path @@ -23470,88 +31811,76 @@ components: type: string description: Handy shortcut for operation name enum: - - replace - add + - replace - remove path: type: string description: path inside document leading to updated parameter - example: /expirationDateTime + example: / value: - type: object - description: new value for updated parameter - description: Service Token change operation data - ServiceTokenActions: - type: string - description: Service Token action type - enum: - - RESEND_EMAIL_NOTIFICATION - PortState: - type: string - description: Port lifecycle state - enum: - - PENDING - - PROVISIONING - - REPROVISIONING - - PENDING_CROSS_CONNECT - - PROVISIONED - - ACTIVE - - DEPROVISIONING - - DEPROVISIONED - - INACTIVE - - FAILED - - ADDED - - DELETED - - TO_BE_ADDED - - TO_BE_DELETED - PortType: - type: string - description: Type of Port - enum: - - XF_PORT - PortOrder: + $ref: "#/components/schemas/RouteAggregationRulesBase" + description: Route Aggregation Rule change operation data + SimplifiedLocationWithoutIBX: + required: + - metroCode type: object properties: - purchaseOrder: - $ref: "#/components/schemas/PortOrderPurchaseOrder" - customerReferenceId: + metroHref: type: string - description: Customer order reference Id - signature: - $ref: "#/components/schemas/PortOrderSignature" - PortOperation: + description: The Canonical URL at which the resource resides. + example: https://api.equinix.com/fabric/v4/metros/AM + region: + type: string + example: AMER, APAC, EMEA + metroName: + type: string + example: Amsterdam + metroCode: + type: string + example: AM + CloudRouterPostRequestPackage: + required: + - code type: object properties: - operationalStatus: + href: type: string - description: Availability of a given physical port. + description: Fabric Cloud Router URI + format: uri + example: https://api.equinix.com/fabric/v4/routerPackages/LAB + type: + type: string + description: Cloud Router package type + example: ROUTER_PACKAGE enum: - - UP - - DOWN - - PARTIAL - connectionCount: - type: integer - description: Total number of connections. - format: int64 - evplVCCount: - type: integer - description: Total number of connections. - format: int64 - fgVCCount: - type: integer - description: Total number of connections. - format: int64 - accessVCCount: - type: integer - description: Total number of connections. - format: int64 - opStatusChangedAt: + - ROUTER_PACKAGE + code: type: string - description: Date and time at which port availability changed. - format: date-time - example: 2020-11-06T07:00:00Z - description: Operational specifications for ports. - PortChange: + description: Cloud Router package code + example: LAB + enum: + - LAB + - BASIC + - STANDARD + - ADVANCED + - PREMIUM + description: Fabric Cloud Router Package Type + CloudRouterAccessPointState: + type: string + description: Access point lifecycle state + enum: + - PROVISIONED + - PROVISIONING + - DEPROVISIONING + - DEPROVISIONED + - REPROVISIONING + - NOT_PROVISIONED + - NOT_DEPROVISIONED + CloudRouterChange: + required: + - type + - updatedDateTime type: object properties: uuid: @@ -23561,9 +31890,7 @@ components: type: string description: Type of change enum: - - PORT_CREATION - - PORT_UPDATE - - PORT_DELETION + - ROUTER_UPDATE status: type: string description: Current outcome of the change flow @@ -23571,11 +31898,6 @@ components: - COMPLETED - FAILED - REQUESTED - information: - type: string - description: Additional information - data: - $ref: "#/components/schemas/PortChangeOperation" createdDateTime: type: string description: Set when change flow starts @@ -23586,241 +31908,353 @@ components: description: Set when change object is updated format: date-time example: 2020-11-06T07:00:00Z - description: Current state of latest port change - PortServiceCode: - type: string - description: Identifies the service type associated with this port - enum: - - CX - - IX - - IA - - MC - PortDevice: - type: object - properties: - name: - type: string - description: Device name - deprecated: true - redundancy: - $ref: "#/components/schemas/PortDeviceRedundancy" - vcBandwidthMax: - type: integer - description: Maximum bandwidth allowed for connection. - format: int64 - description: Port device - PortInterface: - type: object - properties: - type: + information: type: string - description: Port interface type - description: Port interface - PortDemarcationPoint: + description: Additional information + data: + type: array + items: + $ref: "#/components/schemas/CloudRouterChangeOperation" + description: Current state of latest CloudRouter change + CloudRouterChangeOperation: + required: + - op + - path + - value type: object properties: - cabinetUniqueSpaceId: - type: string - description: Port cabinet unique space id - cageUniqueSpaceId: - type: string - description: Port cage unique space id - patchPanel: - type: string - description: Port patch panel - patchPanelName: - type: string - description: Port patch panel - deprecated: true - patchPanelPortA: - type: string - description: Port patch panel port A - patchPanelPortB: - type: string - description: Port patch panel port B - connectorType: - type: string - description: Port connector type - ibx: + op: type: string - description: Port ibx identifier - description: Customer physical Port - PortRedundancy: - type: object - properties: - enabled: - type: boolean - description: Access point redundancy - group: + description: Handy shortcut for operation name + enum: + - replace + - add + - remove + path: type: string - description: Port UUID of respective primary port - deprecated: true - priority: - $ref: "#/components/schemas/PortPriority" - description: Port redundancy configuration - PortEncapsulation: + description: path inside document leading to updated parameter + value: + type: object + description: new value for updated parameter + description: Fabric Cloud Router change operation data + CloudRouterActionType: + type: string + description: Cloud router action type + enum: + - BGP_SESSION_STATUS_UPDATE + - ROUTE_TABLE_ENTRY_UPDATE + - RECEIVED_ROUTE_ENTRY_UPDATE + - ADVERTISED_ROUTE_ENTRY_UPDATE + RouterActionsConnection: type: object properties: - type: + uuid: type: string - description: Port encapsulation protocol type - enum: - - DOT1Q - - QINQ - - UNTAGGED - tagProtocolId: + description: Connection UUID + example: 557400f8-d360-11e9-bb65-2a2ae2dbcce4 + href: type: string - description: Port encapsulation tag protocol identifier - description: Port encapsulation configuration - PortLag: + example: https://api.equinix.com/fabric/v4/connections/557400f8-d360-11e9-bb65-2a2ae2dbcce4 + type: + $ref: "#/components/schemas/ConnectionType" + operation: + $ref: "#/components/schemas/Operation" + description: Connection object for router actions + RouterActionsRouter: type: object properties: - id: - type: string - description: id - enabled: - type: boolean - description: enabled - deprecated: true - name: + uuid: type: string - description: name - memberStatus: + description: Router UUID + example: a1c6b7fd-aead-410a-96b4-b1dfa1071700 + href: type: string - description: member status - description: Port Lag - Package: - type: object - properties: - code: + example: https://api.equinix.com/fabric/v4/routers/a1c6b7fd-aead-410a-96b4-b1dfa1071700 + type: type: string - description: Type of Port Package enum: - - STANDARD - - UNLIMITED - - UNLIMITED_PLUS - description: Package settings for port - PortSettings: + - XF_ROUTER + operation: + $ref: "#/components/schemas/Operation" + description: Router object for router actions + CloudRouterCommandType: + type: string + description: Fabric Cloud Router Command Type + example: PING_COMMAND + enum: + - PING_COMMAND + - TRACEROUTE_COMMAND + CloudRouterCommandRequestPayload: + required: + - destination + - sourceConnection type: object properties: - buyout: - type: boolean - deprecated: true - viewPortPermission: - type: boolean - deprecated: true - placeVcOrderPermission: - type: boolean - deprecated: true - layer3Enabled: - type: boolean - deprecated: true - packageType: + destination: + type: string + description: Fabric Cloud Router Ping or Traceroute Command Destination + example: 8.8.8.8 + sourceConnection: + $ref: "#/components/schemas/CloudRouterCommandRequestConnection" + timeout: + type: integer + description: | + Timeout in seconds for Fabric Cloud Router Command: + - For `PING_COMMAND`: Packet timeout duration. The default value is 5. + - For `TRACEROUTE_COMMAND`: Probe timeout duration. + The default value is 2 and it is not configurable. + example: 2 + dataBytes: + maximum: 9000 + minimum: 16 + type: integer + description: | + Ping Command DataBytes. + This field is only applicable for commands of type `PING_COMMAND`. + example: 100 + default: 64 + probes: + type: integer + description: | + Number of probes for Fabric Cloud Router Traceroute Command. + This field is only applicable for commands of type `TRACEROUTE_COMMAND` and is not configurable. + example: 3 + default: 3 + hopsMax: + maximum: 30 + type: integer + description: | + Maximum number of hops for the traceroute command. + This field is only applicable for commands of type `TRACEROUTE_COMMAND`. + example: 20 + default: 20 + description: Fabric Cloud Router Command Request + CloudRouterCommandState: + type: string + description: Fabric Cloud Router Command State + example: SUCCEEDED + enum: + - PENDING + - SUCCEEDED + - FAILED + - DELETED + CloudRouterCommandRequestResponse: + type: object + properties: + destination: type: string - description: Type of Port Package - deprecated: true - enum: - - STANDARD - - UNLIMITED - - UNLIMITED_PLUS - description: Port configuration settings - PortNotification: + description: Fabric Cloud Router Ping or Traceroute Command Destination + example: 8.8.8.8 + sourceConnection: + $ref: "#/components/schemas/CloudRouterCommandRequestConnection" + timeout: + type: integer + description: | + Timeout in seconds for Fabric Cloud Router Command: + - For `PING_COMMAND`: Packet timeout duration. The default value is 5. + - For `TRACEROUTE_COMMAND`: Probe timeout duration. + The default value is 2 and it is not configurable. + example: 2 + dataBytes: + maximum: 9000 + minimum: 16 + type: integer + description: | + Ping Command DataBytes. + This field is only applicable for commands of type `PING_COMMAND`. + example: 100 + default: 64 + interval: + type: integer + description: | + Time in milliseconds between sending each packet. + This field is only applicable for commands of type `PING_COMMAND`. + example: 1000 + default: 1000 + count: + type: integer + description: | + Total number of ping requests. + This field is only applicable for commands of type `PING_COMMAND`. + example: 5 + default: 5 + probes: + type: integer + description: | + Number of probes for Fabric Cloud Router Traceroute Command. + This field is only applicable for commands of type `TRACEROUTE_COMMAND` and is not configurable. + example: 3 + default: 3 + hopsMax: + maximum: 30 + type: integer + description: | + Maximum number of hops for the traceroute command. + This field is only applicable for commands of type `TRACEROUTE_COMMAND`. + example: 20 + default: 20 + description: Fabric Cloud Router Command Request + CloudRouterCommandResponse: + type: object + oneOf: + - $ref: "#/components/schemas/CloudRouterCommandPingResponse" + - $ref: "#/components/schemas/CloudRouterCommandTracerouteResponse" + RouteTableEntry: required: - - registeredUsers + - changeLog + - state - type type: object properties: type: + $ref: "#/components/schemas/RouteTableEntryType" + protocolType: + $ref: "#/components/schemas/RouteTableEntryProtocolType" + state: + $ref: "#/components/schemas/RouteTableEntryState" + prefix: type: string - description: Notification Type - enum: - - NOTIFICATION - - TECHNICAL - - PEERING - - ESCALATION - registeredUsers: + example: 192.168.10.0/24 + nextHop: + type: string + example: 10.10.10.5 + MED: + type: integer + example: 5 + localPreference: + type: integer + example: 200 + asPath: type: array - description: Array of registered users items: type: string - PortAdditionalInfo: + example: "20100" + connection: + $ref: "#/components/schemas/RouteTableEntry_connection" + changeLog: + $ref: "#/components/schemas/Changelog" + description: Route table entry object + code: + type: string + description: Cloud Router package code + example: LAB + enum: + - LAB + - BASIC + - STANDARD + - ADVANCED + - PREMIUM + PackageChangeLog: type: object properties: - key: + createdDateTime: type: string - description: Key - value: + format: date-time + example: 2020-11-06T07:00:00Z + updatedDateTime: type: string - description: Value - description: Additional information - PortLoa: + format: date-time + example: 2020-11-06T07:00:00Z + description: Cloud Router package change log + ApiServices: type: object properties: - uuid: + route: type: string - description: uuid - type: + description: service routes + status: type: string - description: Loa type - example: DIGITAL_LOA - description: Port Loas - PhysicalPortType: - type: string - description: Type of Port - enum: - - XF_PHYSICAL_PORT - PortTether: + description: service status + changedDateTime: + type: string + description: service status change date + description: Available services details + ValidateConnectionResponse: type: object properties: - crossConnectId: - type: string - description: Port cross connect identifier - cabinetNumber: - type: string - description: Port cabinet number - systemName: - type: string - description: Port system name - patchPanel: - type: string - description: Port patch panel - patchPanelPortA: - type: string - description: Port patch panel port A - patchPanelPortB: - type: string - description: Port patch panel port B - ibx: + uuid: type: string - description: z-side/Equinix IBX - description: Port physical connection - PhysicalPortSettings: + description: Equinix-assigned connection identifier + bandwidth: + maximum: 100000 + minimum: 0 + type: integer + description: Connection bandwidth in Mbps + redundancy: + $ref: "#/components/schemas/ConnectionRedundancy" + aSide: + $ref: "#/components/schemas/ConnectionSide" + zSide: + $ref: "#/components/schemas/ConnectionSide" + description: Validate Connection specification + NetworkType: + type: string + description: Network type + enum: + - EVPLAN + - EPLAN + - IPWAN + - EVPTREE + - EPTREE + NetworkScope: + type: string + description: Network scope + enum: + - REGIONAL + - GLOBAL + - LOCAL + NetworkState: + type: string + description: Network status + example: ACTIVE + enum: + - ACTIVE + - INACTIVE + - DELETED + SimplifiedNetworkChange: type: object properties: - errorMessage: + href: type: string - packageType: + description: Network URI + format: uri + readOnly: true + example: https://api.equinix.com/fabric/v4/networks/2a4fb415-5a7f-436f-bae6-02f5e403deec/changes/4b17da68-3d6b-436d-9c8f-2105f3b950d9 + uuid: type: string - deprecated: true - description: Physical Port configuration settings - SimplifiedAccountRequest: - required: - - accountNumber + description: Uniquely identifies a change + format: uuid + example: 4b17da68-3d6b-436d-9c8f-2105f3b950d9 + type: + $ref: "#/components/schemas/NetworkChangeType" + description: Current state of latest network change + NetworkOperation: type: object properties: - accountNumber: - type: integer - description: Account number - format: int64 - SimplifiedLocationRequest: - required: - - metroCode + equinixStatus: + $ref: "#/components/schemas/NetworkEquinixStatus" + description: Network operational data + Link: type: object properties: - metroCode: + href: type: string - example: AM - PortChangeOperation: + description: Resource URI + format: uri + readOnly: true + rel: + type: string + description: OperationId from Swagger hub spec + method: + type: string + description: Http method type + contentType: + type: string + description: Content type for the response + authenticate: + type: boolean + description: Authentication required or not + NetworkChangeOperation: required: - op - path @@ -23830,7 +32264,10 @@ components: op: type: string description: Handy shortcut for operation name - example: replace + enum: + - replace + - add + - remove path: type: string description: path inside document leading to updated parameter @@ -23838,1012 +32275,865 @@ components: value: type: object description: new value for updated parameter - description: Port change operation data - LinkProtocolResponse: + description: Network change operation data + NetworkSortCriteriaResponse: type: object properties: - href: - type: string - description: LinkProtocol URI - format: uri - readOnly: true - uuid: - type: string - description: Equinix-assigned network identifier - format: uuid - example: 92dc376a-a932-43aa-a6a2-c806dedbd784 - state: - $ref: "#/components/schemas/LinkProtocolState" - type: - $ref: "#/components/schemas/LinkProtocolRequestType" - vlanTag: - type: integer - example: 20 - vni: - type: integer - example: 20 - vlanTagMin: - type: integer - example: 20 - vlanTagMax: - type: integer - example: 200 - vlanSTag: - type: integer - example: 20 - vlanCTag: - type: integer - example: 20 - vlanCTagMin: - type: integer - example: 20 - vlanCTagMax: - type: integer - example: 200 - subInterface: - $ref: "#/components/schemas/SubInterface" - asset: - $ref: "#/components/schemas/LinkProtocolConnection" - serviceToken: - $ref: "#/components/schemas/LinkProtocolServiceToken" - changeLog: - $ref: "#/components/schemas/Changelog" - description: Link Protocol response - PortSortDirection: + direction: + $ref: "#/components/schemas/NetworkSortDirectionResponse" + property: + $ref: "#/components/schemas/NetworkSortByResponse" + NetworkChangeType: type: string - description: Sorting direction + description: Type of change enum: - - DESC - - ASC - default: DESC - PortSortBy: + - NETWORK_CREATION + - NETWORK_UPDATE + - NETWORK_DELETION + NetworkChangeStatus: type: string - description: Possible field names to use on sorting + description: Current outcome of the change flow enum: - - /device/name - - /name - - /state - - /location/metroName - - /demarcationPointIbx - - /device/redundancy/priority - - /lagEnabled - - /physicalPortsSpeed - - /encapsulation/type - - /physicalPorts/tether/crossConnectId - - /package/code - - /changeLog/updatedDateTime - - /changeLog/createdDateTime - - /bandwidth - - /serviceCode - default: /device/name - PortPackage: + - APPROVED + - COMPLETED + - FAILED + - REJECTED + - REQUESTED + - SUBMITTED_FOR_APPROVAL + precisionTimePackageRequest: + title: precisionTimePackageRequest required: - code - - type + type: object + properties: + code: + type: string + description: Precision Time Service Level + enum: + - NTP_STANDARD + - NTP_ENTERPRISE + - PTP_STANDARD + - PTP_ENTERPRISE + description: Precision Time Service Level Request + example: + code: NTP_STANDARD + virtualConnectionUuid: + title: fabricConnectionUuid + required: + - uuid type: object properties: href: type: string - description: Port Package URI + description: Connection URI + format: uri readOnly: true type: type: string - description: Port Package Type - enum: - - PORT_PACKAGE - code: + description: Connection Type + uuid: type: string - description: Port Package code - vcBandwidthMax: - type: integer - description: Maximum virtual connection bandwidth in Mbps - vcRemoteSupported: - type: boolean - description: Indicates if remote virtual connections are supported - supportedServiceTypes: - type: array - description: List of supported service types - items: - type: string - description: Port Package Service Type - enum: - - MSP - supportedSourceTypes: - type: array - description: List of supported source types - items: - $ref: "#/components/schemas/PortPackageSourceType" - supportedMetros: - type: array - description: List of supported metros - items: - type: string - description: Port Package details - RouteFilterState: - type: string - description: Route Filter status - enum: - - PROVISIONING - - REPROVISIONING - - DEPROVISIONING - - PROVISIONED - - DEPROVISIONED - - NOT_PROVISIONED - - NOT_DEPROVISIONED - RouteFiltersChange: + description: Connection UUID. + format: uuid + description: UUID of the Fabric Connection Instance + example: + uuid: 095be615-a8ad-4c33-8e9c-c7612fbf6c9f + ipv4: + title: ipv4 required: - - type - - uuid + - networkMask + - primary + - secondary + type: object + properties: + primary: + type: string + description: Primary Timing Server IP Address + format: ipv4 + secondary: + type: string + description: Secondary Timing Server IP Address + format: ipv4 + networkMask: + type: string + description: Network Mask + format: ipv4 + defaultGateway: + type: string + description: Gateway Interface IP address + format: ipv4 + description: EPT service network information + example: + primary: 10.0.0.1 + secondary: 10.0.0.2 + networkMask: 255.255.255.240 + defaultGateway: 10.0.0.3 + ntpAdvanceConfiguration: + type: array + description: NTP Advanced configuration - MD5 Authentication. + items: + $ref: "#/components/schemas/md5" + ptpAdvanceConfiguration: + type: object + properties: + timeScale: + type: string + description: Time Scale value, ARB denotes Arbitrary and PTP denotes Precision Time Protocol. + example: ARB + enum: + - ARB + - PTP + domain: + maximum: 127 + minimum: 0 + type: integer + description: The PTP domain value. + example: 0 + priority1: + maximum: 248 + minimum: 0 + type: integer + description: The priority1 value determines the best primary clock, Lower value indicates higher priority. + example: 128 + priority2: + maximum: 248 + minimum: 0 + type: integer + description: The priority2 value differentiates and prioritizes the primary clock to avoid confusion when priority1-value is the same for different primary clocks in a network. + example: 128 + logAnnounceInterval: + type: integer + description: Logarithmic value that controls the rate of PTP Announce packets from the PTP time server. Default is 1 (1 packet every 2 seconds), Unit packets/second. + example: 1 + enum: + - -3 + - -2 + - -1 + - 0 + - 1 + logSyncInterval: + type: integer + description: Logarithmic value that controls the rate of PTP Sync packets. Default is -4 (16 packets per second), Unit packets/second.. + example: -4 + enum: + - -5 + - -4 + - -3 + - -2 + - -1 + - 0 + - 1 + logDelayReqInterval: + type: integer + description: Logarithmic value that controls the rate of PTP DelayReq packets. Default is -4 (16 packets per second), Unit packets/second.. + example: -4 + enum: + - -5 + - -4 + - -3 + - -2 + - -1 + - 0 + - 1 + transportMode: + type: string + enum: + - MULTICAST + - UNICAST + - HYBRID + grantTime: + maximum: 7200 + minimum: 30 + type: integer + description: Unicast Grant Time in seconds. For Multicast and Hybrid transport modes, grant time defaults to 300 seconds. For Unicast mode, grant time can be between 30 to 7200. + example: 300 + description: PTP Advanced Configuration. + precisionTimeOrder: + title: precisionTimeOrder type: object properties: - uuid: + purchaseOrderNumber: type: string - description: Uniquely identifies a change - type: + description: Purchase order number + customerReferenceNumber: type: string - description: Type of change - enum: - - BGP_IPv4_PREFIX_FILTER_UPDATE - - BGP_IPv4_PREFIX_FILTER_CREATION - - BGP_IPv4_PREFIX_FILTER_DELETION - - BGP_IPv6_PREFIX_FILTER_UPDATE - - BGP_IPv6_PREFIX_FILTER_CREATION - - BGP_IPv6_PREFIX_FILTER_DELETION - href: + description: Customer reference number + orderNumber: type: string - description: Route filter change URI - format: uri - description: Current state of latest route filter change - RouteFiltersPatchRequestItem: - required: - - op - - path - - value + description: Order Reference Number + description: Precision Time Order + timeServiceOperation: type: object properties: - op: - type: string - description: Handy shortcut for operation name - example: replace - path: + operationalStatus: type: string - description: path to change - example: /name - value: - type: object - description: new value for updated parameter - description: Route filter change operation data - RouteFiltersChangeOperation: + description: time service operational status + enum: + - UP + - DOWN + - DEGRADED + description: time service operational data + precisionTimePackagePostResponse: + title: precisionTimePackagePostResponse required: - - op - - path - - value + - code type: object properties: - op: + href: type: string - description: Handy shortcut for operation name - enum: - - add - - replace - - remove - path: + format: uri + code: type: string - description: path inside document leading to updated parameter - example: / - value: - $ref: "#/components/schemas/RouteFiltersBase" - description: Route filter change operation data - RouteFilterConnectionsData: + enum: + - NTP_STANDARD + - NTP_ENTERPRISE + - PTP_STANDARD + - PTP_ENTERPRISE + example: + href: https://api.equinix.com/fabric/v4/timeServicePackage/NTP_STANDARD + code: NTP_STANDARD + virtualConnectionTimeServiceResponse: + title: fabricConnectionResponse type: object properties: href: type: string description: Connection URI format: uri - example: https://api.equinix.com/fabric/v4/connections/81331c52-04c0-4656-a4a7-18c52669348f + readOnly: true type: - $ref: "#/components/schemas/ConnectionType" + type: string + description: Connection Type. uuid: type: string - description: Route filter identifier + description: Connection UUID. format: uuid - example: 695a8471-6595-4ac6-a2f4-b3d96ed3a59d - name: - type: string - example: connection-1 - SearchFilter: - description: Top-level filter that can be either an AND expression or OR expression - oneOf: - - $ref: "#/components/schemas/SearchAndExpression" - - $ref: "#/components/schemas/SearchOrExpression" - SearchAndExpression: - required: - - and - type: object - properties: - and: - maxItems: 8 - minItems: 1 - type: array - items: - $ref: "#/components/schemas/SearchFilterExpression" - SearchFilterExpression: - description: Filter expression that can be AND, OR, or a simple expression - oneOf: - - $ref: "#/components/schemas/SearchAndExpression" - - $ref: "#/components/schemas/SearchOrExpression" - - $ref: "#/components/schemas/SearchSimpleExpression" - SearchOrExpression: - required: - - or + aSide: + $ref: "#/components/schemas/virtualConnectionSide" + zSide: + $ref: "#/components/schemas/virtualConnectionSide" + description: Fabric Connection Precision Time Service Response Object + precisionTimePrice: + title: precisionTimePrice type: object properties: - or: - maxItems: 8 - minItems: 1 + currency: + type: string + description: offering price currency + charges: type: array items: - $ref: "#/components/schemas/SearchFilterExpression" - SearchSimpleExpression: - required: - - operator - - property - - values + $ref: "#/components/schemas/PriceCharge" + description: Precision Time Price + connectionLink: type: object properties: - property: + href: type: string - operator: + format: uri + example: https://api.equinix.com/fabric/v4/timeServices/92dc376a-a932-43aa-a6a2-c806dedbd784/connections + type: type: string - example: = enum: - - = - - "!=" - - IN - - NOT IN - - LIKE - - ILIKE - - BETWEEN - - ">" - - ">=" - - < - - <= - values: - maxItems: 8 - minItems: 1 - type: array - items: - type: string - description: Simple filter expression with property, operator, and values - RouteFilterSortCriteria: + - EVPL_VC + uuid: + type: string + format: uuid + StreamSearchAsset: type: object properties: - direction: - $ref: "#/components/schemas/RouteFilterSortDirection" - property: - $ref: "#/components/schemas/RouteFilterSortBy" - RouteFilterSortDirection: - type: string - description: Sorting direction - enum: - - DESC - - ASC - default: DESC - RouteFilterSortBy: - type: string - description: Possible field names to use on sorting - enum: - - /type - - /uuid - - /name - - /project/projectId - - /state - - /changeLog/createdDateTime - - /changeLog/updatedDateTime - - /changeLog/deletedDateTime - default: /changeLog/updatedDateTime - RouteFilterRuleState: - type: string - description: Route filter rule status - enum: - - PROVISIONING - - REPROVISIONING - - DEPROVISIONING - - PROVISIONED - - DEPROVISIONED - - NOT_PROVISIONED - - NOT_DEPROVISIONED - RouteFilterRulesChange: - required: - - type - - uuid + href: + type: string + description: Stream Asset URI + format: uri + readOnly: true + uuid: + type: string + description: Equinix-assigned access point identifier + format: uuid + example: c9b8e7a2-f3b1-4576-a4a9-1366a63df170 + streamUuid: + type: string + description: Equinix-assigned access point identifier + format: uuid + example: d4b8e7a2-f3b1-4576-a4a9-1366a63df171 + type: + type: string + description: Asset type + example: XF_PORT + metricsEnabled: + type: boolean + description: enable metric + example: true + attachmentStatus: + type: string + description: asset status + enum: + - ATTACHING + - ATTACHED + - DETACHED + - DETACHING + - FAILED + projectId: + type: string + description: project ic + example: "123" + description: Stream object + StreamSubscriptionSinkResponse: type: object properties: - uuid: + uri: type: string - description: Uniquely identifies a change + description: any publicly reachable http endpoint type: type: string - description: Type of change + description: destination type enum: - - BGP_IPv4_PREFIX_FILTER_RULE_UPDATE - - BGP_IPv4_PREFIX_FILTER_RULE_CREATION - - BGP_IPv4_PREFIX_FILTER_RULE_DELETION - - BGP_IPv6_PREFIX_FILTER_RULE_UPDATE - - BGP_IPv6_PREFIX_FILTER_RULE_CREATION - - BGP_IPv6_PREFIX_FILTER_RULE_DELETION - href: + - DATADOG + - GOOGLE_PUBSUB + - PAGERDUTY + - SERVICENOW + - SLACK + - SPLUNK_HEC + - TEAMS + - WEBHOOK + batchEnabled: + type: boolean + description: batch mode on/off + example: false + batchSizeMax: + type: integer + description: maximum batch size + batchWaitTimeMax: + type: integer + description: maximum batch waiting time + credential: + $ref: "#/components/schemas/StreamSubscriptionSinkCredential" + settings: + $ref: "#/components/schemas/StreamSubscriptionSinkSetting" + host: type: string - description: Route Filter Change URI - format: uri - description: Current state of latest route filter rule change - RouteFilterRulesPatchRequestItem: - required: - - op - - path - - value + description: sink host + description: Create Stream destination + StreamSubscriptionOperation: type: object properties: - op: + eventsDeliveredCount: + type: integer + description: count of delivered events + metricsDeliveredCount: + type: integer + description: count of delivered metrics + alertsDeliveredCount: + type: integer + description: count of delivered alerts + lastSuccessfulDeliveryDateTime: type: string - description: Handy shortcut for operation name - example: replace - path: + description: last successful date time of delivered event, metric, or alert + format: date-time + suspendedDateTime: type: string - description: path to change - example: /prefixMatch - value: - type: object - description: new value for updated parameter - description: Route filter rule change operation data - RouteFilterRulesChangeOperation: - required: - - op - - path - - value + description: suspended date time of stream subscription delivery for event, metric, or alert + format: date-time + errors: + type: array + description: List of error information for stream subscription delivery + items: + $ref: "#/components/schemas/StreamSubscriptionOperationErrors" + description: Stream subscription operational information + StreamSubscriptionOperationErrors: type: object properties: - op: + errorCode: type: string - description: Handy shortcut for operation name - enum: - - add - - replace - - remove - path: + description: Equinix Observability error code + errorMessage: type: string - description: path inside document leading to updated parameter - example: / - value: - $ref: "#/components/schemas/RouteFilterRulesBase" - description: Route filter rule change operation data - RouteAggregationState: - type: string - description: Route Aggregation status - enum: - - PROVISIONING - - REPROVISIONING - - DEPROVISIONING - - PROVISIONED - - DEPROVISIONED - - NOT_PROVISIONED - - NOT_DEPROVISIONED - RouteAggregationsChange: - required: - - type - - uuid + description: Equinix Observability error message + dateTime: + type: string + description: Equinix Observability error date time + format: date-time + additionalInfo: + $ref: "#/components/schemas/StreamSubscriptionOperationAdditionalInfo" + description: Error information for stream subscription delivery + StreamSubscriptionOperationAdditionalInfo: type: object properties: - uuid: + property: type: string - description: Uniquely identifies a change - type: + description: Additional attribute for error information + statusCode: type: string - description: Type of change - enum: - - BGP_IPv4_PREFIX_AGGREGATION_UPDATE - - BGP_IPv4_PREFIX_AGGREGATION_CREATION - - BGP_IPv4_PREFIX_AGGREGATION_DELETION - - BGP_IPv6_PREFIX_AGGREGATION_UPDATE - - BGP_IPv6_PREFIX_AGGREGATION_CREATION - - BGP_IPv6_PREFIX_AGGREGATION_DELETION - href: + description: HTTP error status code response from sink type if error occurred + reason: type: string - description: Route AGGREGATION Change URI - format: uri - description: Current state of latest Route Aggregation change - RouteAggregationsPatchRequestItem: - required: - - op - - path - - value + description: HTTP error message response from sink type if error occurred + description: External error information from subscription sink + StreamSubscriptionFilter: type: object properties: - op: + and: + maxItems: 8 + type: array + items: + $ref: "#/components/schemas/StreamFilter" + StreamFilter: + type: object + anyOf: + - $ref: "#/components/schemas/StreamFilterSimpleExpression" + - $ref: "#/components/schemas/StreamFilterOrFilter" + StreamFilterSimpleExpression: + type: object + properties: + property: type: string - description: Handy shortcut for operation name - example: replace - path: + description: | + Possible field names to use on filters: + * `/subject` - subject + * `/type` - type + example: /type + operator: type: string - description: path to change - example: /name - value: - type: object - description: new value for updated parameter - description: Route Aggregation change operation data - RouteAggregationsChangeOperation: - required: - - op - - path - - value + description: | + Possible operators to use on filters: + * `=` - equal + * `in` - in + * `LIKE` - case-sensitive like + * `ILIKE` - case-insensitive like + example: = + values: + type: array + description: | + ### Supported event or metric names to use on filters with property /type: + * `*` - all events or metrics + * `equinix.fabric.port.*` - port events or metrics + * `equinix.fabric.connection.*` - connection events or metrics + * `equinix.fabric.router.*` - cloud router events + * `equinix.fabric.metro.*` - metro metrics + * `equinix.fabric.network.*` - network events + * `equinix.fabric.service_token.*` - service token events + * `equinix.network_edge.*` - network edge events + * `equinix.network_edge.acl.*` - network edge acl events + * `equinix.network_edge.device.*` - network edge device events + * `equinix.access_manager.*` - identity access manager events + * `equinix.access_manager.user.role.*` - identity access manager user role events + ### Supported event or metric names to use on filters with property /subject: + * `*` - all events or metrics + * `/fabric/v4/ports/` - port events or metrics + * `/fabric/v4/connections/` - connection events or metrics + * `/fabric/v4/routers/` - cloud router events + * `/fabric/v4/metros/` - metro metrics + * `/fabric/v4/networks/` - network events + * `/fabric/v4/tokens/` - service token events + * `/ne/v1/acl/` - network edge acl events + * `/ne/v1/devices/` - network edge device events + * `/am/v2/users//roleAssignments/` - identity access manager events + items: + type: string + StreamFilterOrFilter: + type: object + properties: + or: + maxItems: 3 + type: array + items: + $ref: "#/components/schemas/StreamFilterSimpleExpression" + MetricSelectorResponse: + type: object + properties: + include: + type: array + description: Stream alert rule filtered by metric name + items: + type: string + example: equinix.fabric.metro.sv_da.latency + ResourceSelectorResponse: type: object properties: - op: + include: + type: array + description: | + ### Supported metric names to use on filters with property /subject: + * `/fabric/v4/ports/` - port metrics + * `/fabric/v4/connections/` - connection metrics + * `/fabric/v4/metros/` - metro latency metrics + items: + type: string + DetectionMethodResponse: + type: object + properties: + type: type: string - description: Handy shortcut for operation name + description: | + * THRESHOLD - Alert when a metric crosses a defined threshold by user. + * OUTLIER - Intelligent Alert that has an outlier behavior. This option is currently supported for metro latency metric. enum: - - add - - replace - - remove - path: + - THRESHOLD + - OUTLIER + windowSize: type: string - description: path inside document leading to updated parameter - example: / - value: - $ref: "#/components/schemas/RouteAggregationsBase" - description: Route Aggregation change operation data - RouteAggregationConnectionsData: - type: object - properties: - href: + description: Stream alert rule metric window size + example: PT15M + operand: type: string - description: Connection URI - format: uri - example: https://api.equinix.com/fabric/v4/connections/81331c52-04c0-4656-a4a7-18c52669348f - type: - $ref: "#/components/schemas/ConnectionType" - uuid: + description: Stream alert rule metric operand + enum: + - ABOVE + - BELOW + warningThreshold: type: string - description: Route Aggregation identifier - format: uuid - example: 695a8471-6595-4ac6-a2f4-b3d96ed3a59d - name: + description: Stream alert rule metric warning threshold + criticalThreshold: type: string - example: connection-1 - RouteAggregationSortCriteria: - type: object - properties: - direction: - $ref: "#/components/schemas/RouteAggregationSortDirection" - property: - $ref: "#/components/schemas/RouteAggregationSortBy" - RouteAggregationSortDirection: - type: string - description: Sorting direction - enum: - - DESC - - ASC - default: DESC - RouteAggregationSortBy: - type: string - description: Possible field names to use on sorting - enum: - - /type - - /uuid - - /name - - /project/projectId - - /state - - /changeLog/createdDateTime - - /changeLog/updatedDateTime - - /changeLog/deletedDateTime - default: /changeLog/updatedDateTime - RouteAggregationRuleState: - type: string - description: Route Aggregation Rule status - enum: - - PROVISIONING - - REPROVISIONING - - DEPROVISIONING - - PROVISIONED - - DEPROVISIONED - - NOT_PROVISIONED - - NOT_DEPROVISIONED - RouteAggregationRulesChange: - required: - - type - - uuid + description: Stream alert rule metric critical threshold + CompanyProfileContact: type: object properties: - uuid: - type: string - description: Uniquely identifies a change type: type: string - description: Type of change + description: Contact Type + example: support enum: - - BGP_IPv4_PREFIX_AGGREGATION_RULE_UPDATE - - BGP_IPv4_PREFIX_AGGREGATION_RULE_CREATION - - BGP_IPv4_PREFIX_AGGREGATION_RULE_DELETION - href: - type: string - description: Route Aggregation Change URI - format: uri - description: Current state of latest Route Aggregation Rule change - RouteAggregationRulesPatchRequestItem: - required: - - op - - path - - value + - SUPPORT + contacts: + type: array + items: + $ref: "#/components/schemas/CompanyProfileContact_contacts" + CompanyProfileState: + type: string + description: Company Profile State + CompanyMetro: type: object properties: - op: + href: type: string - description: Handy shortcut for operation name - example: replace - path: + metroCode: type: string - description: path to change - example: /prefix - value: - type: object - description: new value for updated parameter - description: Route Aggregation Rule change operation data - RouteAggregationRulesChangeOperation: - required: - - op - - path - - value + CompanyLogo: type: object properties: - op: + href: type: string - description: Handy shortcut for operation name - enum: - - add - - replace - - remove - path: + uuid: type: string - description: path inside document leading to updated parameter - example: / - value: - $ref: "#/components/schemas/RouteAggregationRulesBase" - description: Route Aggregation Rule change operation data - SimplifiedLocationWithoutIBX: - required: - - metroCode + extensionType: + type: string + CompanyServiceProfile: type: object properties: - metroHref: - type: string - description: The Canonical URL at which the resource resides. - example: https://api.equinix.com/fabric/v4/metros/AM - region: - type: string - example: AMER, APAC, EMEA - metroName: + href: type: string - example: Amsterdam - metroCode: + uuid: type: string - example: AM - CloudRouterPostRequestPackage: - required: - - code + PrivateService: type: object properties: href: type: string - description: Fabric Cloud Router URI - format: uri - example: https://api.equinix.com/fabric/v4/routerPackages/LAB - type: - type: string - description: Cloud Router package type - example: ROUTER_PACKAGE - enum: - - ROUTER_PACKAGE - code: + uuid: type: string - description: Cloud Router package code - example: LAB - enum: - - LAB - - BASIC - - STANDARD - - ADVANCED - - PREMIUM - description: Fabric Cloud Router Package Type - CloudRouterAccessPointState: - type: string - description: Access point lifecycle state - enum: - - PROVISIONED - - PROVISIONING - - DEPROVISIONING - - DEPROVISIONED - - REPROVISIONING - - NOT_PROVISIONED - - NOT_DEPROVISIONED - CloudRouterChange: - required: - - type - - updatedDateTime + CompanyProfileChange: type: object properties: uuid: type: string - description: Uniquely identifies a change type: type: string - description: Type of change - enum: - - ROUTER_UPDATE status: type: string - description: Current outcome of the change flow - enum: - - COMPLETED - - FAILED - - REQUESTED createdDateTime: type: string - description: Set when change flow starts format: date-time - example: 2020-11-06T07:00:00Z updatedDateTime: type: string - description: Set when change object is updated format: date-time - example: 2020-11-06T07:00:00Z - information: - type: string - description: Additional information data: - type: array - items: - $ref: "#/components/schemas/CloudRouterChangeOperation" - description: Current state of latest CloudRouter change - CloudRouterChangeOperation: - required: - - op - - path - - value + $ref: "#/components/schemas/CompanyProfileChangeItem" + CompanyProfileSortDirection: + type: string + description: Sorting direction + default: ASC + enum: + - DESC + - ASC + IssueLoa: + title: IssueLoa type: object - properties: - op: - type: string - description: Handy shortcut for operation name - enum: - - replace - - add - - remove - path: - type: string - description: path inside document leading to updated parameter - value: + description: Issue Loa + allOf: + - $ref: "#/components/schemas/LoaRequest" + - required: + - demarcationPoint type: object - description: new value for updated parameter - description: Fabric Cloud Router change operation data - CloudRouterActionType: + properties: + expirationDateTime: + $ref: "#/components/schemas/LoaExpiration" + requestor: + $ref: "#/components/schemas/LoaRequestor" + demarcationPoint: + $ref: "#/components/schemas/LoaDemarcationPoint" + RequestLoa: + title: RequestLoa + description: Request Loa + allOf: + - $ref: "#/components/schemas/LoaRequest" + - required: + - location + type: object + properties: + issuer: + $ref: "#/components/schemas/LoaIssuer" + location: + $ref: "#/components/schemas/LoaLocation" + LoaType: type: string - description: Cloud router action type + description: | + Type of Letter of Authorization + example: PATCH_PANEL_PORT_LOA enum: - - BGP_SESSION_STATUS_UPDATE - - ROUTE_TABLE_ENTRY_UPDATE - - RECEIVED_ROUTE_ENTRY_UPDATE - - ADVERTISED_ROUTE_ENTRY_UPDATE - RouterActionsConnection: + - CAGE_LOA + - PATCH_PANEL_LOA + - PATCH_PANEL_PORT_LOA + LoaProductType: + type: string + description: | + Product type associated with this LOA.
XC - Cross Connect
XF_PORT - Fabric Port
VD - Network Edge + example: XC + enum: + - XC + - XF_PORT + - VD + LoaState: + type: string + description: Current lifecycle state of the LOA. + example: ACTIVE + enum: + - PENDING + - FAILED + - PENDING_AUTHORIZATION + - PENDING_ACCEPTANCE + - CANCELLED + - INACTIVE + - ACTIVE + - EXPIRED + LoaRequestor: type: object properties: - uuid: + email: type: string - description: Connection UUID - example: 557400f8-d360-11e9-bb65-2a2ae2dbcce4 - href: + description: Email address of the requestor contact. + format: email + example: user@org1.com + orgId: + type: integer + description: Organization ID of the requestor. + example: 9257 + orgName: type: string - example: https://api.equinix.com/fabric/v4/connections/557400f8-d360-11e9-bb65-2a2ae2dbcce4 - type: - $ref: "#/components/schemas/ConnectionType" - operation: - $ref: "#/components/schemas/Operation" - description: Connection object for router actions - RouterActionsRouter: + description: Organization name of the requestor. + example: ABC Inc. + description: Requestor + LoaIssuer: type: object properties: - uuid: - type: string - description: Router UUID - example: a1c6b7fd-aead-410a-96b4-b1dfa1071700 - href: + email: type: string - example: https://api.equinix.com/fabric/v4/routers/a1c6b7fd-aead-410a-96b4-b1dfa1071700 - type: + description: Email address of the issuer contact. + format: email + example: user@org1.com + orgId: + type: integer + description: Organization ID of the issuer. + example: 9257 + orgName: type: string - enum: - - XF_ROUTER - operation: - $ref: "#/components/schemas/Operation" - description: Router object for router actions - CloudRouterCommandType: - type: string - description: Fabric Cloud Router Command Type - example: PING_COMMAND - enum: - - PING_COMMAND - - TRACEROUTE_COMMAND - CloudRouterCommandRequestPayload: - required: - - destination - - sourceConnection + description: Organization name of the issuer. + example: ABC Inc. + description: Issuer + LoaDemarcationPoint: type: object properties: - destination: + cageUniqueSpaceId: type: string - description: Fabric Cloud Router Ping or Traceroute Command Destination - example: 8.8.8.8 - sourceConnection: - $ref: "#/components/schemas/CloudRouterCommandRequestConnection" - timeout: - type: integer - description: | - Timeout in seconds for Fabric Cloud Router Command: - - For `PING_COMMAND`: Packet timeout duration. The default value is 5. - - For `TRACEROUTE_COMMAND`: Probe timeout duration. - The default value is 2 and it is not configurable. - example: 2 - dataBytes: - maximum: 9000 - minimum: 16 - type: integer - description: | - Ping Command DataBytes. - This field is only applicable for commands of type `PING_COMMAND`. - example: 100 - default: 64 - probes: - type: integer - description: | - Number of probes for Fabric Cloud Router Traceroute Command. - This field is only applicable for commands of type `TRACEROUTE_COMMAND` and is not configurable. - example: 3 - default: 3 - hopsMax: - maximum: 30 - type: integer - description: | - Maximum number of hops for the traceroute command. - This field is only applicable for commands of type `TRACEROUTE_COMMAND`. - example: 20 - default: 20 - description: Fabric Cloud Router Command Request - CloudRouterCommandState: - type: string - description: Fabric Cloud Router Command State - example: SUCCEEDED - enum: - - PENDING - - SUCCEEDED - - FAILED - - DELETED - CloudRouterCommandRequestResponse: - type: object - properties: - destination: + description: Unique identifier of the Cage. + example: SV2:00:000000 + patchPanelId: type: string - description: Fabric Cloud Router Ping or Traceroute Command Destination - example: 8.8.8.8 - sourceConnection: - $ref: "#/components/schemas/CloudRouterCommandRequestConnection" - timeout: - type: integer - description: | - Timeout in seconds for Fabric Cloud Router Command: - - For `PING_COMMAND`: Packet timeout duration. The default value is 5. - - For `TRACEROUTE_COMMAND`: Probe timeout duration. - The default value is 2 and it is not configurable. - example: 2 - dataBytes: - maximum: 9000 - minimum: 16 - type: integer - description: | - Ping Command DataBytes. - This field is only applicable for commands of type `PING_COMMAND`. - example: 100 - default: 64 - interval: - type: integer - description: | - Time in milliseconds between sending each packet. - This field is only applicable for commands of type `PING_COMMAND`. - example: 1000 - default: 1000 - count: - type: integer description: | - Total number of ping requests. - This field is only applicable for commands of type `PING_COMMAND`. - example: 5 - default: 5 - probes: + Unique identifier of the Patch Panel. + example: CP:Demarc:1259684 + patchPanelPortA: type: integer description: | - Number of probes for Fabric Cloud Router Traceroute Command. - This field is only applicable for commands of type `TRACEROUTE_COMMAND` and is not configurable. - example: 3 - default: 3 - hopsMax: - maximum: 30 + Specify the desired port number.
When ports are not provided, next available ports will be used. + example: 23 + patchPanelPortB: type: integer description: | - Maximum number of hops for the traceroute command. - This field is only applicable for commands of type `TRACEROUTE_COMMAND`. - example: 20 - default: 20 - description: Fabric Cloud Router Command Request - CloudRouterCommandResponse: - type: object - oneOf: - - $ref: "#/components/schemas/CloudRouterCommandPingResponse" - - $ref: "#/components/schemas/CloudRouterCommandTracerouteResponse" - RouteTableEntry: - required: - - changeLog - - state - - type + Specify the desired port number.
When ports are not provided, next available ports will be used.
Required for Connector type FC and ST only. + example: 24 + connectorType: + $ref: "#/components/schemas/LoaPatchPanelConnectorType" + description: | + Specifies the demarcation point.
For CAGE_LOA - cageUniqueSpaceId is required.
For PATCH_PANEL_LOA - patchPanelId is required.
For PATCH_PANEL_PORT_LOA - patchPanelId, patchPanelPortA, patchPanelPortB + and connectorType is required. + LoaLocation: type: object properties: - type: - $ref: "#/components/schemas/RouteTableEntryType" - protocolType: - $ref: "#/components/schemas/RouteTableEntryProtocolType" - state: - $ref: "#/components/schemas/RouteTableEntryState" - prefix: - type: string - example: 192.168.10.0/24 - nextHop: + ibxCode: type: string - example: 10.10.10.5 - MED: - type: integer - example: 5 - localPreference: - type: integer - example: 200 - asPath: - type: array - items: - type: string - example: "20100" - connection: - $ref: "#/components/schemas/RouteTableEntry_connection" - changeLog: - $ref: "#/components/schemas/Changelog" - description: Route table entry object - code: + description: IBX Code + example: AM1 + description: Eligible location where LOA can be issued. + LoaExpiration: type: string - description: Cloud Router package code - example: LAB - enum: - - LAB - - BASIC - - STANDARD - - ADVANCED - - PREMIUM - PackageChangeLog: + description: | + Date and time when this LOA expires.
Default to 3 months from the creation date + format: date-time + example: 2026-11-06T07:00:00Z + LoaChangelog: type: object properties: - createdDateTime: + createdBy: type: string - format: date-time - example: 2020-11-06T07:00:00Z - updatedDateTime: + description: Created by User Key + example: johnsmith + createdByFullName: + type: string + description: Created by User Full Name + example: John Smith + createdByEmail: + type: string + description: Created by User Email Address + example: john.smith@example.com + createdDateTime: type: string + description: Created by Date and Time format: date-time example: 2020-11-06T07:00:00Z - description: Cloud Router package change log - ApiServices: - type: object - properties: - route: + updatedBy: type: string - description: service routes - status: + description: Updated by User Key + example: johnsmith + updatedByFullName: type: string - description: service status - changedDateTime: + description: Updated by User Full Name + example: John Smith + updatedByEmail: type: string - description: service status change date - description: Available services details - ValidateConnectionResponse: - type: object - properties: - uuid: + description: Updated by User Email Address + example: john.smith@example.com + updatedDateTime: type: string - description: Equinix-assigned connection identifier - bandwidth: - maximum: 100000 - minimum: 0 - type: integer - description: Connection bandwidth in Mbps - redundancy: - $ref: "#/components/schemas/ConnectionRedundancy" - aSide: - $ref: "#/components/schemas/ConnectionSide" - zSide: - $ref: "#/components/schemas/ConnectionSide" - description: Validate Connection specification - NetworkType: - type: string - description: Network type - enum: - - EVPLAN - - EPLAN - - IPWAN - - EVPTREE - - EPTREE - NetworkScope: + description: Updated by Date and Time + format: date-time + example: 2020-11-06T07:00:00Z + description: Change log + LoaActionType: type: string - description: Network scope + description: Action to perform on the LOA. + example: LOA_ISSUER_AUTHORIZATION enum: - - REGIONAL - - GLOBAL - - LOCAL - NetworkState: + - LOA_ISSUER_AUTHORIZATION + - LOA_REQUESTOR_ACCEPTANCE + - LOA_COPY_LINK + - LOA_SEND_EMAIL_NOTIFICATION + - LOA_CANCEL + LoaActionData: + type: object + properties: + demarcationPoint: + $ref: "#/components/schemas/LoaDemarcationPoint" + expirationDateTime: + $ref: "#/components/schemas/LoaExpiration" + portalUrl: + $ref: "#/components/schemas/LoaMagicLink" + description: | + Action Data.
For LOA_ISSUER_AUTHORIZATION — always required. + LoaActionState: type: string - description: Network status - example: ACTIVE + description: Action State enum: - - ACTIVE - - INACTIVE - - DELETED - SimplifiedNetworkChange: + - COMPLETED + - FAILED + - PENDING + LoaConsumer: type: object properties: href: type: string - description: Network URI + description: Consumer URI format: uri - readOnly: true - example: https://api.equinix.com/fabric/v4/networks/2a4fb415-5a7f-436f-bae6-02f5e403deec/changes/4b17da68-3d6b-436d-9c8f-2105f3b950d9 + example: https://api.equinix.com/fabric/v4/ports/29cc7878-54e3-4e1a-8651-87a61354bac2 uuid: type: string - description: Uniquely identifies a change + description: Consumer Identifier format: uuid - example: 4b17da68-3d6b-436d-9c8f-2105f3b950d9 + example: 30cc7878-54e3-4e1a-8651-87a61354bad4 type: - $ref: "#/components/schemas/NetworkChangeType" - description: Current state of latest network change - NetworkOperation: - type: object - properties: - equinixStatus: - $ref: "#/components/schemas/NetworkEquinixStatus" - description: Network operational data - Link: + $ref: "#/components/schemas/LoaProductType" + changeLog: + $ref: "#/components/schemas/LoaChangelog" + description: Associated consumer response + AppDomainType: + type: string + description: App Domain Type + example: APP_DOMAIN + default: APP_DOMAIN + enum: + - APP_DOMAIN + x-order: 2 + AppDomainState: + type: string + description: App Domain lifecycle state + format: string + example: PENDING_VERIFICATION + enum: + - PENDING_VERIFICATION + - PROVISIONING_FAILED + - PROVISIONED + - DEPROVISIONING + - DEPROVISIONING_FAILED + - DEPROVISIONED + x-order: 6 + AppDomainChange: + required: + - type + - updatedDateTime type: object properties: - href: + uuid: type: string - description: Resource URI - format: uri - readOnly: true - rel: + description: Uniquely identifies a change + type: type: string - description: OperationId from Swagger hub spec - method: + description: Type of change + enum: + - APP_DOMAIN_UPDATE + status: type: string - description: Http method type - contentType: + description: Current outcome of the change flow + enum: + - COMPLETED + - FAILED + - REQUESTED + createdDateTime: type: string - description: Content type for the response - authenticate: - type: boolean - description: Authentication required or not - NetworkChangeOperation: + description: Set when change flow starts + format: date-time + example: 2026-06-29T07:00:00Z + updatedDateTime: + type: string + description: Set when change object is updated + format: date-time + example: 2026-06-29T07:15:00Z + data: + type: array + items: + $ref: "#/components/schemas/AppDomainChangeOperation" + description: Current state of latest AppDomain change + AppDomainChangeOperation: required: - op - path @@ -24860,604 +33150,783 @@ components: path: type: string description: path inside document leading to updated parameter - example: /name + enum: + - /description value: type: object description: new value for updated parameter - description: Network change operation data - NetworkSortCriteriaResponse: - type: object - properties: - direction: - $ref: "#/components/schemas/NetworkSortDirectionResponse" - property: - $ref: "#/components/schemas/NetworkSortByResponse" - NetworkChangeType: - type: string - description: Type of change - enum: - - NETWORK_CREATION - - NETWORK_UPDATE - - NETWORK_DELETION - NetworkChangeStatus: + x-go-type: json.RawMessage + description: App Domain change operation data + AppLinkState: type: string - description: Current outcome of the change flow + description: App Link lifecycle state + format: string + example: PROVISIONING enum: - - APPROVED - - COMPLETED - - FAILED - - REJECTED - - REQUESTED - - SUBMITTED_FOR_APPROVAL - precisionTimePackageRequest: - title: precisionTimePackageRequest + - PROVISIONING + - PROVISIONING_FAILED + - PROVISIONED + - DEPROVISIONING + - DEPROVISIONING_FAILED + - DEPROVISIONED + - REPROVISIONING + x-order: 6 + AppDomainAttachedAppLink: required: - - code + - type + - uuid type: object properties: - code: + href: type: string - description: Precision Time Service Level - enum: - - NTP_STANDARD - - NTP_ENTERPRISE - - PTP_STANDARD - - PTP_ENTERPRISE - description: Precision Time Service Level Request - example: - code: NTP_STANDARD - virtualConnectionUuid: - title: fabricConnectionUuid + description: Resource URI + format: uri + readOnly: true + example: https://api.equinix.com/fabric/v4/appDomains/20f3ef8e-d670-4236-86fa-bb0038adcfc3/appLinks/23cd19ab-d3bb-478b-9f25-bd12a3af1914 + x-order: 1 + type: + $ref: "#/components/schemas/AppLinkType" + uuid: + type: string + description: Equinix-assigned access point identifier + format: uuid + example: 23cd19ab-d3bb-478b-9f25-bd12a3af1914 + x-order: 3 + name: + type: string + description: Customer-provided App Link name + format: string + example: Atlassian App Link + x-order: 4 + description: + type: string + description: Customer-provided App Link description + format: string + example: Atlassian App Link in SV + x-order: 5 + state: + $ref: "#/components/schemas/AppLinkState" + router: + $ref: "#/components/schemas/AppLinkCloudRouter" + ipv4Address: + type: string + description: App Link IP address + format: ipv4 + example: 192.168.10.1 + x-order: 8 + bandwidth: + type: integer + description: App Link aggregated data transfer capacity in Mbps + example: 1000 + x-order: 9 + project: + $ref: "#/components/schemas/Project" + description: App Link object + AppLinkType: + type: string + description: App Link Type + example: APP_LINK + default: APP_LINK + enum: + - APP_LINK + x-order: 2 + AppLinkPostRequestRouter: required: - uuid type: object + properties: + uuid: + type: string + description: Cloud Router UUID + format: uuid + example: 36204584-2ae1-44f6-980f-08ecd555d9c6 + description: Cloud Router reference for App Link + AppLinkCloudRouter: + type: object properties: href: type: string - description: Connection URI + description: Resource URI format: uri - readOnly: true + example: https://api.equinix.com/fabric/v4/routers/36204584-2ae1-44f6-980f-08ecd555d9c6 + x-order: 1 type: type: string - description: Connection Type + description: Cloud Router Type + example: XF_ROUTER + enum: + - XF_ROUTER + x-order: 2 uuid: type: string - description: Connection UUID. + description: Cloud Router UUID format: uuid - description: UUID of the Fabric Connection Instance - example: - uuid: 095be615-a8ad-4c33-8e9c-c7612fbf6c9f - ipv4: - title: ipv4 + example: 36204584-2ae1-44f6-980f-08ecd555d9c6 + x-order: 3 + description: App Link Cloud Router + x-order: 7 + AppLinkChange: required: - - networkMask - - primary - - secondary + - type + - updatedDateTime type: object properties: - primary: + uuid: type: string - description: Primary Timing Server IP Address - format: ipv4 - secondary: + description: Uniquely identifies a change + type: type: string - description: Secondary Timing Server IP Address - format: ipv4 - networkMask: + description: Type of change + enum: + - APP_LINK_UPDATE + status: type: string - description: Network Mask - format: ipv4 - defaultGateway: + description: Current outcome of the change flow + enum: + - COMPLETED + - FAILED + - REQUESTED + createdDateTime: type: string - description: Gateway Interface IP address - format: ipv4 - description: EPT service network information - example: - primary: 10.0.0.1 - secondary: 10.0.0.2 - networkMask: 255.255.255.240 - defaultGateway: 10.0.0.3 - ntpAdvanceConfiguration: - type: array - description: NTP Advanced configuration - MD5 Authentication. - items: - $ref: "#/components/schemas/md5" - ptpAdvanceConfiguration: + description: Set when change flow starts + format: date-time + example: 2026-06-29T07:00:00Z + updatedDateTime: + type: string + description: Set when change object is updated + format: date-time + example: 2026-06-29T07:15:00Z + data: + type: array + items: + $ref: "#/components/schemas/AppLinkChangeOperation" + description: Current state of latest AppLink change + AppLinkChangeOperation: + required: + - op + - path + - value type: object properties: - timeScale: + op: type: string - description: Time Scale value, ARB denotes Arbitrary and PTP denotes Precision Time Protocol. - example: ARB - enum: - - ARB - - PTP - domain: - maximum: 127 - minimum: 0 - type: integer - description: The PTP domain value. - example: 0 - priority1: - maximum: 248 - minimum: 0 - type: integer - description: The priority1 value determines the best primary clock, Lower value indicates higher priority. - example: 128 - priority2: - maximum: 248 - minimum: 0 - type: integer - description: The priority2 value differentiates and prioritizes the primary clock to avoid confusion when priority1-value is the same for different primary clocks in a network. - example: 128 - logAnnounceInterval: - type: integer - description: Logarithmic value that controls the rate of PTP Announce packets from the PTP time server. Default is 1 (1 packet every 2 seconds), Unit packets/second. - example: 1 - enum: - - -3 - - -2 - - -1 - - 0 - - 1 - logSyncInterval: - type: integer - description: Logarithmic value that controls the rate of PTP Sync packets. Default is -4 (16 packets per second), Unit packets/second.. - example: -4 - enum: - - -5 - - -4 - - -3 - - -2 - - -1 - - 0 - - 1 - logDelayReqInterval: - type: integer - description: Logarithmic value that controls the rate of PTP DelayReq packets. Default is -4 (16 packets per second), Unit packets/second.. - example: -4 + description: Handy shortcut for operation name enum: - - -5 - - -4 - - -3 - - -2 - - -1 - - 0 - - 1 - transportMode: + - replace + - add + - remove + path: type: string + description: path inside document leading to updated parameter enum: - - MULTICAST - - UNICAST - - HYBRID - grantTime: - maximum: 7200 - minimum: 30 - type: integer - description: Unicast Grant Time in seconds. For Multicast and Hybrid transport modes, grant time defaults to 300 seconds. For Unicast mode, grant time can be between 30 to 7200. - example: 300 - description: PTP Advanced Configuration. - precisionTimeOrder: - title: precisionTimeOrder + - /name + - /description + - /bandwidth + - /ipv4Address + value: + type: object + description: new value for updated parameter + x-go-type: json.RawMessage + description: App Link change operation data + AppLinkAttachState: + type: string + description: App Link attachment lifecycle state + format: string + example: ATTACHED + enum: + - ATTACHING + - ATTACHED + - DETACHING + - DETACHED + - FAILED + x-order: 10 + AppLinkAttachedAppDomain: + required: + - type + - uuid type: object properties: - purchaseOrderNumber: + href: type: string - description: Purchase order number - customerReferenceNumber: + description: Resource URI + format: uri + readOnly: true + example: https://api.equinix.com/fabric/v4/appLinks/23cd19ab-d3bb-478b-9f25-bd12a3af1914/appDomains/20f3ef8e-d670-4236-86fa-bb0038adcfc3 + x-order: 1 + type: + $ref: "#/components/schemas/AppDomainType" + uuid: type: string - description: Customer reference number - orderNumber: + description: Equinix-assigned access point identifier + format: uuid + example: 20f3ef8e-d670-4236-86fa-bb0038adcfc3 + x-order: 3 + name: type: string - description: Order Reference Number - description: Precision Time Order - timeServiceOperation: + description: Customer-provided App Domain name + format: string + example: atlassian.net + x-order: 4 + description: + type: string + description: Customer-provided App Domain description + format: string + example: Atlassian Domain + x-order: 5 + state: + $ref: "#/components/schemas/AppDomainState" + project: + $ref: "#/components/schemas/Project" + attachmentStatus: + $ref: "#/components/schemas/AppLinkAttachState" + description: App Domain object associated with App Link + AppServiceType: + type: string + description: App Service Type + example: APP_SERVICE + default: APP_SERVICE + enum: + - APP_SERVICE + x-order: 2 + AppLinkAppServiceAttachmentChange: + required: + - type + - updatedDateTime type: object properties: - operationalStatus: + uuid: type: string - description: time service operational status + description: Uniquely identifies a change + type: + type: string + description: Type of change enum: - - UP - - DOWN - - DEGRADED - description: time service operational data - precisionTimePackagePostResponse: - title: precisionTimePackagePostResponse + - APP_LINK_UPDATE + status: + type: string + description: Current outcome of the change flow + enum: + - COMPLETED + - FAILED + - REQUESTED + createdDateTime: + type: string + description: Set when change flow starts + format: date-time + example: 2026-06-29T07:00:00Z + updatedDateTime: + type: string + description: Set when change object is updated + format: date-time + example: 2026-06-29T07:15:00Z + data: + type: array + items: + $ref: "#/components/schemas/AppLinkChangeOperation" + description: Current state of latest AppLink change + AppLinkAppServiceAttachmentChangeOperation: required: - - code + - op + - path + - value type: object properties: - href: + op: type: string - format: uri - code: + description: Handy shortcut for operation name + enum: + - replace + - add + - remove + path: type: string + description: path inside document leading to updated parameter enum: - - NTP_STANDARD - - NTP_ENTERPRISE - - PTP_STANDARD - - PTP_ENTERPRISE - example: - href: https://api.equinix.com/fabric/v4/timeServicePackage/NTP_STANDARD - code: NTP_STANDARD - virtualConnectionTimeServiceResponse: - title: fabricConnectionResponse + - /destinationIp + value: + type: object + description: new value for updated parameter + x-go-type: json.RawMessage + description: App Link change operation data + AppLinkAttachedAppService: + required: + - destinationIp + - geoScope + - type + - uuid type: object properties: href: type: string - description: Connection URI + description: Resource URI format: uri readOnly: true + example: https://api.equinix.com/fabric/v4/appLinks/23cd19ab-d3bb-478b-9f25-bd12a3af1914/appServices/5008a109-9d1c-485c-b0ba-de9736f283c2 + x-order: 1 type: - type: string - description: Connection Type. + $ref: "#/components/schemas/AppServiceType" uuid: type: string - description: Connection UUID. + description: Equinix-assigned access point identifier format: uuid - aSide: - $ref: "#/components/schemas/virtualConnectionSide" - zSide: - $ref: "#/components/schemas/virtualConnectionSide" - description: Fabric Connection Precision Time Service Response Object - precisionTimePrice: - title: precisionTimePrice - type: object - properties: - currency: + example: 5008a109-9d1c-485c-b0ba-de9736f283c2 + x-order: 3 + name: type: string - description: offering price currency - charges: + description: Customer-provided App Service name + format: string + example: Atlassian App Service + x-order: 4 + description: + type: string + description: Customer-provided App Service description + format: string + example: Atlassian App Service in SV + x-order: 5 + state: + $ref: "#/components/schemas/AppServiceState" + endpoint: + type: string + description: Accessible endpoint through this service + example: equinixjira.atlassian.net + x-order: 7 + sourceDomains: type: array + description: List of source domains from where traffic is allowed items: - $ref: "#/components/schemas/PriceCharge" - description: Precision Time Price - connectionLink: - type: object - properties: - href: - type: string - format: uri - example: https://api.equinix.com/fabric/v4/timeServices/92dc376a-a932-43aa-a6a2-c806dedbd784/connections - type: + type: string + example: equinix.com + x-order: 8 + project: + $ref: "#/components/schemas/Project" + geoScope: type: string - enum: - - EVPL_VC - uuid: + description: Geo scope for the App Service + example: GLOBAL + x-order: 4 + destinationIp: type: string - format: uuid - StreamSubscriptionSinkResponse: + description: Target IP for forwarding API requests + format: ipv4 + example: 10.10.1.110 + x-order: 5 + attachmentStatus: + $ref: "#/components/schemas/AppLinkAttachState" + description: App Service object associated with App Link + AppServiceState: + type: string + description: App Service lifecycle state + example: PROVISIONING + enum: + - PROVISIONING + - PROVISIONED + - DEPROVISIONING + - DEPROVISIONED + - REPROVISIONING + x-order: 6 + AppServiceChange: + required: + - type + - updatedDateTime type: object properties: - uri: + uuid: type: string - description: any publicly reachable http endpoint + description: Uniquely identifies a change type: type: string - description: destination type + description: Type of change enum: - - DATADOG - - GOOGLE_PUBSUB - - PAGERDUTY - - SERVICENOW - - SLACK - - SPLUNK_HEC - - TEAMS - - WEBHOOK - batchEnabled: - type: boolean - description: batch mode on/off - example: false - batchSizeMax: - type: integer - description: maximum batch size - batchWaitTimeMax: - type: integer - description: maximum batch waiting time - credential: - $ref: "#/components/schemas/StreamSubscriptionSinkCredential" - settings: - $ref: "#/components/schemas/StreamSubscriptionSinkSetting" - host: + - APP_SERVICE_UPDATE + status: type: string - description: sink host - description: Create Stream destination - StreamSubscriptionOperation: - type: object - properties: - eventsDeliveredCount: - type: integer - description: count of delivered events - metricsDeliveredCount: - type: integer - description: count of delivered metrics - alertsDeliveredCount: - type: integer - description: count of delivered alerts - lastSuccessfulDeliveryDateTime: + description: Current outcome of the change flow + enum: + - COMPLETED + - FAILED + - REQUESTED + createdDateTime: type: string - description: last successful date time of delivered event, metric, or alert + description: Set when change flow starts format: date-time - suspendedDateTime: + example: 2026-06-29T07:00:00Z + updatedDateTime: type: string - description: suspended date time of stream subscription delivery for event, metric, or alert + description: Set when change object is updated format: date-time - errors: + example: 2026-06-29T07:15:00Z + data: type: array - description: List of error information for stream subscription delivery items: - $ref: "#/components/schemas/StreamSubscriptionOperationErrors" - description: Stream subscription operational information - StreamSubscriptionOperationErrors: + $ref: "#/components/schemas/AppServiceChangeOperation" + description: Current state of latest AppService change + AppServiceChangeOperation: + required: + - op + - path + - value type: object properties: - errorCode: - type: string - description: Equinix Observability error code - errorMessage: + op: type: string - description: Equinix Observability error message - dateTime: + description: Handy shortcut for operation name + enum: + - replace + - add + - remove + path: type: string - description: Equinix Observability error date time - format: date-time - additionalInfo: - $ref: "#/components/schemas/StreamSubscriptionOperationAdditionalInfo" - description: Error information for stream subscription delivery - StreamSubscriptionOperationAdditionalInfo: + description: path inside document leading to updated parameter + enum: + - /name + - /description + - /sourceDomains + value: + type: object + description: new value for updated parameter + x-go-type: json.RawMessage + description: App Service change operation data + AppServiceAttachedAppLink: + required: + - type + - uuid type: object properties: - property: + href: type: string - description: Additional attribute for error information - statusCode: + description: Resource URI + format: uri + readOnly: true + example: https://api.equinix.com/fabric/v4/appServices/5008a109-9d1c-485c-b0ba-de9736f283c2/appLinks/23cd19ab-d3bb-478b-9f25-bd12a3af1914 + x-order: 1 + type: + $ref: "#/components/schemas/AppLinkType" + uuid: type: string - description: HTTP error status code response from sink type if error occurred - reason: + description: Equinix-assigned access point identifier + format: uuid + example: 23cd19ab-d3bb-478b-9f25-bd12a3af1914 + x-order: 3 + name: type: string - description: HTTP error message response from sink type if error occurred - description: External error information from subscription sink - StreamSubscriptionFilter: - type: object - properties: - and: - maxItems: 8 - type: array - items: - $ref: "#/components/schemas/StreamFilter" - StreamFilter: - type: object - anyOf: - - $ref: "#/components/schemas/StreamFilterSimpleExpression" - - $ref: "#/components/schemas/StreamFilterOrFilter" - StreamFilterSimpleExpression: + description: Customer-provided App Link name + format: string + example: Atlassian App Link + x-order: 4 + description: + type: string + description: Customer-provided App Link description + format: string + example: Atlassian App Link in SV + x-order: 5 + state: + $ref: "#/components/schemas/AppLinkState" + router: + $ref: "#/components/schemas/AppLinkCloudRouter" + ipv4Address: + type: string + description: App Link IP address + format: ipv4 + example: 192.168.10.1 + x-order: 8 + bandwidth: + type: integer + description: App Link aggregated data transfer capacity in Mbps + example: 1000 + x-order: 9 + project: + $ref: "#/components/schemas/Project" + description: App Link object + AppSubscriptionState: + type: string + description: App Subscription lifecycle state + example: PROVISIONING + enum: + - PROVISIONING + - PROVISIONING_FAILED + - PROVISIONED + - DEPROVISIONING + - DEPROVISIONING_FAILED + - DEPROVISIONED + - REPROVISIONING + x-order: 6 + AppServiceAttachedAppSubscription: + required: + - state + - type + - uuid type: object properties: - property: + href: type: string - description: | - Possible field names to use on filters: - * `/subject` - subject - * `/type` - type - example: /type - operator: + description: Resource URI + format: uri + readOnly: true + example: https://api.equinix.com/fabric/v4/appSubscriptions/20f3ef8e-d670-4236-86fa-bb0038adcfc3 + x-order: 1 + type: + $ref: "#/components/schemas/AppSubscriptionType" + uuid: type: string - description: | - Possible operators to use on filters: - * `=` - equal - * `in` - in - * `LIKE` - case-sensitive like - * `ILIKE` - case-insensitive like - example: = - values: + description: Equinix-assigned access point identifier + format: uuid + example: 20f3ef8e-d670-4236-86fa-bb0038adcfc3 + x-order: 3 + state: + $ref: "#/components/schemas/AppSubscriptionState" + account: + $ref: "#/components/schemas/SimplifiedAccount" + description: App Subscription object attached to an App Service + AppSubscriptionType: + type: string + description: App Subscription Type + example: APP_SUBSCRIPTION + default: APP_SUBSCRIPTION + enum: + - APP_SUBSCRIPTION + x-order: 2 + AppSubscriptionSourceRequest: + required: + - ipSubnets + type: object + properties: + appLink: + $ref: "#/components/schemas/AppSubscriptionSourceRequestAppLink" + ipSubnets: type: array - description: | - ### Supported event or metric names to use on filters with property /type: - * `*` - all events or metrics - * `equinix.fabric.port.*` - port events or metrics - * `equinix.fabric.connection.*` - connection events or metrics - * `equinix.fabric.router.*` - cloud router events - * `equinix.fabric.metro.*` - metro metrics - * `equinix.fabric.network.*` - network events - * `equinix.fabric.service_token.*` - service token events - * `equinix.network_edge.*` - network edge events - * `equinix.network_edge.acl.*` - network edge acl events - * `equinix.network_edge.device.*` - network edge device events - * `equinix.access_manager.*` - identity access manager events - * `equinix.access_manager.user.role.*` - identity access manager user role events - ### Supported event or metric names to use on filters with property /subject: - * `*` - all events or metrics - * `/fabric/v4/ports/` - port events or metrics - * `/fabric/v4/connections/` - connection events or metrics - * `/fabric/v4/routers/` - cloud router events - * `/fabric/v4/metros/` - metro metrics - * `/fabric/v4/networks/` - network events - * `/fabric/v4/tokens/` - service token events - * `/ne/v1/acl/` - network edge acl events - * `/ne/v1/devices/` - network edge device events - * `/am/v2/users//roleAssignments/` - identity access manager events + description: List of IP subnets in CIDR notation items: type: string - StreamFilterOrFilter: + format: ipv4-cidr + example: 192.168.100.0/24 + description: Source details for the Subscription + x-order: 4 + AppSubscriptionTargetRequest: + required: + - geoScope + - prioritization type: object properties: - or: - maxItems: 3 - type: array - items: - $ref: "#/components/schemas/StreamFilterSimpleExpression" - MetricSelectorResponse: + appService: + $ref: "#/components/schemas/AppSubscriptionTargetRequestAppService" + geoScope: + type: string + description: Geo scope + example: GLOBAL + prioritization: + $ref: "#/components/schemas/AppSubscriptionPrioritization" + description: Target details for the Subscription + x-order: 5 + AppSubscriptionSource: + required: + - ipSubnets type: object properties: - include: + appLink: + $ref: "#/components/schemas/AppSubscriptionSourceAppLink" + ipSubnets: type: array - description: Stream alert rule filtered by metric name + description: List of IP subnets in CIDR notation items: type: string - example: equinix.fabric.metro.sv_da.latency - ResourceSelectorResponse: + format: ipv4-cidr + example: 192.168.100.0/24 + description: Source details for the Subscription + x-order: 4 + AppSubscriptionTarget: + required: + - geoScope + - prioritization type: object properties: - include: - type: array - description: | - ### Supported metric names to use on filters with property /subject: - * `/fabric/v4/ports/` - port metrics - * `/fabric/v4/connections/` - connection metrics - * `/fabric/v4/metros/` - metro latency metrics - items: - type: string - DetectionMethodResponse: + appService: + $ref: "#/components/schemas/AppSubscriptionTargetAppService" + geoScope: + type: string + description: Geo scope + example: GLOBAL + prioritization: + $ref: "#/components/schemas/AppSubscriptionPrioritization" + description: Target details for the Subscription + x-order: 5 + AppSubscriptionChange: + required: + - type + - updatedDateTime type: object properties: + uuid: + type: string + description: Uniquely identifies a change type: type: string - description: | - * THRESHOLD - Alert when a metric crosses a defined threshold by user. - * OUTLIER - Intelligent Alert that has an outlier behavior. This option is currently supported for metro latency metric. + description: Type of change enum: - - THRESHOLD - - OUTLIER - windowSize: - type: string - description: Stream alert rule metric window size - example: PT15M - operand: + - APP_SUBSCRIPTION_UPDATE + status: type: string - description: Stream alert rule metric operand + description: Current outcome of the change flow enum: - - ABOVE - - BELOW - warningThreshold: + - COMPLETED + - FAILED + - REQUESTED + createdDateTime: type: string - description: Stream alert rule metric warning threshold - criticalThreshold: + description: Set when change flow starts + format: date-time + example: 2026-06-29T07:00:00Z + updatedDateTime: type: string - description: Stream alert rule metric critical threshold - Notification: - type: object - CompanyProfileState: - type: object - CompanyMetro: + description: Set when change object is updated + format: date-time + example: 2026-06-29T07:15:00Z + data: + type: array + items: + $ref: "#/components/schemas/AppSubscriptionChangeOperation" + description: Current state of latest AppSubscription change + AppSubscriptionChangeOperation: + required: + - op + - path + - value type: object properties: - href: + op: type: string - metroCode: + description: Handy shortcut for operation name + enum: + - replace + - add + - remove + path: type: string - CompanyLogo: + description: path inside document leading to updated parameter + value: + type: object + description: new value for updated parameter + x-go-type: json.RawMessage + description: App Subscription change operation data + GatewayType: + type: string + description: Gateway type + enum: + - VPN_GW + Router: type: object properties: href: type: string + description: Fabric Cloud Router URI + format: uri + readOnly: true + example: https://api.equinix.com/fabric/v4/routers/c93a9ca0-bb56-490b-8bce-4b2bdaeb4d46 uuid: type: string - extensionType: - type: string - CompanyServiceProfile: - type: object - properties: - href: - type: string - uuid: + description: Cloud Router UUID + format: uuid + example: c9b8e7a2-f3b1-4576-a4a9-1366a63df170 + type: type: string - PrivateService: + enum: + - XF_ROUTER + GatewayState: + type: string + description: Gateway lifecycle state + example: PROVISIONED + enum: + - PROVISIONING + - PROVISIONED + - REPROVISIONING + - DEPROVISIONING + - DEPROVISIONED + - NOT_PROVISIONED + - NOT_DEPROVISIONED + Account: type: object properties: - href: - type: string - uuid: + accountId: + type: integer + description: Account identifier + accountNumber: + type: integer + description: Account number + accountName: type: string - CompanyProfileChange: - type: object - properties: - uuid: + description: Account name + ucmId: type: string - type: + description: Account ucm id + globalCustId: type: string - status: + description: Global customer organization id + orgId: + type: integer + description: Customer organization id + organizationName: type: string - createdDateTime: + description: Customer organization name + subCustomes: + type: array + description: All sub customer accounts + items: + $ref: "#/components/schemas/Account" + countryCode: type: string - format: date-time - updatedDateTime: + description: Account country code + operationalUnit: type: string - format: date-time - data: - $ref: "#/components/schemas/CompanyProfileChangeItem" - CompanyProfileSortDirection: - type: string - description: Sorting direction - enum: - - DESC - - ASC - default: ASC - LoaType: - type: string - description: Loa Type - example: PATCH_PANEL_PORT_LOA - enum: - - PATCH_PANEL_PORT_LOA - - CAGE_LOA - LoaState: - type: string - description: Loa State - example: ACTIVE - enum: - - PENDING - - FAILED - - PENDING_AUTHORIZATION - - PENDING_ACCEPTANCE - - REJECTED - - CANCELLED - - INACTIVE - - ACTIVE - - EXPIRED - LoaActionType: - type: string - description: Loa Action Type - example: AUTHORIZE_LOA - enum: - - AUTHORIZE_LOA - - ACCEPT_LOA - - COPY_LOA - - SEND_LOA - - CANCEL_LOA - LoaActionState: - type: string - description: Loa Action State - enum: - - COMPLETED - - FAILED - - PENDING - Agent: + description: Account operational unit + operationalUnitMetros: + type: array + description: Account operational unit metros + items: + type: string + signatureRequired: + type: boolean + description: Is signature required + poBearing: + type: boolean + description: Purchase order bearing + default: + type: boolean + description: Default account or not + GatewayChangeOperation: + required: + - op + - path + - value type: object properties: - uuid: + op: type: string - description: Agent Uuid - format: uuid - type: + description: Handy shortcut for operation name + enum: + - replace + - add + - remove + path: type: string - example: ANO_AGENT - ChatMessage: + description: path inside document leading to updated parameter + value: + type: object + description: new value for updated parameter + Phone: type: object properties: - messages: - $ref: "#/components/schemas/Messages" - description: Chat message and tool call information during the agent operation - Messages: - type: array - description: List of chat messages - items: - $ref: "#/components/schemas/Messages_inner" - ToolCallInformation: - type: array - description: List of tools called during the agent operation - items: - $ref: "#/components/schemas/ToolCallInformation_inner" + type: + type: string + description: Notification Type + example: MOBILE + enum: + - MOBILE + - OFFICE + number: + pattern: ^\+[1-9]\d{1,14}$ + type: string + description: Phone number + contactPreference: + $ref: "#/components/schemas/ContactPreference" ConnectionPriority: type: string description: Connection priority in redundancy group @@ -25487,6 +33956,8 @@ components: $ref: "#/components/schemas/Interface" network: $ref: "#/components/schemas/SimplifiedNetwork" + interconnect: + $ref: "#/components/schemas/Interconnect" environment: $ref: "#/components/schemas/ProviderEnvironment" sellerRegion: @@ -25513,6 +33984,18 @@ components: enum: - LEAF - ROOT + productOffering: + $ref: "#/components/schemas/ProductOffering" + bandwidthCommit: + maximum: 100000 + minimum: 0 + type: integer + description: Bandwidth commit in Mbps + providerIdentifier: + type: string + description: Provider identifier + address: + $ref: "#/components/schemas/Address" description: Access point object InternetAccess: type: object @@ -25522,21 +34005,6 @@ components: description: Internet Access Service Identifier format: uuid description: Internet Access Details - ConnectionCompanyProfile: - type: object - properties: - id: - type: number - description: company profile identifier - example: 1 - name: - type: string - description: company profile name - example: Company-1 - globalOrgId: - type: string - description: global customer organization value - description: Connection Company Profile Details ConnectionInvitation: type: object properties: @@ -25654,6 +34122,63 @@ components: type: string description: Equinix-assigned platform connection identifier description: Connection specification + ExchangeServiceResponseBgp: + type: object + properties: + customerPeerIp: + type: string + example: 12.1.1.1 + domainName: + type: string + example: ix-v4.gw01.sin.example.net + primaryRouteServerIp: + type: string + example: 206.126.239.251/22 + secondaryRouteServerIp: + type: string + example: 206.126.239.252/22 + asSet: + type: string + example: AS-EC-SV + mlpeEnabled: + type: boolean + example: true + md5AuthKey: + type: string + example: TestAuthKey12345 + rcMd5AuthKey: + type: string + example: TestAuthKey123456 + prefixes: + type: array + description: List of IP prefix + items: + type: string + description: IP prefix + maxPrefixLimit: + type: integer + format: int64 + example: 300 + prependSelfEnabled: + type: boolean + example: true + RouteCollector: + type: object + properties: + asn: + type: integer + description: Route Collector ASN + format: int64 + example: 1238 + ipV4: + type: string + description: Route Collector ipV4 address + example: 206.126.239.250/22 + ipV6: + type: string + description: Route Collector ipV6 address + example: 2001:504:0:2:0:6:5517:1/64 + description: Route Collector InternetAccessConnection: required: - href @@ -25739,6 +34264,22 @@ components: type: string description: Unique identifier for the IP block format: uuid + InterconnectSortDirectionResponse: + type: string + description: Sorting direction + default: DESC + enum: + - DESC + - ASC + InterconnectSortByResponse: + type: string + description: Possible field names to use on sorting + default: /changeLog/updatedDateTime + enum: + - /changeLog/createdDateTime + - /changeLog/updatedDateTime + - /name + - /state IpBlockProductType: type: string enum: @@ -25754,7 +34295,7 @@ components: - VIRTUAL_PORT_PRODUCT - CLOUD_ROUTER_PRODUCT - PRECISION_TIME_PRODUCT - - METRO_CONNECT_PRODUCT + - OPTICAL_CONNECT_PRODUCT PriceCharge: type: object properties: @@ -25792,6 +34333,8 @@ components: $ref: "#/components/schemas/VirtualConnectionPriceASide" zSide: $ref: "#/components/schemas/VirtualConnectionPriceZSide" + geoScope: + $ref: "#/components/schemas/GeoScopeType" description: Virtual Connection Product configuration IpBlockPrice: type: object @@ -25866,6 +34409,25 @@ components: connection: $ref: "#/components/schemas/TimeServicePriceConnection" description: Time Service Product configuration + OpticalConnectPrice: + type: object + properties: + type: + $ref: "#/components/schemas/OpticalConnectPricePortType" + bandwidth: + minimum: 0 + type: integer + description: Bandwidth in Mbps + example: 1000 + pathType: + $ref: "#/components/schemas/OpticalConnectPricePathType" + connectionDestinationType: + $ref: "#/components/schemas/OpticalConnectConnectionDestinationType" + aSide: + $ref: "#/components/schemas/OpticalConnectPriceASide" + zSide: + $ref: "#/components/schemas/OpticalConnectPriceZSide" + description: Optical Metro Connect Port Product configuration ServiceTokenSide: type: object properties: @@ -25875,6 +34437,50 @@ components: items: $ref: "#/components/schemas/AccessPointSelector" description: Connection link protocol,virtual device or network configuration + OpticalConnectPatchPanelFields: + type: object + properties: + patchPanelId: + type: string + description: Unique identifier of the patch panel. + example: CP:Demarc:1259684 + patchPanelPortA: + type: string + description: | + Specify the desired port number for Port A.
When ports are not provided, next available ports will be used. + example: "10" + patchPanelPortB: + type: string + description: | + Specify the desired port number for Port B.
When ports are not provided, next available ports will be used.
Required for Connector type FC, SC and ST only. + example: "11" + connectorType: + type: string + description: Type of Connector + example: SC + enum: + - FC + - SC + - LC + - ST + description: Patch Panel configuration. + OpticalConnectLocation: + type: object + properties: + ibxCode: + type: string + description: Equinix IBX data centre code. + example: SV1 + description: Destination location for BMMR and REMOTE connections. + OpticalConnectLOA: + type: object + properties: + uuid: + type: string + description: Identifier of the Letter of Authorization + example: 64de7e5-7fe7-41e6-b984-80d5aa159a0e + description: | + Letter of Authorization granting the right to terminate at the Z-side location.
Required for BMMR and REMOTE. PortOrderPurchaseOrder: type: object properties: @@ -26139,6 +34745,138 @@ components: description: Fabric Connection access point object. CompanyProfileChangeItem: type: object + LoaRequest: + required: + - authorizedProductType + - name + - type + type: object + properties: + type: + $ref: "#/components/schemas/LoaType" + name: + maxLength: 50 + minLength: 3 + type: string + description: A short, descriptive name for this LOA. + example: LOA-Equinix-SV1-2026 + description: + maxLength: 450 + minLength: 0 + type: string + description: Additional context about this LOA. + example: Authorization for patch panel port access to Equinix at SV1 + authorizedProductType: + $ref: "#/components/schemas/LoaProductType" + description: Create Loa + LoaPatchPanelConnectorType: + type: string + description: Connector Type + example: SC + enum: + - FC + - SC + - LC + - ST + LoaMagicLink: + type: string + description: | + Portal URL for the LOA to either accept from requestor
or authorize from the issuer. + readOnly: true + example: https://portal.equinix.com/fabric/loa/inventory/issuer/29cc7878-54e3-4e1a-8651-87a61354bac2/authorize + AppSubscriptionSourceRequestAppLink: + required: + - uuid + type: object + properties: + uuid: + type: string + description: Equinix-assigned access point identifier + format: uuid + example: 23cd19ab-d3bb-478b-9f25-bd12a3af1914 + description: App Link reference for App Subscription + AppSubscriptionTargetRequestAppService: + required: + - uuid + type: object + properties: + uuid: + type: string + description: Equinix-assigned access point identifier + format: uuid + example: 5008a109-9d1c-485c-b0ba-de9736f283c2 + description: App Service reference for App Subscription + AppSubscriptionPrioritization: + type: string + description: Prioritization strategy for forwarding API requests + example: LATENCY + enum: + - LATENCY + - PERFORMANCE + - UTILIZATION + - THRESHOLD + - ANY_TAG + AppSubscriptionSourceAppLink: + required: + - uuid + type: object + properties: + href: + type: string + description: Resource URI + format: uri + readOnly: true + example: https://api.equinix.com/fabric/v4/appLinks/23cd19ab-d3bb-478b-9f25-bd12a3af1914 + x-order: 1 + type: + type: string + description: App Link Type + example: APP_LINK + x-order: 2 + uuid: + type: string + description: Equinix-assigned access point identifier + format: uuid + example: 23cd19ab-d3bb-478b-9f25-bd12a3af1914 + x-order: 3 + description: App Link reference for App Subscription + AppSubscriptionTargetAppService: + required: + - uuid + type: object + properties: + href: + type: string + description: Resource URI + format: uri + readOnly: true + example: https://api.equinix.com/fabric/v4/appServices/5008a109-9d1c-485c-b0ba-de9736f283c2 + x-order: 1 + type: + type: string + description: App Service Type + example: APP_SERVICE + x-order: 2 + uuid: + type: string + description: Equinix-assigned access point identifier + format: uuid + example: 5008a109-9d1c-485c-b0ba-de9736f283c2 + x-order: 3 + description: App Service reference for App Subscription + ContactPreference: + type: object + properties: + timezone: + type: string + description: Timezone of the contact preference + availability: + type: string + description: Availability of the contact preference + enum: + - WORK_HOURS + - ANYTIME + description: Contact preference for the phone number AccessPointType: type: string description: Access point type @@ -26154,6 +34892,7 @@ components: - METAL_NETWORK - VPIC_INTERFACE - APP_LINK + - XF_IC SimplifiedPort: type: object properties: @@ -26409,26 +35148,41 @@ components: description: MCN assigned VPIC Interface Identifier format: uuid description: MCN VPIC Interface Information - LastMileConfig: + ProductOffering: type: object properties: - serviceType: + id: type: string - description: Last mile service type - bandwidth: - maximum: 100000 - minimum: 0 - type: integer - description: Last mile bandwidth in Mbps - address: + description: Product offering identifier + name: type: string - description: Last mile address - notifications: - type: array - description: Last mile notification contacts - items: - $ref: "#/components/schemas/LastMileNotificationInfo" - description: Last mile configuration for the connection. Applicable to zSide only. + description: Product offering name + description: Product offering for connection. Applicable to zSide only. + Address: + type: object + properties: + id: + type: string + description: Address identifier + streetNr: + type: string + description: Street number of address + streetName: + type: string + description: Street name of address + city: + type: string + description: City of address + stateOrProvince: + type: string + description: State of address + postCode: + type: string + description: Postal code of address + country: + type: string + description: Country of address + description: Address. VirtualConnectionPriceConnectionType: type: string description: Virtual Connection type @@ -26511,10 +35265,10 @@ components: VirtualPortServiceType: type: string description: Port service type. The default is managed-service provider (MSP). + default: MSP enum: - MSP - EPL - default: MSP VirtualPortConfiguration: type: object properties: @@ -26538,6 +35292,36 @@ components: aSide: $ref: "#/components/schemas/TimeServicePriceConnectionASide" description: Time Service Price Connection configuration + OpticalConnectPricePortType: + type: string + description: Optical Connect type. + example: OC + OpticalConnectPricePathType: + type: string + description: Optical Connect Port Path type. + enum: + - PROTECTED + - UNPROTECTED + - DUAL_DIVERSE + OpticalConnectConnectionDestinationType: + type: string + description: Destination Port connectivity type + enum: + - COLO + - BMMR + - REMOTE + OpticalConnectPriceASide: + type: object + properties: + location: + $ref: "#/components/schemas/OpticalConnectPriceLocation" + description: Optical Connection ASide configuration + OpticalConnectPriceZSide: + type: object + properties: + location: + $ref: "#/components/schemas/OpticalConnectPriceLocation" + description: Optical Connection ZSide configuration AccessPointSelector: type: object properties: @@ -26632,16 +35416,6 @@ components: - QINQ - EVPN_VXLAN - VXLAN - LastMileNotificationInfo: - type: object - properties: - key: - type: string - description: Key - value: - type: string - description: Value - description: Last mile notification contact information VirtualConnectionPriceAccessPointType: type: string description: Virtual Connection access point type @@ -26671,11 +35445,11 @@ components: ConnectivitySourceType: type: string description: Type of connectivity. COLO, colocation; BMMR, building meet-me room. The default is COLO.
A building meet-me room (BMMR) is a room within the same building where an Equinix IBX customer can connect with a non-Equinix IBX customer. + default: COLO enum: - COLO - BMMR - REMOTE - default: COLO VirtualPortPackageCode: type: string description: Virtual port package code @@ -26686,6 +35460,14 @@ components: accessPoint: $ref: "#/components/schemas/TimeServicePriceConnectionAccessPoint" description: Time Service Price Connection ASide configuration + OpticalConnectPriceLocation: + type: object + properties: + ibxCode: + type: string + description: IBX identifier + example: SV1 + description: Optical Connect Location SimplifiedMetadataEntity: type: object properties: @@ -26835,6 +35617,16 @@ components: properties: type: $ref: "#/components/schemas/InternetAccessBillingType" + InternetAccessRoutingProtocolBgpRequest_asn: + required: + - uuid + type: object + properties: + uuid: + type: string + description: Unique identifier of the ASN + format: uuid + example: ad8c5042-b553-4d5e-a2ac-c73bf6d4fd91 PriceError_additionalInfo: type: object properties: @@ -26895,6 +35687,13 @@ components: properties: rootOrgId: type: string + LoaResponse_operation: + type: object + properties: + consumersCount: + type: integer + description: Number of consumers associated with this LOA. + example: 10 Response_incomplete_details: type: object properties: @@ -26927,13 +35726,16 @@ components: type: integer description: The number of reasoning tokens. description: A detailed breakdown of the output tokens. - AgentActivities_metadata: + Gateway_ipv4: type: object properties: - chatMessage: - $ref: "#/components/schemas/ChatMessage" - toolCallInformation: - $ref: "#/components/schemas/ToolCallInformation" + primaryIp: + type: string + example: 192.168.1.1 + secondaryIp: + type: string + example: 192.168.1.2 + description: Gateway IPv4 address Metric_resource: type: object properties: @@ -26982,6 +35784,20 @@ components: href: type: string example: https://api.equinix.com/fabric/v4/connections/3066ab1d-af87-49d7-8a14-c9bdb57ac809 + InternetAccessRoutingProtocolBgp_asn: + required: + - uuid + type: object + properties: + href: + type: string + description: URI of the ASN resource + example: https://api.equinix.com/fabric/v4/asns/ad8c5042-b553-4d5e-a2ac-c73bf6d4fd91 + uuid: + type: string + description: Unique identifier of the ASN + format: uuid + example: ad8c5042-b553-4d5e-a2ac-c73bf6d4fd91 IpBlockRegulations_questions: required: - privateSpaceConsidered @@ -27016,28 +35832,16 @@ components: href: type: string format: uri - Messages_inner: - type: object - properties: - type: - type: string - description: Role of the message sender user or assistant - example: user - content: - type: string - description: Content of the chat message - ToolCallInformation_inner: - type: object + CompanyProfileContact_contacts: + required: + - email properties: name: type: string - description: Name of tools called - input: + role: type: string - description: Content of the tool request - response: + email: type: string - description: Content of the tool response VirtualConnectionPriceASide_accessPoint_port_settings: type: object properties: @@ -27113,137 +35917,12 @@ components: examples: "400": value: - - errorCode: EQ-3142102 - errorMessage: Connection has duplicate buyer-side VLAN ID for port or the same VLAN ID is in the process of being deleted and should be freed up soon - correlationId: cebc3d33-9037-4a2b-a7af-0ad65602cdec - additionalInfo: - - property: /aSide/accessPoint/linkProtocol - - errorCode: EQ-3142535 - errorMessage: The connection bandwidth provided in the connection request exceeds the bandwidth Limit on ServiceToken - details: Please enter bandwidth less than the Speed limit on ServiceToken - correlationId: test - additionalInfo: - - property: /aSide/serviceToken/uuid - - errorCode: EQ-3142536 - errorMessage: Remote connection cannot be created with the provided ServiceToken - details: Only local Connection can be created using this ServiceToken - correlationId: test - additionalInfo: - - property: /zSide/accessPoint/port/uuid - - errorCode: EQ-3142701 - errorMessage: The connection bandwidth provided in the connection request exceeds the bandwidth Limit on ServiceToken - details: not an authorized user - correlationId: test - - errorCode: EQ-3142501 - errorMessage: Invalid input - correlationId: 20d32a80-0d61-4333-bc03-707b591ae2f5 - additionalInfo: - - property: aSide/accessPoint/port/uuid - - errorCode: EQ-3142509 - errorMessage: Connection already deleted - correlationId: cebc3d33-9037-4a2b-a7af-0ad65602cdec - additionalInfo: - - property: uuid - - errorCode: EQ-3142510 - errorMessage: Connection is in transient state - correlationId: 20d32a80-0d61-4333-bc03-707b591ae2f5 - additionalInfo: - - property: uuid - - errorCode: EQ-3142221 - errorMessage: The primary and secondary token provided have different bandwidth tiers. Please use two tokens that support the same bandwidth tiers - correlationId: test - additionalInfo: - - property: /zSide/serviceToken/uuid - - errorCode: EQ-3142222 - errorMessage: The primary and secondary tokens have different encapsulation types (Dot1Q or QinQ). Please use two tokens that support the same encapsulation type - correlationId: test - additionalInfo: - - property: /zSide/serviceToken/uuid - - errorCode: EQ-3142223 - errorMessage: The primary and secondary tokens belong to different projects. Please use two tokens that belong to the same project - correlationId: test - additionalInfo: - - property: /zSide/serviceToken/uuid - - errorCode: EQ-3142224 - errorMessage: The primary and secondary ports have different port speeds (bandwidth). Please use two tokens that support the same port speed - correlationId: test - additionalInfo: - - property: /zSide/serviceToken/uuid - - errorCode: EQ-3142225 - errorMessage: The primary and secondary tokens provided are the same. Please provide a different token - correlationId: test - additionalInfo: - - property: /zSide/serviceToken/uuid - - errorCode: EQ-3142514 - errorMessage: Redundancy group is required - correlationId: test - additionalInfo: - - property: /redundancy/group - - errorCode: EQ-3142515 - errorMessage: Redundancy priority is required - correlationId: test - additionalInfo: - - property: /redundancy/priority - - errorCode: EQ-3142516 - errorMessage: Invalid redundancy group - correlationId: test - additionalInfo: - - property: /redundancy/group - - errorCode: EQ-3142517 - errorMessage: Invalid redundancy priority - correlationId: test - additionalInfo: - - property: /redundancy/priority - - errorCode: EQ-3142303 - errorMessage: Only Primary connection allowed for this CSP - correlationId: test - additionalInfo: - - property: /redundancy/priority - - errorCode: EQ-3142320 - errorMessage: For redundant connection, Service Profile should be the same - correlationId: test - additionalInfo: - - property: /zSide/accessPoint/profile/uuid - - errorCode: EQ-3142021 - errorMessage: For redundant connection, Fabric Cloud Router should be the same - correlationId: test - additionalInfo: - - property: /aSide/accessPoint/router/uuid - - errorCode: EQ-3142012 - errorMessage: Fabric Cloud Router is not in PROVISIONED state - correlationId: test - additionalInfo: - - property: /aSide/accessPoint/router/uuid - - errorCode: EQ-3142301 - errorMessage: Given profile does not exist - correlationId: test - additionalInfo: - - property: /zSide/accessPoint/profile/uuid - - errorCode: EQ-3142302 - errorMessage: Service provider does not exist in required zSide metro - correlationId: test - additionalInfo: - - property: /zSide/accessPoint/location/metroCode - - errorCode: EQ-3142013 - errorMessage: Invalid metro for Cloud Router connection - correlationId: test - additionalInfo: - - property: /aSide/accessPoint/router/uuid - - errorCode: EQ-3142304 - errorMessage: Private connections are not allowed on public profiles - correlationId: test - additionalInfo: - - property: visibility - - errorCode: EQ-3142306 - errorMessage: Requested bandwidth is not supported by service profile - correlationId: test - additionalInfo: - - property: /bandwidth - - errorCode: EQ-3142308 - errorMessage: Authentication key is required - correlationId: test + - errorCode: EQ-3036013 + errorMessage: Invalid Query Parameter + correlationId: c82ff3bc-de07-47e5-b3ec-53a009d01515 additionalInfo: - - property: /zSide/accessPoint/authenticationKey + - property: presence + reason: Allowed value for presence is MY_SERVICES "401": value: - errorCode: EQ-3000039 @@ -27251,10 +35930,9 @@ components: correlationId: c82ff3bc-de07-47e5-b3ec-53a009d01515 "403": value: - - errorCode: EQ-3045003 - errorMessage: Operation not allowed - correlationId: c82ff3bc-de07-47e5-b3ec-53a009d01515 - details: Operation not allowed for current user + - errorCode: EQ-3142402 + errorMessage: Do not have create connection permission on this port + correlationId: cebc3d33-9037-4a2b-a7af-0ad65602cdec "404": value: - errorCode: EQ-3045811 @@ -27271,16 +35949,17 @@ components: value: - errorCode: EQ-3040016 errorMessage: Unsupported media type, please check the request's Content-Type or Content-Encoding - correlationId: cebc3d33-9037-4a2b-a7af-0ad65602cdec + correlationId: c82ff3bc-de07-47e5-b3ec-53a009d01515 additionalInfo: - property: contentType reason: The payload format is in an unsupported format "500": value: - - errorCode: EQ-3045004 - errorMessage: Internal Server Error + - errorCode: EQ-3034003 + errorMessage: Method not supported,Please check the URL passed correlationId: c82ff3bc-de07-47e5-b3ec-53a009d01515 - details: Internal Server Error + additionalInfo: + - reason: method:PATCH AgentTemplatesGetAllResponseExample: value: pagination: @@ -27295,8 +35974,10 @@ components: description: connection bandwidth upgrader agent template state: PROVISIONED enabled: true - agentDefinition: + definition: url: /equinix/agent-factory/refs/heads/use_pdf_html/agent_factory_schema/equinix/fabric/v1/event_driven/upgrade-bw-primary-connection.md + modes: + - ON_EVENT changeLog: createdBy: testuser createdDateTime: 2024-05-06T16:21:18.545214 @@ -27336,13 +36017,55 @@ components: description: connection bandwidth upgrader agent template state: PROVISIONED enabled: true - agentDefinition: + definition: url: /equinix/agent-factory/refs/heads/use_pdf_html/agent_factory_schema/equinix/fabric/v1/event_driven/upgrade-bw-primary-connection.md + modes: + - ON_EVENT changeLog: createdBy: testuser createdDateTime: 2024-05-06T16:21:18.545214 updatedBy: testuser updatedDateTime: 2024-05-06T16:21:18.545214Z + AgentTemplatesSearchExample: + value: + filter: + and: + - property: /name + operator: IN + values: + - name1 + pagination: + offset: 0 + limit: 20 + AgentTemplatesTagsResponseExample: + value: + pagination: + offset: 0 + limit: 20 + total: 3 + data: + - href: https://api.equinix.com/fabric/v4/tags/d684aa26-8276-48b7-bb42-a6d9def0a418 + uuid: d684aa26-8276-48b7-bb42-a6d9def0a418 + type: PREDEFINED_TAG + name: equinix.fabric.agent_factory.templates.design + displayName: Design & Plan Agents + - href: https://api.equinix.com/fabric/v4/tags/e684aa26-8276-48b7-bb42-a6d9def0a418 + uuid: e684aa26-8276-48b7-bb42-a6d9def0a418 + type: PREDEFINED_TAG + name: equinix.fabric.agent_factory.templates.deploy + displayName: Deploy & Change Agents + - href: https://api.equinix.com/fabric/v4/tags/f684aa26-8276-48b7-bb42-a6d9def0a418 + uuid: f684aa26-8276-48b7-bb42-a6d9def0a418 + type: PREDEFINED_TAG + name: equinix.fabric.agent_factory.templates.monitor + displayName: Monitor & Report Agents + AgentTemplatesByUuidTagsResponseExample: + value: + href: https://api.equinix.com/fabric/v4/tags/d684aa26-8276-48b7-bb42-a6d9def0a418 + uuid: d684aa26-8276-48b7-bb42-a6d9def0a418 + type: PREDEFINED_TAG + name: equinix.fabric.agent_factory.templates.design + displayName: Design & Plan Agents AgentGetAllResponseExample: value: pagination: @@ -27361,8 +36084,17 @@ components: projectId: dadd3ab6-c0af-430c-8216-43d44f08c1c5 agentTemplate: uuid: 657400f8-c0af-430c-8216-43d44f08c1c5 + mode: ON_DEMAND configuration: prompt: Connection uuid is . Alert rule is . Upgrade bandwidth to 10GB. + activitiesCount: 0 + operation: + latestExecution: + href: https://api.equinix.com/fabric/v4/agents/d684aa26-8276-48b7-bb42-a6d9def0a418/activities/e684aa26-8276-48b7-bb42-a6d9def0a418 + uuid: e684aa26-8276-48b7-bb42-a6d9def0a418 + status: COMPLETED + startDateTime: 2026-07-29T00:00:00.001201Z + endDateTime: 2026-07-29T00:01:00.001201Z changeLog: createdBy: testuser createdDateTime: 2024-05-06T16:21:18.545214Z @@ -27417,6 +36149,7 @@ components: uuid: 657400f8-c0af-430c-8216-43d44f08c1c5 configuration: prompt: Connection uuid is . Alert rule is . Upgrade bandwidth to 10GB. + activitiesCount: 0 changeLog: createdBy: testuser createdDateTime: 2024-05-06T16:21:18.545214Z @@ -27445,6 +36178,14 @@ components: uuid: 657400f8-c0af-430c-8216-43d44f08c1c5 configuration: prompt: Connection uuid is . Alert rule is . Upgrade bandwidth to 10GB. + activitiesCount: 0 + operation: + latestExecution: + href: https://api.equinix.com/fabric/v4/agents/d684aa26-8276-48b7-bb42-a6d9def0a418/activities/e684aa26-8276-48b7-bb42-a6d9def0a418 + uuid: e684aa26-8276-48b7-bb42-a6d9def0a418 + status: COMPLETED + startDateTime: 2026-07-29T00:00:00.001201Z + endDateTime: 2026-07-29T00:01:00.001201Z changeLog: createdBy: testuser createdDateTime: 2024-05-06T16:21:18.545214Z @@ -27463,6 +36204,7 @@ components: uuid: 657400f8-c0af-430c-8216-43d44f08c1c5 configuration: prompt: Connection uuid is . Alert rule is . Upgrade bandwidth to 10GB. + activitiesCount: 0 changeLog: createdBy: testuser createdDateTime: 2024-05-06T16:21:18.545214Z @@ -27488,6 +36230,7 @@ components: uuid: 657400f8-c0af-430c-8216-43d44f08c1c5 configuration: prompt: Connection uuid is . Alert rule is . Upgrade bandwidth to 10GB. + activitiesCount: 0 changeLog: createdBy: testuser createdDateTime: 2024-05-06T16:21:18.545214Z @@ -27528,6 +36271,60 @@ components: changeLog: createdBy: testuser createdDateTime: 2024-05-06T16:21:18.545214Z + AgentActionGetAllResponseExample: + value: + pagination: + offset: 0 + limit: 20 + total: 1 + data: + - href: https://api.equinix.com/fabric/v4/agents/e59b74d7-58ca-408e-a406-b701e3fba0a7/actions/ee8532ca-7378-4343-b5f8-d17d9aad2895 + uuid: ee8532ca-7378-4343-b5f8-d17d9aad2895 + type: EXECUTE_AGENT + status: PENDING + schedule: + executeDateTime: 2026-03-20T10:10:10.000Z + changeLog: + createdBy: testUser@equinix.com + createdDateTime: 2026-03-10T10:10:10.000Z + AgentActionPostRequestExample: + value: + type: EXECUTE_AGENT + schedule: + executeDateTime: 2026-03-20T10:10:10.000Z + AgentActionResponseExample: + value: + href: https://api.equinix.com/fabric/v4/agents/e59b74d7-58ca-408e-a406-b701e3fba0a7/actions/ee8532ca-7378-4343-b5f8-d17d9aad2895 + uuid: ee8532ca-7378-4343-b5f8-d17d9aad2895 + type: EXECUTE_AGENT + status: PENDING + schedule: + executeDateTime: 2026-03-20T10:10:10.000Z + changeLog: + createdBy: testUser@equinix.com + createdDateTime: 2026-03-10T10:10:10.000Z + AgentActionDeleteResponseExample: + value: + href: https://api.equinix.com/fabric/v4/agents/e59b74d7-58ca-408e-a406-b701e3fba0a7/actions/ee8532ca-7378-4343-b5f8-d17d9aad2895 + uuid: ee8532ca-7378-4343-b5f8-d17d9aad2895 + type: EXECUTE_AGENT + status: DELETED + schedule: + executeDateTime: 2026-03-20T10:10:10.000Z + changeLog: + createdBy: testUser@equinix.com + createdDateTime: 2026-03-10T10:10:10.000Z + AgentSearchExample: + value: + filter: + and: + - property: /name + operator: IN + values: + - name1 + pagination: + offset: 0 + limit: 20 get-cloud-events-by-asset-id: value: pagination: @@ -27669,6 +36466,125 @@ components: pagination: offset: 0 limit: 20 + search-latest-operational-events: + value: + filter: + and: + - property: /subject + operator: IN + values: + - /fabric/v4/ports/8ac8ecfe-c7cb-4def-9f77-5ce93c19d83d + pagination: + offset: 0 + limit: 2 + search-latest-operational-events-response: + value: + pagination: + offset: 0 + limit: 2 + total: 1 + data: + - specversion: "1.0" + source: https://api.equinix.com/fabric/v4/cloudevents + id: 6c573287-9914-4202-8b6d-2d15e7da04b8 + type: equinix.fabric.port.status.down + subject: /fabric/v4/ports/8ac8ecfe-c7cb-4def-9f77-5ce93c19d83d + time: 2018-04-05T17:31:00.000Z + dataschema: https://equinix.github.io/equinix-cloudevents/jsonschema/equinix/fabric/v1/ChangeEvent.json + datacontenttype: application/json + severitynumber: 21 + severitytext: FATAL + equinixalert: raise/AABBcCCDDeEfFf123, + equinixproject: project-123 + data: + message: Virtual port 'port-name' status changed to DOWN + resource: + href: https://api.equinix.com//fabric/v4/ports/8ac8ecfe-c7cb-4def-9f77-5ce93c19d83d + uuid: 8ac8ecfe-c7cb-4def-9f77-5ce93c19d83d + type: XF_PORT + state: PROVISIONED + operation: + operationalStatus: DOWN + search-live-alerts: + value: + filter: + and: + - property: /equinixalert + operator: LIKE + values: + - raise/% + - property: /time + operator: BETWEEN + values: + - 2026-01-01T00:00:00.000Z + - 2026-01-02T00:00:00.000Z + - or: + - property: /equinixproject + operator: IN + values: + - 6a7ce6bb-4424-414d-bea4-7a6a05ff1919 + - property: /subject + operator: LIKE + values: + - /fabric/v4/metros/* + sort: + property: /time + order: DESC + pagination: + limit: 100 + offset: 0 + search-live-alerts-response: + value: + pagination: + offset: 0 + limit: 100 + total: 2 + data: + - specversion: "1.0" + source: https://api.equinix.com/fabric/v4/liveAlerts + id: 6c573287-9914-4202-8b6d-2d15e7da04b8 + type: equinix.fabric.connection.status.down + subject: /fabric/v4/connections/956a86fb-d03d-436c-8d5d-30d1f51f7688 + time: 2026-01-01T03:00:00.000Z + dataschema: https://equinix.github.io/equinix-cloudevents/jsonschema/equinix/fabric/v1/ChangeEvent.json + datacontenttype: application/json + severitynumber: 19 + severitytext: CRITICAL + equinixalert: raise/NCAB543WC4lrLpET8nLX4Vm8 + equinixproject: 6a7ce6bb-4424-414d-bea4-7a6a05ff1919 + data: + message: Connection 'Test-Connection' status changed to Down + resource: + href: https://api.equinix.com/fabric/v4/connections/956a86fb-d03d-436c-8d5d-30d1f51f7688 + uuid: 956a86fb-d03d-436c-8d5d-30d1f51f7688 + type: IP_VC + state: PROVISIONED + name: Test name + description: Test description + - specversion: "1.0" + source: https://api.equinix.com/fabric/v4/liveAlerts + id: 6c573287-9914-4202-8b6d-2d15e7da04b8 + type: equinix.fabric.metro.sv_ch.latency + subject: /fabric/v4/metros/SV + time: 2026-01-01T03:30:00.000Z + dataschema: https://equinix.github.io/equinix-cloudevents/jsonschema/equinix/fabric/v1/ChangeEvent.json + datacontenttype: application/json + severitynumber: 13 + severitytext: WARN + equinixalert: raise/DAEB543WC4lrLpET8nLX4Vm8 + data: + message: Abnormal detected for metro latency from Silicon to Chicago + resource: + href: https://api.equinix.com/fabric/v4/metros/SV + code: SV + type: XF_METRO + metrics: + - type: GAUGE + name: equinix.fabric.metro.sv_ch.latency + unit: ms + datapoints: + - endDateTime: 2026-01-01T03:30:00.000Z + value: 63.6634 get-metrics-by-asset-id: value: pagination: @@ -27755,6 +36671,117 @@ components: value: 251 - endDateTime: 2025-05-14T14:57:46.000Z value: 243 + maintenancesGetAll: + value: + pagination: + offset: 0 + limit: 20 + total: 2 + data: + - href: https://api.equinix.com/fabric/v4/ports/b2d93b39-02db-2dbc-ace0-30fa5c00ad04/maintenances/a1d93b39-02db-2dbc-ace0-30fa5c00ad04 + uuid: a1d93b39-02db-2dbc-ace0-30fa5c00ad04 + type: XF_MAINTENANCE + state: DEFERRED + incidentRefId: CHG0123456 + port: + href: https://api.equinix.com/fabric/v4/ports/b2d93b39-02db-2dbc-ace0-30fa5c00ad04 + type: XF_PORT + uuid: b2d93b39-02db-2dbc-ace0-30fa5c00ad04 + startDateTime: 2026-07-10T00:00:00Z + duration: PT8H + deferredDateTime: 2026-07-15T00:00:00Z + batchUuid: c3d93b39-02db-2dbc-ace0-30fa5c00ad04 + changeLog: + createdBy: admin_user + createdDateTime: 2026-07-01T09:00:00Z + updatedBy: test_user + updatedDateTime: 2026-07-05T14:30:00Z + - href: https://api.equinix.com/fabric/v4/ports/b2d93b39-02db-2dbc-ace0-30fa5c00ad04/maintenances/b1d93b39-02db-2dbc-ace0-30fa5c00ad04 + uuid: b1d93b39-02db-2dbc-ace0-30fa5c00ad04 + type: XF_MAINTENANCE + state: SCHEDULED + incidentRefId: CHG0123457 + port: + href: https://api.equinix.com/fabric/v4/ports/b2d93b39-02db-2dbc-ace0-30fa5c00ad04 + type: XF_PORT + uuid: b2d93b39-02db-2dbc-ace0-30fa5c00ad04 + startDateTime: 2026-07-11T00:00:00Z + duration: PT8H + batchUuid: c3d93b39-02db-2dbc-ace0-30fa5c00ad04 + changeLog: + createdBy: admin_user + createdDateTime: 2026-07-01T09:00:00Z + updatedBy: test_user + updatedDateTime: 2026-07-05T14:30:00Z + maintenanceGet: + value: + href: https://api.equinix.com/fabric/v4/ports/b2d93b39-02db-2dbc-ace0-30fa5c00ad04/maintenances/a1d93b39-02db-2dbc-ace0-30fa5c00ad04 + uuid: a1d93b39-02db-2dbc-ace0-30fa5c00ad04 + type: XF_MAINTENANCE + state: DEFERRED + incidentRefId: CHG0123456 + port: + href: https://api.equinix.com/fabric/v4/ports/b2d93b39-02db-2dbc-ace0-30fa5c00ad04 + type: XF_PORT + uuid: b2d93b39-02db-2dbc-ace0-30fa5c00ad04 + startDateTime: 2026-07-10T00:00:00Z + duration: PT8H + deferredDateTime: 2026-07-15T00:00:00Z + batchUuid: c3d93b39-02db-2dbc-ace0-30fa5c00ad04 + changeLog: + createdBy: admin_user + createdDateTime: 2026-07-01T09:00:00Z + updatedBy: test_user + updatedDateTime: 2026-07-05T14:30:00Z + maintenanceActionsGetAll: + value: + pagination: + offset: 0 + limit: 20 + total: 1 + data: + - href: https://api.equinix.com/fabric/v4/ports/29cc7878-54e3-4e1a-8651-87a61354bac2/maintenances/a1d93b39-02db-2dbc-ace0-30fa5c00ad04/actions/30cc7878-54e3-4e1a-8651-87a61354bad4 + uuid: 30cc7878-54e3-4e1a-8651-87a61354bad4 + type: MAINTENANCE_DEFER + state: COMPLETED + changeLog: + createdBy: admin_user + createdDateTime: 2025-10-21T10:30:00Z + maintenanceActionRequest: + value: + type: MAINTENANCE_DEFER + maintenanceActionPost: + value: + href: https://api.equinix.com/fabric/v4/ports/29cc7878-54e3-4e1a-8651-87a61354bac2/maintenances/a1d93b39-02db-2dbc-ace0-30fa5c00ad04/actions/30cc7878-54e3-4e1a-8651-87a61354bad4 + uuid: 30cc7878-54e3-4e1a-8651-87a61354bad4 + type: MAINTENANCE_DEFER + state: PENDING + changeLog: + createdBy: admin_user + createdDateTime: 2025-10-21T10:30:00Z + maintenanceActionSearchRequest: + value: + filter: + and: + - property: /type + operator: = + values: + - MAINTENANCE_DEFER + pagination: + offset: 0 + limit: 20 + sort: + - direction: DESC + property: /changeLog/createdDateTime + maintenanceActionGet: + value: + href: https://api.equinix.com/fabric/v4/ports/29cc7878-54e3-4e1a-8651-87a61354bac2/maintenances/a1d93b39-02db-2dbc-ace0-30fa5c00ad04/actions/30cc7878-54e3-4e1a-8651-87a61354bad4 + uuid: 30cc7878-54e3-4e1a-8651-87a61354bad4 + type: MAINTENANCE_DEFER + state: COMPLETED + changeLog: + createdBy: admin_user + createdDateTime: 2025-10-21T10:30:00Z get-metrics-by-name: value: pagination: @@ -28297,6 +37324,77 @@ components: - type: ALL emails: - test@test.com + COLO2LMaaSSP: + value: + type: EVPL_VC + name: Last Mile Connection 1 + bandwidth: 10 + redundancy: + priority: PRIMARY + order: + termLength: 1 + aSide: + accessPoint: + type: COLO + port: + uuid: d4db1048-ef3d-f3d6-49e0-306a5c00a341 + linkProtocol: + type: QINQ + vlanSTag: 121 + vlanCTag: 145 + zSide: + accessPoint: + type: SP + profile: + uuid: 8236fbb9-51e5-428f-86bf-6b67e1223ac1 + location: + metroCode: DC + productOffering: + id: sample-product-offering-id + name: Sample product offering 1 + bandwidthCommit: 50 + address: + id: lmaas-addr-sample-id + streetNr: "1234" + streetName: Main St + city: San Jose + stateOrProvince: CA + postCode: "95101" + country: United States + project: + projectId: ac4d34ca-0d9c-4bc2-9aab-1234567abcde + notifications: + - type: ALL + emails: + - someone@sample.com + - type: ORDERING + emails: + - someone@sample.com + phone: + - type: OFFICE + number: 11234567890 + contactPreference: + timezone: America/Los_Angeles + availability: ANYTIME + - type: MOBILE + number: 11234567890 + contactPreference: + timezone: America/Los_Angeles + availability: ANYTIME + - type: TECHNICAL + emails: + - someone@sample.com + phone: + - type: OFFICE + number: 11234567890 + contactPreference: + timezone: America/Los_Angeles + availability: ANYTIME + - type: MOBILE + number: 11234567890 + contactPreference: + timezone: America/Los_Angeles + availability: ANYTIME COLO2GoogleSPwithDot1q: value: type: EVPL_VC @@ -30686,6 +39784,97 @@ components: name: Azure ExpressRoute uuid: a1390b22-bbe0-4e93-ad37-85beef9d254a authenticationKey: xxxx-xxx-xxxx + COLO2LMaaSSP-Response: + value: + href: https://api.equinix.com/fabric/v4/connections/8236fbb9-51e5-428f-86bf-6b67e1223ac1 + uuid: 8236fbb9-51e5-428f-86bf-6b67e1223ac1 + type: EVPL_VC + name: Last Mile Connection 1 + bandwidth: 10 + operation: + providerStatus: NOT_AVAILABLE + equinixStatus: PENDING_APPROVAL + redundancy: + group: d4db1048-ef3d-f3d6-49e0-306a5c00a341 + priority: PRIMARY + order: + billingTier: Up to 10 MB + termLength: 1 + aSide: + accessPoint: + location: + metroCode: DC + port: + href: https://api.equinix.com/fabric/v4/ports/c4d9350e-780f-80fd-1ce0-306a5c00a600 + type: XF_PORT + uuid: c4d9350e-780f-80fd-1ce0-306a5c00a600 + name: Sample Port DC + linkProtocol: + type: QINQ + vlanSTag: 121 + vlanCTag: 145 + zSide: + accessPoint: + location: + metroCode: DC + profile: + href: https://api.equinix.com/fabric/v4/serviceProfiles/e36b0f9b-6080-4909-90a7-d5e3623d00d1 + uuid: e36b0f9b-6080-4909-90a7-d5e3623d00d1 + type: LMAAS_PROFILE + name: Last Mile Service Profile 1 + productOffering: + id: sample-product-offering-id + name: Sample product offering 1 + bandwidthCommit: 50 + address: + id: lmaas-addr-sample-id + streetNr: "1234" + streetName: Main St + city: San Jose + stateOrProvince: CA + postCode: "95101" + country: United States + notifications: + - type: ALL + emails: + - someone@sample.com + - type: ORDERING + emails: + - someone@sample.com + phone: + - type: OFFICE + number: 11234567890 + contactPreference: + timezone: America/Los_Angeles + availability: ANYTIME + - type: MOBILE + number: 11234567890 + contactPreference: + timezone: America/Los_Angeles + availability: ANYTIME + - type: TECHNICAL + emails: + - someone@sample.com + phone: + - type: OFFICE + number: 11234567890 + contactPreference: + timezone: America/Los_Angeles + availability: ANYTIME + - type: MOBILE + number: 11234567890 + contactPreference: + timezone: America/Los_Angeles + availability: ANYTIME + changeLog: + createdBy: sampleuser + createdByFullName: Sample User + createdByEmail: someone@sample.com + createdDateTime: 2026-01-01T00:00:00.000Z + updatedBy: sampleuser + updatedByFullName: Sample User + updatedByEmail: someone@sample.com + updatedDateTime: 2026-01-01T00:00:00.000Z COLO2GoogleSPwithDot1q-Response: value: href: https://api.equinix.com/fabric/v4/connections/f662d4c4-fcd8-40ba-b95b-64fc7e0a61fb @@ -31031,7 +40220,7 @@ components: notifications: - type: ALL emails: - - ? test@test.comoperation + - test@test.comoperation: null operation: providerStatus: ACTIVE equinixStatus: PROVISIONED @@ -33505,6 +42694,177 @@ components: linkProtocol: type: DOT1Q vlanTag: 3322 + ColoToColoWithMaintenanceResponseExample: + value: + href: https://api.equinix.com/fabric/v4/connections/650fa2db-37fc-4eca-a9ac-1bb33481b03f + type: EVPL_VC + uuid: 650fa2db-37fc-4eca-a9ac-1bb33481b03f + name: E2E-CON-ColoToColo-280122023234849 + state: PROVISIONED + operation: + providerStatus: AVAILABLE + equinixStatus: PROVISIONED + maintenanceStatus: SCHEDULED + lockEnabled: true + order: + purchaseOrderNumber: PO754587184643 + notifications: + - type: ALL + emails: + - fake@mail.com + account: + accountNumber: 270001 + orgId: 91997 + globalOrgId: 0016u000003JZ4sAAG + changeLog: + createdBy: admin_user + createdDateTime: 2022-01-28T02:32:36.402Z + updatedBy: test_user + updatedDateTime: 2022-01-29T02:32:36.402Z + bandwidth: 50 + redundancy: + group: 4647f20d-6339-4e83-b31e-b35da3060d63 + priority: PRIMARY + isRemote: false + direction: OUTGOING + aSide: + accessPoint: + type: COLO + location: + metroHref: https://api.equinix.com/fabric/v4/metros/DA + metroCode: DA + port: + href: https://api.equinix.com/fabric/v4/ports/c791f8cb-5a41-a410-8ce0-306a5c00a4ee + type: XF_PORT + uuid: c791f8cb-5a41-a410-8ce0-306a5c00a4ee + name: testBuyer-DA1-L-Dot1q-STD-PRI-10G-NK-329 + linkProtocol: + type: DOT1Q + vlanTag: 1043 + zSide: + accessPoint: + type: COLO + location: + metroHref: https://api.equinix.com/fabric/v4/metros/DA + metroCode: DA + port: + href: https://api.equinix.com/fabric/v4/ports/c791f8cb-5a49-a490-8ce0-306a5c00a4ee + type: XF_PORT + uuid: c791f8cb-5a49-a490-8ce0-306a5c00a4ee + name: testBuyer-DA1-L-Dot1q-STD-SEC-10G-NK-337 + linkProtocol: + type: DOT1Q + vlanTag: 3322 + LMaaSConnectionResponse: + value: + href: https://api.equinix.com/fabric/v4/connections/8236fbb9-51e5-428f-86bf-6b67e1223ac1 + uuid: 8236fbb9-51e5-428f-86bf-6b67e1223ac1 + type: EVPL_VC + name: Last Mile Connection 1 + state: ACTIVE + operation: + providerStatus: AVAILABLE + equinixStatus: PROVISIONED + order: + billingTier: Up to 10 MB + termLength: 1 + bandwidth: 10 + redundancy: + group: d4db1048-ef3d-f3d6-49e0-306a5c00a341 + priority: PRIMARY + isRemote: false + direction: INCOMING + account: + accountNumber: 201257 + orgId: 91955 + globalOrgId: "" + project: + projectId: ac4d34ca-0d9c-4bc2-9aab-1234567abcde + changeLog: + createdBy: sampleuser + createdDateTime: 2026-01-01T00:00:00.000Z + updatedBy: sampleuser + updatedDateTime: 2026-01-01T00:00:00.000Z + notifications: + - type: ALL + emails: + - someone@sample.com + - type: ORDERING + emails: + - someone@sample.com + phone: + - type: OFFICE + number: 11234567890 + contactPreference: + timezone: America/Los_Angeles + availability: ANYTIME + - type: MOBILE + number: 11234567890 + contactPreference: + timezone: America/Los_Angeles + availability: ANYTIME + - type: TECHNICAL + emails: + - someone@sample.com + phone: + - type: OFFICE + number: 11234567890 + contactPreference: + timezone: America/Los_Angeles + availability: ANYTIME + - type: MOBILE + number: 11234567890 + contactPreference: + timezone: America/Los_Angeles + availability: ANYTIME + aSide: + accessPoint: + type: COLO + account: + accountNumber: 201257 + organizationName: Sample Organization + location: + region: AMER + metroName: Ashburn + metroCode: DC + ibx: DC11 + port: + href: https://api.equinix.com/fabric/v4/ports/c4d9350e-780f-80fd-1ce0-306a5c00a600 + uuid: c4d9350e-780f-80fd-1ce0-306a5c00a600 + name: Sample Port DC + redundancy: + priority: SECONDARY + linkProtocol: + type: QINQ + vlanSTag: 121 + vlanCTag: 145 + zSide: + accessPoint: + type: SP + account: + organizationName: Sample Provider Organization + location: + region: AMER + metroName: Ashburn + metroCode: DC + ibx: DC11 + profile: + href: https://api.equinix.com/fabric/v4/serviceProfiles/e36b0f9b-6080-4909-90a7-d5e3623d00d1 + type: LMAAS_PROFILE + name: Last Mile Service Profile 1 + uuid: e36b0f9b-6080-4909-90a7-d5e3623d00d1 + productOffering: + id: sample-product-offering-id + name: Sample product offering 1 + bandwidthCommit: 50 + address: + id: lmaas-addr-sample-id + streetNr: "1234" + streetName: Main St + city: San Jose + stateOrProvince: CA + postCode: "95101" + country: United States 400_Invalid_id: value: - errorCode: EQ-3142519 @@ -34733,9 +44093,9 @@ components: order: purchaseOrderNumber: 1-3456576 notifications: - - type: ALL - emails: - - test@test.com + - type: NOTIFICATION + registeredUsers: + - jaguarsuser-port-order project: projectId: e275485c-7072-439f-943a-c923548b2be5 account: @@ -34797,9 +44157,9 @@ components: account: accountNumber: 100179 notifications: - - type: ALL - emails: - - test@test.com + - type: NOTIFICATION + registeredUsers: + - jaguarsuser-port-order changelog: createdBy: "12345" createdDateTime: 2025-08-30T07:21:39Z @@ -34823,9 +44183,9 @@ components: ExchangeService_404: value: - errorCode: EQ-3067101 - errorMessage: Exchange Service not found. + errorMessage: Internet Exchange Service not found. correlationId: c82ff3bc-de07-47e5-b3ec-53a009d01515 - details: Exchange Service not found. + details: Internet Exchange Service not found. ExchangeService_500: value: - errorCode: EQ-3067104 @@ -34889,9 +44249,9 @@ components: account: accountNumber: 100179 notifications: - - type: ALL - emails: - - test@test.com + - type: NOTIFICATION + registeredUsers: + - jaguarsuser-port-order changelog: updatedBy: "12345" updatedDateTime: 2025-08-30T07:21:39Z @@ -34957,9 +44317,9 @@ components: account: accountNumber: 100179 notifications: - - type: ALL - emails: - - test@test.com + - type: NOTIFICATION + registeredUsers: + - jaguarsuser-port-order changelog: updatedBy: "12345" updatedDateTime: 2025-08-30T07:21:39Z @@ -35042,9 +44402,9 @@ components: account: accountNumber: 100179 notifications: - - type: ALL - emails: - - test@test.com + - type: NOTIFICATION + registeredUsers: + - jaguarsuser-port-order changelog: updatedBy: "12345" updatedDateTime: 2025-08-30T07:21:39Z @@ -35241,6 +44601,174 @@ components: - op: replace path: /order/purchaseOrderNumber value: PO-98765 + InterconnectCreate: + value: + type: XF_IC + name: test ic sv + description: test interconnect + location: + metroCode: SV + package: + code: BASIC + order: + termLength: 1 + account: + accountNumber: 456789 + project: + projectId: ae708bbb-d669-406a-845a-99b39ff65fd0 + notifications: + - type: NOTIFICATIONS + emails: + - abc@test.com + InterconnectResponse: + value: + href: https://api.equinix.com/fabric/v4/interconnects/34085b91-2ea3-4578-bc1f-bbd526b57885 + uuid: 34085b91-2ea3-4578-bc1f-bbd526b57885 + type: XF_IC + name: test ic sv + description: test interconnect + state: PROVISIONING + location: + href: https://api.equinix.com/fabric/v4/metros/SV + metroCode: SV + usedBandwidth: 0 + package: + href: https://api.equinix.com/fabric/v4/interconnectPackages/BASIC + code: BASIC + router: + href: https://api.equinix.com/fabric/v4/routers/24884a4e-bb47-403a-9426-a1b766305226 + type: IC_ROUTER + uuid: 24884a4e-bb47-403a-9426-a1b766305226 + order: + termLength: 1 + account: + accountNumber: 456789 + project: + projectId: ae708bbb-d669-406a-845a-99b39ff65fd0 + notifications: + - type: NOTIFICATIONS + emails: + - test@test.com + - abc@test.com + changeLog: + createdId: 1111 + createdDateTime: 2026-01-15T08:00:00Z + InterconnectDeleteResponse: + value: + href: https://api.equinix.com/fabric/v4/interconnects/34085b91-2ea3-4578-bc1f-bbd526b57885 + uuid: 34085b91-2ea3-4578-bc1f-bbd526b57885 + type: XF_IC + name: test ic sv + description: test interconnect + state: DEPROVISIONED + location: + href: https://api.equinix.com/fabric/v4/metros/SV + metroCode: SV + usedBandwidth: 0 + package: + href: https://api.equinix.com/fabric/v4/interconnectPackages/BASIC + code: BASIC + router: + href: https://api.equinix.com/fabric/v4/routers/24884a4e-bb47-403a-9426-a1b766305226 + type: IC_ROUTER + uuid: 24884a4e-bb47-403a-9426-a1b766305226 + order: + termLength: 1 + account: + accountNumber: 456789 + project: + projectId: ae708bbb-d669-406a-845a-99b39ff65fd0 + changeLog: + createdBy: johnsmith + createdDateTime: 2026-01-15T08:00:00Z + updatedBy: johnsmith + updatedDateTime: 2026-07-24T10:30:00Z + deletedBy: johndoe + deletedDateTime: 2026-07-24T10:30:00Z + InterconnectSearchRequest: + value: + filter: + and: + - property: /project/projectId + operator: IN + values: + - ae708bbb-d669-406a-845a-99b39ff65fd0 + - property: /state + operator: IN + values: + - PROVISIONED + pagination: + offset: 0 + limit: 20 + sort: + - direction: DESC + property: /changeLog/createdDateTime + InterconnectSearchResponse: + value: + pagination: + total: 1 + offset: 0 + limit: 20 + sort: + - property: /changeLog/createdDateTime + direction: DESC + data: + - href: https://api.equinix.com/fabric/v4/interconnects/34085b91-2ea3-4578-bc1f-bbd526b57885 + uuid: 34085b91-2ea3-4578-bc1f-bbd526b57885 + type: XF_IC + state: PROVISIONED + description: test interconnect + location: + href: https://api.equinix.com/fabric/v4/metros/SV + metroCode: SV + usedBandwidth: 2000 + package: + href: https://api.equinix.com/fabric/v4/interconnectPackages/BASIC + code: BASIC + router: + href: https://api.equinix.com/fabric/v4/routers/24884a4e-bb47-403a-9426-a1b766305226 + uuid: 24884a4e-bb47-403a-9426-a1b766305226 + type: IC_ROUTER + order: + termLength: 1 + account: + accountNumber: 456789 + project: + projectId: ae708bbb-d669-406a-845a-99b39ff65fd0 + notifications: + - type: NOTIFICATIONS + emails: + - test@test.com + changeLog: + createdBy: johnsmith + createdDateTime: 2026-01-15T08:00:00Z + interconnect-packages: + value: + data: + - href: https://api.equinix.com/fabric/v4/interconnectPackages/b3ceae25-fc42-4857-9aa8-bd72e0d063df + type: IC_PACKAGE + uuid: b3ceae25-fc42-4857-9aa8-bd72e0d063df + code: BASIC + description: string + routesMax: 1000 + bandwidthMax: 100000 + isRemote: true + - href: https://api.equinix.com/fabric/v4/interconnectPackages/d89066ca-7861-457c-9dc1-63f131af4179 + type: IC_PACKAGE + uuid: d89066ca-7861-457c-9dc1-63f131af4179 + code: STANDARD + description: string + routesMax: 2000 + bandwidthMax: 200000 + isRemote: true + - href: https://api.equinix.com/fabric/v4/interconnectPackages/ca1551cd-0364-4508-a969-6631c4bf9ea7 + type: IC_PACKAGE + uuid: ca1551cd-0364-4508-a969-6631c4bf9ea7 + code: PREMIUM + description: string + routesMax: 3000 + bandwidthMax: 400000 + isRemote: true IpBlockCreateEquinixApacRequest: value: prefixLength: 24 @@ -36006,6 +45534,22 @@ components: pagination: limit: 25 offset: 0 + ConnectionSearchByMaintenanceStatus: + value: + filter: + and: + - property: /operation/maintenanceStatus + operator: IN + values: + - SCHEDULED + - COMPLETED + - property: /operation/lockEnabled + operator: IN + values: + - true + pagination: + limit: 25 + offset: 0 VirtualConnectionProductEvplVcTypeFromColoToColo: value: filter: @@ -36364,6 +45908,46 @@ components: operator: IN values: - "10" + VirtualConnectionProductColoToColoWithGeoScope: + value: + filter: + and: + - property: /type + operator: = + values: + - VIRTUAL_CONNECTION_PRODUCT + - property: /connection/type + operator: = + values: + - EVPL_VC + - property: /connection/bandwidth + operator: IN + values: + - "100" + - property: /connection/aSide/accessPoint/type + operator: = + values: + - COLO + - property: /connection/aSide/accessPoint/location/metroCode + operator: = + values: + - CH + - property: /connection/aSide/accessPoint/port/settings/buyout + operator: = + values: + - "false" + - property: /connection/zSide/accessPoint/location/metroCode + operator: = + values: + - CH + - property: /connection/zSide/accessPoint/type + operator: = + values: + - COLO + - property: /connection/geoScope + operator: = + values: + - CONUS FabricCloudRouterProduct: value: filter: @@ -36608,39 +46192,39 @@ components: operator: = values: - CH3 - MetroConnectProduct: + OpticalConnectProduct: value: filter: and: - property: /type operator: = values: - - METRO_CONNECT_PRODUCT + - OPTICAL_CONNECT_PRODUCT - property: /account/accountNumber operator: = values: - "200551" - - property: /metroConnect/type + - property: /opticalConnect/type operator: = values: - - OPTICAL_MC - - property: /metroConnect/bandwidth + - OC + - property: /opticalConnect/bandwidth operator: = values: - "1000" - - property: /metroConnect/pathType + - property: /opticalConnect/pathType operator: = values: - PROTECTED - - property: /metroConnect/connectionDestinationType + - property: /opticalConnect/connectionDestinationType operator: = values: - COLO - - property: /metroConnect/aSide/location/ibxCode + - property: /opticalConnect/aSide/location/ibxCode operator: = values: - CH1 - - property: /metroConnect/zSide/location/ibxCode + - property: /opticalConnect/zSide/location/ibxCode operator: = values: - CH3 @@ -36842,27 +46426,28 @@ components: location: metroCode: CH ibx: CH3 - MetroConnect: + OpticalConnect: value: pagination: offset: 0 limit: 1 total: 1 data: - - type: METRO_CONNECT_PRODUCT + - type: OPTICAL_CONNECT_PRODUCT code: MC00007.PROD - name: Metro Connect Port Product - description: Metro Connect Port + name: Optical Connect Port Product + description: Optical Connect Port account: accountNumber: 200551 + orgId: 123 charges: - type: MONTHLY_RECURRING price: 500 - type: NON_RECURRING price: 0 currency: USD - metroConnect: - type: OPTICAL_MC + opticalConnect: + type: OC bandwidth: 1000 pathType: PROTECTED connectionDestinationType: COLO @@ -37209,19 +46794,6 @@ components: supportedBandwidths: - 100 - 500 - lastMileCatalogs: - - name: att fiber - webUrl: att.com/lastmile - offerings: - - bandwidth: 10 - price: - unit: USD - min: 10 - max: 100 - deliveryDate: - min: 1 - max: 10 - unit: DAYS ServiceProfileCreate-CRH: value: name: Service Profile 1 @@ -37267,6 +46839,87 @@ components: supportedBandwidths: - 100 - 500 + LmaasServiceProfileCreate: + value: + name: Last Mile Service Profile 1 + description: Sample Last Mile Service Profile + type: LMAAS_PROFILE + notifications: + - emails: + - someone@sample.com + type: QUOTE_NOTIFICATIONS + tags: [] + visibility: PUBLIC + customFields: [] + allowedEmails: [] + ports: + - type: XF_PORT + uuid: c4d9350e-780f-80fd-1ce0-306a5c00a600 + location: + metroCode: DC + crossConnectId: ECX.03.00000962 + lastMileConfig: + productCatalogs: + - id: sample-product-offering-id + name: Sample Product Offering + webUrl: https://www.example.com/lastmile + deliveryDate: + min: 10 + max: 30 + unit: DAYS + offerings: + - bandwidth: 50 + price: + unit: USD + min: 100 + max: 500 + - bandwidth: 100 + price: + unit: USD + min: 200 + max: 500 + - bandwidth: 200 + price: + unit: USD + min: 300 + max: 500 + - bandwidth: 1000 + price: + unit: USD + min: 1000 + max: 2000 + accessPointTypeConfigs: + - type: COLO + linkProtocolConfig: + encapsulationStrategy: null + namedTags: [] + reuseVlanSTag: false + enableAutoGenerateServiceKey: false + apiConfig: + equinixManagedPort: false + equinixManagedVlan: false + allowOverSubscription: false + overSubscriptionLimit: 1 + apiAvailable: false + integrationId: "" + bandwidthFromApi: false + authenticationKey: + required: false + allowRemoteConnections: true + supportedBandwidths: + - 10 + - 50 + - 200 + - 500 + - 1000 + allowCustomBandwidth: false + connectionLabel: Connection + allowBandwidthAutoApproval: false + connectionRedundancyRequired: false + selectiveRedundancy: true + marketingInfo: + processSteps: [] + promotion: true ServiceProfileCreateResponse: value: state: PENDING_APPROVAL @@ -37333,19 +46986,96 @@ components: - code: SY ibxs: - SY4 - lastMileCatalogs: - - name: att fiber - webUrl: att.com/lastmile - offerings: - - bandwidth: 10 - price: - unit: USD - min: 10 - max: 100 - deliveryDate: - min: 1 - max: 10 - unit: DAYS + LmaasServiceProfileCreateResponse: + value: + href: https://api.equinix.com/fabric/v4/serviceProfiles/e36b0f9b-6080-4909-90a7-d5e3623d00d1 + uuid: e36b0f9b-6080-4909-90a7-d5e3623d00d1 + name: Last Mile Service Profile 1 + description: Sample Last Mile Service Profile + type: LMAAS_PROFILE + notifications: + - emails: + - someone@sample.com + type: QUOTE_NOTIFICATIONS + tags: [] + visibility: PUBLIC + customFields: [] + allowedEmails: [] + ports: + - type: XF_PORT + uuid: c4d9350e-780f-80fd-1ce0-306a5c00a600 + location: + metroCode: DC + crossConnectId: ECX.03.00000962 + lastMileConfig: + apiIntegration: + siteValidationEnabled: false + dataCenterLocationEnabled: false + productOfferingEnabled: false + poqEnabled: false + quoteEnabled: false + placeOrderEnabled: false + productCatalogs: + - id: sample-product-offering-id + name: Sample Product Offering + webUrl: https://www.example.com/lastmile + deliveryDate: + min: 10 + max: 30 + unit: DAYS + offerings: + - bandwidth: 50 + price: + unit: USD + min: 100 + max: 500 + - bandwidth: 100 + price: + unit: USD + min: 200 + max: 500 + - bandwidth: 200 + price: + unit: USD + min: 300 + max: 500 + - bandwidth: 1000 + price: + unit: USD + min: 1000 + max: 2000 + accessPointTypeConfigs: + - type: COLO + linkProtocolConfig: + encapsulationStrategy: null + namedTags: [] + reuseVlanSTag: false + enableAutoGenerateServiceKey: false + apiConfig: + equinixManagedPort: false + equinixManagedVlan: false + allowOverSubscription: false + overSubscriptionLimit: 1 + apiAvailable: false + integrationId: "" + bandwidthFromApi: false + authenticationKey: + required: false + allowRemoteConnections: true + supportedBandwidths: + - 10 + - 50 + - 200 + - 500 + - 1000 + allowCustomBandwidth: false + connectionLabel: Connection + allowBandwidthAutoApproval: false + connectionRedundancyRequired: false + selectiveRedundancy: true + marketingInfo: + processSteps: [] + promotion: true sp-403-create: value: - errorCode: EQ-3001036 @@ -37617,6 +47347,121 @@ components: ibxs: - SY4 displayName: Sydney + LmaasServiceProfileResponse: + value: + state: ACTIVE + account: + orgId: 90925 + organizationName: Sample Organization + globalOrgId: 0017i000011X23ZAAS + project: + projectId: ac4d34ca-0d9c-4bc2-9aab-1234567abcde + changeLog: + createdBy: sampleuser + createdByFullName: Sample User + createdByEmail: someone@sample.com + createdDateTime: 2026-01-01T00:00:00.000Z + updatedBy: sampleuser + updatedByFullName: Sample User + updatedByEmail: someone@sample.com + updatedDateTime: 2026-01-01T00:00:00.000Z + href: https://api.equinix.com/fabric/v4/serviceProfiles/e36b0f9b-6080-4909-90a7-d5e3623d00d1 + uuid: e36b0f9b-6080-4909-90a7-d5e3623d00d1 + type: LMAAS_PROFILE + name: Last Mile Service Profile 1 + description:

Sample Last Mile Service Profile

+ notifications: + - type: QUOTE_NOTIFICATIONS + emails: + - someone@sample.com + visibility: PUBLIC + customFields: + - label: Account Id + description: Provider Portal User ID + required: true + dataType: NUMBER + captureInEmail: false + ports: + - type: XF_PORT + uuid: c4d9350e-780f-80fd-1ce0-306a5c00a600 + location: + metroCode: DC + crossConnectId: ECX.03.00000962 + metros: + - code: DC + name: Ashburn + ibxs: + - DC6 + - DC5 + displayName: Ashburn + accessPointTypeConfigs: + - uuid: d2d8105b-da0c-4b09-92d7-2584a85cbb33 + type: COLO + supportedBandwidths: + - 10 + - 50 + - 200 + - 500 + - 1000 + allowRemoteConnections: true + allowCustomBandwidth: false + allowBandwidthAutoApproval: false + linkProtocolConfig: + reuseVlanSTag: false + encapsulation: DOT1Q + enableAutoGenerateServiceKey: false + connectionRedundancyRequired: false + selectiveRedundancy: true + apiConfig: + apiAvailable: false + integrationId: "" + equinixManagedPort: false + equinixManagedVlan: false + allowOverSubscription: false + overSubscriptionLimit: 1 + bandwidthFromApi: false + connectionLabel: Connection + authenticationKey: + required: false + marketingInfo: + promotion: true + lastMileConfig: + apiIntegration: + siteValidationEnabled: false + dataCenterLocationEnabled: false + productOfferingEnabled: false + poqEnabled: false + quoteEnabled: false + placeOrderEnabled: false + productCatalogs: + - id: Sample-product-offering-id + name: Sample Product Offering + webUrl: https://www.example.com/lastmile + deliveryDate: + unit: DAYS + min: 10 + max: 90 + offerings: + - bandwidth: 50 + price: + unit: USD + min: 100 + max: 500 + - bandwidth: 100 + price: + unit: USD + min: 200 + max: 500 + - bandwidth: 500 + price: + unit: USD + min: 500 + max: 1000 + - bandwidth: 1000 + price: + unit: USD + min: 1000 + max: 2000 ServiceProfileUpdate: value: name: Service Profile 2 @@ -38017,6 +47862,44 @@ components: createdDateTime: 2026-03-04T10:30:00Z updatedBy: adminuser updatedDateTime: 2026-03-04T10:35:00Z + ServiceProfileEnvironmentsResponse: + value: + data: + - href: https://api.equinix.com/fabric/v4/serviceProfiles/23ad37d0-6b1c-4d1f-a4eb-9f3d68fbe4fd/environments/6ad498b5-d929-44ac-a199-ce9f0d31d9ac + uuid: 6ad498b5-d929-44ac-a199-ce9f0d31d9ac + type: IC_ENV + name: US West 1 – Production + description: Primary production environment + region: us-west-1 + metros: + - code: CH + name: Chicago + displayName: Chicago + - code: DC + name: Ashburn + displayName: Ashburn + supportedBandwidths: + - 1000 + - 10000 + - 100000 + - href: https://api.equinix.com/fabric/v4/serviceProfiles/23ad37d0-6b1c-4d1f-a4eb-9f3d68fbe4fd/environments/1ad498b5-d929-44ac-a199-ce9f0d31d9ab + uuid: 1ad498b5-d929-44ac-a199-ce9f0d31d9ab + type: IC_ENV + name: US East 1 – Production + description: Primary production environment + region: us-east-1 + metros: + - href: https://api.equinix.com/fabric/v4/metros/DC + metroCode: DC + type: XF_METRO + supportedBandwidths: + - 1000 + - 10000 + - 100000 + pagination: + offset: 0 + limit: 2 + total: 2 getServiceToken: value: href: http://api.equinix.com/fabric/v4/serviceTokens/13ab7dc7-c18e-4f73-aa35-fc3a83966e79 @@ -38821,15 +48704,16 @@ components: values: - 407f8239-254c-4fe2-a378-458f197e17c4 ColoOpticalConnectCreate: + description: Both ends terminate on patch panels in colocation space you occupy, so no Letter of Authorization is needed. value: - type: MC + type: OC bandwidth: 100000 connectionDestinationType: COLO pathType: UNPROTECTED aSide: patchPanelId: CP:Demarc:1259684 - patchPanelPortA: null - patchPanelPortB: null + patchPanelPortA: "9" + patchPanelPortB: "10" connectorType: SC zSide: patchPanelId: PP:Demarc:1259684 @@ -38837,20 +48721,17 @@ components: patchPanelPortB: "11" connectorType: SC order: - purchaseOrderNumber: 156576 - project: - projectId: 8f23b36f-db8f-44c8-a6e5-606e1b485931 - account: - accountNumber: 270848 + purchaseOrderNumber: "156576" notifications: - - type: ALL + - type: NOTIFICATION emails: - test@test.com - registeredUsers: - - test@test.com RemoteOpticalConnectCreate: + description: |- + The Z-side is identified by IBX code and the Letter of Authorization + issued by the destination customer. value: - type: MC + type: OC bandwidth: 100000 connectionDestinationType: REMOTE pathType: UNPROTECTED @@ -38865,23 +48746,19 @@ components: loa: uuid: 64de7e5-7fe7-41e6-b984-80d5aa159a0e order: - purchaseOrderNumber: 156576 - project: - projectId: 8f23b36f-db8f-44c8-a6e5-606e1b485931 - account: - accountNumber: 270848 + purchaseOrderNumber: "156576" notifications: - - type: ALL + - type: NOTIFICATION emails: - test@test.com - registeredUsers: - - test@test.com BMMROpticalConnectCreate: + description: The Z-side is identified by location and Letter of Authorization.
bmmrType declares who operates the meet-me room. value: - type: MC + type: OC bandwidth: 100000 connectionDestinationType: BMMR pathType: UNPROTECTED + bmmrType: EQUINIX aSide: patchPanelId: PP:Demarc:1259684 patchPanelPortA: "10" @@ -38892,24 +48769,18 @@ components: ibxCode: SV2 loa: uuid: 64de7e5-7fe7-41e6-b984-80d5aa159a0e - bmmrType: EQUINIX order: - purchaseOrderNumber: 156576 - project: - projectId: 8f23b36f-db8f-44c8-a6e5-606e1b485931 - account: - accountNumber: 270848 + purchaseOrderNumber: "156576" notifications: - - type: ALL + - type: NOTIFICATION emails: - test@test.com - registeredUsers: - - test@test.com ColoOpticalConnectResponseExample: + summary: COLO connection value: href: https://api.equinix.com/fabric/v4/opticalConnects/06dbb0e3-e55d-4090-8aff-fc5654abaad0 uuid: 06dbb0e3-e55d-4090-8aff-fc5654abaad0 - type: MC + type: OC name: 270848-SV1-SV2-01 state: PROVISIONING bandwidth: 100000 @@ -38934,28 +48805,26 @@ components: location: ibxCode: SV2 order: - purchaseOrderNumber: 156576 + purchaseOrderNumber: "156576" orderNumber: 1-129105284100 - project: - projectId: 8f23b36f-db8f-44c8-a6e5-606e1b485931 account: accountNumber: 270848 + orgId: 123 notifications: - - type: ALL + - type: NOTIFICATION emails: - test@test.com - registeredUsers: - - test@test.com changeLog: createdByEmail: abc@xyz.com createdDateTime: 2025-07-24T06:50:46Z updatedByEmail: abc@xyz.com updatedDateTime: 2025-07-24T06:51:46Z RemoteOpticalConnectResponseExample: + summary: Remote connection value: href: https://api.equinix.com/fabric/v4/opticalConnects/06dbb0e3-e55d-4090-8aff-fc5654abaad0 uuid: 06dbb0e3-e55d-4090-8aff-fc5654abaad0 - type: MC + type: OC name: 270848-SV1-SV2-01 state: PROVISIONING bandwidth: 100000 @@ -38976,28 +48845,26 @@ components: loa: uuid: 64de7e5-7fe7-41e6-b984-80d5aa159a0e order: - purchaseOrderNumber: 156576 + purchaseOrderNumber: "156576" orderNumber: 1-129105284100 - project: - projectId: 8f23b36f-db8f-44c8-a6e5-606e1b485931 account: accountNumber: 270848 + orgId: 123 notifications: - - type: ALL + - type: NOTIFICATION emails: - test@test.com - registeredUsers: - - test@test.com changeLog: createdByEmail: abc@xyz.com createdDateTime: 2025-07-24T06:50:46Z updatedByEmail: abc@xyz.com updatedDateTime: 2025-07-24T06:51:46Z BMMROpticalConnectResponseExample: + summary: BMMR connection value: href: https://api.equinix.com/fabric/v4/opticalConnects/06dbb0e3-e55d-4090-8aff-fc5654abaad0 uuid: 06dbb0e3-e55d-4090-8aff-fc5654abaad0 - type: MC + type: OC name: 270848-SV1-SV2-01 state: PROVISIONING bandwidth: 100000 @@ -39019,27 +48886,54 @@ components: loa: uuid: 64de7e5-7fe7-41e6-b984-80d5aa159a0e order: - purchaseOrderNumber: 156576 + purchaseOrderNumber: "156576" orderNumber: 1-129105284100 - project: - projectId: 8f23b36f-db8f-44c8-a6e5-606e1b485931 account: accountNumber: 270848 + orgId: 123 notifications: - - type: ALL + - type: NOTIFICATION emails: - test@test.com - registeredUsers: - - test@test.com changeLog: createdByEmail: abc@xyz.com createdDateTime: 2025-07-24T06:50:46Z updatedByEmail: abc@xyz.com updatedDateTime: 2025-07-24T06:51:46Z + OpticalConnect_400: + summary: Unknown or inaccessible connection. + value: + - errorCode: EQ-3057103 + errorMessage: Optical Connect Service does not exist or does not belong to the user.Please check Optical Connect UUID + correlationId: cebc3d33-9037-4a2b-a7af-0ad65602cdec + details: Optical Connect Service does not exist or does not belong to the user.Please check Optical Connect UUID + OpticalConnect_403: + summary: Operation not permitted + value: + - errorCode: EQ-3057102 + errorMessage: Operation not allowed + correlationId: c82ff3bc-de07-47e5-b3ec-53a009d01515 + details: Operation not allowed for current user + OpticalConnect_404: + summary: Optical connection not found + value: + - errorCode: EQ-3057101 + errorMessage: Optical Connect Service not found or already deleted + correlationId: c82ff3bc-de07-47e5-b3ec-53a009d01515 + details: Optical Connect Service not found or already deleted + OpticalConnect_500: + summary: Unexpected server error + value: + - errorCode: EQ-3057104 + errorMessage: Internal Server Error + correlationId: c82ff3bc-de07-47e5-b3ec-53a009d01515 + details: Internal Server Error ColoOpticalConnectBulkCreate: + summary: COLO diverse pair + description: Two connections on separate patch panels. Equinix assigns the shared redundancy group and returns it on both connections. value: data: - - type: MC + - type: OC bandwidth: 100000 connectionDestinationType: COLO pathType: DUAL_DIVERSE @@ -39055,15 +48949,13 @@ components: patchPanelPortA: "10" patchPanelPortB: "11" connectorType: SC - project: - projectId: 8f23b36f-db8f-44c8-a6e5-606e1b485931 - account: - accountNumber: 270848 notifications: - - type: ALL + - type: NOTIFICATION emails: - test@test.com - - type: MC + registeredUsers: + - test + - type: OC bandwidth: 100000 connectionDestinationType: COLO pathType: DUAL_DIVERSE @@ -39079,18 +48971,14 @@ components: patchPanelPortA: "14" patchPanelPortB: "15" connectorType: SC - project: - projectId: 8f23b36f-db8f-44c8-a6e5-606e1b485931 - account: - accountNumber: 270848 notifications: - - type: ALL + - type: NOTIFICATION emails: - test@test.com RemoteOpticalConnectBulkCreate: value: data: - - type: MC + - type: OC bandwidth: 100000 connectionDestinationType: REMOTE pathType: DUAL_DIVERSE @@ -39106,15 +48994,15 @@ components: ibxCode: SV2 loa: uuid: 64de7e5-7fe7-41e6-b984-80d5aa159a0e - project: - projectId: 8f23b36f-db8f-44c8-a6e5-606e1b485931 account: accountNumber: 270848 notifications: - - type: ALL + - type: NOTIFICATION emails: - test@test.com - - type: MC + registeredUsers: + - test@test.com + - type: OC bandwidth: 100000 connectionDestinationType: REMOTE pathType: DUAL_DIVERSE @@ -39130,18 +49018,16 @@ components: ibxCode: SV2 loa: uuid: e9e2a1b6-8d4f-4c3e-8b2a-5f1d6e7a9c59 - project: - projectId: 8f23b36f-db8f-44c8-a6e5-606e1b485931 account: accountNumber: 270848 notifications: - - type: ALL + - type: NOTIFICATION emails: - test@test.com BMMROpticalConnectBulkCreate: value: data: - - type: MC + - type: OC bandwidth: 100000 connectionDestinationType: BMMR pathType: DUAL_DIVERSE @@ -39158,15 +49044,15 @@ components: ibxCode: SV2 loa: uuid: 64de7e5-7fe7-41e6-b984-80d5aa159a0e - project: - projectId: 8f23b36f-db8f-44c8-a6e5-606e1b485931 account: accountNumber: 270848 notifications: - - type: ALL + - type: NOTIFICATION emails: - test@test.com - - type: MC + registeredUsers: + - test@test.com + - type: OC bandwidth: 100000 connectionDestinationType: BMMR pathType: DUAL_DIVERSE @@ -39183,67 +49069,10 @@ components: ibxCode: SV2 loa: uuid: e9e2a1b6-8d4f-4c3e-8b2a-5f1d6e7a9c59 - project: - projectId: 8f23b36f-db8f-44c8-a6e5-606e1b485931 account: accountNumber: 270848 notifications: - - type: ALL - emails: - - test@test.com - ColoOpticalConnectBulkCreateWithPurchaseOrder: - value: - data: - - type: MC - bandwidth: 100000 - connectionDestinationType: COLO - pathType: DUAL_DIVERSE - redundancy: - priority: PRIMARY - aSide: - patchPanelId: CP:Demarc:1259684 - patchPanelPortA: "10" - patchPanelPortB: "11" - connectorType: SC - zSide: - patchPanelId: CP:Demarc:1259684 - patchPanelPortA: "10" - patchPanelPortB: "11" - connectorType: SC - order: - purchaseOrderNumber: 156576 - project: - projectId: 8f23b36f-db8f-44c8-a6e5-606e1b485931 - account: - accountNumber: 270848 - notifications: - - type: ALL - emails: - - test@test.com - - type: MC - bandwidth: 100000 - connectionDestinationType: COLO - pathType: DUAL_DIVERSE - redundancy: - priority: SECONDARY - aSide: - patchPanelId: PP:Demarc:1260379 - patchPanelPortA: "14" - patchPanelPortB: "15" - connectorType: SC - zSide: - patchPanelId: PP:Demarc:1260379 - patchPanelPortA: "14" - patchPanelPortB: "15" - connectorType: SC - order: - purchaseOrderNumber: 156576 - project: - projectId: 8f23b36f-db8f-44c8-a6e5-606e1b485931 - account: - accountNumber: 270848 - notifications: - - type: ALL + - type: NOTIFICATION emails: - test@test.com ColoOpticalConnectBulkResponseExample: @@ -39251,7 +49080,7 @@ components: data: - href: https://api.equinix.com/fabric/v4/opticalConnects/06dbb0e3-e55d-4090-8aff-fc5654abaad0 uuid: 06dbb0e3-e55d-4090-8aff-fc5654abaad0 - type: MC + type: OC name: 270848-SV1-SV2-PRI-01 state: PROVISIONING bandwidth: 100000 @@ -39280,19 +49109,16 @@ components: ibxCode: SV2 order: orderNumber: 1-129105284100 - project: - projectId: 8f23b36f-db8f-44c8-a6e5-606e1b485931 account: accountNumber: 270848 + orgId: 123 notifications: - - type: ALL + - type: NOTIFICATION emails: - test@test.com - registeredUsers: - - test@test.com - href: https://api.equinix.com/fabric/v4/opticalConnects/a6f77b33-96c6-4eeb-8d79-76374d950603 uuid: a6f77b33-96c6-4eeb-8d79-76374d950603 - type: MC + type: OC name: 270848-SV1-SV2-SEC-02 state: PROVISIONING bandwidth: 100000 @@ -39321,22 +49147,19 @@ components: ibxCode: SV2 order: orderNumber: 1-129105284100 - project: - projectId: 8f23b36f-db8f-44c8-a6e5-606e1b485931 account: accountNumber: 270848 + orgId: 123 notifications: - - type: ALL + - type: NOTIFICATION emails: - test@test.com - registeredUsers: - - test@test.com RemoteOpticalConnectBulkResponseExample: value: data: - href: https://api.equinix.com/fabric/v4/opticalConnects/06dbb0e3-e55d-4090-8aff-fc5654abaad0 uuid: 06dbb0e3-e55d-4090-8aff-fc5654abaad0 - type: MC + type: OC name: 270848-SV1-SV2-PRI-01 state: PROVISIONING bandwidth: 100000 @@ -39361,19 +49184,16 @@ components: uuid: 64de7e5-7fe7-41e6-b984-80d5aa159a0e order: orderNumber: 1-129105284100 - project: - projectId: 8f23b36f-db8f-44c8-a6e5-606e1b485931 account: accountNumber: 270848 + orgId: 123 notifications: - - type: ALL + - type: NOTIFICATION emails: - test@test.com - registeredUsers: - - test@test.com - href: https://api.equinix.com/fabric/v4/opticalConnects/c9e2a1b6-7d4f-4c3e-8b2a-5f1d6e7a9c58 uuid: c9e2a1b6-7d4f-4c3e-8b2a-5f1d6e7a9c58 - type: MC + type: OC name: 270848-SV1-SV2-SEC-02 state: PROVISIONING bandwidth: 100000 @@ -39398,22 +49218,19 @@ components: uuid: e9e2a1b6-8d4f-4c3e-8b2a-5f1d6e7a9c59 order: orderNumber: 1-129105284100 - project: - projectId: 8f23b36f-db8f-44c8-a6e5-606e1b485931 account: accountNumber: 270848 + orgId: 123 notifications: - - type: ALL + - type: NOTIFICATION emails: - test@test.com - registeredUsers: - - test@test.com BMMROpticalConnectBulkResponseExample: value: data: - href: https://api.equinix.com/fabric/v4/opticalConnects/06dbb0e3-e55d-4090-8aff-fc5654abaad0 uuid: 06dbb0e3-e55d-4090-8aff-fc5654abaad0 - type: MC + type: OC name: 270848-SV1-SV2-PRI-01 state: PROVISIONING bandwidth: 100000 @@ -39439,19 +49256,16 @@ components: uuid: 64de7e5-7fe7-41e6-b984-80d5aa159a0e order: orderNumber: 1-129105284100 - project: - projectId: 8f23b36f-db8f-44c8-a6e5-606e1b485931 account: accountNumber: 270848 + orgId: 123 notifications: - - type: ALL + - type: NOTIFICATION emails: - test@test.com - registeredUsers: - - test@test.com - href: https://api.equinix.com/fabric/v4/opticalConnects/c9e2a1b6-7d4f-4c3e-8b2a-5f1d6e7a9c58 uuid: c9e2a1b6-7d4f-4c3e-8b2a-5f1d6e7a9c58 - type: MC + type: OC name: 270848-SV1-SV2-SEC-02 state: PROVISIONING bandwidth: 100000 @@ -39477,132 +49291,18 @@ components: uuid: e9e2a1b6-8d4f-4c3e-8b2a-5f1d6e7a9c59 order: orderNumber: 1-129105284100 - project: - projectId: 8f23b36f-db8f-44c8-a6e5-606e1b485931 account: accountNumber: 270848 + orgId: 123 notifications: - - type: ALL - emails: - - test@test.com - registeredUsers: - - test@test.com - ColoOpticalConnectBulkResponseWithPurchaseOrderExample: - value: - data: - - href: https://api.equinix.com/fabric/v4/opticalConnects/06dbb0e3-e55d-4090-8aff-fc5654abaad0 - uuid: 06dbb0e3-e55d-4090-8aff-fc5654abaad0 - type: MC - name: 270848-SV1-SV2-PRI-01 - state: PROVISIONING - bandwidth: 100000 - connectionDestinationType: COLO - pathType: DUAL_DIVERSE - redundancy: - priority: PRIMARY - group: 22f8e668-4754-4564-825d-d1c7889c885a - aSide: - patchPanelId: CP:Demarc:1259684 - patchPanelPortA: "10" - patchPanelPortB: "11" - connectorType: SC - cageUniqueSpaceId: SV1:01:002174 - cabinetUniqueSpaceId: Demarc - location: - ibxCode: SV1 - zSide: - patchPanelId: CP:Demarc:1259684 - patchPanelPortA: "10" - patchPanelPortB: "11" - connectorType: SC - cageUniqueSpaceId: SV1:01:002174 - cabinetUniqueSpaceId: Demarc - location: - ibxCode: SV2 - order: - purchaseOrderNumber: 156576 - orderNumber: 1-129105284100 - project: - projectId: 8f23b36f-db8f-44c8-a6e5-606e1b485931 - account: - accountNumber: 270848 - notifications: - - type: ALL - emails: - - test@test.com - registeredUsers: - - test@test.com - - href: https://api.equinix.com/fabric/v4/opticalConnects/a6f77b33-96c6-4eeb-8d79-76374d950603 - uuid: a6f77b33-96c6-4eeb-8d79-76374d950603 - type: MC - name: 270848-SV1-SV2-SEC-02 - state: PROVISIONING - bandwidth: 100000 - connectionDestinationType: COLO - pathType: DUAL_DIVERSE - redundancy: - priority: SECONDARY - group: 22f8e668-4754-4564-825d-d1c7889c885a - aSide: - patchPanelId: PP:Demarc:1260379 - patchPanelPortA: "14" - patchPanelPortB: "15" - connectorType: SC - cageUniqueSpaceId: SV1:01:002174 - cabinetUniqueSpaceId: Demarc - location: - ibxCode: SV1 - zSide: - patchPanelId: PP:Demarc:1260379 - patchPanelPortA: "14" - patchPanelPortB: "15" - connectorType: SC - cageUniqueSpaceId: SV1:01:002174 - cabinetUniqueSpaceId: Demarc - location: - ibxCode: SV2 - order: - purchaseOrderNumber: 156576 - orderNumber: 1-129105284100 - project: - projectId: 8f23b36f-db8f-44c8-a6e5-606e1b485931 - account: - accountNumber: 270848 - notifications: - - type: ALL + - type: NOTIFICATION emails: - test@test.com - registeredUsers: - - test@test.com - OpticalConnect_400: - value: - - errorCode: EQ-3057103 - errorMessage: Optical Connect Service does not exist or does not belong to the user.Please check Optical Connect UUID - correlationId: cebc3d33-9037-4a2b-a7af-0ad65602cdec - details: Optical Connect Service does not exist or does not belong to the user.Please check Optical Connect UUID - OpticalConnect_403: - value: - - errorCode: EQ-3057102 - errorMessage: Operation not allowed - correlationId: c82ff3bc-de07-47e5-b3ec-53a009d01515 - details: Operation not allowed for current user - OpticalConnect_404: - value: - - errorCode: EQ-3057101 - errorMessage: Optical Connect Service not found or already deleted - correlationId: c82ff3bc-de07-47e5-b3ec-53a009d01515 - details: Optical Connect Service not found or already deleted - OpticalConnect_500: - value: - - errorCode: EQ-3057104 - errorMessage: Internal Server Error - correlationId: c82ff3bc-de07-47e5-b3ec-53a009d01515 - details: Internal Server Error ColoOpticalConnectResponseDeprovisioningExample: value: href: https://api.equinix.com/fabric/v4/opticalConnects/06dbb0e3-e55d-4090-8aff-fc5654abaad0 uuid: 06dbb0e3-e55d-4090-8aff-fc5654abaad0 - type: MC + type: OC name: 270848-SV1-SV2-01 state: DEPROVISIONING bandwidth: 100000 @@ -39627,18 +49327,15 @@ components: location: ibxCode: SV2 order: - purchaseOrderNumber: 156576 + purchaseOrderNumber: "156576" orderNumber: 1-129105284100 - project: - projectId: 8f23b36f-db8f-44c8-a6e5-606e1b485931 account: accountNumber: 270848 + orgId: 123 notifications: - - type: ALL + - type: NOTIFICATION emails: - test@test.com - registeredUsers: - - test@test.com changeLog: createdByEmail: abc@xyz.com createdDateTime: 2025-07-24T06:50:46Z @@ -39648,7 +49345,7 @@ components: value: href: https://api.equinix.com/fabric/v4/opticalConnects/06dbb0e3-e55d-4090-8aff-fc5654abaad0 uuid: 06dbb0e3-e55d-4090-8aff-fc5654abaad0 - type: MC + type: OC name: 270848-SV1-SV2-01 state: DEPROVISIONING bandwidth: 100000 @@ -39669,23 +49366,20 @@ components: loa: uuid: 64de7e5-7fe7-41e6-b984-80d5aa159a0e order: - purchaseOrderNumber: 156576 + purchaseOrderNumber: "156576" orderNumber: 1-129105284100 - project: - projectId: 8f23b36f-db8f-44c8-a6e5-606e1b485931 account: accountNumber: 270848 + orgId: 123 notifications: - - type: ALL + - type: NOTIFICATION emails: - test@test.com - registeredUsers: - - test@test.com BMMROpticalConnectResponseDeprovisioningExample: value: href: https://api.equinix.com/fabric/v4/opticalConnects/06dbb0e3-e55d-4090-8aff-fc5654abaad0 uuid: 06dbb0e3-e55d-4090-8aff-fc5654abaad0 - type: MC + type: OC name: 270848-SV1-SV2-01 state: DEPROVISIONING bandwidth: 100000 @@ -39707,24 +49401,22 @@ components: loa: uuid: 64de7e5-7fe7-41e6-b984-80d5aa159a0e order: - purchaseOrderNumber: 156576 + purchaseOrderNumber: "156576" orderNumber: 1-129105284100 - project: - projectId: 8f23b36f-db8f-44c8-a6e5-606e1b485931 account: accountNumber: 270848 + orgId: 123 notifications: - - type: ALL + - type: NOTIFICATION emails: - test@test.com - registeredUsers: - - test@test.com changeLog: createdByEmail: abc@xyz.com createdDateTime: 2025-07-24T06:50:46Z updatedByEmail: abc@xyz.com updatedDateTime: 2025-07-24T06:51:46Z SearchOpticalConnectFilterByStatus: + summary: All provisioned connections value: filter: and: @@ -39732,10 +49424,6 @@ components: operator: = values: - PROVISIONED - - property: /project/projectId - operator: = - values: - - 66a2d2f7-b79b-49bc-8642-d2b3c1c138b4 pagination: offset: 0 limit: 20 @@ -39743,6 +49431,7 @@ components: - direction: DESC property: /changeLog/updatedDateTime SearchOpticalConnectByName: + summary: A named connection of a given type value: filter: and: @@ -39753,11 +49442,7 @@ components: - property: /type operator: = values: - - MC - - property: /project/projectId - operator: = - values: - - 8f23b36f-db8f-44c8-a6e5-606e1b485931 + - OC pagination: offset: 0 limit: 20 @@ -39765,6 +49450,8 @@ components: - direction: DESC property: /changeLog/updatedDateTime SearchOpticalConnectFilterOrAnd: + summary: Partial match on uuid or name + description: An OR group nested inside the top-level AND — matches circuits whose uuid starts with the given prefix, or whose name is like the value. value: filter: and: @@ -39776,12 +49463,9 @@ components: - property: /name operator: LIKE values: - - fmc-service - - property: /project/projectId - operator: = - values: - - 8f23b36f-db8f-44c8-a6e5-606e1b485931 + - 270848-SV1-SV2-01 OpticalConnectSearchResponseExample: + summary: One matching connection. value: pagination: offset: 20 @@ -39792,7 +49476,7 @@ components: data: - href: https://api.equinix.com/fabric/v4/opticalConnects/06dbb0e3-e55d-4090-8aff-fc5654abaad0 uuid: 06dbb0e3-e55d-4090-8aff-fc5654abaad0 - type: MC + type: OC name: 270848-SV1-SV2-01-1 state: PROVISIONING bandwidth: 100000 @@ -39816,18 +49500,15 @@ components: location: ibxCode: SV2 order: - purchaseOrderNumber: 156576 + purchaseOrderNumber: "156576" orderNumber: 1-129105284100 - project: - projectId: 8f23b36f-db8f-44c8-a6e5-606e1b485931 account: accountNumber: 270848 + orgId: 123 notifications: - - type: ALL + - type: NOTIFICATION emails: - test@test.com - registeredUsers: - - test@test.com changeLog: createdByEmail: abc@xyz.com createdDateTime: 2025-07-24T06:50:46Z @@ -39835,7 +49516,7 @@ components: updatedDateTime: 2025-07-24T06:51:46Z - href: https://api.equinix.com/fabric/v4/opticalConnects/07abb0e3-e67d-5090-9aff-fc5654abaae0 uuid: 07abb0e3-e67d-5090-9aff-fc5654abaae0 - type: MC + type: OC name: 270848-SV1-SV2-01-2 state: PROVISIONED bandwidth: 100000 @@ -39859,24 +49540,22 @@ components: location: ibxCode: SV2 order: - purchaseOrderNumber: 126758 + purchaseOrderNumber: "126758" orderNumber: 1-139105284200 - project: - projectId: 66a2d2f7-b79b-49bc-8642-d2b3c1c138b4 account: accountNumber: 280845 + orgId: 123 notifications: - - type: ALL + - type: NOTIFICATION emails: - test@test.com - registeredUsers: - - test@test.com changeLog: createdByEmail: abc@xyz.com createdDateTime: 2024-07-24T06:50:46Z updatedByEmail: abc@xyz.com updatedDateTime: 2024-07-24T06:51:46Z OpticalConnect_400_invalid_sorting: + summary: Invalid sort direction. value: - errorCode: EQ-3057105 errorMessage: Invalid value for sorting direction. @@ -39884,6 +49563,7 @@ components: additionalInfo: - reason: Only accept DESC and ASC for sorting direction. OpticalConnect_401: + summary: Missing or invalid credentials value: - errorCode: EQ-3057106 errorMessage: User not found in request or invalid. @@ -40170,6 +49850,8 @@ components: connectionCount: 1 evplVCCount: 1 accessVCCount: 0 + maintenanceStatus: SCHEDULED + lockEnabled: true account: accountNumber: 200558 accountName: Gen-L2-Qa-01-Auto-200558 @@ -42096,6 +51778,68 @@ components: ibx: DA1 operation: operationalStatus: UP + maintenanceScheduledPortByUUID: + value: + href: https://api.equinix.com/fabric/v4/ports/44c5712b-d704-4ca5-9b42-ee6be32ee06a + type: XF_PORT + uuid: 44c5712b-d704-4ca5-9b42-ee6be32ee06a + name: 270843-DA1-CX-PRI-33 + physicalPortsSpeed: 1000 + physicalPortsType: 1000BASE_LX + project: + projectId: 66a2d2f7-b79b-49bc-8642-d2b3c1c138b4 + package: + code: UNLIMITED + state: ACTIVE + connectivitySourceType: COLO + operation: + operationalStatus: UP + connectionCount: 10 + evplVCCount: 10 + accessVCCount: 0 + maintenanceStatus: SCHEDULED + lockEnabled: true + account: + accountNumber: 270843 + accountName: ctr-sit-account1 + orgId: 93055 + organizationName: ctr-sit-account1-270843 + ucmId: 64726950-A62C-4749-98E2-5AA4CA44284F + globalCustId: 0016u000003JZ3XAAW + changeLog: + createdBy: admin_user + createdDateTime: 2025-05-21T18:12:18.300Z + updatedBy: test_user + updatedDateTime: 2025-05-29T20:38:48.900Z + bandwidth: 1000 + availableBandwidth: 500 + usedBandwidth: 500 + location: + metroHref: https://api.equinix.com/fabric/v4/metros/DA + region: AMER + metroName: Dallas + metroCode: DA + ibx: DA1 + demarcationPointIbx: DA1 + tetherIbx: DA1 + redundancy: + priority: PRIMARY + encapsulation: + type: QINQ + tagProtocolId: 34984 + lagEnabled: false + physicalPorts: + - type: XF_PHYSICAL_PORT + state: ADDED + bandwidth: 0 + uuid: 0189244a-f3ac-7258-a8b4-3167af899305 + tether: + crossConnectId: "513213223" + ibx: DA1 + demarcationPoint: + ibx: DA1 + operation: + operationalStatus: UP portDryRunDelete: value: type: XF_PORT @@ -42670,6 +52414,22 @@ components: sort: - property: /changeLog/createdDateTime direction: DESC + portSearchByMaintenanceStatus: + value: + filter: + and: + - property: /operation/maintenanceStatus + operator: IN + values: + - SCHEDULED + - COMPLETED + - property: /operation/lockEnabled + operator: IN + values: + - true + pagination: + limit: 25 + offset: 0 portSearchInvalidProjectRequest: value: - errorCode: EQ-3046110 @@ -45160,97 +54920,6 @@ components: errorMessage: The provided subnet is not valid. details: The provided subnet is overlapping with other connections in the same Fabric Cloud Router. correlationId: 5f9f9ab9-a6cb-4e8a-aa34-105cd4cb6cc8 - GatewayAttachmentListResponse: - value: - pagination: - offset: 0 - limit: 10 - total: 1 - data: - - href: https://api.equinix.com/fabric/v4/routers/369c112f-1d8e-4ad1-ae85-7b03ddf4c728/gateways/3cacb007-1f0a-4686-8bf4-7cdcaf696e05 - uuid: 3cacb007-1f0a-4686-8bf4-7cdcaf696e05 - type: VPN_GATEWAY - attachmentStatus: ATTACHED - changeLog: - createdBy: testuser - createdByEmail: testuser@equinix.com - createdByFullName: testuser testuser - createdDateTime: 2020-05-21T10:30:00Z - GatewayAttachmentListErrorResponse: - value: - pagination: - offset: 0 - limit: 10 - total: 1 - data: - - href: https://api.equinix.com/fabric/v4/routers/369c112f-1d8e-4ad1-ae85-7b03ddf4c728/gateways/3cacb007-1f0a-4686-8bf4-7cdcaf696e05 - uuid: 3cacb007-1f0a-4686-8bf4-7cdcaf696e05 - type: VPN_GATEWAY - attachmentStatus: ATTACHED - errors: - - errorCode: EQ-3040085 - errorMessage: Gateway detachment failed due to configuration error. - correlationId: abcd1234-56ef-78gh-90ij-klmnopqrstuv - details: The gateway configuration is invalid for detachment. - additionalInfo: - - reason: Invalid gateway settings. - changeLog: - createdBy: testuser - createdByEmail: testuser@equinix.com - createdByFullName: testuser testuser - createdDateTime: 2020-05-21T10:30:00Z - updatedBy: adminuser - updatedByEmail: adminuser@equinix.com - updatedByFullName: admin user - updatedDateTime: 2020-06-15T14:45:00Z - GatewayAttachmentResponse: - value: - href: https://api.equinix.com/fabric/v4/routers/81331c52-04c0-4656-a4a7-18c52669348f/gateways/695a8471-6595-4ac6-a2f4-b3d96ed3a59d - type: VPN_GATEWAY - uuid: 695a8471-6595-4ac6-a2f4-b3d96ed3a59d - attachmentStatus: ATTACHING - changeLog: - createdBy: testuser - createdByEmail: testuser@equinix.com - createdByFullName: testuser testuser - createdDateTime: 2020-05-21T10:30:00Z - GatewayAttachmentErrorResponse: - value: - href: https://api.equinix.com/fabric/v4/routers/81331c52-04c0-4656-a4a7-18c52669348f/gateways/695a8471-6595-4ac6-a2f4-b3d96ed3a59d - type: VPN_GATEWAY - uuid: 695a8471-6595-4ac6-a2f4-b3d96ed3a59d - attachmentStatus: ATTACHED - errors: - - errorCode: EQ-3040085 - errorMessage: Gateway detachment failed due to configuration error. - correlationId: abcd1234-56ef-78gh-90ij-klmnopqrstuv - details: The gateway configuration is invalid for detachment. - additionalInfo: - - reason: Invalid gateway settings. - changeLog: - createdBy: testuser - createdByEmail: testuser@equinix.com - createdByFullName: testuser testuser - createdDateTime: 2020-05-21T10:30:00Z - updatedBy: adminuser - updatedByEmail: adminuser@equinix.com - updatedByFullName: admin user - updatedDateTime: 2020-06-15T14:45:00Z - GatewayDetachmentResponse: - value: - href: https://api.equinix.com/fabric/v4/routers/369c112f-1d8e-4ad1-ae85-7b03ddf4c728/gateways/3cacb007-1f0a-4686-8bf4-7cdcaf696e05 - uuid: 3cacb007-1f0a-4686-8bf4-7cdcaf696e05 - type: VPN_GATEWAY - attachmentStatus: DETACHING - changeLog: - createdBy: testuser - createdByEmail: testuser@equinix.com - createdByFullName: testuser testuser - createdDateTime: 2020-05-21T10:30:00Z - deletedBy: testuser - deletedByEmail: testuser@equinix.com - deletedByFullName: testuser testuser - deletedDateTime: 2020-05-21T10:30:00Z CloudRouterSearchRouteFiltersRequest: value: filter: @@ -46951,10 +56620,10 @@ components: ntpAdvancedConfiguration: - type: ASCII keyNumber: 65534 - key: plain_printable_key + key: YmFzZTY0X3ByaW50YWJsZV9rZXk= - type: HEX keyNumber: 65535 - key: a1a1a1a1a1a1a1 + key: YTFhMWExYTFhMWExYTE= ntpStandardCreateResponse: value: href: https://api.equinix.com/fabric/v4/timeServices/a8ba52de-faae-43b5-b0b1-6904d37ee011 @@ -47029,10 +56698,10 @@ components: ntpAdvancedConfiguration: - type: ASCII keyNumber: 65534 - key: plain_printable_key + key: YmFzZTY0X3ByaW50YWJsZV9rZXk= - type: HEX keyNumber: 65535 - key: a1a1a1a1a1a1a1 + key: YTFhMWExYTFhMWExYTE= account: accountNumber: 123456 changeLog: @@ -47568,10 +57237,10 @@ components: ntpAdvancedConfiguration: - type: ASCII keyNumber: 65534 - key: plain_printable_key + key: YmFzZTY0X3ByaW50YWJsZV9rZXk= - type: HEX keyNumber: 65535 - key: a1a1a1a1a1a1a1 + key: YTFhMWExYTFhMWExYTE= order: orderNumber: 1-129105284100 account: @@ -47618,10 +57287,10 @@ components: ntpAdvancedConfiguration: - type: ASCII keyNumber: 65534 - key: plain_printable_key + key: YmFzZTY0X3ByaW50YWJsZV9rZXk= - type: HEX keyNumber: 65535 - key: a1a1a1a1a1a1a1 + key: YTFhMWExYTFhMWExYTE= order: orderNumber: 1-129105284100 account: @@ -47667,10 +57336,10 @@ components: ntpAdvancedConfiguration: - type: ASCII keyNumber: 65534 - key: plain_printable_key + key: YmFzZTY0X3ByaW50YWJsZV9rZXk= - type: HEX keyNumber: 65535 - key: a1a1a1a1a1a1a1 + key: YTFhMWExYTFhMWExYTE= order: orderNumber: 1-129105284100 account: @@ -47805,10 +57474,10 @@ components: ntpAdvancedConfiguration: - type: ASCII keyNumber: 65534 - key: plain_printable_key + key: YmFzZTY0X3ByaW50YWJsZV9rZXk= - type: HEX keyNumber: 65535 - key: a1a1a1a1a1a1a1 + key: YTFhMWExYTFhMWExYTE= configurePtpWithAdvancedConfig: value: type: PTP @@ -47958,10 +57627,10 @@ components: value: - type: ASCII keyNumber: 65534 - key: plain-text-key + key: YmFzZTY0X3ByaW50YWJsZV9rZXk= - type: HEX keyNumber: 65535 - key: a1a1a1a1a1a1 + key: YTFhMWExYTFhMWExYTE= ntpStandardReprovisionResponse: value: href: https://api.equinix.com/fabric/v4/timeServices/a8ba52de-faae-43b5-b0b1-6904d37ee011 @@ -48291,6 +57960,51 @@ components: alertRulesCount: 3 changeLog: createdDateTime: 2024-05-06T16:21:18.545214Z + StreamSearchRequestExample: + value: + filter: + and: + - property: /project/projectId + operator: IN + values: + - 2f7f1a59-2dbf-43f8-b1a4-3c1f4e4b55b5 + - or: + - property: /uuid + operator: IN + values: + - 12f4d4a1-c7cb-4def-9f77-5ce93c19d999 + - 8ac8ecfe-c7cb-4def-9f77-5ce93c19d83d + - property: /state + operator: = + values: + - PROVISIONED + sort: + - direction: DESC + property: /changeLog/createdDateTime + pagination: + offset: 0 + limit: 20 + stream-search-all-example: + value: + pagination: + offset: 0 + limit: 20 + total: 1 + data: + - href: https://api.equinix.com/fabric/v4/streams/12f4d4a1-c7cb-4def-9f77-5ce93c19d999 + uuid: 12f4d4a1-c7cb-4def-9f77-5ce93c19d999 + type: TELEMETRY_STREAM + name: stream-dev-01 + description: Observability stream for project assets + project: + projectId: 2f7f1a59-2dbf-43f8-b1a4-3c1f4e4b55b5 + state: PROVISIONED + assetsCount: 3 + streamSubscriptionsCount: 1 + alertRulesCount: 2 + changeLog: + createdDateTime: 2026-06-17T10:15:30Z + updatedDateTime: 2026-06-18T10:15:30Z StreamPutRequestExample: value: name: splunk1 @@ -48313,17 +58027,27 @@ components: value: filter: and: + - property: /uuid + operator: IN + values: + - 8ac8ecfe-c7cb-4def-9f77-5ce93c19d83d + - 9ac8ecfe-c7cb-4def-9f77-5ce93c19d83e - property: /streamUuid operator: = values: - - e684aa26-8276-48b7-bb42-a6d9def0a419 - pagination: - offset: 0 - limit: 20 + - 4719e319-65ae-4001-aabf-ca5f107b9b29 + - property: /attachmentStatus + operator: IN + values: + - ATTACHED + - ATTACHING sort: - direction: DESC property: /uuid - stream-asset-get-all-example: + pagination: + offset: 0 + limit: 20 + stream-asset-search-all-example: value: pagination: offset: 0 @@ -48332,9 +58056,11 @@ components: data: - href: https://api.equinix.com/fabric/v4/ports/e684aa26-8276-48b7-bb42-a6d9def0a419 uuid: d684aa26-8276-48b7-bb42-a6d9def0a418 + streamUuid: e784aa26-8276-48b7-bb42-a6d9def0a424 type: XF_PORT metricsEnabled: false attachmentStatus: ATTACHED + projectId: dadd3ab6-c0af-430c-8216-43d44f08c1c5 StreamConnectionAssetResponseExample: value: href: https://api.equinix.com/fabric/v4/streams/e684aa26-8276-48b7-bb42-a6d9def0a419/connections/d684aa26-8276-48b7-bb42-a6d9def0a418 @@ -48518,20 +58244,64 @@ components: password: settings: source: Equinix - StreamSubscriptionPostRequestExampleWebhook: + StreamSubscriptionPostRequestExampleGenericWebhookNoAuth: + value: + type: STREAM_SUBSCRIPTION + name: webhook + description: subscription-1 + enabled: true + sink: + type: WEBHOOK + settings: + eventUri: https://xxxxxx + metricUri: https://xxxxxx + format: CLOUDEVENT + StreamSubscriptionPostRequestExampleGenericWebhookApiKey: + value: + type: STREAM_SUBSCRIPTION + name: webhook + description: subscription-1 + enabled: true + sink: + type: WEBHOOK + settings: + eventUri: https://xxxxxx + metricUri: https://xxxxxx + format: CLOUDEVENT + credential: + type: API_KEY + apiKey: + StreamSubscriptionPostRequestExampleGenericWebhookAccessToken: + value: + type: STREAM_SUBSCRIPTION + name: webhook + description: subscription-1 + enabled: true + sink: + type: WEBHOOK + settings: + eventUri: https://xxxxxx + metricUri: https://xxxxxx + format: CLOUDEVENT + credential: + type: ACCESS_TOKEN + accessToken: + StreamSubscriptionPostRequestExampleGenericWebhookUsernamePassword: value: type: STREAM_SUBSCRIPTION name: webhook description: subscription-1 enabled: true - metricSelector: - include: - - equinix.fabric.connection.* sink: type: WEBHOOK settings: eventUri: https://xxxxxx + metricUri: https://xxxxxx format: CLOUDEVENT + credential: + type: USERNAME_PASSWORD + username: + password: StreamSubscriptionPostRequestExampleGrafanaWebhook: value: type: STREAM_SUBSCRIPTION @@ -48654,6 +58424,63 @@ components: batchWaitTimeMax: 5 changeLog: createdDateTime: 2024-05-06T16:21:18.545214Z + StreamSubscriptionSearchRequestExample: + value: + filter: + and: + - property: /streamUuid + operator: = + values: + - 12f4d4a1-c7cb-4def-9f77-5ce93c19d999 + - or: + - property: /uuid + operator: = + values: + - 8ac8ecfe-c7cb-4def-9f77-5ce93c19d83d + - property: /name + operator: ILIKE + values: + - demo% + sort: + - direction: DESC + property: /changeLog/createdDateTime + pagination: + offset: 0 + limit: 20 + stream-subscription-search-all-example: + value: + pagination: + offset: 0 + limit: 20 + total: 1 + data: + - href: https://api.equinix.com/fabric/v4/streams/12f4d4a1-c7cb-4def-9f77-5ce93c19d999/subscriptions/8ac8ecfe-c7cb-4def-9f77-5ce93c19d83d + uuid: 8ac8ecfe-c7cb-4def-9f77-5ce93c19d83d + type: STREAM_SUBSCRIPTION + name: demo-subscription + description: Subscription for demo stream events + state: PROVISIONED + enabled: true + metricSelector: + include: + - equinix.fabric.connection.* + eventSelector: + include: + - equinix.fabric.connection.* + sink: + uri: https://hooks.example.com/fabric + type: WEBHOOK + batchEnabled: false + batchSizeMax: 50 + batchWaitTimeMax: 5 + operation: + eventsDeliveredCount: 12 + metricsDeliveredCount: 4 + alertsDeliveredCount: 0 + errors: [] + changeLog: + createdDateTime: 2026-06-17T10:15:30Z + updatedDateTime: 2026-06-18T10:15:30Z stream-alert-rules-get-all-example: value: pagination: @@ -49330,123 +59157,193 @@ components: - DIRECT_CONNECT - VPC - SUBNET - IssueLoaOnCageWithPatchPanelPort: - value: - type: CAGE_LOA - name: My-LOA - description: Issue Loa on cage with patch patch port to organizationName1 - expirationDateTime: 2024-12-31T23:59:59Z - requestor: - email: user@org1.com - orgId: 95900 - organizationName: organizationName1 - patchPanelPort: - patchPanelId: CP:Demarc:1259684 - patchPanelPortA: 23 - patchPanelPortB: 24 - connectorType: SC IssueLoaOnCageWithCageId: value: type: CAGE_LOA - name: My-LOA - description: Issue Loa on cage with cageUniqueSpaceId to organizationName1 - expirationDateTime: 2024-12-31T23:59:59Z + name: LOA-Equinix-SV1-2026 + description: Authorization for cage access to Equinix at SV1 + authorizedProductType: XC + expirationDateTime: 2026-12-31T23:59:59Z requestor: email: user@org1.com orgId: 95900 - organizationName: organizationName1 - cageUniqueSpaceId: AM7:0G:0202 + orgName: organizationName1 + demarcationPoint: + cageUniqueSpaceId: AM7:0G:0202 IssueLoaOnPatchPanelPort: value: type: PATCH_PANEL_PORT_LOA - name: My-LOA - description: Issue Loa on patch panel ports to organizationName1 - expirationDateTime: 2024-12-31T23:59:59Z + name: LOA-Equinix-SV1-2026 + description: Authorization for patch panel port access to Equinix at SV1 + authorizedProductType: XC + expirationDateTime: 2026-12-31T23:59:59Z requestor: email: user@org1.com orgId: 95900 - organizationName: organizationName1 - patchPanelPort: + orgName: organizationName1 + demarcationPoint: patchPanelId: CP:Demarc:1259684 patchPanelPortA: 23 patchPanelPortB: 24 connectorType: SC + IssueLoaOnPatchPanel: + value: + type: PATCH_PANEL_LOA + name: LOA-Equinix-SV1-2026 + description: Authorization for patch panel access to Equinix at SV1 + authorizedProductType: XC + expirationDateTime: 2026-12-31T23:59:59Z + requestor: + email: user@org1.com + orgId: 95900 + orgName: organizationName1 + demarcationPoint: + patchPanelId: CP:Demarc:1259684 RequestLoaOnCage: value: type: CAGE_LOA - name: My-LOA - description: Request Loa on cage to organizationName2 + name: LOA-Equinix-SV1-2026 + description: Authorization for patch panel port access to Equinix at SV1 + authorizedProductType: XC issuer: email: user@org2.com orgId: 95901 - organizationName: organizationName2 + orgName: organizationName2 location: ibxCode: SV11 RequestLoaOnPatchPanel: + value: + type: PATCH_PANEL_LOA + name: LOA-Equinix-SV1-2026 + description: Authorization for patch panel port access to Equinix at SV1 + authorizedProductType: XC + issuer: + email: user@org2.com + orgId: 95901 + orgName: organizationName2 + location: + ibxCode: SV11 + RequestLoaOnPatchPanelPort: value: type: PATCH_PANEL_PORT_LOA - name: My-LOA - description: Request Loa on patch patch port to organizationName2 + name: LOA-Equinix-SV1-2026 + description: Authorization for patch panel port access to Equinix at SV1 + authorizedProductType: XC issuer: email: user@org2.com orgId: 95901 - organizationName: organizationName2 + orgName: organizationName2 location: ibxCode: SV11 - LoaCreateResponseWhenRequestedByRequestor: + LoaCreateResponseByRequestor: value: href: https://api.equinix.com/fabric/v4/loas/29cc7878-54e3-4e1a-8651-87a61354bac2 uuid: 29cc7878-54e3-4e1a-8651-87a61354bac2 type: PATCH_PANEL_PORT_LOA - name: My-LOA - description: create loa + name: LOA-Equinix-SV1-2026 + description: Authorization for cage access to Equinix at SV1 + authorizedProductType: XC state: PENDING_AUTHORIZATION requestor: email: user@org1.com orgId: 95900 - organizationName: organizationName1 + orgName: organizationName1 issuer: email: user@org2.com orgId: 95901 - organizationName: organizationName2 + orgName: organizationName2 location: - ibxCode: AM1 + ibxCode: SV1 changeLog: - createdDateTime: 2025-07-24T06:50:46Z - createdBy: "123" - LoaCreateResponseWhenRequestedByIssuer: + createdDateTime: 2026-07-24T06:50:46Z + createdBy: user + createdByEmail: user@org1.com + LoaCreateResponseByIssuerWithCageType: value: href: https://api.equinix.com/fabric/v4/loas/29cc7878-54e3-4e1a-8651-87a61354bac2 uuid: 29cc7878-54e3-4e1a-8651-87a61354bac2 type: CAGE_LOA - name: My-LOA - description: create loa + name: LOA-Equinix-SV1-2026 + description: Authorization for cage access to Equinix at SV1 + authorizedProductType: XC state: PENDING_ACCEPTANCE requestor: email: user@org1.com orgId: 95900 - organizationName: organizationName1 + orgName: organizationName1 issuer: email: user@org2.com orgId: 95901 - organizationName: organizationName2 - patchPanelPort: + orgName: organizationName2 + demarcationPoint: + cageUniqueSpaceId: SV1:01:10:200 + location: + ibxCode: SV1 + changeLog: + createdDateTime: 2025-07-24T06:50:46Z + createdBy: user + createdByEmail: user@org2.com + LoaCreateResponseByIssuerWithPatchPanelPortType: + value: + href: https://api.equinix.com/fabric/v4/loas/29cc7878-54e3-4e1a-8651-87a61354bac2 + uuid: 29cc7878-54e3-4e1a-8651-87a61354bac2 + type: PATCH_PANEL_PORT_LOA + name: LOA-Equinix-SV1-2026 + description: Authorization for cage access to Equinix at SV1 + authorizedProductType: XC + state: PENDING_ACCEPTANCE + requestor: + email: user@org1.com + orgId: 95900 + orgName: organizationName1 + issuer: + email: user@org2.com + orgId: 95901 + orgName: organizationName2 + demarcationPoint: patchPanelId: CP:Demarc:1259684 patchPanelPortA: 23 patchPanelPortB: 23 connectorType: SC - cageUniqueSpaceId: SV2:01:10:200 location: - ibxCode: SV11 + ibxCode: SV1 changeLog: - createdDateTime: 2025-07-24T06:50:46Z - createdBy: "123" + createdDateTime: 2026-07-24T06:50:46Z + createdBy: user + createdByEmail: user@org2.com + LoaCreateResponseByIssuerWithPatchPanelType: + value: + href: https://api.equinix.com/fabric/v4/loas/29cc7878-54e3-4e1a-8651-87a61354bac2 + uuid: 29cc7878-54e3-4e1a-8651-87a61354bac2 + type: PATCH_PANEL_LOA + name: LOA-Equinix-SV1-2026 + description: Authorization for cage access to Equinix at SV1 + authorizedProductType: XC + state: PENDING_ACCEPTANCE + requestor: + email: user@org1.com + orgId: 95900 + orgName: organizationName1 + issuer: + email: user@org2.com + orgId: 95901 + orgName: organizationName2 + demarcationPoint: + patchPanelId: CP:Demarc:1259684 + location: + ibxCode: SV1 + changeLog: + createdDateTime: 2026-07-24T06:50:46Z + createdBy: user + createdByEmail: user@org2.com Loa_400: value: - errorCode: EQ-3070103 - errorMessage: Loa does not exist. Please check Loa UUID + errorMessage: Loa does not exist. correlationId: cebc3d33-9037-4a2b-a7af-0ad65602cdec - details: Loa does not exist. Please check Loa UUID + additionalInfo: + - property: uuid + reason: Loa does not exist. Please check Loa UUID Loa_401: value: - errorCode: EQ-3070106 @@ -49457,155 +59354,333 @@ components: - errorCode: EQ-3070102 errorMessage: Operation not allowed correlationId: c82ff3bc-de07-47e5-b3ec-53a009d01515 - details: Operation not allowed for current user + additionalInfo: + - reason: Operation not allowed for current user Loa_404: value: - errorCode: EQ-3070101 errorMessage: Loa not found correlationId: c82ff3bc-de07-47e5-b3ec-53a009d01515 - details: Loa not found + additionalInfo: + - property: uuid + reason: Loa does not exist. Please check Loa UUID Loa_500: value: - errorCode: EQ-3070104 errorMessage: Internal Server Error correlationId: c82ff3bc-de07-47e5-b3ec-53a009d01515 - details: Internal Server Error - LoaResponseExample: + additionalInfo: + - reason: An unexpected error occurred while processing the request + LoaResponse: value: href: https://api.equinix.com/fabric/v4/loas/29cc7878-54e3-4e1a-8651-87a61354bac2 uuid: 29cc7878-54e3-4e1a-8651-87a61354bac2 type: PATCH_PANEL_PORT_LOA - name: My-LOA - description: create loa + name: LOA-Equinix-SV1-2026 + description: Authorization for cage access to Equinix at SV1 + authorizedProductType: XC state: INACTIVE + expirationDateTime: 2024-12-31T23:59:59Z + operation: + consumersCount: 10 requestor: email: user@org1.com orgId: 95900 - organizationName: organizationName1 + orgName: organizationName1 issuer: email: user@org2.com orgId: 95901 - organizationName: organizationName2 - patchPanelPort: + orgName: organizationName2 + demarcationPoint: patchPanelId: CP:Demarc:1259684 - patchPanelPortA: "23" - patchPanelPortB: "23" + patchPanelPortA: 23 + patchPanelPortB: 23 connectorType: SC - cageId: SV2:01:10:200 location: - ibxCode: AM1 + ibxCode: SV1 changeLog: createdDateTime: 2025-07-24T06:50:46Z - createdBy: "123" + createdBy: user + createdByEmail: user@org2.com LoaPatchRequest: value: - op: replace - path: /patchPanelPort/patchPanelId + path: /demarcationPoint/patchPanelId value: CP:Demarc:1259685 LoaPatchResponse: value: href: https://api.equinix.com/fabric/v4/loas/29cc7878-54e3-4e1a-8651-87a61354bac2 uuid: 29cc7878-54e3-4e1a-8651-87a61354bac2 type: PATCH_PANEL_PORT_LOA - name: My-LOA - description: create loa + name: LOA-Equinix-SV1-2026 + description: Authorization for cage access to Equinix at SV1 + authorizedProductType: XC state: INACTIVE + operation: + consumersCount: 1 requestor: email: user@org1.com orgId: 95900 - organizationName: organizationName1 + orgName: organizationName1 issuer: email: user@org2.com orgId: 95901 - organizationName: organizationName2 - patchPanelPort: + orgName: organizationName2 + demarcationPoint: patchPanelId: CP:Demarc:1259684 - patchPanelPortA: "23" - patchPanelPortB: "23" + patchPanelPortA: 23 + patchPanelPortB: 23 connectorType: SC - cageId: SV2:01:10:200 location: - ibxCode: AM1 + ibxCode: SV1 changeLog: - createdDateTime: 2025-07-24T06:50:46Z - createdBy: "123" + createdDateTime: 2026-07-24T06:50:46Z + createdBy: user + createdByEmail: user@org2.com AuthorizeLoaActionRequest: value: - type: AUTHORIZE_LOA + type: LOA_ISSUER_AUTHORIZATION data: - patchPanelPort: + demarcationPoint: patchPanelId: CP:Demarc:1259684 patchPanelPortA: "23" patchPanelPortB: "23" connectorType: SC + expirationDateTime: 2026-08-07T07:00:00Z AcceptLoaActionRequest: value: - type: ACCEPT_LOA + type: LOA_REQUESTOR_ACCEPTANCE CopyLoaActionRequest: value: - type: COPY_LOA + type: LOA_COPY_LINK SendLoaActionRequest: value: - type: SEND_LOA + type: LOA_SEND_EMAIL_NOTIFICATION CancelLoaActionRequest: value: - type: CANCEL_LOA + type: LOA_CANCEL AuthorizeLoaActionResponse: value: href: https://api.equinix.com/fabric/v4/loas/29cc7878-54e3-4e1a-8651-87a61354bac2/actions/30cc7878-54e3-4e1a-8651-87a61354bad4 uuid: 30cc7878-54e3-4e1a-8651-87a61354bad4 - type: AUTHORIZE_LOA + type: LOA_ISSUER_AUTHORIZATION state: COMPLETED data: - patchPanelPort: + demarcationPoint: patchPanelId: CP:Demarc:1259684 - patchPanelPortA: "23" - patchPanelPortB: "23" + patchPanelPortA: 23 + patchPanelPortB: 23 connectorType: SC + expirationDateTime: 2026-08-07T07:00:00Z changeLog: - createdDateTime: 2025-07-24T06:50:46Z - createdBy: "123" + createdDateTime: 2026-06-24T06:50:46Z + createdBy: user + createdByEmail: user@org1.com AcceptLoaActionResponse: value: href: https://api.equinix.com/fabric/v4/loas/29cc7878-54e3-4e1a-8651-87a61354bac2/actions/30cc7878-54e3-4e1a-8651-87a61354bad4 uuid: 30cc7878-54e3-4e1a-8651-87a61354bad4 - type: ACCEPT_LOA + type: LOA_REQUESTOR_ACCEPTANCE state: COMPLETED changeLog: createdDateTime: 2025-07-24T06:50:46Z - createdBy: user1 + createdBy: user + createdByEmail: user@org2.com SendLoaActionResponse: value: href: https://api.equinix.com/fabric/v4/loas/29cc7878-54e3-4e1a-8651-87a61354bac2/actions/30cc7878-54e3-4e1a-8651-87a61354bad4 uuid: 30cc7878-54e3-4e1a-8651-87a61354bad4 - type: SEND_LOA + type: LOA_SEND_EMAIL_NOTIFICATION state: COMPLETED changeLog: - createdDateTime: 2025-07-24T06:50:46Z - createdBy: "123" + createdDateTime: 2026-07-24T06:50:46Z + createdBy: user + createdByEmail: user@org2.com CopyLoaActionResponse: value: href: https://api.equinix.com/fabric/v4/loas/29cc7878-54e3-4e1a-8651-87a61354bac2/actions/30cc7878-54e3-4e1a-8651-87a61354bad4 uuid: 30cc7878-54e3-4e1a-8651-87a61354bad4 - type: COPY_LOA + type: LOA_COPY_LINK state: COMPLETED + data: + portalUrl: https://portal.equinix.com/fabric/loa/inventory/issuer/29cc7878-54e3-4e1a-8651-87a61354bac2/authorize changeLog: - createdDateTime: 2025-07-24T06:50:46Z - createdBy: "123" - LoaSearchByLoaId: + createdDateTime: 2026-06-24T06:50:46Z + createdBy: user + createdByEmail: user@org1.com + Loa_Action_400: + value: + - errorCode: EQ-3070107 + errorMessage: Loa Action does not exist. + correlationId: cebc3d33-9037-4a2b-a7af-0ad65602cdec + additionalInfo: + - property: uuid + reason: Loa Action does not exist. Please check Loa UUID + Loa_Action_404: + value: + - errorCode: EQ-3070101 + errorMessage: Loa Action not found + correlationId: c82ff3bc-de07-47e5-b3ec-53a009d01515 + additionalInfo: + - property: uuid + reason: Loa 3070101 does not exist. Please check Loa UUID + LoaSearchByNameWithType: + summary: A named loa of a given type value: filter: and: - - property: /uuid + - property: /name + operator: ILIKE + values: + - LOA-Equinix-SV1 + - property: /type operator: = values: - - 29cc7878-54e3-4e1a-8651-87a61354bac2 + - PATCH_PANEL_PORT_LOA pagination: limit: 25 offset: 0 sort: - property: /changeLog/updatedDateTime direction: DESC + LoaSearchStateWithPartnerOrIbx: + summary: Partial match on state with partner name or with ibx code + value: + filter: + and: + - property: /state + operator: = + values: + - PENDING_ACCEPTANCE + - or: + - property: /requestor/orgName + operator: ILIKE + values: + - abc + - property: /location/ibxCode + operator: ILIKE + values: + - MB + pagination: + limit: 25 + offset: 0 + sort: + - property: /changeLog/updatedDateTime + direction: DESC + LoaSearchResponse: + value: + pagination: + offset: 0 + limit: 25 + total: 1 + sort: + - property: /changeLog/createdDateTime + direction: DESC + data: + - href: https://api.equinix.com/fabric/v4/loas/29cc7878-54e3-4e1a-8651-87a61354bac2 + uuid: 29cc7878-54e3-4e1a-8651-87a61354bac2 + type: PATCH_PANEL_PORT_LOA + name: LOA-Equinix-SV1-2026 + description: Authorization for cage access to Equinix at SV1 + authorizedProductType: XC + state: INACTIVE + expirationDateTime: 2026-12-31T23:59:59Z + operation: + connectionsCount: 1 + requestor: + email: user@org1.com + orgId: 95900 + orgName: organizationName1 + issuer: + email: user@org2.com + orgId: 95901 + orgName: organizationName2 + demarcationPoint: + patchPanelId: CP:Demarc:1259684 + patchPanelPortA: 23 + patchPanelPortB: 23 + connectorType: SC + location: + ibxCode: SV1 + changeLog: + createdDateTime: 2026-07-24T06:50:46Z + createdBy: user + createdByEmail: user@org2.com + LoaActionSearchByActionType: + value: + filter: + and: + - property: /type + operator: = + values: + - LOA_REQUESTOR_ACCEPTANCE + pagination: + limit: 25 + offset: 0 + sort: + - property: /changeLog/createdDateTime + direction: DESC + LoaSearchActionResponse: + value: + pagination: + offset: 0 + limit: 25 + total: 1 + sort: + - property: /changeLog/createdDateTime + direction: DESC + data: + - href: https://api.equinix.com/fabric/v4/loas/29cc7878-54e3-4e1a-8651-87a61354bac2/actions/30cc7878-54e3-4e1a-8651-87a61354bad4 + uuid: 30cc7878-54e3-4e1a-8651-87a61354bad4 + type: LOA_ISSUER_AUTHORIZATION + state: COMPLETED + changeLog: + createdDateTime: 2026-07-24T06:50:46Z + createdBy: user + createdByEmail: user@org2.com + LoaConsumersResponse: + value: + pagination: + offset: 0 + limit: 25 + total: 2 + data: + - href: https://api.equinix.com/fabric/v4/ports/29cc7878-54e3-4e1a-8651-87a61354bac2 + uuid: 29cc7878-54e3-4e1a-8651-87a61354bac2 + type: XF_PORT + changeLog: + createdDateTime: 2025-07-24T06:50:46Z + - href: https://api.equinix.com/fabric/v4/ports/b7e14c2d-93f8-4a61-8d5b-c29f71e4a306 + uuid: b7e14c2d-93f8-4a61-8d5b-c29f71e4a306 + type: XF_PORT + changeLog: + createdDateTime: 2025-07-26T06:50:46Z + LoaNotesResponse: + value: + data: + - type: ISSUER + href: https://api.equinix.com/fabric/v4/loas/7c-5b93-4e6a-a218-6c7d9e3f45b1/notes/e41f485e-3094-42de-8797-0ef19a51df79 + uuid: e41f485e-3094-42de-8797-0ef19a51df79 + comments: test note from issuer + changeLog: + createdDateTime: 2026-07-24T06:50:46Z + - type: REQUESTOR + href: https://api.equinix.com/fabric/v4/loas/7c-5b93-4e6a-a218-6c7d9e3f45b1/notes/a41f485e-3094-42de-8797-0ef19a51df81 + uuid: a41f485e-3094-42de-8797-0ef19a51df81 + comments: test note from requestor + changeLog: + createdDateTime: 2026-07-25T06:50:46Z + LoaNoteRequest: + value: + comments: LOA under review by our team. Expected response within 2 business days. + CreateLoaNoteResponse: + value: + type: ISSUER + href: https://api.equinix.com/fabric/v4/loas/7c-5b93-4e6a-a218-6c7d9e3f45b1/notes/e41f485e-3094-42de-8797-0ef19a51df79 + uuid: e41f485e-3094-42de-8797-0ef19a51df79 + comments: LOA under review by our team. Expected response within 2 business days. + changeLog: + createdDateTime: 2026-06-24T06:50:46Z AppDomainCreate: value: type: APP_DOMAIN @@ -49623,6 +59698,10 @@ components: state: PENDING_VERIFICATION project: projectId: 71b55fef-fd2e-402f-ae3c-01d5f00bf2d4 + changeLog: + createdBy: test + createdDateTime: 2026-06-27T04:20:55.471Z + updatedDateTime: 2026-06-28T04:20:55.471Z AppDomain_400_InvalidName: value: - errorCode: EQ-3810022 @@ -49669,6 +59748,10 @@ components: state: PROVISIONED project: projectId: 71b55fef-fd2e-402f-ae3c-01d5f00bf2d4 + changeLog: + createdBy: test + createdDateTime: 2026-06-27T04:20:55.471Z + updatedDateTime: 2026-06-28T04:20:55.471Z AppDomain_404: value: - errorCode: EQ-3810020 @@ -49685,12 +59768,54 @@ components: state: DEPROVISIONED project: projectId: 71b55fef-fd2e-402f-ae3c-01d5f00bf2d4 + changeLog: + createdBy: test + createdDateTime: 2026-06-27T04:20:55.471Z + updatedBy: test + updatedDateTime: 2026-06-28T04:20:55.471Z + deletedBy: test + deletedDateTime: 2026-06-29T04:20:55.471Z AppDomain_400_InvalidState: value: - errorCode: EQ-3810030 errorMessage: Cannot delete App Domain in transient state correlationId: 09fbe616-e563-438e-9b1b-56632d1611ff details: Cannot delete App Domain in transient state. + AppDomainUpdateDescription: + value: + - op: replace + path: /description + value: Updated Atlassian Domain + AppDomainPatchResponseExample: + value: + href: https://api.equinix.com/fabric/v4/appDomains/20f3ef8e-d670-4236-86fa-bb0038adcfc3 + uuid: 20f3ef8e-d670-4236-86fa-bb0038adcfc3 + type: APP_DOMAIN + name: atlassian.net + description: Updated Atlassian Domain + state: PROVISIONED + project: + projectId: 71b55fef-fd2e-402f-ae3c-01d5f00bf2d4 + change: + uuid: 531c4ab5-43b0-4352-8975-ee9045325841 + type: APP_DOMAIN_UPDATE + status: REQUESTED + createdDateTime: 2026-06-27T04:20:55.471Z + updatedDateTime: 2026-06-28T04:20:55.471Z + data: + - op: replace + path: /description + value: Updated Atlassian Domain + changeLog: + createdBy: test + createdDateTime: 2026-06-27T04:20:55.471Z + updatedBy: test + updatedDateTime: 2026-06-28T04:20:55.471Z + AppDomain_400_InvalidOperation: + value: + - errorCode: EQ-3810022 + errorMessage: Invalid Argument passed + correlationId: c82ff3bc-de07-47e5-b3ec-53a009d01515 AppDomainSearchFilterByStatus: value: filter: @@ -49733,9 +59858,9 @@ components: and: - or: - property: /name - operator: = + operator: LIKE values: - - abc + - abc% - property: /project/projectId operator: = values: @@ -49812,6 +59937,10 @@ components: bandwidth: 1000 project: projectId: 71b55fef-fd2e-402f-ae3c-01d5f00bf2d4 + changeLog: + createdBy: test + createdDateTime: 2026-06-27T04:20:55.471Z + updatedDateTime: 2026-06-28T04:20:55.471Z AppLink_400_InvalidName: value: - errorCode: EQ-3820022 @@ -49864,6 +59993,10 @@ components: bandwidth: 1000 project: projectId: 71b55fef-fd2e-402f-ae3c-01d5f00bf2d4 + changeLog: + createdBy: test + createdDateTime: 2026-06-27T04:20:55.471Z + updatedDateTime: 2026-06-28T04:20:55.471Z AppLink_404: value: - errorCode: EQ-3820020 @@ -49886,12 +60019,60 @@ components: bandwidth: 1000 project: projectId: 71b55fef-fd2e-402f-ae3c-01d5f00bf2d4 + changeLog: + createdBy: test + createdDateTime: 2026-06-27T04:20:55.471Z + updatedBy: test + updatedDateTime: 2026-06-28T04:20:55.471Z + deletedBy: test + deletedDateTime: 2026-06-29T04:20:55.471Z AppLink_400_InvalidState: value: - errorCode: EQ-3820030 errorMessage: Cannot delete App Link in transient state correlationId: 09fbe616-e563-438e-9b1b-56632d1611ff details: Cannot delete App Link in transient state. + AppLinkUpdateName: + value: + - op: replace + path: /name + value: Updated Atlassian App Link + AppLinkPatchResponseExample: + value: + href: https://api.equinix.com/fabric/v4/appLinks/23cd19ab-d3bb-478b-9f25-bd12a3af1914 + uuid: 23cd19ab-d3bb-478b-9f25-bd12a3af1914 + type: APP_LINK + name: Updated Atlassian App Link + description: Atlassian App Link in SV + state: REPROVISIONING + router: + href: https://api.equinix.com/fabric/v4/routers/36204584-2ae1-44f6-980f-08ecd555d9c6 + uuid: 36204584-2ae1-44f6-980f-08ecd555d9c6 + type: XF_ROUTER + ipv4Address: 192.168.10.1 + bandwidth: 1000 + project: + projectId: 71b55fef-fd2e-402f-ae3c-01d5f00bf2d4 + change: + uuid: 531c4ab5-43b0-4352-8975-ee9045325841 + type: APP_LINK_UPDATE + status: REQUESTED + createdDateTime: 2026-06-27T04:20:55.471Z + updatedDateTime: 2026-06-28T04:20:55.471Z + data: + - op: replace + path: /name + value: Updated Atlassian App Link + changeLog: + createdBy: test + createdDateTime: 2026-06-27T04:20:55.471Z + updatedBy: test + updatedDateTime: 2026-06-28T04:20:55.471Z + AppLink_400_InvalidOperation: + value: + - errorCode: EQ-3040054 + errorMessage: Invalid Argument passed + correlationId: c82ff3bc-de07-47e5-b3ec-53a009d01515 AppLinkSearchFilterByStatus: value: filter: @@ -49934,9 +60115,9 @@ components: and: - or: - property: /name - operator: = + operator: LIKE values: - - abc + - abc% - property: /project/projectId operator: = values: @@ -49971,6 +60152,17 @@ components: correlationId: 11091aa7-322a-461e-b6af-40fd10543c94 additionalInfo: - reason: Only accept DESC and ASC for sorting direction. + AppLinkAttachDomainResponse: + value: + href: https://api.equinix.com/fabric/v4/appLinks/23cd19ab-d3bb-478b-9f25-bd12a3af1914/appDomains/20f3ef8e-d670-4236-86fa-bb0038adcfc3 + uuid: 20f3ef8e-d670-4236-86fa-bb0038adcfc3 + type: APP_DOMAIN + name: atlassian.net + attachmentStatus: ATTACHED + changeLog: + createdBy: test + createdDateTime: 2026-06-27T04:20:55.471Z + updatedDateTime: 2026-06-28T04:20:55.471Z AppLinkAttachDomainAttachResponse: value: href: https://api.equinix.com/fabric/v4/appLinks/23cd19ab-d3bb-478b-9f25-bd12a3af1914/appDomains/20f3ef8e-d670-4236-86fa-bb0038adcfc3 @@ -49978,6 +60170,10 @@ components: type: APP_DOMAIN name: atlassian.net attachmentStatus: ATTACHING + changeLog: + createdBy: test + createdDateTime: 2026-06-27T04:20:55.471Z + updatedDateTime: 2026-06-27T04:20:55.471Z AppLink_400_InvalidAttachState: value: - errorCode: EQ-3820030 @@ -49991,6 +60187,10 @@ components: type: APP_DOMAIN name: atlassian.net attachmentStatus: DETACHING + changeLog: + createdBy: test + createdDateTime: 2026-06-27T04:20:55.471Z + updatedDateTime: 2026-06-28T04:20:55.471Z AppLinkAttachDomainSearchFilterByStatus: value: filter: @@ -50046,6 +60246,22 @@ components: project: projectId: 71b55fef-fd2e-402f-ae3c-01d5f00bf2d4 attachmentStatus: ATTACHED + changeLog: + createdBy: test + createdDateTime: 2026-06-27T04:20:55.471Z + updatedDateTime: 2026-06-28T04:20:55.471Z + AppLinkAttachServiceResponse: + value: + href: https://api.equinix.com/fabric/v4/appLinks/23cd19ab-d3bb-478b-9f25-bd12a3af1914/appServices/5008a109-9d1c-485c-b0ba-de9736f283c2 + uuid: 5008a109-9d1c-485c-b0ba-de9736f283c2 + type: APP_SERVICE + geoScope: GLOBAL + destinationIp: 10.10.1.110 + attachmentStatus: ATTACHED + changeLog: + createdBy: test + createdDateTime: 2026-06-27T04:20:55.471Z + updatedDateTime: 2026-06-28T04:20:55.471Z AppLinkAttachService: value: geoScope: GLOBAL @@ -50058,6 +60274,10 @@ components: geoScope: GLOBAL destinationIp: 10.10.1.110 attachmentStatus: ATTACHING + changeLog: + createdBy: test + createdDateTime: 2026-06-27T04:20:55.471Z + updatedDateTime: 2026-06-27T04:20:55.471Z AppLinkAttachServiceDetachResponse: value: href: https://api.equinix.com/fabric/v4/appLinks/23cd19ab-d3bb-478b-9f25-bd12a3af1914/appServices/5008a109-9d1c-485c-b0ba-de9736f283c2 @@ -50066,6 +60286,38 @@ components: geoScope: GLOBAL destinationIp: 10.10.1.110 attachmentStatus: DETACHING + changeLog: + createdBy: test + createdDateTime: 2026-06-27T04:20:55.471Z + updatedDateTime: 2026-06-28T04:20:55.471Z + AppLinkAttachServicePatchDestinationIp: + value: + - op: replace + path: /destinationIp + value: 10.10.1.120 + AppLinkAttachServicePatchResponse: + value: + href: https://api.equinix.com/fabric/v4/appLinks/23cd19ab-d3bb-478b-9f25-bd12a3af1914/appServices/5008a109-9d1c-485c-b0ba-de9736f283c2 + uuid: 5008a109-9d1c-485c-b0ba-de9736f283c2 + type: APP_SERVICE + geoScope: GLOBAL + destinationIp: 10.10.1.120 + attachmentStatus: ATTACHING + change: + uuid: 531c4ab5-43b0-4352-8975-ee9045325841 + type: APP_LINK_UPDATE + status: REQUESTED + createdDateTime: 2026-06-27T04:20:55.471Z + updatedDateTime: 2026-06-27T04:20:55.471Z + data: + - op: replace + path: /destinationIp + value: 10.10.1.120 + changeLog: + createdBy: test + createdDateTime: 2026-06-27T04:20:55.471Z + updatedBy: test + updatedDateTime: 2026-06-27T04:20:55.471Z AppLinkAttachServiceSearchFilterByStatus: value: filter: @@ -50128,6 +60380,10 @@ components: geoScope: GLOBAL destinationIp: 10.10.1.110 attachmentStatus: ATTACHED + changeLog: + createdBy: test + createdDateTime: 2026-06-27T04:20:55.471Z + updatedDateTime: 2026-06-28T04:20:55.471Z AppServiceCreate: value: type: APP_SERVICE @@ -50147,12 +60403,15 @@ components: name: Atlassian App Service description: Atlassian App Service in SV state: PROVISIONING - endpoints: - - equinixjira.atlassian.net + endpoint: equinixjira.atlassian.net sourceDomains: - equinix.com project: projectId: 71b55fef-fd2e-402f-ae3c-01d5f00bf2d4 + changeLog: + createdBy: test + createdDateTime: 2026-06-27T04:20:55.471Z + updatedDateTime: 2026-06-28T04:20:55.471Z AppService_400_InvalidName: value: - errorCode: EQ-3830022 @@ -50197,14 +60456,17 @@ components: name: Atlassian App Service description: Atlassian App Service in SV state: PROVISIONED - endpoints: - - equinixjira.atlassian.net + endpoint: equinixjira.atlassian.net sourceDomains: - equinix.com project: projectId: 71b55fef-fd2e-402f-ae3c-01d5f00bf2d4 account: organizationName: atlassian + changeLog: + createdBy: test + createdDateTime: 2026-06-27T04:20:55.471Z + updatedDateTime: 2026-06-28T04:20:55.471Z AppService_404: value: - errorCode: EQ-3830020 @@ -50219,18 +60481,62 @@ components: name: Atlassian App Service description: Atlassian App Service in SV state: DEPROVISIONING - endpoints: - - equinixjira.atlassian.net + endpoint: equinixjira.atlassian.net sourceDomains: - equinix.com project: projectId: 71b55fef-fd2e-402f-ae3c-01d5f00bf2d4 + changeLog: + createdBy: test + createdDateTime: 2026-06-27T04:20:55.471Z + updatedBy: test + updatedDateTime: 2026-06-28T04:20:55.471Z + deletedBy: test + deletedDateTime: 2026-06-29T04:20:55.471Z AppService_400_InvalidState: value: - errorCode: EQ-3830030 errorMessage: Cannot delete App Service in transient state correlationId: 09fbe616-e563-438e-9b1b-56632d1611ff details: Cannot delete App Service in transient state. + AppServiceUpdateName: + value: + - op: replace + path: /name + value: Updated Atlassian App Service + AppServicePatchResponseExample: + value: + href: https://api.equinix.com/fabric/v4/appServices/5008a109-9d1c-485c-b0ba-de9736f283c2 + uuid: 5008a109-9d1c-485c-b0ba-de9736f283c2 + type: APP_SERVICE + name: Updated Atlassian App Service + description: Atlassian App Service in SV + state: REPROVISIONING + endpoint: equinixjira.atlassian.net + sourceDomains: + - equinix.com + project: + projectId: 71b55fef-fd2e-402f-ae3c-01d5f00bf2d4 + change: + uuid: 531c4ab5-43b0-4352-8975-ee9045325841 + type: APP_SERVICE_UPDATE + status: REQUESTED + createdDateTime: 2026-06-27T04:20:55.471Z + updatedDateTime: 2026-06-28T04:20:55.471Z + data: + - op: replace + path: /name + value: Updated Atlassian App Service + changeLog: + createdBy: test + createdDateTime: 2026-06-27T04:20:55.471Z + updatedBy: test + updatedDateTime: 2026-06-28T04:20:55.471Z + AppService_400_InvalidOperation: + value: + - errorCode: EQ-3040054 + errorMessage: Invalid Argument passed + correlationId: c82ff3bc-de07-47e5-b3ec-53a009d01515 AppServiceSearchFilterByStatus: value: filter: @@ -50273,9 +60579,9 @@ components: and: - or: - property: /name - operator: = + operator: LIKE values: - - abc + - abc% - property: /project/projectId operator: = values: @@ -50295,8 +60601,7 @@ components: name: Atlassian App Service description: Atlassian App Service in SV state: PROVISIONED - endpoints: - - equinixjira.atlassian.net + endpoint: equinixjira.atlassian.net sourceDomains: - equinix.com project: @@ -50331,6 +60636,19 @@ components: ipv4Address: 192.168.10.1 project: projectId: 71b55fef-fd2e-402f-ae3c-01d5f00bf2d4 + AppServiceAttachedAppSubscriptionsGetResponseExample: + value: + pagination: + limit: 20 + offset: 0 + total: 1 + data: + - href: https://api.equinix.com/fabric/v4/appSubscriptions/20f3ef8e-d670-4236-86fa-bb0038adcfc3 + type: APP_SUBSCRIPTION + uuid: 20f3ef8e-d670-4236-86fa-bb0038adcfc3 + state: PROVISIONED + account: + organizationName: equinix AppServiceAttachedAppSubscriptionSearchExample: value: pagination: @@ -50377,6 +60695,10 @@ components: state: PROVISIONING project: projectId: 71b55fef-fd2e-402f-ae3c-01d5f00bf2d4 + changeLog: + createdBy: test + createdDateTime: 2026-06-27T04:20:55.471Z + updatedDateTime: 2026-06-28T04:20:55.471Z AppSubscription_401: value: - errorCode: EQ-3840001 @@ -50422,6 +60744,10 @@ components: state: PROVISIONED project: projectId: 71b55fef-fd2e-402f-ae3c-01d5f00bf2d4 + changeLog: + createdBy: test + createdDateTime: 2026-06-27T04:20:55.471Z + updatedDateTime: 2026-06-28T04:20:55.471Z AppSubscription_404: value: - errorCode: EQ-3840020 @@ -50446,12 +60772,65 @@ components: state: DEPROVISIONED project: projectId: 71b55fef-fd2e-402f-ae3c-01d5f00bf2d4 + changeLog: + createdBy: test + createdDateTime: 2026-06-27T04:20:55.471Z + updatedBy: test + updatedDateTime: 2026-06-28T04:20:55.471Z + deletedBy: test + deletedDateTime: 2026-06-29T04:20:55.471Z AppSubscription_400_InvalidState: value: - errorCode: EQ-3840030 errorMessage: Cannot delete App Subscription in transient state correlationId: 09fbe616-e563-438e-9b1b-56632d1611ff details: Cannot delete App Subscription in transient state. + AppSubscriptionUpdateSourceIpSubnets: + value: + - op: add + path: /source/ipSubnets + value: + - 192.168.200.0/24 + AppSubscriptionPatchResponseExample: + value: + href: https://api.equinix.com/fabric/v4/appSubscriptions/20f3ef8e-d670-4236-86fa-bb0038adcfc3 + uuid: 20f3ef8e-d670-4236-86fa-bb0038adcfc3 + type: APP_SUBSCRIPTION + source: + appLink: + uuid: e32c9c7a-0149-4582-8345-192b82aef972 + ipSubnets: + - 192.168.100.0/24 + - 192.168.200.0/24 + target: + appService: + uuid: e18c15f4-c8aa-4c18-9e35-a7e9b288201d + geoScope: GLOBAL + prioritization: LATENCY + state: PROVISIONING + project: + projectId: 71b55fef-fd2e-402f-ae3c-01d5f00bf2d4 + change: + uuid: 531c4ab5-43b0-4352-8975-ee9045325841 + type: APP_SUBSCRIPTION_UPDATE + status: REQUESTED + createdDateTime: 2026-06-27T04:20:55.471Z + updatedDateTime: 2026-06-28T04:20:55.471Z + data: + - op: add + path: /source/ipSubnets + value: + - 192.168.200.0/24 + changeLog: + createdBy: test + createdDateTime: 2026-06-27T04:20:55.471Z + updatedBy: test + updatedDateTime: 2026-06-28T04:20:55.471Z + AppSubscription_400_InvalidOperation: + value: + - errorCode: EQ-3040054 + errorMessage: Invalid Argument passed + correlationId: c82ff3bc-de07-47e5-b3ec-53a009d01515 AppSubscriptionSearchFilterByStatus: value: filter: @@ -51077,6 +61456,478 @@ components: has_more: false last_id: msg_3920f72c-5172-42d1-8f5b-7eafd490411e object: list + GatewayCreate: + value: + type: VPN_GW + name: My-VPN-Gateway + description: my test gateway + bandwidth: 1000 + haEnabled: true + router: + uuid: 89fcecec-b7e7-453b-b1ba-b35757bfcdbf + type: XF_ROUTER + project: + projectId: b1baecec-b7e7-453b-89fc-b35757bfcdbf + account: + accountNumber: "123456" + GatewayPostResponseExample: + value: + href: https://api.equinix.com/fabric/v4/gateways/c93a9ca0-bb56-490b-8bce-4b2bdaeb4d46 + uuid: c93a9ca0-bb56-490b-8bce-4b2bdaeb4d46 + type: VPN_GW + name: My-VPN-Gateway + description: my test gateway + state: PROVISIONING + bandwidth: 50 + router: + href: https://api.equinix.com/fabric/v4/routers/6658cc3b-18e0-437c-b972-62b51a419a1e + uuid: 6658cc3b-18e0-437c-b972-62b51a419a1e + type: XF_ROUTER + haEnabled: true + ipv4: + primaryIp: 192.168.127.12 + secondaryIp: 192.168.127.13 + project: + projectId: b1baecec-b7e7-453b-89fc-b35757bfcdbf + account: + accountNumber: "12345678" + changeLog: + createdBy: abc@xyz.com + createdByEmail: abc@xyz.com + createdDateTime: 2025-04-21T01:11:11.117Z + updatedBy: abc@xyz.com + updatedByEmail: abc@xyz.com + updatedDateTime: 2025-04-22T02:22:22.227Z + Gateway_400_InvalidName: + value: + - errorCode: EQ-8010022 + errorMessage: Name is minimum 0 and up to 50 characters in length + correlationId: fc7a32c8-2b99-4915-bb4b-eb42bbba668e + details: Name is minimum 0 and up to 50 characters in length + additionalInfo: + - property: /name + reason: Name is minimum 0 and up to 50 characters in length + Gateway_401: + value: + - errorCode: EQ-8010001 + errorMessage: User not found in request or invalid. + correlationId: c82ff3bc-de07-47e5-b3ec-53a009d01515 + additionalInfo: + - reason: You are unauthorized to perform this operation + Gateway_403: + value: + - errorCode: EQ-8010002 + errorMessage: Operation not allowed + correlationId: 8a72af9d-23f7-4b90-8237-0987130b42dd + details: Operation not allowed for current user + Gateway_415: + value: + - errorCode: EQ-8010016 + errorMessage: Unsupported media type, please check the request's Content-Type or Content-Encoding + correlationId: c82ff3bc-de07-47e5-b3ec-53a009d01515 + additionalInfo: + - property: contentType + reason: The payload format is in an unsupported format + Gateway_500: + value: + - errorCode: EQ-8010030 + errorMessage: Internal Server Error + correlationId: f9018571-1001-4422-978b-bfa38ed6b92e + details: Internal Server Error + GatewayGetResponseExample: + value: + href: https://api.equinix.com/fabric/v4/gateways/c93a9ca0-bb56-490b-8bce-4b2bdaeb4d46 + uuid: c93a9ca0-bb56-490b-8bce-4b2bdaeb4d46 + type: VPN_GW + name: My-VPN-Gateway + description: my test gateway + state: PROVISIONED + bandwidth: 50 + router: + href: https://api.equinix.com/fabric/v4/routers/6658cc3b-18e0-437c-b972-62b51a419a1e + uuid: 6658cc3b-18e0-437c-b972-62b51a419a1e + type: XF_ROUTER + haEnabled: true + ipv4: + primaryIp: 192.168.127.12 + secondaryIp: 192.168.127.13 + project: + projectId: b1baecec-b7e7-453b-89fc-b35757bfcdbf + account: + accountNumber: "12345678" + changeLog: + createdBy: abc@xyz.com + createdByEmail: abc@xyz.com + createdDateTime: 2025-04-21T01:11:11.117Z + updatedBy: abc@xyz.com + updatedByEmail: abc@xyz.com + updatedDateTime: 2025-04-22T02:22:22.227Z + Gateway_404: + value: + - errorCode: EQ-8010020 + errorMessage: Gateway not found or already deleted + correlationId: 9b6baf30-3eb0-458c-af8b-fff3fae32bc7 + details: Gateway not found or already deleted + GatewayDeleteResponseExample: + value: + href: https://api.equinix.com/fabric/v4/gateways/c93a9ca0-bb56-490b-8bce-4b2bdaeb4d46 + uuid: c93a9ca0-bb56-490b-8bce-4b2bdaeb4d46 + type: VPN_GW + name: My-VPN-Gateway + description: my test gateway + state: DEPROVISIONING + bandwidth: 50 + router: + href: https://api.equinix.com/fabric/v4/routers/6658cc3b-18e0-437c-b972-62b51a419a1e + uuid: 6658cc3b-18e0-437c-b972-62b51a419a1e + type: XF_ROUTER + haEnabled: true + ipv4: + primaryIp: 192.168.127.12 + secondaryIp: 192.168.127.13 + project: + projectId: b1baecec-b7e7-453b-89fc-b35757bfcdbf + account: + accountNumber: "12345678" + changeLog: + createdBy: abc@xyz.com + createdByEmail: abc@xyz.com + createdDateTime: 2025-04-21T01:11:11.117Z + updatedBy: abc@xyz.com + updatedByEmail: abc@xyz.com + updatedDateTime: 2025-04-22T02:22:22.227Z + deletedBy: abc@xyz.com + deletedByEmail: abc@xyz.com + deletedDateTime: 2025-04-23T03:33:33.337Z + Gateway_400_InvalidState: + value: + - errorCode: EQ-8010030 + errorMessage: Cannot delete Gateway in transient state + correlationId: 09fbe616-e563-438e-9b1b-56632d1611ff + details: Cannot delete Gateway in transient state. + GatewayUpdateNameRequest: + value: + - op: replace + path: /name + value: Gw-Name-2 + GatewayUpdateBandwidthRequest: + value: + - op: replace + path: /bandwidth + value: 1000 + GatewayUpdateResponseExample: + value: + href: https://api.equinix.com/fabric/v4/gateways/c93a9ca0-bb56-490b-8bce-4b2bdaeb4d46 + uuid: c93a9ca0-bb56-490b-8bce-4b2bdaeb4d46 + type: VPN_GW + name: Gw-Name-2 + description: my test gateway + state: REPROVISIONING + bandwidth: 50 + router: + href: https://api.equinix.com/fabric/v4/routers/6658cc3b-18e0-437c-b972-62b51a419a1e + uuid: 6658cc3b-18e0-437c-b972-62b51a419a1e + type: XF_ROUTER + haEnabled: true + ipv4: + primaryIp: 192.168.127.12 + secondaryIp: 192.168.127.13 + project: + projectId: b1baecec-b7e7-453b-89fc-b35757bfcdbf + account: + accountNumber: "12345678" + changeLog: + createdBy: abc@xyz.com + createdByEmail: abc@xyz.com + createdDateTime: 2025-04-21T01:11:11.117Z + updatedBy: abc@xyz.com + updatedByEmail: abc@xyz.com + updatedDateTime: 2025-04-22T02:22:22.227Z + TermPostFCRRequestExample: + value: + accountNumber: ACCT-123456 + product: CLOUD_ROUTER_PRODUCT + type: BCD_FIXED_TERM + delayDuration: P30D + startDateTime: 2026-09-24T06:59:46Z + quantityEntitled: 1 + name: Q3 FCR Trial — Advanced & Premium + comSolCaseId: CS-98765 + notes: text1 + selector: + and: + - property: /router/package/code + operator: IN + values: + - ADVANCED + - PREMIUM + TermPostVCRequestExample: + value: + accountNumber: ACCT-654321 + product: VIRTUAL_CONNECTION_PRODUCT + type: BCD_FIXED_TERM + delayDuration: P60D + startDateTime: 2026-07-01T00:00:00Z + quantityEntitled: 1 + name: Q3 VC Trial — Up to 1G + comSolCaseId: CS-98766 + selector: + and: + - property: /connection/bandwidth + operator: <= + values: + - "1000" + TermPostFCRResponseExample: + value: + href: https://api.equinix.com/fabric/v4/terms/a1b2c3d4-e5f6-7890-abcd-ef1234567890 + uuid: a1b2c3d4-e5f6-7890-abcd-ef1234567890 + accountNumber: ACCT-123456 + type: BCD_FIXED_TERM + product: CLOUD_ROUTER_PRODUCT + state: ACTIVE + startDateTime: 2026-09-24T06:59:46Z + delayDuration: P30D + commencementDateTime: 2026-12-24T06:59:46Z + quantityEntitled: 1 + name: Q3 FCR Trial — Advanced & Premium + comSolCaseId: CS-98765 + notes: text1 + selector: + and: + - property: /router/package/code + operator: IN + values: + - ADVANCED + - PREMIUM + changeLog: + createdId: 1222 + createdDateTime: 2026-06-15T10:00:00Z + TermPostVCResponseExample: + value: + href: https://api.equinix.com/fabric/v4/terms/b2c3d4e5-f6a7-8901-bcde-f12345678901 + uuid: b2c3d4e5-f6a7-8901-bcde-f12345678901 + accountNumber: ACCT-654321 + type: BCD_FIXED_TERM + product: VIRTUAL_CONNECTION_PRODUCT + state: ACTIVE + startDateTime: 2026-07-01T00:00:00Z + delayDuration: P60D + commencementDateTime: 2026-08-30T00:00:00Z + quantityEntitled: 1 + name: Q3 VC Trial — Up to 1G + comSolCaseId: CS-98766 + selector: + and: + - property: /connection/bandwidth + operator: <= + values: + - "1000" + changeLog: + createdId: 1223 + createdDateTime: 2026-06-15T10:05:00Z + Terms_400: + value: + - errorCode: EQ-3073002 + errorMessage: Invalid argument + correlationId: req-abc-123 + details: accountNumber is required + additionalInfo: + - property: accountNumber + reason: required + Terms_400_TermStartDateInPast: + value: + - errorCode: EQ-3073010 + errorMessage: startDateTime cannot be in the past + correlationId: req-abc-123 + details: startDateTime cannot be in the past + additionalInfo: + - property: startDateTime + reason: must be today or a future date + Terms_500: + value: + - errorCode: EQ-3073001 + errorMessage: Internal error + correlationId: req-abc-123 + details: Internal system error + TermGetByIdFCRResponseExample: + value: + href: https://api.equinix.com/fabric/v4/terms/a1b2c3d4-e5f6-7890-abcd-ef1234567890 + uuid: a1b2c3d4-e5f6-7890-abcd-ef1234567890 + accountNumber: ACCT-123456 + type: BCD_FIXED_TERM + product: CLOUD_ROUTER_PRODUCT + state: ACTIVE + startDateTime: 2026-09-24T06:59:46Z + delayDuration: P30D + commencementDateTime: 2026-12-24T06:59:46Z + quantityEntitled: 1 + name: Q3 FCR Trial — Advanced & Premium + comSolCaseId: CS-98765 + notes: text1 + selector: + and: + - property: /router/package/code + operator: IN + values: + - ADVANCED + - PREMIUM + changeLog: + createdId: 1222 + createdDateTime: 2026-06-15T10:00:00Z + TermGetByIdVCResponseExample: + value: + href: https://api.equinix.com/fabric/v4/terms/b2c3d4e5-f6a7-8901-bcde-f12345678901 + uuid: b2c3d4e5-f6a7-8901-bcde-f12345678901 + accountNumber: ACCT-654321 + type: BCD_FIXED_TERM + product: VIRTUAL_CONNECTION_PRODUCT + state: ACTIVE + startDateTime: 2026-07-01T00:00:00Z + delayDuration: P60D + commencementDateTime: 2026-08-30T00:00:00Z + quantityEntitled: 1 + name: Q3 VC Trial — Up to 1G + comSolCaseId: CS-98766 + selector: + and: + - property: /connection/bandwidth + operator: <= + values: + - "1000" + changeLog: + createdId: 1223 + createdDateTime: 2026-06-15T10:05:00Z + Terms_404: + value: + - errorCode: EQ-3073004 + errorMessage: Resource not found + correlationId: req-abc-123 + details: "Term not found: a1b2c3d4-e5f6-7890-abcd-ef1234567890" + TermDeleteFCRResponseExample: + value: + href: https://api.equinix.com/fabric/v4/terms/a1b2c3d4-e5f6-7890-abcd-ef1234567890 + uuid: a1b2c3d4-e5f6-7890-abcd-ef1234567890 + accountNumber: ACCT-123456 + type: BCD_FIXED_TERM + product: CLOUD_ROUTER_PRODUCT + state: DELETED + startDateTime: 2026-09-24T06:59:46Z + delayDuration: P30D + commencementDateTime: 2026-12-24T06:59:46Z + quantityEntitled: 1 + name: Q3 FCR Trial — Advanced & Premium + comSolCaseId: CS-98765 + notes: text1 + selector: + and: + - property: /router/package/code + operator: IN + values: + - ADVANCED + - PREMIUM + changeLog: + createdId: 1222 + createdDateTime: 2026-06-15T10:00:00Z + deletedId: 1222 + deletedDateTime: 2026-07-29T09:00:00Z + TermDeleteVCResponseExample: + value: + href: https://api.equinix.com/fabric/v4/terms/b2c3d4e5-f6a7-8901-bcde-f12345678901 + uuid: b2c3d4e5-f6a7-8901-bcde-f12345678901 + accountNumber: ACCT-654321 + type: BCD_FIXED_TERM + product: VIRTUAL_CONNECTION_PRODUCT + state: DELETED + startDateTime: 2026-07-01T00:00:00Z + delayDuration: P60D + commencementDateTime: 2026-08-30T00:00:00Z + quantityEntitled: 1 + name: Q3 VC Trial — Up to 1G + comSolCaseId: CS-98766 + selector: + and: + - property: /connection/bandwidth + operator: <= + values: + - "1000" + changeLog: + createdId: 1223 + createdDateTime: 2026-06-15T10:05:00Z + deletedId: 1223 + deletedDateTime: 2026-07-29T09:05:00Z + Terms_409: + value: + - errorCode: EQ-3073005 + errorMessage: Resource already deleted + correlationId: req-abc-123 + details: "Term already deleted: a1b2c3d4-e5f6-7890-abcd-ef1234567890" + TermSearchFCRRequestExample: + value: + filter: + and: + - property: accountNumber + operator: = + values: + - ACCT-123456 + - property: product + operator: = + values: + - CLOUD_ROUTER_PRODUCT + - property: state + operator: = + values: + - ACTIVE + sort: + - field: changeLog.createdDateTime + direction: DESC + pagination: + offset: 0 + limit: 20 + TermSearchVCRequestExample: + value: + filter: + and: + - property: accountNumber + operator: = + values: + - ACCT-654321 + - property: product + operator: = + values: + - VIRTUAL_CONNECTION_PRODUCT + - property: state + operator: IN + values: + - ACTIVE + - INACTIVE + sort: + - field: startDateTime + direction: ASC + pagination: + offset: 0 + limit: 20 + TermSearchResponseExample: + value: + data: + - uuid: a1b2c3d4-e5f6-7890-abcd-ef1234567890 + href: https://api.equinix.com/fabric/v4/terms/a1b2c3d4-e5f6-7890-abcd-ef1234567890 + accountNumber: ACCT-123456 + type: BCD_FIXED_TERM + product: CLOUD_ROUTER_PRODUCT + state: ACTIVE + startDateTime: 2026-09-24T06:59:46Z + delayDuration: P30D + commencementDateTime: 2026-12-24T06:59:46Z + quantityEntitled: 1 + name: Q3 FCR Trial — Advanced & Premium + comSolCaseId: CS-98765 + changeLog: + createdId: 1222 + createdDateTime: 2026-06-15T10:00:00Z + pagination: + offset: 0 + limit: 20 + total: 1 headers: ETag: description: response header - identifier for a specific version of a resource. From 99a58252d887cd74b7a8f3a1e614b3dd7b10ded4 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 17 Aug 2026 09:00:54 +0000 Subject: [PATCH 03/16] sync: generate client with 2026-08-17 spec --- services/fabricv4/README.md | 400 ++- services/fabricv4/docs/AccessPoint.md | 5 + services/fabricv4/docs/AccessPointType.md | 2 + services/fabricv4/docs/Account.md | 26 + .../fabricv4/docs/ActivationKeyDetails.md | 18 + services/fabricv4/docs/AddOperation.md | 10 +- services/fabricv4/docs/Address.md | 20 + services/fabricv4/docs/AgentActivities.md | 20 - .../fabricv4/docs/AgentActivitiesMetadata.md | 14 - services/fabricv4/docs/AgentPatchRequest.md | 16 - services/fabricv4/docs/AgentPostRequest.md | 20 - services/fabricv4/docs/AgentTemplates.md | 35 - services/fabricv4/docs/Agents.md | 37 - .../docs/AllInterconnectPackagesResponse.md | 15 + services/fabricv4/docs/AppDomain.md | 22 + .../fabricv4/docs/AppDomainAttachedAppLink.md | 23 + .../docs/AppDomainAttachedAppLinks.md | 14 + services/fabricv4/docs/AppDomainChange.md | 37 + .../fabricv4/docs/AppDomainChangeOperation.md | 34 + services/fabricv4/docs/AppDomainFilter.md | 16 + ...BulkPortRequest.md => AppDomainFilters.md} | 5 +- services/fabricv4/docs/AppDomainOrFilter.md | 13 + .../fabricv4/docs/AppDomainPostRequest.md | 17 + .../fabricv4/docs/AppDomainSearchRequest.md | 16 + ...Response.md => AppDomainSearchResponse.md} | 4 +- .../docs/AppDomainSimpleExpression.md | 15 + .../fabricv4/docs/AppDomainSortCriteria.md | 14 + .../fabricv4/docs/AppDomainSortDirection.md | 13 + services/fabricv4/docs/AppDomainState.md | 21 + services/fabricv4/docs/AppDomainType.md | 11 + services/fabricv4/docs/AppLink.md | 25 + .../docs/AppLinkAppDomainAttachment.md | 19 + .../docs/AppLinkAppServiceAttachment.md | 21 + .../docs/AppLinkAppServiceAttachmentChange.md | 37 + ...LinkAppServiceAttachmentChangeOperation.md | 34 + .../docs/AppLinkAttachDomainFilter.md | 16 + .../docs/AppLinkAttachDomainFilters.md | 13 + .../docs/AppLinkAttachDomainOrFilter.md | 13 + .../docs/AppLinkAttachDomainSearchRequest.md | 16 + .../docs/AppLinkAttachDomainSearchResponse.md | 14 + .../AppLinkAttachDomainSimpleExpression.md | 15 + .../docs/AppLinkAttachDomainSortCriteria.md | 14 + .../docs/AppLinkAttachDomainSortDirection.md | 13 + .../docs/AppLinkAttachServiceFilter.md | 16 + .../docs/AppLinkAttachServiceFilters.md | 13 + .../docs/AppLinkAttachServiceOrFilter.md | 13 + .../docs/AppLinkAttachServiceRequest.md | 15 + .../docs/AppLinkAttachServiceSearchRequest.md | 16 + .../AppLinkAttachServiceSearchResponse.md | 14 + .../AppLinkAttachServiceSimpleExpression.md | 15 + .../docs/AppLinkAttachServiceSortCriteria.md | 14 + .../docs/AppLinkAttachServiceSortDirection.md | 13 + services/fabricv4/docs/AppLinkAttachState.md | 19 + .../fabricv4/docs/AppLinkAttachedAppDomain.md | 21 + .../docs/AppLinkAttachedAppDomains.md | 14 + .../docs/AppLinkAttachedAppService.md | 25 + .../docs/AppLinkAttachedAppServices.md | 14 + services/fabricv4/docs/AppLinkChange.md | 37 + .../fabricv4/docs/AppLinkChangeOperation.md | 37 + services/fabricv4/docs/AppLinkCloudRouter.md | 24 + services/fabricv4/docs/AppLinkFilter.md | 16 + .../{AgentDefinition.md => AppLinkFilters.md} | 4 +- services/fabricv4/docs/AppLinkOrFilter.md | 13 + services/fabricv4/docs/AppLinkPostRequest.md | 20 + .../fabricv4/docs/AppLinkPostRequestRouter.md | 14 + .../fabricv4/docs/AppLinkSearchRequest.md | 16 + ...llResponse.md => AppLinkSearchResponse.md} | 4 +- .../fabricv4/docs/AppLinkSimpleExpression.md | 15 + services/fabricv4/docs/AppLinkSortCriteria.md | 14 + .../fabricv4/docs/AppLinkSortDirection.md | 13 + services/fabricv4/docs/AppLinkState.md | 23 + services/fabricv4/docs/AppLinkType.md | 11 + services/fabricv4/docs/AppService.md | 25 + .../docs/AppServiceAttachedAppLink.md | 23 + .../docs/AppServiceAttachedAppLinks.md | 14 + .../docs/AppServiceAttachedAppSubscription.md | 18 + ...AppServiceAttachedAppSubscriptionFilter.md | 16 + ...ppServiceAttachedAppSubscriptionFilters.md | 13 + ...pServiceAttachedAppSubscriptionOrFilter.md | 13 + ...iceAttachedAppSubscriptionSearchRequest.md | 16 + ...ceAttachedAppSubscriptionSearchResponse.md | 14 + ...AttachedAppSubscriptionSimpleExpression.md | 15 + ...viceAttachedAppSubscriptionSortCriteria.md | 14 + ...iceAttachedAppSubscriptionSortDirection.md | 13 + .../AppServiceAttachedAppSubscriptions.md | 14 + services/fabricv4/docs/AppServiceChange.md | 37 + .../docs/AppServiceChangeOperation.md | 36 + services/fabricv4/docs/AppServiceFilter.md | 16 + services/fabricv4/docs/AppServiceFilters.md | 13 + services/fabricv4/docs/AppServiceOrFilter.md | 13 + .../fabricv4/docs/AppServicePostRequest.md | 19 + .../fabricv4/docs/AppServiceSearchRequest.md | 16 + .../fabricv4/docs/AppServiceSearchResponse.md | 14 + .../docs/AppServiceSimpleExpression.md | 15 + .../fabricv4/docs/AppServiceSortCriteria.md | 14 + .../fabricv4/docs/AppServiceSortDirection.md | 13 + services/fabricv4/docs/AppServiceState.md | 19 + services/fabricv4/docs/AppServiceType.md | 11 + services/fabricv4/docs/AppSubscription.md | 22 + .../fabricv4/docs/AppSubscriptionChange.md | 37 + .../docs/AppSubscriptionChangeOperation.md | 26 + .../fabricv4/docs/AppSubscriptionFilter.md | 16 + .../fabricv4/docs/AppSubscriptionFilters.md | 13 + .../fabricv4/docs/AppSubscriptionOrFilter.md | 13 + .../docs/AppSubscriptionPostRequest.md | 17 + .../docs/AppSubscriptionPrioritization.md | 19 + .../docs/AppSubscriptionSearchRequest.md | 16 + ...es.md => AppSubscriptionSearchResponse.md} | 4 +- .../docs/AppSubscriptionSimpleExpression.md | 15 + .../docs/AppSubscriptionSortCriteria.md | 14 + .../docs/AppSubscriptionSortDirection.md | 13 + .../fabricv4/docs/AppSubscriptionSource.md | 15 + .../docs/AppSubscriptionSourceAppLink.md | 16 + .../docs/AppSubscriptionSourceRequest.md | 15 + .../AppSubscriptionSourceRequestAppLink.md | 14 + .../fabricv4/docs/AppSubscriptionState.md | 23 + .../fabricv4/docs/AppSubscriptionTarget.md | 16 + .../docs/AppSubscriptionTargetAppService.md | 16 + .../docs/AppSubscriptionTargetRequest.md | 16 + .../AppSubscriptionTargetRequestAppService.md | 14 + services/fabricv4/docs/AppSubscriptionType.md | 11 + ...{AgentsApi.md => ApplicationDomainsApi.md} | 199 +- services/fabricv4/docs/ApplicationLinksApi.md | 1218 ++++++++ .../fabricv4/docs/ApplicationServicesApi.md | 616 ++++ .../docs/ApplicationSubscriptionsApi.md | 374 +++ services/fabricv4/docs/AttachLogoResponse.md | 17 - .../fabricv4/docs/AttachedAppDomainOrder.md | 13 + .../fabricv4/docs/AttachedAppLinkOrder.md | 13 + .../fabricv4/docs/AttachedAppServiceOrder.md | 13 + .../docs/AttachedAppSubscriptionOrder.md | 13 + .../docs/BulkOpticalConnectRequest.md | 14 + services/fabricv4/docs/ChatMessage.md | 14 - .../docs/CloudEventSimpleExpression.md | 2 +- services/fabricv4/docs/CloudEventsApi.md | 72 + .../fabricv4/docs/CloudRouterReadResponse.md | 38 + services/fabricv4/docs/CloudRoutersApi.md | 6 +- .../docs/CompanyProfileActionRequest.md | 14 - .../fabricv4/docs/CompanyProfileContact.md | 22 + .../docs/CompanyProfileContactContacts.md | 15 + .../fabricv4/docs/CompanyProfileRequest.md | 6 +- .../fabricv4/docs/CompanyProfileResponse.md | 6 +- .../docs/CompanyProfileSearchFieldName.md | 25 + .../docs/CompanyProfileSearchFilter.md | 9 +- .../docs/CompanyProfileSearchFilters.md | 14 + .../docs/CompanyProfileSearchOrFilter.md | 14 + .../docs/CompanyProfileSearchRequest.md | 2 +- .../CompanyProfileSearchSimpleExpression.md | 15 + services/fabricv4/docs/CompanyProfilesApi.md | 2 +- .../fabricv4/docs/ConnectionCompanyProfile.md | 16 - services/fabricv4/docs/ConnectionOperation.md | 1 + services/fabricv4/docs/ConnectionType.md | 4 +- services/fabricv4/docs/ContactPreference.md | 24 + services/fabricv4/docs/CreateLoa.md | 22 + services/fabricv4/docs/CreateLoaNote.md | 14 + .../fabricv4/docs/EnvironmentActionRequest.md | 15 + .../docs/EnvironmentActionResponse.md | 19 + .../docs/EnvironmentActionStateEnum.md | 13 + .../docs/EnvironmentActionTypeEnum.md | 11 + .../docs/ExchangeServiceAndExpression.md | 13 + .../docs/ExchangeServiceNotification.md | 26 + .../docs/ExchangeServiceOrExpression.md | 13 + .../docs/ExchangeServicePropertyExpression.md | 31 + .../fabricv4/docs/ExchangeServiceResponse.md | 53 + .../docs/ExchangeServiceResponseBgp.md | 23 + .../docs/ExchangeServiceSearchExpression.md | 33 + .../docs/ExchangeServiceSearchRequest.md | 16 + .../docs/ExchangeServiceSearchResponse.md | 16 + .../docs/ExchangeServiceSearchSortCriteria.md | 33 + services/fabricv4/docs/FabricOneApi.md | 372 +++ services/fabricv4/docs/Gateway.md | 27 + .../docs/GatewayAttachmentListResponse.md | 14 - .../docs/GatewayAttachmentResponse.md | 39 - .../fabricv4/docs/GatewayChangeOperation.md | 25 + services/fabricv4/docs/GatewayIpv4.md | 15 + services/fabricv4/docs/GatewayPostRequest.md | 23 + services/fabricv4/docs/GatewayState.md | 23 + services/fabricv4/docs/GatewayType.md | 11 + services/fabricv4/docs/GatewaysApi.md | 300 ++ services/fabricv4/docs/Interconnect.md | 36 + services/fabricv4/docs/InterconnectFilter.md | 38 + .../fabricv4/docs/InterconnectLocation.md | 15 + .../docs/InterconnectLocationRequest.md | 14 + .../fabricv4/docs/InterconnectNotification.md | 23 + services/fabricv4/docs/InterconnectPackage.md | 21 + .../fabricv4/docs/InterconnectPostRequest.md | 30 + services/fabricv4/docs/InterconnectRouter.md | 24 + .../docs/InterconnectSearchFieldName.md | 35 + .../docs/InterconnectSearchRequest.md | 16 + .../docs/InterconnectSearchResponse.md | 16 + services/fabricv4/docs/InterconnectSortBy.md | 17 + .../docs/InterconnectSortByResponse.md | 17 + .../fabricv4/docs/InterconnectSortCriteria.md | 14 + .../docs/InterconnectSortCriteriaResponse.md | 14 + .../docs/InterconnectSortDirection.md | 13 + .../docs/InterconnectSortDirectionResponse.md | 13 + services/fabricv4/docs/InterconnectState.md | 17 + .../docs/InternetAccessRoutingProtocolBgp.md | 1 + .../InternetAccessRoutingProtocolBgpAsn.md | 14 + ...InternetAccessRoutingProtocolBgpRequest.md | 1 + ...ernetAccessRoutingProtocolBgpRequestAsn.md | 13 + ...sApi.md => InternetExchangeServicesApi.md} | 71 +- services/fabricv4/docs/IpBlock.md | 6 +- services/fabricv4/docs/IpBlocksApi.md | 60 +- services/fabricv4/docs/IssueLoa.md | 20 + services/fabricv4/docs/LastMileConfig.md | 17 - .../fabricv4/docs/LastMileNotificationInfo.md | 15 - services/fabricv4/docs/LoaActionData.md | 16 + services/fabricv4/docs/LoaActionFieldName.md | 15 + services/fabricv4/docs/LoaActionFilter.md | 35 + services/fabricv4/docs/LoaActionOrFilter.md | 13 + services/fabricv4/docs/LoaActionRequest.md | 15 + services/fabricv4/docs/LoaActionResponse.md | 19 + .../fabricv4/docs/LoaActionSearchFilters.md | 13 + .../fabricv4/docs/LoaActionSearchRequest.md | 16 + .../fabricv4/docs/LoaActionSearchResponse.md | 16 + .../docs/LoaActionSearchSimpleExpressions.md | 34 + .../fabricv4/docs/LoaActionSortCriteria.md | 31 + services/fabricv4/docs/LoaActionType.md | 10 +- services/fabricv4/docs/LoaChangelog.md | 21 + services/fabricv4/docs/LoaConsumer.md | 17 + .../fabricv4/docs/LoaConsumersResponse.md | 15 + services/fabricv4/docs/LoaDemarcationPoint.md | 18 + services/fabricv4/docs/LoaFieldName.md | 49 + services/fabricv4/docs/LoaFilter.md | 35 + services/fabricv4/docs/LoaIssuer.md | 16 + services/fabricv4/docs/LoaLocation.md | 14 + services/fabricv4/docs/LoaNoteDetails.md | 27 + services/fabricv4/docs/LoaNotesResponse.md | 14 + .../fabricv4/docs/{OpEnum.md => LoaOpEnum.md} | 6 +- services/fabricv4/docs/LoaOrFilter.md | 13 + .../docs/LoaPatchPanelConnectorType.md | 17 + services/fabricv4/docs/LoaProductType.md | 15 + services/fabricv4/docs/LoaReplaceOperation.md | 16 + services/fabricv4/docs/LoaRequest.md | 17 + services/fabricv4/docs/LoaRequestor.md | 16 + services/fabricv4/docs/LoaResponse.md | 27 + .../fabricv4/docs/LoaResponseOperation.md | 13 + .../{AgentTemplate.md => LoaSearchFilters.md} | 4 +- services/fabricv4/docs/LoaSearchRequest.md | 16 + services/fabricv4/docs/LoaSearchResponse.md | 16 + services/fabricv4/docs/LoaSimpleExpression.md | 34 + services/fabricv4/docs/LoaSortCriteria.md | 34 + services/fabricv4/docs/LoaState.md | 2 - services/fabricv4/docs/LoaType.md | 6 +- services/fabricv4/docs/LoasApi.md | 748 +++++ services/fabricv4/docs/LogoRequest.md | 17 - services/fabricv4/docs/LogosApi.md | 78 + services/fabricv4/docs/MaintenanceState.md | 17 + services/fabricv4/docs/MessagesInner.md | 14 - services/fabricv4/docs/ModelConfiguration.md | 13 - .../fabricv4/docs/OperationalEventFilters.md | 13 + .../docs/OperationalEventSearchRequest.md | 15 + .../docs/OperationalEventSimpleExpression.md | 15 + services/fabricv4/docs/OperatorEnum.md | 25 + .../docs/OpticalConnectASideRequest.md | 28 + .../docs/OpticalConnectASideResponse.md | 31 + services/fabricv4/docs/OpticalConnectBulk.md | 14 + ...OpticalConnectConnectionDestinationType.md | 15 + .../fabricv4/docs/OpticalConnectFilter.md | 17 + .../fabricv4/docs/OpticalConnectFilters.md | 13 + services/fabricv4/docs/OpticalConnectLOA.md | 14 + .../fabricv4/docs/OpticalConnectLocation.md | 14 + .../docs/OpticalConnectNotification.md | 26 + .../fabricv4/docs/OpticalConnectOrFilter.md | 13 + services/fabricv4/docs/OpticalConnectOrder.md | 16 + .../docs/OpticalConnectPatchPanelFields.md | 28 + .../docs/OpticalConnectPostRequest.md | 61 + services/fabricv4/docs/OpticalConnectPrice.md | 19 + .../fabricv4/docs/OpticalConnectPriceASide.md | 14 + .../docs/OpticalConnectPriceLocation.md | 14 + .../docs/OpticalConnectPricePathType.md | 15 + .../fabricv4/docs/OpticalConnectPriceZSide.md | 14 + .../fabricv4/docs/OpticalConnectRedundancy.md | 24 + .../fabricv4/docs/OpticalConnectResponse.md | 66 + .../docs/OpticalConnectSearchRequest.md | 16 + .../OpticalConnectServiceSearchResponse.md | 14 + .../docs/OpticalConnectSimpleExpression.md | 15 + .../fabricv4/docs/OpticalConnectSortBy.md | 27 + .../docs/OpticalConnectSortCriteria.md | 15 + .../docs/OpticalConnectSortDirection.md | 13 + services/fabricv4/docs/OpticalConnectState.md | 23 + .../docs/OpticalConnectZSideRequest.md | 30 + .../docs/OpticalConnectZSideResponse.md | 32 + .../fabricv4/docs/OpticalMetroConnectsApi.md | 297 ++ services/fabricv4/docs/PatchOperation.md | 25 - services/fabricv4/docs/Phone.md | 24 + services/fabricv4/docs/PortExpression.md | 10 + services/fabricv4/docs/PortOperation.md | 1 + services/fabricv4/docs/PortSearchFieldName.md | 4 + services/fabricv4/docs/Price.md | 1 + services/fabricv4/docs/ProductOffering.md | 15 + services/fabricv4/docs/ProductType.md | 2 +- services/fabricv4/docs/ProviderEnvironment.md | 4 +- .../fabricv4/docs/ProviderEnvironments.md | 15 + .../docs/PublicPeeringConnectionResponse.md | 15 + services/fabricv4/docs/RemoveOperation.md | 10 +- services/fabricv4/docs/ReplaceOperation.md | 10 +- services/fabricv4/docs/RequestLoa.md | 19 + services/fabricv4/docs/RouteCollector.md | 16 + services/fabricv4/docs/Router.md | 23 + .../fabricv4/docs/RoutingProtocolResponse.md | 19 + services/fabricv4/docs/SearchFieldName.md | 4 + .../docs/SearchOperationalEventResponse.md | 14 + services/fabricv4/docs/SearchResponse.md | 2 +- .../docs/SearchStreamAssetResponse.md | 14 + ...AllResponse.md => SearchStreamResponse.md} | 4 +- .../docs/SearchStreamSubscriptionResponse.md | 14 + services/fabricv4/docs/ServiceProfile.md | 4 +- .../docs/ServiceProfileAccessPointCOLO.md | 1 - .../fabricv4/docs/ServiceProfileChange.md | 2 +- .../docs/ServiceProfileLastMileAddress.md | 16 - .../ServiceProfileLastMileApiIntegration.md | 19 + .../docs/ServiceProfileLastMileConfig.md | 3 +- .../ServiceProfileLastMileNotification.md | 16 - .../ServiceProfileLastMileProductCatalog.md | 1 + .../fabricv4/docs/ServiceProfileRequest.md | 4 +- ...on.md => ServiceProfileUpdateOperation.md} | 12 +- services/fabricv4/docs/ServiceProfilesApi.md | 160 +- .../fabricv4/docs/SimplifiedNotification.md | 2 + .../fabricv4/docs/SimplifiedServiceProfile.md | 4 +- services/fabricv4/docs/Sort.md | 2 +- services/fabricv4/docs/StreamAsset.md | 5 + services/fabricv4/docs/StreamAssetFilter.md | 4 +- .../fabricv4/docs/StreamAssetSearchRequest.md | 2 +- .../docs/StreamAssetSimpleExpression.md | 4 +- services/fabricv4/docs/StreamAssetSortBy.md | 4 +- .../fabricv4/docs/StreamAssetSortCriteria.md | 4 +- services/fabricv4/docs/StreamSearchAsset.md | 32 + services/fabricv4/docs/StreamSearchFilter.md | 16 + .../docs/{Agent.md => StreamSearchFilters.md} | 5 +- .../fabricv4/docs/StreamSearchOrFilter.md | 13 + services/fabricv4/docs/StreamSearchRequest.md | 16 + .../docs/StreamSearchSimpleExpression.md | 15 + services/fabricv4/docs/StreamSearchSortBy.md | 13 + .../fabricv4/docs/StreamSearchSortCriteria.md | 14 + .../docs/StreamSearchSortDirection.md | 13 + .../docs/StreamSubscriptionSearchFilter.md | 16 + .../docs/StreamSubscriptionSearchFilters.md | 13 + .../docs/StreamSubscriptionSearchOrFilter.md | 13 + .../docs/StreamSubscriptionSearchRequest.md | 16 + ...treamSubscriptionSearchSimpleExpression.md | 15 + .../docs/StreamSubscriptionSearchSortBy.md | 13 + .../StreamSubscriptionSearchSortCriteria.md | 14 + .../StreamSubscriptionSearchSortDirection.md | 13 + .../fabricv4/docs/StreamSubscriptionsApi.md | 73 + services/fabricv4/docs/StreamsApi.md | 95 +- services/fabricv4/docs/Style.md | 15 + services/fabricv4/docs/TagRequest.md | 2 +- services/fabricv4/docs/TagResponse.md | 14 +- services/fabricv4/docs/TagsApi.md | 75 +- .../fabricv4/docs/ToolCallInformationInner.md | 15 - .../fabricv4/docs/VirtualConnectionPrice.md | 1 + .../java/com/equinix/sdk/fabricv4/JSON.java | 249 +- ...ntsApi.java => ApplicationDomainsApi.java} | 524 ++-- .../sdk/fabricv4/api/ApplicationLinksApi.java | 2637 +++++++++++++++++ .../fabricv4/api/ApplicationServicesApi.java | 1364 +++++++++ .../api/ApplicationSubscriptionsApi.java | 820 +++++ .../sdk/fabricv4/api/CloudEventsApi.java | 145 + .../sdk/fabricv4/api/CloudRoutersApi.java | 17 +- .../sdk/fabricv4/api/CompanyProfilesApi.java | 8 +- .../sdk/fabricv4/api/FabricOneApi.java | 808 +++++ .../equinix/sdk/fabricv4/api/GatewaysApi.java | 667 +++++ ....java => InternetExchangeServicesApi.java} | 193 +- .../equinix/sdk/fabricv4/api/IpBlocksApi.java | 156 +- .../com/equinix/sdk/fabricv4/api/LoasApi.java | 1607 ++++++++++ .../equinix/sdk/fabricv4/api/LogosApi.java | 186 ++ .../fabricv4/api/OpticalMetroConnectsApi.java | 656 ++++ .../sdk/fabricv4/api/ServiceProfilesApi.java | 362 ++- .../fabricv4/api/StreamSubscriptionsApi.java | 149 + .../equinix/sdk/fabricv4/api/StreamsApi.java | 204 +- .../com/equinix/sdk/fabricv4/api/TagsApi.java | 156 +- .../sdk/fabricv4/model/AccessPoint.java | 156 +- .../sdk/fabricv4/model/AccessPointType.java | 4 +- .../equinix/sdk/fabricv4/model/Account.java | 675 +++++ ...eConfig.java => ActivationKeyDetails.java} | 213 +- .../sdk/fabricv4/model/AddOperation.java | 54 +- .../equinix/sdk/fabricv4/model/Address.java | 460 +++ ...a => AllInterconnectPackagesResponse.java} | 88 +- .../{AgentTemplates.java => AppDomain.java} | 296 +- .../model/AppDomainAttachedAppLink.java | 558 ++++ ...se.java => AppDomainAttachedAppLinks.java} | 70 +- .../sdk/fabricv4/model/AppDomainChange.java | 565 ++++ .../model/AppDomainChangeOperation.java | 456 +++ .../sdk/fabricv4/model/AppDomainFilter.java | 269 ++ .../sdk/fabricv4/model/AppDomainFilters.java | 308 ++ .../sdk/fabricv4/model/AppDomainOrFilter.java | 308 ++ ...Address.java => AppDomainPostRequest.java} | 165 +- .../model/AppDomainSearchRequest.java | 370 +++ .../model/AppDomainSearchResponse.java | 339 +++ .../model/AppDomainSimpleExpression.java | 355 +++ .../fabricv4/model/AppDomainSortCriteria.java | 317 ++ .../model/AppDomainSortDirection.java | 78 + .../sdk/fabricv4/model/AppDomainState.java | 86 + .../sdk/fabricv4/model/AppDomainType.java | 76 + .../equinix/sdk/fabricv4/model/AppLink.java | 616 ++++ .../model/AppLinkAppDomainAttachment.java | 445 +++ .../model/AppLinkAppServiceAttachment.java | 505 ++++ .../AppLinkAppServiceAttachmentChange.java | 565 ++++ ...nkAppServiceAttachmentChangeOperation.java | 456 +++ .../model/AppLinkAttachDomainFilter.java | 269 ++ .../model/AppLinkAttachDomainFilters.java | 308 ++ .../model/AppLinkAttachDomainOrFilter.java | 308 ++ .../AppLinkAttachDomainSearchRequest.java | 370 +++ .../AppLinkAttachDomainSearchResponse.java | 339 +++ .../AppLinkAttachDomainSimpleExpression.java | 355 +++ .../AppLinkAttachDomainSortCriteria.java | 317 ++ .../AppLinkAttachDomainSortDirection.java | 78 + .../model/AppLinkAttachServiceFilter.java | 269 ++ .../model/AppLinkAttachServiceFilters.java | 308 ++ .../model/AppLinkAttachServiceOrFilter.java | 308 ++ .../model/AppLinkAttachServiceRequest.java | 322 ++ .../AppLinkAttachServiceSearchRequest.java | 370 +++ .../AppLinkAttachServiceSearchResponse.java | 339 +++ .../AppLinkAttachServiceSimpleExpression.java | 355 +++ .../AppLinkAttachServiceSortCriteria.java | 317 ++ .../AppLinkAttachServiceSortDirection.java | 78 + .../fabricv4/model/AppLinkAttachState.java | 84 + .../model/AppLinkAttachedAppDomain.java | 503 ++++ .../model/AppLinkAttachedAppDomains.java | 339 +++ .../model/AppLinkAttachedAppService.java | 630 ++++ .../model/AppLinkAttachedAppServices.java | 339 +++ .../sdk/fabricv4/model/AppLinkChange.java | 565 ++++ .../model/AppLinkChangeOperation.java | 462 +++ .../fabricv4/model/AppLinkCloudRouter.java | 400 +++ .../sdk/fabricv4/model/AppLinkFilter.java | 269 ++ .../sdk/fabricv4/model/AppLinkFilters.java | 308 ++ .../sdk/fabricv4/model/AppLinkOrFilter.java | 308 ++ ...stRequest.java => AppLinkPostRequest.java} | 210 +- ...ent.java => AppLinkPostRequestRouter.java} | 106 +- .../fabricv4/model/AppLinkSearchRequest.java | 370 +++ ...vities.java => AppLinkSearchResponse.java} | 70 +- ...data.java => AppLinkSimpleExpression.java} | 166 +- .../fabricv4/model/AppLinkSortCriteria.java | 317 ++ .../fabricv4/model/AppLinkSortDirection.java | 78 + .../sdk/fabricv4/model/AppLinkState.java | 88 + .../sdk/fabricv4/model/AppLinkType.java | 76 + .../sdk/fabricv4/model/AppService.java | 634 ++++ .../model/AppServiceAttachedAppLink.java | 558 ++++ .../model/AppServiceAttachedAppLinks.java | 339 +++ ...=> AppServiceAttachedAppSubscription.java} | 175 +- ...pServiceAttachedAppSubscriptionFilter.java | 269 ++ ...ServiceAttachedAppSubscriptionFilters.java | 308 ++ ...erviceAttachedAppSubscriptionOrFilter.java | 308 ++ ...eAttachedAppSubscriptionSearchRequest.java | 370 +++ ...AttachedAppSubscriptionSearchResponse.java | 339 +++ ...tachedAppSubscriptionSimpleExpression.java | 355 +++ ...ceAttachedAppSubscriptionSortCriteria.java | 317 ++ ...eAttachedAppSubscriptionSortDirection.java | 78 + .../AppServiceAttachedAppSubscriptions.java | 339 +++ .../sdk/fabricv4/model/AppServiceChange.java | 565 ++++ .../model/AppServiceChangeOperation.java | 460 +++ .../sdk/fabricv4/model/AppServiceFilter.java | 269 ++ .../sdk/fabricv4/model/AppServiceFilters.java | 308 ++ .../fabricv4/model/AppServiceOrFilter.java | 308 ++ .../fabricv4/model/AppServicePostRequest.java | 449 +++ .../model/AppServiceSearchRequest.java | 370 +++ .../model/AppServiceSearchResponse.java | 339 +++ .../model/AppServiceSimpleExpression.java | 355 +++ .../model/AppServiceSortCriteria.java | 317 ++ .../model/AppServiceSortDirection.java | 78 + .../sdk/fabricv4/model/AppServiceState.java | 84 + .../sdk/fabricv4/model/AppServiceType.java | 76 + .../sdk/fabricv4/model/AppSubscription.java | 532 ++++ .../fabricv4/model/AppSubscriptionChange.java | 565 ++++ .../model/AppSubscriptionChangeOperation.java | 404 +++ .../fabricv4/model/AppSubscriptionFilter.java | 269 ++ .../model/AppSubscriptionFilters.java | 308 ++ .../model/AppSubscriptionOrFilter.java | 308 ++ .../model/AppSubscriptionPostRequest.java | 384 +++ .../model/AppSubscriptionPrioritization.java | 84 + .../model/AppSubscriptionSearchRequest.java | 370 +++ .../model/AppSubscriptionSearchResponse.java | 339 +++ .../AppSubscriptionSimpleExpression.java | 355 +++ .../model/AppSubscriptionSortCriteria.java | 317 ++ .../model/AppSubscriptionSortDirection.java | 78 + .../fabricv4/model/AppSubscriptionSource.java | 337 +++ .../model/AppSubscriptionSourceAppLink.java | 352 +++ .../model/AppSubscriptionSourceRequest.java | 337 +++ .../AppSubscriptionSourceRequestAppLink.java | 294 ++ .../fabricv4/model/AppSubscriptionState.java | 88 + .../fabricv4/model/AppSubscriptionTarget.java | 353 +++ .../AppSubscriptionTargetAppService.java | 352 +++ .../model/AppSubscriptionTargetRequest.java | 353 +++ ...ppSubscriptionTargetRequestAppService.java | 294 ++ .../fabricv4/model/AppSubscriptionType.java | 76 + .../model/AttachedAppDomainOrder.java | 78 + .../fabricv4/model/AttachedAppLinkOrder.java | 78 + .../model/AttachedAppServiceOrder.java | 78 + .../model/AttachedAppSubscriptionOrder.java | 78 + .../model/BulkOpticalConnectRequest.java | 308 ++ .../model/CloudEventSimpleExpression.java | 2 +- .../model/CloudRouterReadResponse.java | 813 +++++ .../fabricv4/model/CompanyProfileContact.java | 391 +++ ...ava => CompanyProfileContactContacts.java} | 133 +- .../fabricv4/model/CompanyProfileRequest.java | 121 +- .../model/CompanyProfileResponse.java | 122 +- .../model/CompanyProfileSearchFieldName.java | 90 + .../model/CompanyProfileSearchFilter.java | 626 ++-- .../model/CompanyProfileSearchFilters.java | 308 ++ .../model/CompanyProfileSearchOrFilter.java | 311 ++ .../model/CompanyProfileSearchRequest.java | 12 +- .../CompanyProfileSearchSimpleExpression.java | 364 +++ .../fabricv4/model/ConnectionOperation.java | 37 +- .../sdk/fabricv4/model/ConnectionType.java | 4 +- .../sdk/fabricv4/model/ContactPreference.java | 371 +++ .../equinix/sdk/fabricv4/model/CreateLoa.java | 282 ++ ...eActionRequest.java => CreateLoaNote.java} | 101 +- .../model/EnvironmentActionRequest.java | 322 ++ ...es.java => EnvironmentActionResponse.java} | 204 +- .../model/EnvironmentActionStateEnum.java | 78 + .../model/EnvironmentActionTypeEnum.java | 76 + .../model/ExchangeServiceAndExpression.java | 311 ++ .../model/ExchangeServiceNotification.java | 395 +++ .../model/ExchangeServiceOrExpression.java | 311 ++ .../ExchangeServicePropertyExpression.java | 468 +++ .../model/ExchangeServiceResponse.java | 854 ++++++ .../model/ExchangeServiceResponseBgp.java | 578 ++++ .../ExchangeServiceSearchExpression.java | 322 ++ .../model/ExchangeServiceSearchRequest.java | 370 +++ .../model/ExchangeServiceSearchResponse.java | 388 +++ .../ExchangeServiceSearchSortCriteria.java | 429 +++ .../model/{Agents.java => Gateway.java} | 362 +-- ...ation.java => GatewayChangeOperation.java} | 72 +- .../{MessagesInner.java => GatewayIpv4.java} | 114 +- .../fabricv4/model/GatewayPostRequest.java | 549 ++++ .../sdk/fabricv4/model/GatewayState.java | 88 + .../sdk/fabricv4/model/GatewayType.java | 76 + .../sdk/fabricv4/model/Interconnect.java | 783 +++++ .../fabricv4/model/InterconnectFilter.java | 533 ++++ ...ionInfo.java => InterconnectLocation.java} | 114 +- .../model/InterconnectLocationRequest.java | 286 ++ .../model/InterconnectNotification.java | 380 +++ .../fabricv4/model/InterconnectPackage.java | 486 +++ .../model/InterconnectPostRequest.java | 597 ++++ .../fabricv4/model/InterconnectRouter.java | 399 +++ .../model/InterconnectSearchFieldName.java | 100 + .../model/InterconnectSearchRequest.java | 370 +++ .../model/InterconnectSearchResponse.java | 388 +++ .../fabricv4/model/InterconnectSortBy.java | 82 + .../model/InterconnectSortByResponse.java | 82 + .../model/InterconnectSortCriteria.java | 319 ++ .../InterconnectSortCriteriaResponse.java | 319 ++ .../model/InterconnectSortDirection.java | 78 + .../InterconnectSortDirectionResponse.java | 78 + .../sdk/fabricv4/model/InterconnectState.java | 82 + .../InternetAccessRoutingProtocolBgp.java | 40 +- .../InternetAccessRoutingProtocolBgpAsn.java | 323 ++ ...ternetAccessRoutingProtocolBgpRequest.java | 40 +- ...netAccessRoutingProtocolBgpRequestAsn.java | 294 ++ .../equinix/sdk/fabricv4/model/IpBlock.java | 6 +- .../sdk/fabricv4/model/IpBlockOwnership.java | 2 +- .../sdk/fabricv4/model/IpBlockState.java | 2 +- .../equinix/sdk/fabricv4/model/IssueLoa.java | 467 +++ .../sdk/fabricv4/model/LoaActionData.java | 343 +++ .../fabricv4/model/LoaActionFieldName.java | 80 + .../sdk/fabricv4/model/LoaActionFilter.java | 270 ++ .../sdk/fabricv4/model/LoaActionOrFilter.java | 308 ++ .../sdk/fabricv4/model/LoaActionRequest.java | 324 ++ .../sdk/fabricv4/model/LoaActionResponse.java | 441 +++ .../model/LoaActionSearchFilters.java | 308 ++ .../model/LoaActionSearchRequest.java | 370 +++ .../model/LoaActionSearchResponse.java | 388 +++ .../LoaActionSearchSimpleExpressions.java | 433 +++ .../fabricv4/model/LoaActionSortCriteria.java | 425 +++ .../sdk/fabricv4/model/LoaActionState.java | 2 +- .../sdk/fabricv4/model/LoaActionType.java | 12 +- .../sdk/fabricv4/model/LoaChangelog.java | 484 +++ .../sdk/fabricv4/model/LoaConsumer.java | 379 +++ .../fabricv4/model/LoaConsumersResponse.java | 339 +++ .../fabricv4/model/LoaDemarcationPoint.java | 398 +++ .../sdk/fabricv4/model/LoaFieldName.java | 114 + .../equinix/sdk/fabricv4/model/LoaFilter.java | 270 ++ .../equinix/sdk/fabricv4/model/LoaIssuer.java | 341 +++ ...{AgentDefinition.java => LoaLocation.java} | 84 +- .../sdk/fabricv4/model/LoaNoteDetails.java | 458 +++ ...PortRequest.java => LoaNotesResponse.java} | 66 +- .../equinix/sdk/fabricv4/model/LoaOpEnum.java | 80 + .../{ChatMessage.java => LoaOrFilter.java} | 106 +- .../model/LoaPatchPanelConnectorType.java | 82 + .../sdk/fabricv4/model/LoaProductType.java | 80 + ...hRequest.java => LoaReplaceOperation.java} | 126 +- .../{LogoRequest.java => LoaRequest.java} | 140 +- .../sdk/fabricv4/model/LoaRequestor.java | 341 +++ .../sdk/fabricv4/model/LoaResponse.java | 681 +++++ ...uration.java => LoaResponseOperation.java} | 83 +- .../sdk/fabricv4/model/LoaSearchFilters.java | 308 ++ .../sdk/fabricv4/model/LoaSearchRequest.java | 370 +++ .../sdk/fabricv4/model/LoaSearchResponse.java | 388 +++ .../fabricv4/model/LoaSimpleExpression.java | 433 +++ .../sdk/fabricv4/model/LoaSortCriteria.java | 431 +++ .../equinix/sdk/fabricv4/model/LoaState.java | 4 +- .../equinix/sdk/fabricv4/model/LoaType.java | 8 +- .../sdk/fabricv4/model/MaintenanceState.java | 82 + .../model/OperationalEventFilters.java | 308 ++ .../model/OperationalEventSearchRequest.java | 319 ++ .../OperationalEventSimpleExpression.java | 355 +++ .../sdk/fabricv4/model/OperatorEnum.java | 90 + .../model/OpticalConnectASideRequest.java | 433 +++ .../model/OpticalConnectASideResponse.java | 522 ++++ .../fabricv4/model/OpticalConnectBulk.java | 308 ++ ...ticalConnectConnectionDestinationType.java | 80 + .../fabricv4/model/OpticalConnectFilter.java | 269 ++ .../fabricv4/model/OpticalConnectFilters.java | 308 ++ ...ntTemplate.java => OpticalConnectLOA.java} | 56 +- .../model/OpticalConnectLocation.java | 286 ++ .../model/OpticalConnectNotification.java | 429 +++ .../model/OpticalConnectOrFilter.java | 308 ++ ...fication.java => OpticalConnectOrder.java} | 143 +- .../model/OpticalConnectPatchPanelFields.java | 433 +++ .../model/OpticalConnectPostRequest.java | 828 ++++++ .../fabricv4/model/OpticalConnectPrice.java | 437 +++ .../model/OpticalConnectPriceASide.java | 288 ++ .../model/OpticalConnectPriceLocation.java | 286 ++ .../model/OpticalConnectPricePathType.java | 80 + .../model/OpticalConnectPriceZSide.java | 288 ++ .../model/OpticalConnectRedundancy.java | 372 +++ .../model/OpticalConnectResponse.java | 969 ++++++ .../model/OpticalConnectSearchRequest.java | 370 +++ .../OpticalConnectServiceSearchResponse.java | 339 +++ .../model/OpticalConnectSimpleExpression.java | 355 +++ .../fabricv4/model/OpticalConnectSortBy.java | 92 + .../model/OpticalConnectSortCriteria.java | 319 ++ .../model/OpticalConnectSortDirection.java | 78 + .../fabricv4/model/OpticalConnectState.java | 88 + .../model/OpticalConnectZSideRequest.java | 495 ++++ .../model/OpticalConnectZSideResponse.java | 553 ++++ .../com/equinix/sdk/fabricv4/model/Phone.java | 402 +++ .../sdk/fabricv4/model/PortExpression.java | 22 +- .../sdk/fabricv4/model/PortOperation.java | 37 +- .../fabricv4/model/PortSearchFieldName.java | 6 +- .../com/equinix/sdk/fabricv4/model/Price.java | 37 +- ...mpanyProfile.java => ProductOffering.java} | 105 +- .../sdk/fabricv4/model/ProductType.java | 2 +- .../fabricv4/model/ProviderEnvironment.java | 93 +- .../fabricv4/model/ProviderEnvironments.java | 339 +++ .../PublicPeeringConnectionResponse.java | 345 +++ .../sdk/fabricv4/model/RemoveOperation.java | 54 +- .../sdk/fabricv4/model/ReplaceOperation.java | 54 +- .../sdk/fabricv4/model/RequestLoa.java | 440 +++ .../sdk/fabricv4/model/RouteCollector.java | 341 +++ .../equinix/sdk/fabricv4/model/Router.java | 399 +++ .../model/RoutingProtocolResponse.java | 459 +++ .../sdk/fabricv4/model/SearchFieldName.java | 4 + .../model/SearchOperationalEventResponse.java | 339 +++ .../sdk/fabricv4/model/SearchResponse.java | 14 +- ...se.java => SearchStreamAssetResponse.java} | 70 +- ...esponse.java => SearchStreamResponse.java} | 70 +- .../SearchStreamSubscriptionResponse.java | 339 +++ .../sdk/fabricv4/model/ServiceProfile.java | 14 +- .../model/ServiceProfileAccessPointCOLO.java | 4 +- .../fabricv4/model/ServiceProfileChange.java | 14 +- .../ServiceProfileLastMileApiIntegration.java | 413 +++ .../model/ServiceProfileLastMileConfig.java | 89 +- .../ServiceProfileLastMileProductCatalog.java | 33 +- .../fabricv4/model/ServiceProfileRequest.java | 14 +- ...ava => ServiceProfileUpdateOperation.java} | 41 +- .../model/SimplifiedNotification.java | 59 +- .../model/SimplifiedServiceProfile.java | 14 +- .../com/equinix/sdk/fabricv4/model/Sort.java | 2 +- .../sdk/fabricv4/model/StreamAsset.java | 12 +- .../model/StreamAssetSearchRequest.java | 23 +- .../model/StreamAssetSimpleExpression.java | 4 +- .../sdk/fabricv4/model/StreamAssetSortBy.java | 4 +- .../model/StreamAssetSortCriteria.java | 39 +- ...ntResponse.java => StreamSearchAsset.java} | 303 +- .../fabricv4/model/StreamSearchFilter.java | 269 ++ .../fabricv4/model/StreamSearchFilters.java | 311 ++ .../fabricv4/model/StreamSearchOrFilter.java | 308 ++ .../fabricv4/model/StreamSearchRequest.java | 370 +++ .../model/StreamSearchSimpleExpression.java | 355 +++ .../fabricv4/model/StreamSearchSortBy.java | 78 + .../model/StreamSearchSortCriteria.java | 322 ++ .../model/StreamSearchSortDirection.java | 78 + .../model/StreamSubscriptionSearchFilter.java | 269 ++ .../StreamSubscriptionSearchFilters.java | 311 ++ .../StreamSubscriptionSearchOrFilter.java | 308 ++ .../StreamSubscriptionSearchRequest.java | 375 +++ ...eamSubscriptionSearchSimpleExpression.java | 355 +++ .../model/StreamSubscriptionSearchSortBy.java | 78 + .../StreamSubscriptionSearchSortCriteria.java | 322 ++ ...StreamSubscriptionSearchSortDirection.java | 78 + .../model/{OpEnum.java => Style.java} | 28 +- .../sdk/fabricv4/model/TagRequest.java | 84 +- .../sdk/fabricv4/model/TagResponse.java | 173 +- .../model/VirtualConnectionPrice.java | 37 +- 685 files changed, 101231 insertions(+), 4046 deletions(-) create mode 100644 services/fabricv4/docs/Account.md create mode 100644 services/fabricv4/docs/ActivationKeyDetails.md create mode 100644 services/fabricv4/docs/Address.md delete mode 100644 services/fabricv4/docs/AgentActivities.md delete mode 100644 services/fabricv4/docs/AgentActivitiesMetadata.md delete mode 100644 services/fabricv4/docs/AgentPatchRequest.md delete mode 100644 services/fabricv4/docs/AgentPostRequest.md delete mode 100644 services/fabricv4/docs/AgentTemplates.md delete mode 100644 services/fabricv4/docs/Agents.md create mode 100644 services/fabricv4/docs/AllInterconnectPackagesResponse.md create mode 100644 services/fabricv4/docs/AppDomain.md create mode 100644 services/fabricv4/docs/AppDomainAttachedAppLink.md create mode 100644 services/fabricv4/docs/AppDomainAttachedAppLinks.md create mode 100644 services/fabricv4/docs/AppDomainChange.md create mode 100644 services/fabricv4/docs/AppDomainChangeOperation.md create mode 100644 services/fabricv4/docs/AppDomainFilter.md rename services/fabricv4/docs/{BulkPortRequest.md => AppDomainFilters.md} (50%) create mode 100644 services/fabricv4/docs/AppDomainOrFilter.md create mode 100644 services/fabricv4/docs/AppDomainPostRequest.md create mode 100644 services/fabricv4/docs/AppDomainSearchRequest.md rename services/fabricv4/docs/{GetAllStreamAssetResponse.md => AppDomainSearchResponse.md} (58%) create mode 100644 services/fabricv4/docs/AppDomainSimpleExpression.md create mode 100644 services/fabricv4/docs/AppDomainSortCriteria.md create mode 100644 services/fabricv4/docs/AppDomainSortDirection.md create mode 100644 services/fabricv4/docs/AppDomainState.md create mode 100644 services/fabricv4/docs/AppDomainType.md create mode 100644 services/fabricv4/docs/AppLink.md create mode 100644 services/fabricv4/docs/AppLinkAppDomainAttachment.md create mode 100644 services/fabricv4/docs/AppLinkAppServiceAttachment.md create mode 100644 services/fabricv4/docs/AppLinkAppServiceAttachmentChange.md create mode 100644 services/fabricv4/docs/AppLinkAppServiceAttachmentChangeOperation.md create mode 100644 services/fabricv4/docs/AppLinkAttachDomainFilter.md create mode 100644 services/fabricv4/docs/AppLinkAttachDomainFilters.md create mode 100644 services/fabricv4/docs/AppLinkAttachDomainOrFilter.md create mode 100644 services/fabricv4/docs/AppLinkAttachDomainSearchRequest.md create mode 100644 services/fabricv4/docs/AppLinkAttachDomainSearchResponse.md create mode 100644 services/fabricv4/docs/AppLinkAttachDomainSimpleExpression.md create mode 100644 services/fabricv4/docs/AppLinkAttachDomainSortCriteria.md create mode 100644 services/fabricv4/docs/AppLinkAttachDomainSortDirection.md create mode 100644 services/fabricv4/docs/AppLinkAttachServiceFilter.md create mode 100644 services/fabricv4/docs/AppLinkAttachServiceFilters.md create mode 100644 services/fabricv4/docs/AppLinkAttachServiceOrFilter.md create mode 100644 services/fabricv4/docs/AppLinkAttachServiceRequest.md create mode 100644 services/fabricv4/docs/AppLinkAttachServiceSearchRequest.md create mode 100644 services/fabricv4/docs/AppLinkAttachServiceSearchResponse.md create mode 100644 services/fabricv4/docs/AppLinkAttachServiceSimpleExpression.md create mode 100644 services/fabricv4/docs/AppLinkAttachServiceSortCriteria.md create mode 100644 services/fabricv4/docs/AppLinkAttachServiceSortDirection.md create mode 100644 services/fabricv4/docs/AppLinkAttachState.md create mode 100644 services/fabricv4/docs/AppLinkAttachedAppDomain.md create mode 100644 services/fabricv4/docs/AppLinkAttachedAppDomains.md create mode 100644 services/fabricv4/docs/AppLinkAttachedAppService.md create mode 100644 services/fabricv4/docs/AppLinkAttachedAppServices.md create mode 100644 services/fabricv4/docs/AppLinkChange.md create mode 100644 services/fabricv4/docs/AppLinkChangeOperation.md create mode 100644 services/fabricv4/docs/AppLinkCloudRouter.md create mode 100644 services/fabricv4/docs/AppLinkFilter.md rename services/fabricv4/docs/{AgentDefinition.md => AppLinkFilters.md} (55%) create mode 100644 services/fabricv4/docs/AppLinkOrFilter.md create mode 100644 services/fabricv4/docs/AppLinkPostRequest.md create mode 100644 services/fabricv4/docs/AppLinkPostRequestRouter.md create mode 100644 services/fabricv4/docs/AppLinkSearchRequest.md rename services/fabricv4/docs/{AgentTemplateGetAllResponse.md => AppLinkSearchResponse.md} (56%) create mode 100644 services/fabricv4/docs/AppLinkSimpleExpression.md create mode 100644 services/fabricv4/docs/AppLinkSortCriteria.md create mode 100644 services/fabricv4/docs/AppLinkSortDirection.md create mode 100644 services/fabricv4/docs/AppLinkState.md create mode 100644 services/fabricv4/docs/AppLinkType.md create mode 100644 services/fabricv4/docs/AppService.md create mode 100644 services/fabricv4/docs/AppServiceAttachedAppLink.md create mode 100644 services/fabricv4/docs/AppServiceAttachedAppLinks.md create mode 100644 services/fabricv4/docs/AppServiceAttachedAppSubscription.md create mode 100644 services/fabricv4/docs/AppServiceAttachedAppSubscriptionFilter.md create mode 100644 services/fabricv4/docs/AppServiceAttachedAppSubscriptionFilters.md create mode 100644 services/fabricv4/docs/AppServiceAttachedAppSubscriptionOrFilter.md create mode 100644 services/fabricv4/docs/AppServiceAttachedAppSubscriptionSearchRequest.md create mode 100644 services/fabricv4/docs/AppServiceAttachedAppSubscriptionSearchResponse.md create mode 100644 services/fabricv4/docs/AppServiceAttachedAppSubscriptionSimpleExpression.md create mode 100644 services/fabricv4/docs/AppServiceAttachedAppSubscriptionSortCriteria.md create mode 100644 services/fabricv4/docs/AppServiceAttachedAppSubscriptionSortDirection.md create mode 100644 services/fabricv4/docs/AppServiceAttachedAppSubscriptions.md create mode 100644 services/fabricv4/docs/AppServiceChange.md create mode 100644 services/fabricv4/docs/AppServiceChangeOperation.md create mode 100644 services/fabricv4/docs/AppServiceFilter.md create mode 100644 services/fabricv4/docs/AppServiceFilters.md create mode 100644 services/fabricv4/docs/AppServiceOrFilter.md create mode 100644 services/fabricv4/docs/AppServicePostRequest.md create mode 100644 services/fabricv4/docs/AppServiceSearchRequest.md create mode 100644 services/fabricv4/docs/AppServiceSearchResponse.md create mode 100644 services/fabricv4/docs/AppServiceSimpleExpression.md create mode 100644 services/fabricv4/docs/AppServiceSortCriteria.md create mode 100644 services/fabricv4/docs/AppServiceSortDirection.md create mode 100644 services/fabricv4/docs/AppServiceState.md create mode 100644 services/fabricv4/docs/AppServiceType.md create mode 100644 services/fabricv4/docs/AppSubscription.md create mode 100644 services/fabricv4/docs/AppSubscriptionChange.md create mode 100644 services/fabricv4/docs/AppSubscriptionChangeOperation.md create mode 100644 services/fabricv4/docs/AppSubscriptionFilter.md create mode 100644 services/fabricv4/docs/AppSubscriptionFilters.md create mode 100644 services/fabricv4/docs/AppSubscriptionOrFilter.md create mode 100644 services/fabricv4/docs/AppSubscriptionPostRequest.md create mode 100644 services/fabricv4/docs/AppSubscriptionPrioritization.md create mode 100644 services/fabricv4/docs/AppSubscriptionSearchRequest.md rename services/fabricv4/docs/{AgentGetActivities.md => AppSubscriptionSearchResponse.md} (71%) create mode 100644 services/fabricv4/docs/AppSubscriptionSimpleExpression.md create mode 100644 services/fabricv4/docs/AppSubscriptionSortCriteria.md create mode 100644 services/fabricv4/docs/AppSubscriptionSortDirection.md create mode 100644 services/fabricv4/docs/AppSubscriptionSource.md create mode 100644 services/fabricv4/docs/AppSubscriptionSourceAppLink.md create mode 100644 services/fabricv4/docs/AppSubscriptionSourceRequest.md create mode 100644 services/fabricv4/docs/AppSubscriptionSourceRequestAppLink.md create mode 100644 services/fabricv4/docs/AppSubscriptionState.md create mode 100644 services/fabricv4/docs/AppSubscriptionTarget.md create mode 100644 services/fabricv4/docs/AppSubscriptionTargetAppService.md create mode 100644 services/fabricv4/docs/AppSubscriptionTargetRequest.md create mode 100644 services/fabricv4/docs/AppSubscriptionTargetRequestAppService.md create mode 100644 services/fabricv4/docs/AppSubscriptionType.md rename services/fabricv4/docs/{AgentsApi.md => ApplicationDomainsApi.md} (58%) create mode 100644 services/fabricv4/docs/ApplicationLinksApi.md create mode 100644 services/fabricv4/docs/ApplicationServicesApi.md create mode 100644 services/fabricv4/docs/ApplicationSubscriptionsApi.md delete mode 100644 services/fabricv4/docs/AttachLogoResponse.md create mode 100644 services/fabricv4/docs/AttachedAppDomainOrder.md create mode 100644 services/fabricv4/docs/AttachedAppLinkOrder.md create mode 100644 services/fabricv4/docs/AttachedAppServiceOrder.md create mode 100644 services/fabricv4/docs/AttachedAppSubscriptionOrder.md create mode 100644 services/fabricv4/docs/BulkOpticalConnectRequest.md delete mode 100644 services/fabricv4/docs/ChatMessage.md create mode 100644 services/fabricv4/docs/CloudRouterReadResponse.md delete mode 100644 services/fabricv4/docs/CompanyProfileActionRequest.md create mode 100644 services/fabricv4/docs/CompanyProfileContact.md create mode 100644 services/fabricv4/docs/CompanyProfileContactContacts.md create mode 100644 services/fabricv4/docs/CompanyProfileSearchFieldName.md create mode 100644 services/fabricv4/docs/CompanyProfileSearchFilters.md create mode 100644 services/fabricv4/docs/CompanyProfileSearchOrFilter.md create mode 100644 services/fabricv4/docs/CompanyProfileSearchSimpleExpression.md delete mode 100644 services/fabricv4/docs/ConnectionCompanyProfile.md create mode 100644 services/fabricv4/docs/ContactPreference.md create mode 100644 services/fabricv4/docs/CreateLoa.md create mode 100644 services/fabricv4/docs/CreateLoaNote.md create mode 100644 services/fabricv4/docs/EnvironmentActionRequest.md create mode 100644 services/fabricv4/docs/EnvironmentActionResponse.md create mode 100644 services/fabricv4/docs/EnvironmentActionStateEnum.md create mode 100644 services/fabricv4/docs/EnvironmentActionTypeEnum.md create mode 100644 services/fabricv4/docs/ExchangeServiceAndExpression.md create mode 100644 services/fabricv4/docs/ExchangeServiceNotification.md create mode 100644 services/fabricv4/docs/ExchangeServiceOrExpression.md create mode 100644 services/fabricv4/docs/ExchangeServicePropertyExpression.md create mode 100644 services/fabricv4/docs/ExchangeServiceResponse.md create mode 100644 services/fabricv4/docs/ExchangeServiceResponseBgp.md create mode 100644 services/fabricv4/docs/ExchangeServiceSearchExpression.md create mode 100644 services/fabricv4/docs/ExchangeServiceSearchRequest.md create mode 100644 services/fabricv4/docs/ExchangeServiceSearchResponse.md create mode 100644 services/fabricv4/docs/ExchangeServiceSearchSortCriteria.md create mode 100644 services/fabricv4/docs/FabricOneApi.md create mode 100644 services/fabricv4/docs/Gateway.md delete mode 100644 services/fabricv4/docs/GatewayAttachmentListResponse.md delete mode 100644 services/fabricv4/docs/GatewayAttachmentResponse.md create mode 100644 services/fabricv4/docs/GatewayChangeOperation.md create mode 100644 services/fabricv4/docs/GatewayIpv4.md create mode 100644 services/fabricv4/docs/GatewayPostRequest.md create mode 100644 services/fabricv4/docs/GatewayState.md create mode 100644 services/fabricv4/docs/GatewayType.md create mode 100644 services/fabricv4/docs/GatewaysApi.md create mode 100644 services/fabricv4/docs/Interconnect.md create mode 100644 services/fabricv4/docs/InterconnectFilter.md create mode 100644 services/fabricv4/docs/InterconnectLocation.md create mode 100644 services/fabricv4/docs/InterconnectLocationRequest.md create mode 100644 services/fabricv4/docs/InterconnectNotification.md create mode 100644 services/fabricv4/docs/InterconnectPackage.md create mode 100644 services/fabricv4/docs/InterconnectPostRequest.md create mode 100644 services/fabricv4/docs/InterconnectRouter.md create mode 100644 services/fabricv4/docs/InterconnectSearchFieldName.md create mode 100644 services/fabricv4/docs/InterconnectSearchRequest.md create mode 100644 services/fabricv4/docs/InterconnectSearchResponse.md create mode 100644 services/fabricv4/docs/InterconnectSortBy.md create mode 100644 services/fabricv4/docs/InterconnectSortByResponse.md create mode 100644 services/fabricv4/docs/InterconnectSortCriteria.md create mode 100644 services/fabricv4/docs/InterconnectSortCriteriaResponse.md create mode 100644 services/fabricv4/docs/InterconnectSortDirection.md create mode 100644 services/fabricv4/docs/InterconnectSortDirectionResponse.md create mode 100644 services/fabricv4/docs/InterconnectState.md create mode 100644 services/fabricv4/docs/InternetAccessRoutingProtocolBgpAsn.md create mode 100644 services/fabricv4/docs/InternetAccessRoutingProtocolBgpRequestAsn.md rename services/fabricv4/docs/{AgentTemplatesApi.md => InternetExchangeServicesApi.md} (55%) create mode 100644 services/fabricv4/docs/IssueLoa.md delete mode 100644 services/fabricv4/docs/LastMileConfig.md delete mode 100644 services/fabricv4/docs/LastMileNotificationInfo.md create mode 100644 services/fabricv4/docs/LoaActionData.md create mode 100644 services/fabricv4/docs/LoaActionFieldName.md create mode 100644 services/fabricv4/docs/LoaActionFilter.md create mode 100644 services/fabricv4/docs/LoaActionOrFilter.md create mode 100644 services/fabricv4/docs/LoaActionRequest.md create mode 100644 services/fabricv4/docs/LoaActionResponse.md create mode 100644 services/fabricv4/docs/LoaActionSearchFilters.md create mode 100644 services/fabricv4/docs/LoaActionSearchRequest.md create mode 100644 services/fabricv4/docs/LoaActionSearchResponse.md create mode 100644 services/fabricv4/docs/LoaActionSearchSimpleExpressions.md create mode 100644 services/fabricv4/docs/LoaActionSortCriteria.md create mode 100644 services/fabricv4/docs/LoaChangelog.md create mode 100644 services/fabricv4/docs/LoaConsumer.md create mode 100644 services/fabricv4/docs/LoaConsumersResponse.md create mode 100644 services/fabricv4/docs/LoaDemarcationPoint.md create mode 100644 services/fabricv4/docs/LoaFieldName.md create mode 100644 services/fabricv4/docs/LoaFilter.md create mode 100644 services/fabricv4/docs/LoaIssuer.md create mode 100644 services/fabricv4/docs/LoaLocation.md create mode 100644 services/fabricv4/docs/LoaNoteDetails.md create mode 100644 services/fabricv4/docs/LoaNotesResponse.md rename services/fabricv4/docs/{OpEnum.md => LoaOpEnum.md} (89%) create mode 100644 services/fabricv4/docs/LoaOrFilter.md create mode 100644 services/fabricv4/docs/LoaPatchPanelConnectorType.md create mode 100644 services/fabricv4/docs/LoaProductType.md create mode 100644 services/fabricv4/docs/LoaReplaceOperation.md create mode 100644 services/fabricv4/docs/LoaRequest.md create mode 100644 services/fabricv4/docs/LoaRequestor.md create mode 100644 services/fabricv4/docs/LoaResponse.md create mode 100644 services/fabricv4/docs/LoaResponseOperation.md rename services/fabricv4/docs/{AgentTemplate.md => LoaSearchFilters.md} (57%) create mode 100644 services/fabricv4/docs/LoaSearchRequest.md create mode 100644 services/fabricv4/docs/LoaSearchResponse.md create mode 100644 services/fabricv4/docs/LoaSimpleExpression.md create mode 100644 services/fabricv4/docs/LoaSortCriteria.md create mode 100644 services/fabricv4/docs/LoasApi.md delete mode 100644 services/fabricv4/docs/LogoRequest.md create mode 100644 services/fabricv4/docs/MaintenanceState.md delete mode 100644 services/fabricv4/docs/MessagesInner.md delete mode 100644 services/fabricv4/docs/ModelConfiguration.md create mode 100644 services/fabricv4/docs/OperationalEventFilters.md create mode 100644 services/fabricv4/docs/OperationalEventSearchRequest.md create mode 100644 services/fabricv4/docs/OperationalEventSimpleExpression.md create mode 100644 services/fabricv4/docs/OperatorEnum.md create mode 100644 services/fabricv4/docs/OpticalConnectASideRequest.md create mode 100644 services/fabricv4/docs/OpticalConnectASideResponse.md create mode 100644 services/fabricv4/docs/OpticalConnectBulk.md create mode 100644 services/fabricv4/docs/OpticalConnectConnectionDestinationType.md create mode 100644 services/fabricv4/docs/OpticalConnectFilter.md create mode 100644 services/fabricv4/docs/OpticalConnectFilters.md create mode 100644 services/fabricv4/docs/OpticalConnectLOA.md create mode 100644 services/fabricv4/docs/OpticalConnectLocation.md create mode 100644 services/fabricv4/docs/OpticalConnectNotification.md create mode 100644 services/fabricv4/docs/OpticalConnectOrFilter.md create mode 100644 services/fabricv4/docs/OpticalConnectOrder.md create mode 100644 services/fabricv4/docs/OpticalConnectPatchPanelFields.md create mode 100644 services/fabricv4/docs/OpticalConnectPostRequest.md create mode 100644 services/fabricv4/docs/OpticalConnectPrice.md create mode 100644 services/fabricv4/docs/OpticalConnectPriceASide.md create mode 100644 services/fabricv4/docs/OpticalConnectPriceLocation.md create mode 100644 services/fabricv4/docs/OpticalConnectPricePathType.md create mode 100644 services/fabricv4/docs/OpticalConnectPriceZSide.md create mode 100644 services/fabricv4/docs/OpticalConnectRedundancy.md create mode 100644 services/fabricv4/docs/OpticalConnectResponse.md create mode 100644 services/fabricv4/docs/OpticalConnectSearchRequest.md create mode 100644 services/fabricv4/docs/OpticalConnectServiceSearchResponse.md create mode 100644 services/fabricv4/docs/OpticalConnectSimpleExpression.md create mode 100644 services/fabricv4/docs/OpticalConnectSortBy.md create mode 100644 services/fabricv4/docs/OpticalConnectSortCriteria.md create mode 100644 services/fabricv4/docs/OpticalConnectSortDirection.md create mode 100644 services/fabricv4/docs/OpticalConnectState.md create mode 100644 services/fabricv4/docs/OpticalConnectZSideRequest.md create mode 100644 services/fabricv4/docs/OpticalConnectZSideResponse.md create mode 100644 services/fabricv4/docs/OpticalMetroConnectsApi.md delete mode 100644 services/fabricv4/docs/PatchOperation.md create mode 100644 services/fabricv4/docs/Phone.md create mode 100644 services/fabricv4/docs/ProductOffering.md create mode 100644 services/fabricv4/docs/ProviderEnvironments.md create mode 100644 services/fabricv4/docs/PublicPeeringConnectionResponse.md create mode 100644 services/fabricv4/docs/RequestLoa.md create mode 100644 services/fabricv4/docs/RouteCollector.md create mode 100644 services/fabricv4/docs/Router.md create mode 100644 services/fabricv4/docs/RoutingProtocolResponse.md create mode 100644 services/fabricv4/docs/SearchOperationalEventResponse.md create mode 100644 services/fabricv4/docs/SearchStreamAssetResponse.md rename services/fabricv4/docs/{AgentGetAllResponse.md => SearchStreamResponse.md} (72%) create mode 100644 services/fabricv4/docs/SearchStreamSubscriptionResponse.md delete mode 100644 services/fabricv4/docs/ServiceProfileLastMileAddress.md create mode 100644 services/fabricv4/docs/ServiceProfileLastMileApiIntegration.md delete mode 100644 services/fabricv4/docs/ServiceProfileLastMileNotification.md rename services/fabricv4/docs/{JsonPatchOperation.md => ServiceProfileUpdateOperation.md} (61%) create mode 100644 services/fabricv4/docs/StreamSearchAsset.md create mode 100644 services/fabricv4/docs/StreamSearchFilter.md rename services/fabricv4/docs/{Agent.md => StreamSearchFilters.md} (54%) create mode 100644 services/fabricv4/docs/StreamSearchOrFilter.md create mode 100644 services/fabricv4/docs/StreamSearchRequest.md create mode 100644 services/fabricv4/docs/StreamSearchSimpleExpression.md create mode 100644 services/fabricv4/docs/StreamSearchSortBy.md create mode 100644 services/fabricv4/docs/StreamSearchSortCriteria.md create mode 100644 services/fabricv4/docs/StreamSearchSortDirection.md create mode 100644 services/fabricv4/docs/StreamSubscriptionSearchFilter.md create mode 100644 services/fabricv4/docs/StreamSubscriptionSearchFilters.md create mode 100644 services/fabricv4/docs/StreamSubscriptionSearchOrFilter.md create mode 100644 services/fabricv4/docs/StreamSubscriptionSearchRequest.md create mode 100644 services/fabricv4/docs/StreamSubscriptionSearchSimpleExpression.md create mode 100644 services/fabricv4/docs/StreamSubscriptionSearchSortBy.md create mode 100644 services/fabricv4/docs/StreamSubscriptionSearchSortCriteria.md create mode 100644 services/fabricv4/docs/StreamSubscriptionSearchSortDirection.md create mode 100644 services/fabricv4/docs/Style.md delete mode 100644 services/fabricv4/docs/ToolCallInformationInner.md rename services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/api/{AgentsApi.java => ApplicationDomainsApi.java} (59%) create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/api/ApplicationLinksApi.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/api/ApplicationServicesApi.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/api/ApplicationSubscriptionsApi.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/api/FabricOneApi.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/api/GatewaysApi.java rename services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/api/{AgentTemplatesApi.java => InternetExchangeServicesApi.java} (55%) create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/api/LoasApi.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/api/OpticalMetroConnectsApi.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/Account.java rename services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/{LastMileConfig.java => ActivationKeyDetails.java} (60%) create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/Address.java rename services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/{GatewayAttachmentListResponse.java => AllInterconnectPackagesResponse.java} (73%) rename services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/{AgentTemplates.java => AppDomain.java} (63%) create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppDomainAttachedAppLink.java rename services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/{AgentTemplateGetAllResponse.java => AppDomainAttachedAppLinks.java} (79%) create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppDomainChange.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppDomainChangeOperation.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppDomainFilter.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppDomainFilters.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppDomainOrFilter.java rename services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/{ServiceProfileLastMileAddress.java => AppDomainPostRequest.java} (63%) create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppDomainSearchRequest.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppDomainSearchResponse.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppDomainSimpleExpression.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppDomainSortCriteria.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppDomainSortDirection.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppDomainState.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppDomainType.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLink.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkAppDomainAttachment.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkAppServiceAttachment.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkAppServiceAttachmentChange.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkAppServiceAttachmentChangeOperation.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkAttachDomainFilter.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkAttachDomainFilters.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkAttachDomainOrFilter.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkAttachDomainSearchRequest.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkAttachDomainSearchResponse.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkAttachDomainSimpleExpression.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkAttachDomainSortCriteria.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkAttachDomainSortDirection.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkAttachServiceFilter.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkAttachServiceFilters.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkAttachServiceOrFilter.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkAttachServiceRequest.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkAttachServiceSearchRequest.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkAttachServiceSearchResponse.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkAttachServiceSimpleExpression.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkAttachServiceSortCriteria.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkAttachServiceSortDirection.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkAttachState.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkAttachedAppDomain.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkAttachedAppDomains.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkAttachedAppService.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkAttachedAppServices.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkChange.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkChangeOperation.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkCloudRouter.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkFilter.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkFilters.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkOrFilter.java rename services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/{AgentPostRequest.java => AppLinkPostRequest.java} (67%) rename services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/{Agent.java => AppLinkPostRequestRouter.java} (74%) create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkSearchRequest.java rename services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/{AgentGetActivities.java => AppLinkSearchResponse.java} (80%) rename services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/{AgentActivitiesMetadata.java => AppLinkSimpleExpression.java} (58%) create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkSortCriteria.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkSortDirection.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkState.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkType.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppService.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppServiceAttachedAppLink.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppServiceAttachedAppLinks.java rename services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/{AttachLogoResponse.java => AppServiceAttachedAppSubscription.java} (65%) create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppServiceAttachedAppSubscriptionFilter.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppServiceAttachedAppSubscriptionFilters.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppServiceAttachedAppSubscriptionOrFilter.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppServiceAttachedAppSubscriptionSearchRequest.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppServiceAttachedAppSubscriptionSearchResponse.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppServiceAttachedAppSubscriptionSimpleExpression.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppServiceAttachedAppSubscriptionSortCriteria.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppServiceAttachedAppSubscriptionSortDirection.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppServiceAttachedAppSubscriptions.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppServiceChange.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppServiceChangeOperation.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppServiceFilter.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppServiceFilters.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppServiceOrFilter.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppServicePostRequest.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppServiceSearchRequest.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppServiceSearchResponse.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppServiceSimpleExpression.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppServiceSortCriteria.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppServiceSortDirection.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppServiceState.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppServiceType.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppSubscription.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppSubscriptionChange.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppSubscriptionChangeOperation.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppSubscriptionFilter.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppSubscriptionFilters.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppSubscriptionOrFilter.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppSubscriptionPostRequest.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppSubscriptionPrioritization.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppSubscriptionSearchRequest.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppSubscriptionSearchResponse.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppSubscriptionSimpleExpression.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppSubscriptionSortCriteria.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppSubscriptionSortDirection.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppSubscriptionSource.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppSubscriptionSourceAppLink.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppSubscriptionSourceRequest.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppSubscriptionSourceRequestAppLink.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppSubscriptionState.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppSubscriptionTarget.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppSubscriptionTargetAppService.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppSubscriptionTargetRequest.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppSubscriptionTargetRequestAppService.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppSubscriptionType.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AttachedAppDomainOrder.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AttachedAppLinkOrder.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AttachedAppServiceOrder.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AttachedAppSubscriptionOrder.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/BulkOpticalConnectRequest.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/CloudRouterReadResponse.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/CompanyProfileContact.java rename services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/{ToolCallInformationInner.java => CompanyProfileContactContacts.java} (66%) create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/CompanyProfileSearchFieldName.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/CompanyProfileSearchFilters.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/CompanyProfileSearchOrFilter.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/CompanyProfileSearchSimpleExpression.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ContactPreference.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/CreateLoa.java rename services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/{CompanyProfileActionRequest.java => CreateLoaNote.java} (71%) create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/EnvironmentActionRequest.java rename services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/{AgentActivities.java => EnvironmentActionResponse.java} (65%) create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/EnvironmentActionStateEnum.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/EnvironmentActionTypeEnum.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ExchangeServiceAndExpression.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ExchangeServiceNotification.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ExchangeServiceOrExpression.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ExchangeServicePropertyExpression.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ExchangeServiceResponse.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ExchangeServiceResponseBgp.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ExchangeServiceSearchExpression.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ExchangeServiceSearchRequest.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ExchangeServiceSearchResponse.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ExchangeServiceSearchSortCriteria.java rename services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/{Agents.java => Gateway.java} (64%) rename services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/{PatchOperation.java => GatewayChangeOperation.java} (82%) rename services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/{MessagesInner.java => GatewayIpv4.java} (70%) create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/GatewayPostRequest.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/GatewayState.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/GatewayType.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/Interconnect.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/InterconnectFilter.java rename services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/{LastMileNotificationInfo.java => InterconnectLocation.java} (69%) create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/InterconnectLocationRequest.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/InterconnectNotification.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/InterconnectPackage.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/InterconnectPostRequest.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/InterconnectRouter.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/InterconnectSearchFieldName.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/InterconnectSearchRequest.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/InterconnectSearchResponse.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/InterconnectSortBy.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/InterconnectSortByResponse.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/InterconnectSortCriteria.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/InterconnectSortCriteriaResponse.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/InterconnectSortDirection.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/InterconnectSortDirectionResponse.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/InterconnectState.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/InternetAccessRoutingProtocolBgpAsn.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/InternetAccessRoutingProtocolBgpRequestAsn.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/IssueLoa.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaActionData.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaActionFieldName.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaActionFilter.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaActionOrFilter.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaActionRequest.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaActionResponse.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaActionSearchFilters.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaActionSearchRequest.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaActionSearchResponse.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaActionSearchSimpleExpressions.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaActionSortCriteria.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaChangelog.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaConsumer.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaConsumersResponse.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaDemarcationPoint.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaFieldName.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaFilter.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaIssuer.java rename services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/{AgentDefinition.java => LoaLocation.java} (76%) create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaNoteDetails.java rename services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/{BulkPortRequest.java => LoaNotesResponse.java} (81%) create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaOpEnum.java rename services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/{ChatMessage.java => LoaOrFilter.java} (73%) create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaPatchPanelConnectorType.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaProductType.java rename services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/{AgentPatchRequest.java => LoaReplaceOperation.java} (71%) rename services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/{LogoRequest.java => LoaRequest.java} (71%) create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaRequestor.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaResponse.java rename services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/{ModelConfiguration.java => LoaResponseOperation.java} (74%) create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaSearchFilters.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaSearchRequest.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaSearchResponse.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaSimpleExpression.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaSortCriteria.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/MaintenanceState.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OperationalEventFilters.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OperationalEventSearchRequest.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OperationalEventSimpleExpression.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OperatorEnum.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OpticalConnectASideRequest.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OpticalConnectASideResponse.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OpticalConnectBulk.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OpticalConnectConnectionDestinationType.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OpticalConnectFilter.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OpticalConnectFilters.java rename services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/{AgentTemplate.java => OpticalConnectLOA.java} (81%) create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OpticalConnectLocation.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OpticalConnectNotification.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OpticalConnectOrFilter.java rename services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/{ServiceProfileLastMileNotification.java => OpticalConnectOrder.java} (60%) create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OpticalConnectPatchPanelFields.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OpticalConnectPostRequest.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OpticalConnectPrice.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OpticalConnectPriceASide.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OpticalConnectPriceLocation.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OpticalConnectPricePathType.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OpticalConnectPriceZSide.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OpticalConnectRedundancy.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OpticalConnectResponse.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OpticalConnectSearchRequest.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OpticalConnectServiceSearchResponse.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OpticalConnectSimpleExpression.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OpticalConnectSortBy.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OpticalConnectSortCriteria.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OpticalConnectSortDirection.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OpticalConnectState.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OpticalConnectZSideRequest.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OpticalConnectZSideResponse.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/Phone.java rename services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/{ConnectionCompanyProfile.java => ProductOffering.java} (72%) create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ProviderEnvironments.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/PublicPeeringConnectionResponse.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/RequestLoa.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/RouteCollector.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/Router.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/RoutingProtocolResponse.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/SearchOperationalEventResponse.java rename services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/{GetAllStreamAssetResponse.java => SearchStreamAssetResponse.java} (82%) rename services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/{AgentGetAllResponse.java => SearchStreamResponse.java} (80%) create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/SearchStreamSubscriptionResponse.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ServiceProfileLastMileApiIntegration.java rename services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/{JsonPatchOperation.java => ServiceProfileUpdateOperation.java} (86%) rename services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/{GatewayAttachmentResponse.java => StreamSearchAsset.java} (64%) create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/StreamSearchFilter.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/StreamSearchFilters.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/StreamSearchOrFilter.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/StreamSearchRequest.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/StreamSearchSimpleExpression.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/StreamSearchSortBy.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/StreamSearchSortCriteria.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/StreamSearchSortDirection.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/StreamSubscriptionSearchFilter.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/StreamSubscriptionSearchFilters.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/StreamSubscriptionSearchOrFilter.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/StreamSubscriptionSearchRequest.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/StreamSubscriptionSearchSimpleExpression.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/StreamSubscriptionSearchSortBy.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/StreamSubscriptionSearchSortCriteria.java create mode 100644 services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/StreamSubscriptionSearchSortDirection.java rename services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/{OpEnum.java => Style.java} (69%) diff --git a/services/fabricv4/README.md b/services/fabricv4/README.md index d63330c2..e3fdef70 100644 --- a/services/fabricv4/README.md +++ b/services/fabricv4/README.md @@ -1,7 +1,7 @@ # fabricv4 Equinix Fabric API v4 -- API version: 4.30 +- API version: 4.31 - Generator version: 7.16.0 Equinix Fabric is an advanced software-defined interconnection solution that enables you to directly, securely and dynamically connect to distributed infrastructure and digital ecosystems on platform Equinix via a single port, Customers can use Fabric to connect to:
1. Cloud Service Providers - Clouds, network and other service providers.
2. Enterprises - Other Equinix customers, vendors and partners.
3. Myself - Another customer instance deployed at Equinix.

Integrations (SDKs, Tools) links:
Fabric Java SDK
Fabric Go SDK
Fabric Python SDK
Equinix Terraform Provider
Fabric Terraform Modules
Equinix Pulumi Provider
@@ -86,7 +86,7 @@ import com.equinix.sdk.fabricv4.ApiException; import com.equinix.sdk.fabricv4.Configuration; import com.equinix.sdk.fabricv4.auth.*; import com.equinix.sdk.fabricv4.model.*; -import com.equinix.sdk.fabricv4.api.AgentTemplatesApi; +import com.equinix.sdk.fabricv4.api.ApplicationDomainsApi; public class Example { public static void main(String[] args) { @@ -97,15 +97,13 @@ public class Example { HttpBearerAuth BearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("BearerAuth"); BearerAuth.setBearerToken("BEARER TOKEN"); - AgentTemplatesApi apiInstance = new AgentTemplatesApi(defaultClient); - UUID agentTemplateId = UUID.randomUUID(); // UUID | Agent Template UUID - Integer offset = 1; // Integer | offset - Integer limit = 10; // Integer | number of records to fetch + ApplicationDomainsApi apiInstance = new ApplicationDomainsApi(defaultClient); + AppDomainPostRequest appDomainPostRequest = new AppDomainPostRequest(); // AppDomainPostRequest | try { - AgentTemplates result = apiInstance.getAgentTemplateByUuid(agentTemplateId, offset, limit); + AppDomain result = apiInstance.createAppDomain(appDomainPostRequest); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AgentTemplatesApi#getAgentTemplateByUuid"); + System.err.println("Exception when calling ApplicationDomainsApi#createAppDomain"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -122,17 +120,45 @@ All URIs are relative to *https://api.equinix.com* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -*AgentTemplatesApi* | [**getAgentTemplateByUuid**](docs/AgentTemplatesApi.md#getAgentTemplateByUuid) | **GET** /fabric/v4/agentTemplates/{agentTemplateId} | Get Agent Template by UUID -*AgentTemplatesApi* | [**getAgentTemplates**](docs/AgentTemplatesApi.md#getAgentTemplates) | **GET** /fabric/v4/agentTemplates | Get Agent Templates -*AgentsApi* | [**createAgent**](docs/AgentsApi.md#createAgent) | **POST** /fabric/v4/agents | Create Agent -*AgentsApi* | [**deleteAgentByUuid**](docs/AgentsApi.md#deleteAgentByUuid) | **DELETE** /fabric/v4/agents/{agentId} | Delete Agent by UUID -*AgentsApi* | [**getAgentActivities**](docs/AgentsApi.md#getAgentActivities) | **GET** /fabric/v4/agents/{agentId}/activities | Get Agent Activities -*AgentsApi* | [**getAgentByUuid**](docs/AgentsApi.md#getAgentByUuid) | **GET** /fabric/v4/agents/{agentId} | Get Agent by UUID -*AgentsApi* | [**getAgents**](docs/AgentsApi.md#getAgents) | **GET** /fabric/v4/agents | Get Agents -*AgentsApi* | [**patchAgentByUuid**](docs/AgentsApi.md#patchAgentByUuid) | **PATCH** /fabric/v4/agents/{agentId} | Update Agent by UUID +*ApplicationDomainsApi* | [**createAppDomain**](docs/ApplicationDomainsApi.md#createAppDomain) | **POST** /fabric/v4/appDomains | Create App Domain +*ApplicationDomainsApi* | [**deleteAppDomainByUuid**](docs/ApplicationDomainsApi.md#deleteAppDomainByUuid) | **DELETE** /fabric/v4/appDomains/{appDomainId} | Delete App Domain +*ApplicationDomainsApi* | [**getAppDomainByUuid**](docs/ApplicationDomainsApi.md#getAppDomainByUuid) | **GET** /fabric/v4/appDomains/{appDomainId} | Get App Domain +*ApplicationDomainsApi* | [**getAttachedAppLinksByAppDomainId**](docs/ApplicationDomainsApi.md#getAttachedAppLinksByAppDomainId) | **GET** /fabric/v4/appDomains/{appDomainId}/appLinks | Get attached App Links for App Domain +*ApplicationDomainsApi* | [**searchAppDomains**](docs/ApplicationDomainsApi.md#searchAppDomains) | **POST** /fabric/v4/appDomains/search | Search App Domains +*ApplicationDomainsApi* | [**updateAppDomainByUuid**](docs/ApplicationDomainsApi.md#updateAppDomainByUuid) | **PATCH** /fabric/v4/appDomains/{appDomainId} | Update App Domain +*ApplicationLinksApi* | [**attachAppDomainToAppLink**](docs/ApplicationLinksApi.md#attachAppDomainToAppLink) | **PUT** /fabric/v4/appLinks/{appLinkId}/appDomains/{appDomainId} | Attach App Domain to App Link +*ApplicationLinksApi* | [**attachAppServiceToAppLink**](docs/ApplicationLinksApi.md#attachAppServiceToAppLink) | **PUT** /fabric/v4/appLinks/{appLinkId}/appServices/{appServiceId} | Attach App Service to App Link +*ApplicationLinksApi* | [**createAppLink**](docs/ApplicationLinksApi.md#createAppLink) | **POST** /fabric/v4/appLinks | Create App Link +*ApplicationLinksApi* | [**deleteAppLinkByUuid**](docs/ApplicationLinksApi.md#deleteAppLinkByUuid) | **DELETE** /fabric/v4/appLinks/{appLinkId} | Delete App Link +*ApplicationLinksApi* | [**detachAppDomainFromAppLink**](docs/ApplicationLinksApi.md#detachAppDomainFromAppLink) | **DELETE** /fabric/v4/appLinks/{appLinkId}/appDomains/{appDomainId} | Detach App Domain from App Link +*ApplicationLinksApi* | [**detachAppServiceFromAppLink**](docs/ApplicationLinksApi.md#detachAppServiceFromAppLink) | **DELETE** /fabric/v4/appLinks/{appLinkId}/appServices/{appServiceId} | Detach App Service from App Link +*ApplicationLinksApi* | [**getAppLinkByUuid**](docs/ApplicationLinksApi.md#getAppLinkByUuid) | **GET** /fabric/v4/appLinks/{appLinkId} | Get App Link +*ApplicationLinksApi* | [**getAttachedAppDomainByUuid**](docs/ApplicationLinksApi.md#getAttachedAppDomainByUuid) | **GET** /fabric/v4/appLinks/{appLinkId}/appDomains/{appDomainId} | Get attached App Domain for App Link +*ApplicationLinksApi* | [**getAttachedAppDomainsByAppLinkId**](docs/ApplicationLinksApi.md#getAttachedAppDomainsByAppLinkId) | **GET** /fabric/v4/appLinks/{appLinkId}/appDomains | Get attached App Domains for App Link +*ApplicationLinksApi* | [**getAttachedAppServiceByUuid**](docs/ApplicationLinksApi.md#getAttachedAppServiceByUuid) | **GET** /fabric/v4/appLinks/{appLinkId}/appServices/{appServiceId} | Get attached App Service for App Link +*ApplicationLinksApi* | [**getAttachedAppServicesByAppLinkId**](docs/ApplicationLinksApi.md#getAttachedAppServicesByAppLinkId) | **GET** /fabric/v4/appLinks/{appLinkId}/appServices | Get attached App Services for App Link +*ApplicationLinksApi* | [**searchAppLinks**](docs/ApplicationLinksApi.md#searchAppLinks) | **POST** /fabric/v4/appLinks/search | Search App Links +*ApplicationLinksApi* | [**searchAttachedAppDomains**](docs/ApplicationLinksApi.md#searchAttachedAppDomains) | **POST** /fabric/v4/appLinks/{appLinkId}/appDomains/search | Search attached App Domain to App Link +*ApplicationLinksApi* | [**searchAttachedAppServices**](docs/ApplicationLinksApi.md#searchAttachedAppServices) | **POST** /fabric/v4/appLinks/{appLinkId}/appServices/search | Search attached App Service to App Link +*ApplicationLinksApi* | [**updateAppLinkByUuid**](docs/ApplicationLinksApi.md#updateAppLinkByUuid) | **PATCH** /fabric/v4/appLinks/{appLinkId} | Update App Link +*ApplicationLinksApi* | [**updateAppServiceAttachmentToAppLink**](docs/ApplicationLinksApi.md#updateAppServiceAttachmentToAppLink) | **PATCH** /fabric/v4/appLinks/{appLinkId}/appServices/{appServiceId} | Update App Service attachment to App Link +*ApplicationServicesApi* | [**createAppService**](docs/ApplicationServicesApi.md#createAppService) | **POST** /fabric/v4/appServices | Create App Service +*ApplicationServicesApi* | [**deleteAppServiceByUuid**](docs/ApplicationServicesApi.md#deleteAppServiceByUuid) | **DELETE** /fabric/v4/appServices/{appServiceId} | Delete App Service +*ApplicationServicesApi* | [**getAppServiceByUuid**](docs/ApplicationServicesApi.md#getAppServiceByUuid) | **GET** /fabric/v4/appServices/{appServiceId} | Get App Service +*ApplicationServicesApi* | [**getAttachedAppLinksByAppServiceId**](docs/ApplicationServicesApi.md#getAttachedAppLinksByAppServiceId) | **GET** /fabric/v4/appServices/{appServiceId}/appLinks | Get attached App Links for App Service +*ApplicationServicesApi* | [**getAttachedAppSubscriptionsByAppServiceId**](docs/ApplicationServicesApi.md#getAttachedAppSubscriptionsByAppServiceId) | **GET** /fabric/v4/appServices/{appServiceId}/appSubscriptions | Get attached App Subscriptions for App Service +*ApplicationServicesApi* | [**searchAppServices**](docs/ApplicationServicesApi.md#searchAppServices) | **POST** /fabric/v4/appServices/search | Search App Services +*ApplicationServicesApi* | [**searchAttachedAppSubscriptionsByAppServiceId**](docs/ApplicationServicesApi.md#searchAttachedAppSubscriptionsByAppServiceId) | **POST** /fabric/v4/appServices/{appServiceId}/appSubscriptions/search | Search attached App Subscriptions +*ApplicationServicesApi* | [**updateAppServiceByUuid**](docs/ApplicationServicesApi.md#updateAppServiceByUuid) | **PATCH** /fabric/v4/appServices/{appServiceId} | Update App Service +*ApplicationSubscriptionsApi* | [**createAppSubscription**](docs/ApplicationSubscriptionsApi.md#createAppSubscription) | **POST** /fabric/v4/appSubscriptions | Create App Subscription +*ApplicationSubscriptionsApi* | [**deleteAppSubscriptionByUuid**](docs/ApplicationSubscriptionsApi.md#deleteAppSubscriptionByUuid) | **DELETE** /fabric/v4/appSubscriptions/{appSubscriptionId} | Delete App Subscription +*ApplicationSubscriptionsApi* | [**getAppSubscriptionByUuid**](docs/ApplicationSubscriptionsApi.md#getAppSubscriptionByUuid) | **GET** /fabric/v4/appSubscriptions/{appSubscriptionId} | Get App Subscription +*ApplicationSubscriptionsApi* | [**searchAppSubscriptions**](docs/ApplicationSubscriptionsApi.md#searchAppSubscriptions) | **POST** /fabric/v4/appSubscriptions/search | Search App Subscriptions +*ApplicationSubscriptionsApi* | [**updateAppSubscriptionByUuid**](docs/ApplicationSubscriptionsApi.md#updateAppSubscriptionByUuid) | **PATCH** /fabric/v4/appSubscriptions/{appSubscriptionId} | Update App Subscription *CloudEventsApi* | [**getCloudEvent**](docs/CloudEventsApi.md#getCloudEvent) | **GET** /fabric/v4/cloudevents/{cloudEventId} | Get Cloud Event *CloudEventsApi* | [**getCloudEventByAssetId**](docs/CloudEventsApi.md#getCloudEventByAssetId) | **GET** /fabric/v4/{asset}/{assetId}/cloudevents | Get Cloud Events by Asset Id *CloudEventsApi* | [**searchCloudEvents**](docs/CloudEventsApi.md#searchCloudEvents) | **POST** /fabric/v4/cloudevents/search | Search Cloud Events +*CloudEventsApi* | [**searchLastOpEvents**](docs/CloudEventsApi.md#searchLastOpEvents) | **POST** /fabric/v4/latestOperationalEvents/search | Search Last Operational Cloud Events *CloudRoutersApi* | [**createCloudRouter**](docs/CloudRoutersApi.md#createCloudRouter) | **POST** /fabric/v4/routers | Create Routers *CloudRoutersApi* | [**createCloudRouterAction**](docs/CloudRoutersApi.md#createCloudRouterAction) | **POST** /fabric/v4/routers/{routerId}/actions | Create Route Table Action *CloudRoutersApi* | [**createCloudRouterCommand**](docs/CloudRoutersApi.md#createCloudRouterCommand) | **POST** /fabric/v4/routers/{routerId}/commands | Initiate Command @@ -172,17 +198,39 @@ Class | Method | HTTP request | Description *ConnectionsApi* | [**searchConnections**](docs/ConnectionsApi.md#searchConnections) | **POST** /fabric/v4/connections/search | Search connections *ConnectionsApi* | [**updateConnectionByUuid**](docs/ConnectionsApi.md#updateConnectionByUuid) | **PATCH** /fabric/v4/connections/{connectionId} | Update by ID *ConnectionsApi* | [**validateConnections**](docs/ConnectionsApi.md#validateConnections) | **POST** /fabric/v4/connections/validate | Validate Connection +*FabricOneApi* | [**createInterconnect**](docs/FabricOneApi.md#createInterconnect) | **POST** /fabric/v4/interconnects | Create Interconnect +*FabricOneApi* | [**deleteInterconnectByUuid**](docs/FabricOneApi.md#deleteInterconnectByUuid) | **DELETE** /fabric/v4/interconnects/{interconnectId} | Delete Interconnect By ID +*FabricOneApi* | [**getInterconnectByUuid**](docs/FabricOneApi.md#getInterconnectByUuid) | **GET** /fabric/v4/interconnects/{interconnectId} | Get Interconnect By ID +*FabricOneApi* | [**getInterconnectPackages**](docs/FabricOneApi.md#getInterconnectPackages) | **GET** /fabric/v4/interconnectPackages | Get All Interconnect Packages +*FabricOneApi* | [**searchInterconnects**](docs/FabricOneApi.md#searchInterconnects) | **POST** /fabric/v4/interconnects/search | Search Interconnects +*GatewaysApi* | [**createGateway**](docs/GatewaysApi.md#createGateway) | **POST** /fabric/v4/gateways | Create Gateway +*GatewaysApi* | [**deleteGatewayByUuid**](docs/GatewaysApi.md#deleteGatewayByUuid) | **DELETE** /fabric/v4/gateways/{gatewayId} | Delete Gateway +*GatewaysApi* | [**getGatewayByUuid**](docs/GatewaysApi.md#getGatewayByUuid) | **GET** /fabric/v4/gateways/{gatewayId} | Get Gateway +*GatewaysApi* | [**updateGatewayByUuid**](docs/GatewaysApi.md#updateGatewayByUuid) | **PATCH** /fabric/v4/gateways/{gatewayId} | Update Gateway by ID *HealthApi* | [**getStatus**](docs/HealthApi.md#getStatus) | **GET** /fabric/v4/health | Get service status *InternetAccessServicesApi* | [**createEiaService**](docs/InternetAccessServicesApi.md#createEiaService) | **POST** /fabric/v4/internetAccessServices | Creates Internet Access Service *InternetAccessServicesApi* | [**deleteEiaService**](docs/InternetAccessServicesApi.md#deleteEiaService) | **DELETE** /fabric/v4/internetAccessServices/{uuid} | Delete Internet Access Service by UUID *InternetAccessServicesApi* | [**getEiaService**](docs/InternetAccessServicesApi.md#getEiaService) | **GET** /fabric/v4/internetAccessServices/{uuid} | Retrieve Internet Access Service by UUID *InternetAccessServicesApi* | [**patchEiaService**](docs/InternetAccessServicesApi.md#patchEiaService) | **PATCH** /fabric/v4/internetAccessServices/{uuid} | Patch Internet Access Service by UUID *InternetAccessServicesApi* | [**searchEiaServices**](docs/InternetAccessServicesApi.md#searchEiaServices) | **POST** /fabric/v4/internetAccessServices/search | Search for Internet Access Services -*IpBlocksApi* | [**deleteIpBlockById**](docs/IpBlocksApi.md#deleteIpBlockById) | **DELETE** /fabric/v4/ipBlocks/{uuid} | Delete Ip Block by UUID -*IpBlocksApi* | [**getIpBlock**](docs/IpBlocksApi.md#getIpBlock) | **GET** /fabric/v4/ipBlocks/{uuid} | Retrieve Ip Block by UUID -*IpBlocksApi* | [**patchIpBlockById**](docs/IpBlocksApi.md#patchIpBlockById) | **PATCH** /fabric/v4/ipBlocks/{uuid} | patch Ip Block by UUID -*IpBlocksApi* | [**searchIpBlocks**](docs/IpBlocksApi.md#searchIpBlocks) | **POST** /fabric/v4/ipBlocks/search | Search for Ip Blocks -*IpBlocksApi* | [**submitIpBlock**](docs/IpBlocksApi.md#submitIpBlock) | **POST** /fabric/v4/ipBlocks | Submits new Equinix owned or customer owned Ip Block request +*InternetExchangeServicesApi* | [**getExchangeServiceById**](docs/InternetExchangeServicesApi.md#getExchangeServiceById) | **GET** /fabric/v4/exchangeServices/{exchangeServiceId} | Get Internet Exchange Service +*InternetExchangeServicesApi* | [**searchExchangeService**](docs/InternetExchangeServicesApi.md#searchExchangeService) | **POST** /fabric/v4/exchangeServices/search | Search Internet Exchange Service +*IpBlocksApi* | [**deleteIpBlockById**](docs/IpBlocksApi.md#deleteIpBlockById) | **DELETE** /fabric/v4/ipBlocks/{uuid} | Delete IP Block by UUID +*IpBlocksApi* | [**getIpBlock**](docs/IpBlocksApi.md#getIpBlock) | **GET** /fabric/v4/ipBlocks/{uuid} | Retrieve IP Block by UUID +*IpBlocksApi* | [**patchIpBlockById**](docs/IpBlocksApi.md#patchIpBlockById) | **PATCH** /fabric/v4/ipBlocks/{uuid} | patch IP Block by UUID +*IpBlocksApi* | [**searchIpBlocks**](docs/IpBlocksApi.md#searchIpBlocks) | **POST** /fabric/v4/ipBlocks/search | Search for IP Blocks +*IpBlocksApi* | [**submitIpBlock**](docs/IpBlocksApi.md#submitIpBlock) | **POST** /fabric/v4/ipBlocks | Submits new Equinix owned or customer owned IP Block request +*LoasApi* | [**createLoa**](docs/LoasApi.md#createLoa) | **POST** /fabric/v4/loas | Create Loa +*LoasApi* | [**createLoaNoteByLoaId**](docs/LoasApi.md#createLoaNoteByLoaId) | **POST** /fabric/v4/loas/{loaId}/notes | Create Loa Note +*LoasApi* | [**getLoaActionsByUuid**](docs/LoasApi.md#getLoaActionsByUuid) | **GET** /fabric/v4/loas/{loaId}/actions/{actionId} | Get Loa Action by Action ID +*LoasApi* | [**getLoaByUuid**](docs/LoasApi.md#getLoaByUuid) | **GET** /fabric/v4/loas/{loaId} | Get Loa +*LoasApi* | [**getLoaConsumersByLoaId**](docs/LoasApi.md#getLoaConsumersByLoaId) | **GET** /fabric/v4/loas/{loaId}/consumers | Get Loa Consumers +*LoasApi* | [**getLoaNotesByUuid**](docs/LoasApi.md#getLoaNotesByUuid) | **GET** /fabric/v4/loas/{loaId}/notes | Get Loa Notes +*LoasApi* | [**performLoaAction**](docs/LoasApi.md#performLoaAction) | **POST** /fabric/v4/loas/{loaId}/actions | Loa Actions +*LoasApi* | [**searchLoa**](docs/LoasApi.md#searchLoa) | **POST** /fabric/v4/loas/search | Search Loas +*LoasApi* | [**searchLoaAction**](docs/LoasApi.md#searchLoaAction) | **POST** /fabric/v4/loas/{loaId}/actions/search | Search Loa Actions +*LoasApi* | [**updateLoaByUuid**](docs/LoasApi.md#updateLoaByUuid) | **PATCH** /fabric/v4/loas/{loaId} | Update Loa +*LogosApi* | [**createLogo**](docs/LogosApi.md#createLogo) | **POST** /fabric/v4/logos | Create Logo *LogosApi* | [**deleteLogoByUuid**](docs/LogosApi.md#deleteLogoByUuid) | **DELETE** /fabric/v4/logos/{uuid} | Delete Logo *LogosApi* | [**getLogoByUuid**](docs/LogosApi.md#getLogoByUuid) | **GET** /fabric/v4/logos/{uuid} | Get Logo *MarketplaceSubscriptionsApi* | [**getSubscriptionById**](docs/MarketplaceSubscriptionsApi.md#getSubscriptionById) | **GET** /fabric/v4/marketplaceSubscriptions/{subscriptionId} | Get Subscription @@ -199,6 +247,10 @@ Class | Method | HTTP request | Description *NetworksApi* | [**getNetworkChanges**](docs/NetworksApi.md#getNetworkChanges) | **GET** /fabric/v4/networks/{networkId}/changes | Get Network Changes *NetworksApi* | [**searchNetworks**](docs/NetworksApi.md#searchNetworks) | **POST** /fabric/v4/networks/search | Search Network *NetworksApi* | [**updateNetworkByUuid**](docs/NetworksApi.md#updateNetworkByUuid) | **PATCH** /fabric/v4/networks/{networkId} | Update Network By ID +*OpticalMetroConnectsApi* | [**createBulkOpticalConnect**](docs/OpticalMetroConnectsApi.md#createBulkOpticalConnect) | **POST** /fabric/v4/opticalConnects/bulk | Create Dual Diverse Optical Metro Connect Service +*OpticalMetroConnectsApi* | [**createOpticalConnect**](docs/OpticalMetroConnectsApi.md#createOpticalConnect) | **POST** /fabric/v4/opticalConnects | Create Optical Metro Connect Service +*OpticalMetroConnectsApi* | [**getOpticalConnectByUuid**](docs/OpticalMetroConnectsApi.md#getOpticalConnectByUuid) | **GET** /fabric/v4/opticalConnects/{opticalConnectId} | Get Optical Metro Connect Service +*OpticalMetroConnectsApi* | [**searchOpticalConnect**](docs/OpticalMetroConnectsApi.md#searchOpticalConnect) | **POST** /fabric/v4/opticalConnects/search | Search Optical Metro Connect Services *PortPackagesApi* | [**getPortPackages**](docs/PortPackagesApi.md#getPortPackages) | **GET** /fabric/v4/portPackages | Get All Port Packages *PortsApi* | [**addToLag**](docs/PortsApi.md#addToLag) | **POST** /fabric/v4/ports/{portId}/physicalPorts/bulk | Add to Lag *PortsApi* | [**createPort**](docs/PortsApi.md#createPort) | **POST** /fabric/v4/ports | Create Port @@ -281,10 +333,12 @@ Class | Method | HTTP request | Description *ServiceProfilesApi* | [**createServiceProfileAction**](docs/ServiceProfilesApi.md#createServiceProfileAction) | **POST** /fabric/v4/serviceProfiles/{serviceProfileId}/actions | Profile Actions *ServiceProfilesApi* | [**deleteServiceProfileByUuid**](docs/ServiceProfilesApi.md#deleteServiceProfileByUuid) | **DELETE** /fabric/v4/serviceProfiles/{serviceProfileId} | Delete Profile *ServiceProfilesApi* | [**getServiceProfileByUuid**](docs/ServiceProfilesApi.md#getServiceProfileByUuid) | **GET** /fabric/v4/serviceProfiles/{serviceProfileId} | Get Profile +*ServiceProfilesApi* | [**getServiceProfileEnvironmentsByUuid**](docs/ServiceProfilesApi.md#getServiceProfileEnvironmentsByUuid) | **GET** /fabric/v4/serviceProfiles/{serviceProfileId}/environments | Get Profile Environments *ServiceProfilesApi* | [**getServiceProfileMetrosByUuid**](docs/ServiceProfilesApi.md#getServiceProfileMetrosByUuid) | **GET** /fabric/v4/serviceProfiles/{serviceProfileId}/metros | Get Profile Metros *ServiceProfilesApi* | [**getServiceProfiles**](docs/ServiceProfilesApi.md#getServiceProfiles) | **GET** /fabric/v4/serviceProfiles | Get all Profiles *ServiceProfilesApi* | [**putServiceProfileByUuid**](docs/ServiceProfilesApi.md#putServiceProfileByUuid) | **PUT** /fabric/v4/serviceProfiles/{serviceProfileId} | Replace Profile *ServiceProfilesApi* | [**searchServiceProfiles**](docs/ServiceProfilesApi.md#searchServiceProfiles) | **POST** /fabric/v4/serviceProfiles/search | Profile Search +*ServiceProfilesApi* | [**serviceProfileEnvironmentAction**](docs/ServiceProfilesApi.md#serviceProfileEnvironmentAction) | **POST** /fabric/v4/serviceProfiles/{serviceProfileId}/environments/{environmentId}/actions | Service Profile Environment Actions *ServiceProfilesApi* | [**updateServiceProfileByUuid**](docs/ServiceProfilesApi.md#updateServiceProfileByUuid) | **PATCH** /fabric/v4/serviceProfiles/{serviceProfileId} | Update Profile *ServiceTokensApi* | [**createServiceToken**](docs/ServiceTokensApi.md#createServiceToken) | **POST** /fabric/v4/serviceTokens | Create Service Token *ServiceTokensApi* | [**createServiceTokenAction**](docs/ServiceTokensApi.md#createServiceTokenAction) | **POST** /fabric/v4/serviceTokens/{serviceTokenId}/actions | ServiceToken Actions @@ -304,6 +358,7 @@ Class | Method | HTTP request | Description *StreamSubscriptionsApi* | [**deleteStreamSubscriptionByUuid**](docs/StreamSubscriptionsApi.md#deleteStreamSubscriptionByUuid) | **DELETE** /fabric/v4/streams/{streamId}/subscriptions/{subscriptionId} | Delete Subscription *StreamSubscriptionsApi* | [**getStreamSubscriptionByUuid**](docs/StreamSubscriptionsApi.md#getStreamSubscriptionByUuid) | **GET** /fabric/v4/streams/{streamId}/subscriptions/{subscriptionId} | Get Subscription *StreamSubscriptionsApi* | [**getStreamSubscriptions**](docs/StreamSubscriptionsApi.md#getStreamSubscriptions) | **GET** /fabric/v4/streams/{streamId}/subscriptions | Get Subscriptions +*StreamSubscriptionsApi* | [**searchStreamSubscriptions**](docs/StreamSubscriptionsApi.md#searchStreamSubscriptions) | **POST** /fabric/v4/streamSubscriptions/search | Search Stream Subscriptions *StreamSubscriptionsApi* | [**updateStreamSubscriptionByUuid**](docs/StreamSubscriptionsApi.md#updateStreamSubscriptionByUuid) | **PUT** /fabric/v4/streams/{streamId}/subscriptions/{subscriptionId} | Update Subscription *StreamsApi* | [**createStreams**](docs/StreamsApi.md#createStreams) | **POST** /fabric/v4/streams | Create Stream *StreamsApi* | [**deleteStreamAssetByUuid**](docs/StreamsApi.md#deleteStreamAssetByUuid) | **DELETE** /fabric/v4/streams/{streamId}/{asset}/{assetId} | Detach Asset @@ -311,10 +366,12 @@ Class | Method | HTTP request | Description *StreamsApi* | [**getStreamAssetByUuid**](docs/StreamsApi.md#getStreamAssetByUuid) | **GET** /fabric/v4/streams/{streamId}/{asset}/{assetId} | Get Asset *StreamsApi* | [**getStreamByUuid**](docs/StreamsApi.md#getStreamByUuid) | **GET** /fabric/v4/streams/{streamId} | Get Stream *StreamsApi* | [**getStreams**](docs/StreamsApi.md#getStreams) | **GET** /fabric/v4/streams | Get Streams -*StreamsApi* | [**getStreamsAssets**](docs/StreamsApi.md#getStreamsAssets) | **POST** /fabric/v4/streamAssets/search | Get Assets +*StreamsApi* | [**searchStreamAssets**](docs/StreamsApi.md#searchStreamAssets) | **POST** /fabric/v4/streamAssets/search | Search Stream Assets +*StreamsApi* | [**searchStreams**](docs/StreamsApi.md#searchStreams) | **POST** /fabric/v4/streams/search | Search Streams *StreamsApi* | [**updateStreamAssetByUuid**](docs/StreamsApi.md#updateStreamAssetByUuid) | **PUT** /fabric/v4/streams/{streamId}/{asset}/{assetId} | Attach Asset *StreamsApi* | [**updateStreamByUuid**](docs/StreamsApi.md#updateStreamByUuid) | **PUT** /fabric/v4/streams/{streamId} | Update Stream *TagsApi* | [**createTag**](docs/TagsApi.md#createTag) | **POST** /fabric/v4/tags | Create Tag +*TagsApi* | [**getTagByUuid**](docs/TagsApi.md#getTagByUuid) | **GET** /fabric/v4/tags/{uuid} | Get Tag *TagsApi* | [**listTags**](docs/TagsApi.md#listTags) | **GET** /fabric/v4/tags | List Tags @@ -323,32 +380,134 @@ Class | Method | HTTP request | Description - [AccessPoint](docs/AccessPoint.md) - [AccessPointSelector](docs/AccessPointSelector.md) - [AccessPointType](docs/AccessPointType.md) + - [Account](docs/Account.md) - [Actions](docs/Actions.md) + - [ActivationKeyDetails](docs/ActivationKeyDetails.md) - [AddOperation](docs/AddOperation.md) - - [Agent](docs/Agent.md) - - [AgentActivities](docs/AgentActivities.md) - - [AgentActivitiesMetadata](docs/AgentActivitiesMetadata.md) - - [AgentDefinition](docs/AgentDefinition.md) - - [AgentGetActivities](docs/AgentGetActivities.md) - - [AgentGetAllResponse](docs/AgentGetAllResponse.md) - - [AgentPatchRequest](docs/AgentPatchRequest.md) - - [AgentPostRequest](docs/AgentPostRequest.md) - - [AgentTemplate](docs/AgentTemplate.md) - - [AgentTemplateGetAllResponse](docs/AgentTemplateGetAllResponse.md) - - [AgentTemplates](docs/AgentTemplates.md) - - [Agents](docs/Agents.md) + - [Address](docs/Address.md) - [AlertRulePostRequest](docs/AlertRulePostRequest.md) - [AlertRulePutRequest](docs/AlertRulePutRequest.md) + - [AllInterconnectPackagesResponse](docs/AllInterconnectPackagesResponse.md) - [AllPhysicalPortsResponse](docs/AllPhysicalPortsResponse.md) - [AllPortPackagesResponse](docs/AllPortPackagesResponse.md) - [AllPortsResponse](docs/AllPortsResponse.md) - [ApiConfig](docs/ApiConfig.md) - [ApiServices](docs/ApiServices.md) + - [AppDomain](docs/AppDomain.md) + - [AppDomainAttachedAppLink](docs/AppDomainAttachedAppLink.md) + - [AppDomainAttachedAppLinks](docs/AppDomainAttachedAppLinks.md) + - [AppDomainChange](docs/AppDomainChange.md) + - [AppDomainChangeOperation](docs/AppDomainChangeOperation.md) + - [AppDomainFilter](docs/AppDomainFilter.md) + - [AppDomainFilters](docs/AppDomainFilters.md) + - [AppDomainOrFilter](docs/AppDomainOrFilter.md) + - [AppDomainPostRequest](docs/AppDomainPostRequest.md) + - [AppDomainSearchRequest](docs/AppDomainSearchRequest.md) + - [AppDomainSearchResponse](docs/AppDomainSearchResponse.md) + - [AppDomainSimpleExpression](docs/AppDomainSimpleExpression.md) + - [AppDomainSortCriteria](docs/AppDomainSortCriteria.md) + - [AppDomainSortDirection](docs/AppDomainSortDirection.md) + - [AppDomainState](docs/AppDomainState.md) + - [AppDomainType](docs/AppDomainType.md) + - [AppLink](docs/AppLink.md) + - [AppLinkAppDomainAttachment](docs/AppLinkAppDomainAttachment.md) + - [AppLinkAppServiceAttachment](docs/AppLinkAppServiceAttachment.md) + - [AppLinkAppServiceAttachmentChange](docs/AppLinkAppServiceAttachmentChange.md) + - [AppLinkAppServiceAttachmentChangeOperation](docs/AppLinkAppServiceAttachmentChangeOperation.md) + - [AppLinkAttachDomainFilter](docs/AppLinkAttachDomainFilter.md) + - [AppLinkAttachDomainFilters](docs/AppLinkAttachDomainFilters.md) + - [AppLinkAttachDomainOrFilter](docs/AppLinkAttachDomainOrFilter.md) + - [AppLinkAttachDomainSearchRequest](docs/AppLinkAttachDomainSearchRequest.md) + - [AppLinkAttachDomainSearchResponse](docs/AppLinkAttachDomainSearchResponse.md) + - [AppLinkAttachDomainSimpleExpression](docs/AppLinkAttachDomainSimpleExpression.md) + - [AppLinkAttachDomainSortCriteria](docs/AppLinkAttachDomainSortCriteria.md) + - [AppLinkAttachDomainSortDirection](docs/AppLinkAttachDomainSortDirection.md) + - [AppLinkAttachServiceFilter](docs/AppLinkAttachServiceFilter.md) + - [AppLinkAttachServiceFilters](docs/AppLinkAttachServiceFilters.md) + - [AppLinkAttachServiceOrFilter](docs/AppLinkAttachServiceOrFilter.md) + - [AppLinkAttachServiceRequest](docs/AppLinkAttachServiceRequest.md) + - [AppLinkAttachServiceSearchRequest](docs/AppLinkAttachServiceSearchRequest.md) + - [AppLinkAttachServiceSearchResponse](docs/AppLinkAttachServiceSearchResponse.md) + - [AppLinkAttachServiceSimpleExpression](docs/AppLinkAttachServiceSimpleExpression.md) + - [AppLinkAttachServiceSortCriteria](docs/AppLinkAttachServiceSortCriteria.md) + - [AppLinkAttachServiceSortDirection](docs/AppLinkAttachServiceSortDirection.md) + - [AppLinkAttachState](docs/AppLinkAttachState.md) + - [AppLinkAttachedAppDomain](docs/AppLinkAttachedAppDomain.md) + - [AppLinkAttachedAppDomains](docs/AppLinkAttachedAppDomains.md) + - [AppLinkAttachedAppService](docs/AppLinkAttachedAppService.md) + - [AppLinkAttachedAppServices](docs/AppLinkAttachedAppServices.md) + - [AppLinkChange](docs/AppLinkChange.md) + - [AppLinkChangeOperation](docs/AppLinkChangeOperation.md) + - [AppLinkCloudRouter](docs/AppLinkCloudRouter.md) + - [AppLinkFilter](docs/AppLinkFilter.md) + - [AppLinkFilters](docs/AppLinkFilters.md) + - [AppLinkOrFilter](docs/AppLinkOrFilter.md) + - [AppLinkPostRequest](docs/AppLinkPostRequest.md) + - [AppLinkPostRequestRouter](docs/AppLinkPostRequestRouter.md) + - [AppLinkSearchRequest](docs/AppLinkSearchRequest.md) + - [AppLinkSearchResponse](docs/AppLinkSearchResponse.md) + - [AppLinkSimpleExpression](docs/AppLinkSimpleExpression.md) + - [AppLinkSortCriteria](docs/AppLinkSortCriteria.md) + - [AppLinkSortDirection](docs/AppLinkSortDirection.md) + - [AppLinkState](docs/AppLinkState.md) + - [AppLinkType](docs/AppLinkType.md) + - [AppService](docs/AppService.md) + - [AppServiceAttachedAppLink](docs/AppServiceAttachedAppLink.md) + - [AppServiceAttachedAppLinks](docs/AppServiceAttachedAppLinks.md) + - [AppServiceAttachedAppSubscription](docs/AppServiceAttachedAppSubscription.md) + - [AppServiceAttachedAppSubscriptionFilter](docs/AppServiceAttachedAppSubscriptionFilter.md) + - [AppServiceAttachedAppSubscriptionFilters](docs/AppServiceAttachedAppSubscriptionFilters.md) + - [AppServiceAttachedAppSubscriptionOrFilter](docs/AppServiceAttachedAppSubscriptionOrFilter.md) + - [AppServiceAttachedAppSubscriptionSearchRequest](docs/AppServiceAttachedAppSubscriptionSearchRequest.md) + - [AppServiceAttachedAppSubscriptionSearchResponse](docs/AppServiceAttachedAppSubscriptionSearchResponse.md) + - [AppServiceAttachedAppSubscriptionSimpleExpression](docs/AppServiceAttachedAppSubscriptionSimpleExpression.md) + - [AppServiceAttachedAppSubscriptionSortCriteria](docs/AppServiceAttachedAppSubscriptionSortCriteria.md) + - [AppServiceAttachedAppSubscriptionSortDirection](docs/AppServiceAttachedAppSubscriptionSortDirection.md) + - [AppServiceAttachedAppSubscriptions](docs/AppServiceAttachedAppSubscriptions.md) + - [AppServiceChange](docs/AppServiceChange.md) + - [AppServiceChangeOperation](docs/AppServiceChangeOperation.md) + - [AppServiceFilter](docs/AppServiceFilter.md) + - [AppServiceFilters](docs/AppServiceFilters.md) + - [AppServiceOrFilter](docs/AppServiceOrFilter.md) + - [AppServicePostRequest](docs/AppServicePostRequest.md) + - [AppServiceSearchRequest](docs/AppServiceSearchRequest.md) + - [AppServiceSearchResponse](docs/AppServiceSearchResponse.md) + - [AppServiceSimpleExpression](docs/AppServiceSimpleExpression.md) + - [AppServiceSortCriteria](docs/AppServiceSortCriteria.md) + - [AppServiceSortDirection](docs/AppServiceSortDirection.md) + - [AppServiceState](docs/AppServiceState.md) + - [AppServiceType](docs/AppServiceType.md) + - [AppSubscription](docs/AppSubscription.md) + - [AppSubscriptionChange](docs/AppSubscriptionChange.md) + - [AppSubscriptionChangeOperation](docs/AppSubscriptionChangeOperation.md) + - [AppSubscriptionFilter](docs/AppSubscriptionFilter.md) + - [AppSubscriptionFilters](docs/AppSubscriptionFilters.md) + - [AppSubscriptionOrFilter](docs/AppSubscriptionOrFilter.md) + - [AppSubscriptionPostRequest](docs/AppSubscriptionPostRequest.md) + - [AppSubscriptionPrioritization](docs/AppSubscriptionPrioritization.md) + - [AppSubscriptionSearchRequest](docs/AppSubscriptionSearchRequest.md) + - [AppSubscriptionSearchResponse](docs/AppSubscriptionSearchResponse.md) + - [AppSubscriptionSimpleExpression](docs/AppSubscriptionSimpleExpression.md) + - [AppSubscriptionSortCriteria](docs/AppSubscriptionSortCriteria.md) + - [AppSubscriptionSortDirection](docs/AppSubscriptionSortDirection.md) + - [AppSubscriptionSource](docs/AppSubscriptionSource.md) + - [AppSubscriptionSourceAppLink](docs/AppSubscriptionSourceAppLink.md) + - [AppSubscriptionSourceRequest](docs/AppSubscriptionSourceRequest.md) + - [AppSubscriptionSourceRequestAppLink](docs/AppSubscriptionSourceRequestAppLink.md) + - [AppSubscriptionState](docs/AppSubscriptionState.md) + - [AppSubscriptionTarget](docs/AppSubscriptionTarget.md) + - [AppSubscriptionTargetAppService](docs/AppSubscriptionTargetAppService.md) + - [AppSubscriptionTargetRequest](docs/AppSubscriptionTargetRequest.md) + - [AppSubscriptionTargetRequestAppService](docs/AppSubscriptionTargetRequestAppService.md) + - [AppSubscriptionType](docs/AppSubscriptionType.md) - [Asset](docs/Asset.md) - - [AttachLogoResponse](docs/AttachLogoResponse.md) - [AttachPrivateServiceResponse](docs/AttachPrivateServiceResponse.md) - [AttachServiceProfileResponse](docs/AttachServiceProfileResponse.md) - [AttachTagResponse](docs/AttachTagResponse.md) + - [AttachedAppDomainOrder](docs/AttachedAppDomainOrder.md) + - [AttachedAppLinkOrder](docs/AttachedAppLinkOrder.md) + - [AttachedAppServiceOrder](docs/AttachedAppServiceOrder.md) + - [AttachedAppSubscriptionOrder](docs/AttachedAppSubscriptionOrder.md) - [AuthContext](docs/AuthContext.md) - [AuthenticationKey](docs/AuthenticationKey.md) - [BGPActionData](docs/BGPActionData.md) @@ -360,11 +519,10 @@ Class | Method | HTTP request | Description - [BGPConnectionIpv6](docs/BGPConnectionIpv6.md) - [BGPConnectionOperation](docs/BGPConnectionOperation.md) - [BandwidthUtilization](docs/BandwidthUtilization.md) + - [BulkOpticalConnectRequest](docs/BulkOpticalConnectRequest.md) - [BulkPhysicalPort](docs/BulkPhysicalPort.md) - - [BulkPortRequest](docs/BulkPortRequest.md) - [Change](docs/Change.md) - [Changelog](docs/Changelog.md) - - [ChatMessage](docs/ChatMessage.md) - [CloudEvent](docs/CloudEvent.md) - [CloudEventAssetType](docs/CloudEventAssetType.md) - [CloudEventData](docs/CloudEventData.md) @@ -414,6 +572,7 @@ Class | Method | HTTP request | Description - [CloudRouterPostRequest](docs/CloudRouterPostRequest.md) - [CloudRouterPostRequestBase](docs/CloudRouterPostRequestBase.md) - [CloudRouterPostRequestPackage](docs/CloudRouterPostRequestPackage.md) + - [CloudRouterReadResponse](docs/CloudRouterReadResponse.md) - [CloudRouterRouteAggregationAndExpression](docs/CloudRouterRouteAggregationAndExpression.md) - [CloudRouterRouteAggregationExpression](docs/CloudRouterRouteAggregationExpression.md) - [CloudRouterRouteAggregationOrExpression](docs/CloudRouterRouteAggregationOrExpression.md) @@ -436,14 +595,19 @@ Class | Method | HTTP request | Description - [Code](docs/Code.md) - [CompanyLogo](docs/CompanyLogo.md) - [CompanyMetro](docs/CompanyMetro.md) - - [CompanyProfileActionRequest](docs/CompanyProfileActionRequest.md) - [CompanyProfileChange](docs/CompanyProfileChange.md) + - [CompanyProfileContact](docs/CompanyProfileContact.md) + - [CompanyProfileContactContacts](docs/CompanyProfileContactContacts.md) - [CompanyProfileRequest](docs/CompanyProfileRequest.md) - [CompanyProfileResponse](docs/CompanyProfileResponse.md) - [CompanyProfileResponseAccount](docs/CompanyProfileResponseAccount.md) + - [CompanyProfileSearchFieldName](docs/CompanyProfileSearchFieldName.md) - [CompanyProfileSearchFilter](docs/CompanyProfileSearchFilter.md) + - [CompanyProfileSearchFilters](docs/CompanyProfileSearchFilters.md) + - [CompanyProfileSearchOrFilter](docs/CompanyProfileSearchOrFilter.md) - [CompanyProfileSearchRequest](docs/CompanyProfileSearchRequest.md) - [CompanyProfileSearchResponse](docs/CompanyProfileSearchResponse.md) + - [CompanyProfileSearchSimpleExpression](docs/CompanyProfileSearchSimpleExpression.md) - [CompanyProfileSortDirection](docs/CompanyProfileSortDirection.md) - [CompanyServiceProfile](docs/CompanyServiceProfile.md) - [ConnectedMetro](docs/ConnectedMetro.md) @@ -452,7 +616,6 @@ Class | Method | HTTP request | Description - [ConnectionAction](docs/ConnectionAction.md) - [ConnectionActionRequest](docs/ConnectionActionRequest.md) - [ConnectionChangeOperation](docs/ConnectionChangeOperation.md) - - [ConnectionCompanyProfile](docs/ConnectionCompanyProfile.md) - [ConnectionDirection](docs/ConnectionDirection.md) - [ConnectionInvitation](docs/ConnectionInvitation.md) - [ConnectionLink](docs/ConnectionLink.md) @@ -483,6 +646,9 @@ Class | Method | HTTP request | Description - [ConnectionType](docs/ConnectionType.md) - [ConnectivitySource](docs/ConnectivitySource.md) - [ConnectivitySourceType](docs/ConnectivitySourceType.md) + - [ContactPreference](docs/ContactPreference.md) + - [CreateLoa](docs/CreateLoa.md) + - [CreateLoaNote](docs/CreateLoaNote.md) - [CustomField](docs/CustomField.md) - [DetectionMethod](docs/DetectionMethod.md) - [DetectionMethodResponse](docs/DetectionMethodResponse.md) @@ -490,15 +656,33 @@ Class | Method | HTTP request | Description - [DirectConnectionIpv6](docs/DirectConnectionIpv6.md) - [Direction](docs/Direction.md) - [EndCustomer](docs/EndCustomer.md) + - [EnvironmentActionRequest](docs/EnvironmentActionRequest.md) + - [EnvironmentActionResponse](docs/EnvironmentActionResponse.md) + - [EnvironmentActionStateEnum](docs/EnvironmentActionStateEnum.md) + - [EnvironmentActionTypeEnum](docs/EnvironmentActionTypeEnum.md) - [EquinixStatus](docs/EquinixStatus.md) - [Error](docs/Error.md) + - [ExchangeServiceAndExpression](docs/ExchangeServiceAndExpression.md) + - [ExchangeServiceNotification](docs/ExchangeServiceNotification.md) + - [ExchangeServiceOrExpression](docs/ExchangeServiceOrExpression.md) + - [ExchangeServicePropertyExpression](docs/ExchangeServicePropertyExpression.md) + - [ExchangeServiceResponse](docs/ExchangeServiceResponse.md) + - [ExchangeServiceResponseBgp](docs/ExchangeServiceResponseBgp.md) + - [ExchangeServiceSearchExpression](docs/ExchangeServiceSearchExpression.md) + - [ExchangeServiceSearchRequest](docs/ExchangeServiceSearchRequest.md) + - [ExchangeServiceSearchResponse](docs/ExchangeServiceSearchResponse.md) + - [ExchangeServiceSearchSortCriteria](docs/ExchangeServiceSearchSortCriteria.md) - [Expression](docs/Expression.md) - [FabricCloudRouterCode](docs/FabricCloudRouterCode.md) - [FabricCloudRouterPackages](docs/FabricCloudRouterPackages.md) - [FabricCloudRouterPrice](docs/FabricCloudRouterPrice.md) - [FilterBody](docs/FilterBody.md) - - [GatewayAttachmentListResponse](docs/GatewayAttachmentListResponse.md) - - [GatewayAttachmentResponse](docs/GatewayAttachmentResponse.md) + - [Gateway](docs/Gateway.md) + - [GatewayChangeOperation](docs/GatewayChangeOperation.md) + - [GatewayIpv4](docs/GatewayIpv4.md) + - [GatewayPostRequest](docs/GatewayPostRequest.md) + - [GatewayState](docs/GatewayState.md) + - [GatewayType](docs/GatewayType.md) - [GeoCoordinates](docs/GeoCoordinates.md) - [GeoScopeType](docs/GeoScopeType.md) - [GeoZone](docs/GeoZone.md) @@ -506,7 +690,6 @@ Class | Method | HTTP request | Description - [GetAllConnectionRouteAggregationsResponse](docs/GetAllConnectionRouteAggregationsResponse.md) - [GetAllConnectionRouteFiltersResponse](docs/GetAllConnectionRouteFiltersResponse.md) - [GetAllStreamAlertRuleResponse](docs/GetAllStreamAlertRuleResponse.md) - - [GetAllStreamAssetResponse](docs/GetAllStreamAssetResponse.md) - [GetAllStreamResponse](docs/GetAllStreamResponse.md) - [GetAllStreamSubscriptionResponse](docs/GetAllStreamSubscriptionResponse.md) - [GetCloudEventsByAssetResponse](docs/GetCloudEventsByAssetResponse.md) @@ -520,6 +703,24 @@ Class | Method | HTTP request | Description - [HealthResponse](docs/HealthResponse.md) - [Hop](docs/Hop.md) - [HopProbes](docs/HopProbes.md) + - [Interconnect](docs/Interconnect.md) + - [InterconnectFilter](docs/InterconnectFilter.md) + - [InterconnectLocation](docs/InterconnectLocation.md) + - [InterconnectLocationRequest](docs/InterconnectLocationRequest.md) + - [InterconnectNotification](docs/InterconnectNotification.md) + - [InterconnectPackage](docs/InterconnectPackage.md) + - [InterconnectPostRequest](docs/InterconnectPostRequest.md) + - [InterconnectRouter](docs/InterconnectRouter.md) + - [InterconnectSearchFieldName](docs/InterconnectSearchFieldName.md) + - [InterconnectSearchRequest](docs/InterconnectSearchRequest.md) + - [InterconnectSearchResponse](docs/InterconnectSearchResponse.md) + - [InterconnectSortBy](docs/InterconnectSortBy.md) + - [InterconnectSortByResponse](docs/InterconnectSortByResponse.md) + - [InterconnectSortCriteria](docs/InterconnectSortCriteria.md) + - [InterconnectSortCriteriaResponse](docs/InterconnectSortCriteriaResponse.md) + - [InterconnectSortDirection](docs/InterconnectSortDirection.md) + - [InterconnectSortDirectionResponse](docs/InterconnectSortDirectionResponse.md) + - [InterconnectState](docs/InterconnectState.md) - [InternetAccess](docs/InternetAccess.md) - [InternetAccessAccount](docs/InternetAccessAccount.md) - [InternetAccessBilling](docs/InternetAccessBilling.md) @@ -548,7 +749,9 @@ Class | Method | HTTP request | Description - [InternetAccessPostRequestBilling](docs/InternetAccessPostRequestBilling.md) - [InternetAccessRoutingProtocol](docs/InternetAccessRoutingProtocol.md) - [InternetAccessRoutingProtocolBgp](docs/InternetAccessRoutingProtocolBgp.md) + - [InternetAccessRoutingProtocolBgpAsn](docs/InternetAccessRoutingProtocolBgpAsn.md) - [InternetAccessRoutingProtocolBgpRequest](docs/InternetAccessRoutingProtocolBgpRequest.md) + - [InternetAccessRoutingProtocolBgpRequestAsn](docs/InternetAccessRoutingProtocolBgpRequestAsn.md) - [InternetAccessRoutingProtocolDirect](docs/InternetAccessRoutingProtocolDirect.md) - [InternetAccessRoutingProtocolDirectRequest](docs/InternetAccessRoutingProtocolDirectRequest.md) - [InternetAccessRoutingProtocolRequest](docs/InternetAccessRoutingProtocolRequest.md) @@ -584,9 +787,7 @@ Class | Method | HTTP request | Description - [IpBlockType](docs/IpBlockType.md) - [IpBlocksSearchRequestBody](docs/IpBlocksSearchRequestBody.md) - [Ipv4](docs/Ipv4.md) - - [JsonPatchOperation](docs/JsonPatchOperation.md) - - [LastMileConfig](docs/LastMileConfig.md) - - [LastMileNotificationInfo](docs/LastMileNotificationInfo.md) + - [IssueLoa](docs/IssueLoa.md) - [Link](docs/Link.md) - [LinkAggregationGroup](docs/LinkAggregationGroup.md) - [LinkProtocolConnection](docs/LinkProtocolConnection.md) @@ -596,16 +797,50 @@ Class | Method | HTTP request | Description - [LinkProtocolServiceToken](docs/LinkProtocolServiceToken.md) - [LinkProtocolState](docs/LinkProtocolState.md) - [LinkProtocolType](docs/LinkProtocolType.md) + - [LoaActionData](docs/LoaActionData.md) + - [LoaActionFieldName](docs/LoaActionFieldName.md) + - [LoaActionFilter](docs/LoaActionFilter.md) + - [LoaActionOrFilter](docs/LoaActionOrFilter.md) + - [LoaActionRequest](docs/LoaActionRequest.md) + - [LoaActionResponse](docs/LoaActionResponse.md) + - [LoaActionSearchFilters](docs/LoaActionSearchFilters.md) + - [LoaActionSearchRequest](docs/LoaActionSearchRequest.md) + - [LoaActionSearchResponse](docs/LoaActionSearchResponse.md) + - [LoaActionSearchSimpleExpressions](docs/LoaActionSearchSimpleExpressions.md) + - [LoaActionSortCriteria](docs/LoaActionSortCriteria.md) - [LoaActionState](docs/LoaActionState.md) - [LoaActionType](docs/LoaActionType.md) + - [LoaChangelog](docs/LoaChangelog.md) + - [LoaConsumer](docs/LoaConsumer.md) + - [LoaConsumersResponse](docs/LoaConsumersResponse.md) + - [LoaDemarcationPoint](docs/LoaDemarcationPoint.md) + - [LoaFieldName](docs/LoaFieldName.md) + - [LoaFilter](docs/LoaFilter.md) + - [LoaIssuer](docs/LoaIssuer.md) + - [LoaLocation](docs/LoaLocation.md) + - [LoaNoteDetails](docs/LoaNoteDetails.md) + - [LoaNotesResponse](docs/LoaNotesResponse.md) + - [LoaOpEnum](docs/LoaOpEnum.md) + - [LoaOrFilter](docs/LoaOrFilter.md) + - [LoaPatchPanelConnectorType](docs/LoaPatchPanelConnectorType.md) + - [LoaProductType](docs/LoaProductType.md) + - [LoaReplaceOperation](docs/LoaReplaceOperation.md) + - [LoaRequest](docs/LoaRequest.md) + - [LoaRequestor](docs/LoaRequestor.md) + - [LoaResponse](docs/LoaResponse.md) + - [LoaResponseOperation](docs/LoaResponseOperation.md) + - [LoaSearchFilters](docs/LoaSearchFilters.md) + - [LoaSearchRequest](docs/LoaSearchRequest.md) + - [LoaSearchResponse](docs/LoaSearchResponse.md) + - [LoaSimpleExpression](docs/LoaSimpleExpression.md) + - [LoaSortCriteria](docs/LoaSortCriteria.md) - [LoaState](docs/LoaState.md) - [LoaType](docs/LoaType.md) - - [LogoRequest](docs/LogoRequest.md) - [LogoResponse](docs/LogoResponse.md) + - [MaintenanceState](docs/MaintenanceState.md) - [MarketingInfo](docs/MarketingInfo.md) - [MarketplaceSubscription](docs/MarketplaceSubscription.md) - [Md5](docs/Md5.md) - - [MessagesInner](docs/MessagesInner.md) - [MetalInterconnection](docs/MetalInterconnection.md) - [Metric](docs/Metric.md) - [MetricAssetType](docs/MetricAssetType.md) @@ -620,7 +855,6 @@ Class | Method | HTTP request | Description - [Metro](docs/Metro.md) - [MetroError](docs/MetroError.md) - [MetroResponse](docs/MetroResponse.md) - - [ModelConfiguration](docs/ModelConfiguration.md) - [ModelInterface](docs/ModelInterface.md) - [ModelPackage](docs/ModelPackage.md) - [Network](docs/Network.md) @@ -646,9 +880,41 @@ Class | Method | HTTP request | Description - [NetworkSortDirectionResponse](docs/NetworkSortDirectionResponse.md) - [NetworkState](docs/NetworkState.md) - [NetworkType](docs/NetworkType.md) - - [OpEnum](docs/OpEnum.md) - [Operation](docs/Operation.md) + - [OperationalEventFilters](docs/OperationalEventFilters.md) + - [OperationalEventSearchRequest](docs/OperationalEventSearchRequest.md) + - [OperationalEventSimpleExpression](docs/OperationalEventSimpleExpression.md) - [OperationalStatus](docs/OperationalStatus.md) + - [OperatorEnum](docs/OperatorEnum.md) + - [OpticalConnectASideRequest](docs/OpticalConnectASideRequest.md) + - [OpticalConnectASideResponse](docs/OpticalConnectASideResponse.md) + - [OpticalConnectBulk](docs/OpticalConnectBulk.md) + - [OpticalConnectConnectionDestinationType](docs/OpticalConnectConnectionDestinationType.md) + - [OpticalConnectFilter](docs/OpticalConnectFilter.md) + - [OpticalConnectFilters](docs/OpticalConnectFilters.md) + - [OpticalConnectLOA](docs/OpticalConnectLOA.md) + - [OpticalConnectLocation](docs/OpticalConnectLocation.md) + - [OpticalConnectNotification](docs/OpticalConnectNotification.md) + - [OpticalConnectOrFilter](docs/OpticalConnectOrFilter.md) + - [OpticalConnectOrder](docs/OpticalConnectOrder.md) + - [OpticalConnectPatchPanelFields](docs/OpticalConnectPatchPanelFields.md) + - [OpticalConnectPostRequest](docs/OpticalConnectPostRequest.md) + - [OpticalConnectPrice](docs/OpticalConnectPrice.md) + - [OpticalConnectPriceASide](docs/OpticalConnectPriceASide.md) + - [OpticalConnectPriceLocation](docs/OpticalConnectPriceLocation.md) + - [OpticalConnectPricePathType](docs/OpticalConnectPricePathType.md) + - [OpticalConnectPriceZSide](docs/OpticalConnectPriceZSide.md) + - [OpticalConnectRedundancy](docs/OpticalConnectRedundancy.md) + - [OpticalConnectResponse](docs/OpticalConnectResponse.md) + - [OpticalConnectSearchRequest](docs/OpticalConnectSearchRequest.md) + - [OpticalConnectServiceSearchResponse](docs/OpticalConnectServiceSearchResponse.md) + - [OpticalConnectSimpleExpression](docs/OpticalConnectSimpleExpression.md) + - [OpticalConnectSortBy](docs/OpticalConnectSortBy.md) + - [OpticalConnectSortCriteria](docs/OpticalConnectSortCriteria.md) + - [OpticalConnectSortDirection](docs/OpticalConnectSortDirection.md) + - [OpticalConnectState](docs/OpticalConnectState.md) + - [OpticalConnectZSideRequest](docs/OpticalConnectZSideRequest.md) + - [OpticalConnectZSideResponse](docs/OpticalConnectZSideResponse.md) - [Order](docs/Order.md) - [OutputStructuredPing](docs/OutputStructuredPing.md) - [OutputStructuredPingResponseItem](docs/OutputStructuredPingResponseItem.md) @@ -659,8 +925,8 @@ Class | Method | HTTP request | Description - [PaginationRequest](docs/PaginationRequest.md) - [PatchIpBlockRequestBodyItem](docs/PatchIpBlockRequestBodyItem.md) - [PatchIpBlockRequestBodyItemValue](docs/PatchIpBlockRequestBodyItemValue.md) - - [PatchOperation](docs/PatchOperation.md) - [PeeringType](docs/PeeringType.md) + - [Phone](docs/Phone.md) - [PhysicalPort](docs/PhysicalPort.md) - [PhysicalPortSettings](docs/PhysicalPortSettings.md) - [PhysicalPortType](docs/PhysicalPortType.md) @@ -719,15 +985,19 @@ Class | Method | HTTP request | Description - [PrivateService](docs/PrivateService.md) - [PrivateServiceListResponse](docs/PrivateServiceListResponse.md) - [ProcessStep](docs/ProcessStep.md) + - [ProductOffering](docs/ProductOffering.md) - [ProductType](docs/ProductType.md) - [Project](docs/Project.md) - [ProviderEnvironment](docs/ProviderEnvironment.md) - [ProviderEnvironmentTypeEnum](docs/ProviderEnvironmentTypeEnum.md) + - [ProviderEnvironments](docs/ProviderEnvironments.md) - [ProviderStatus](docs/ProviderStatus.md) - [PtpAdvanceConfiguration](docs/PtpAdvanceConfiguration.md) + - [PublicPeeringConnectionResponse](docs/PublicPeeringConnectionResponse.md) - [RaAttachmentSortItem](docs/RaAttachmentSortItem.md) - [RemoveOperation](docs/RemoveOperation.md) - [ReplaceOperation](docs/ReplaceOperation.md) + - [RequestLoa](docs/RequestLoa.md) - [ResourceData](docs/ResourceData.md) - [ResourceSelector](docs/ResourceSelector.md) - [ResourceSelectorResponse](docs/ResourceSelectorResponse.md) @@ -769,6 +1039,7 @@ Class | Method | HTTP request | Description - [RouteAggregationsPatchRequestItem](docs/RouteAggregationsPatchRequestItem.md) - [RouteAggregationsSearchRequest](docs/RouteAggregationsSearchRequest.md) - [RouteAggregationsSearchResponse](docs/RouteAggregationsSearchResponse.md) + - [RouteCollector](docs/RouteCollector.md) - [RouteFilterChangeData](docs/RouteFilterChangeData.md) - [RouteFilterChangeDataResponse](docs/RouteFilterChangeDataResponse.md) - [RouteFilterConnectionsData](docs/RouteFilterConnectionsData.md) @@ -817,6 +1088,7 @@ Class | Method | HTTP request | Description - [RouteTableEntrySortDirection](docs/RouteTableEntrySortDirection.md) - [RouteTableEntryState](docs/RouteTableEntryState.md) - [RouteTableEntryType](docs/RouteTableEntryType.md) + - [Router](docs/Router.md) - [RouterActionsConnection](docs/RouterActionsConnection.md) - [RouterActionsRouter](docs/RouterActionsRouter.md) - [RouterPackageCode](docs/RouterPackageCode.md) @@ -834,16 +1106,21 @@ Class | Method | HTTP request | Description - [RoutingProtocolDirectType](docs/RoutingProtocolDirectType.md) - [RoutingProtocolOperation](docs/RoutingProtocolOperation.md) - [RoutingProtocolProject](docs/RoutingProtocolProject.md) + - [RoutingProtocolResponse](docs/RoutingProtocolResponse.md) - [SearchAndExpression](docs/SearchAndExpression.md) - [SearchExpression](docs/SearchExpression.md) - [SearchFieldName](docs/SearchFieldName.md) - [SearchFilter](docs/SearchFilter.md) - [SearchFilterExpression](docs/SearchFilterExpression.md) + - [SearchOperationalEventResponse](docs/SearchOperationalEventResponse.md) - [SearchOrExpression](docs/SearchOrExpression.md) - [SearchRequest](docs/SearchRequest.md) - [SearchResponse](docs/SearchResponse.md) - [SearchSimpleExpression](docs/SearchSimpleExpression.md) - [SearchSortItem](docs/SearchSortItem.md) + - [SearchStreamAssetResponse](docs/SearchStreamAssetResponse.md) + - [SearchStreamResponse](docs/SearchStreamResponse.md) + - [SearchStreamSubscriptionResponse](docs/SearchStreamSubscriptionResponse.md) - [ServiceMetro](docs/ServiceMetro.md) - [ServiceMetros](docs/ServiceMetros.md) - [ServiceProfile](docs/ServiceProfile.md) @@ -858,10 +1135,9 @@ Class | Method | HTTP request | Description - [ServiceProfileAndFilter](docs/ServiceProfileAndFilter.md) - [ServiceProfileChange](docs/ServiceProfileChange.md) - [ServiceProfileFilter](docs/ServiceProfileFilter.md) - - [ServiceProfileLastMileAddress](docs/ServiceProfileLastMileAddress.md) + - [ServiceProfileLastMileApiIntegration](docs/ServiceProfileLastMileApiIntegration.md) - [ServiceProfileLastMileConfig](docs/ServiceProfileLastMileConfig.md) - [ServiceProfileLastMileDeliveryDateRange](docs/ServiceProfileLastMileDeliveryDateRange.md) - - [ServiceProfileLastMileNotification](docs/ServiceProfileLastMileNotification.md) - [ServiceProfileLastMileOffering](docs/ServiceProfileLastMileOffering.md) - [ServiceProfileLastMilePriceRange](docs/ServiceProfileLastMilePriceRange.md) - [ServiceProfileLastMileProductCatalog](docs/ServiceProfileLastMileProductCatalog.md) @@ -876,6 +1152,7 @@ Class | Method | HTTP request | Description - [ServiceProfileSortDirection](docs/ServiceProfileSortDirection.md) - [ServiceProfileStateEnum](docs/ServiceProfileStateEnum.md) - [ServiceProfileTypeEnum](docs/ServiceProfileTypeEnum.md) + - [ServiceProfileUpdateOperation](docs/ServiceProfileUpdateOperation.md) - [ServiceProfileVisibilityEnum](docs/ServiceProfileVisibilityEnum.md) - [ServiceProfiles](docs/ServiceProfiles.md) - [ServiceSearchResponse](docs/ServiceSearchResponse.md) @@ -929,6 +1206,15 @@ Class | Method | HTTP request | Description - [StreamFilterSimpleExpression](docs/StreamFilterSimpleExpression.md) - [StreamPostRequest](docs/StreamPostRequest.md) - [StreamPutRequest](docs/StreamPutRequest.md) + - [StreamSearchAsset](docs/StreamSearchAsset.md) + - [StreamSearchFilter](docs/StreamSearchFilter.md) + - [StreamSearchFilters](docs/StreamSearchFilters.md) + - [StreamSearchOrFilter](docs/StreamSearchOrFilter.md) + - [StreamSearchRequest](docs/StreamSearchRequest.md) + - [StreamSearchSimpleExpression](docs/StreamSearchSimpleExpression.md) + - [StreamSearchSortBy](docs/StreamSearchSortBy.md) + - [StreamSearchSortCriteria](docs/StreamSearchSortCriteria.md) + - [StreamSearchSortDirection](docs/StreamSearchSortDirection.md) - [StreamSubscription](docs/StreamSubscription.md) - [StreamSubscriptionFilter](docs/StreamSubscriptionFilter.md) - [StreamSubscriptionOperation](docs/StreamSubscriptionOperation.md) @@ -936,11 +1222,20 @@ Class | Method | HTTP request | Description - [StreamSubscriptionOperationErrors](docs/StreamSubscriptionOperationErrors.md) - [StreamSubscriptionPostRequest](docs/StreamSubscriptionPostRequest.md) - [StreamSubscriptionPutRequest](docs/StreamSubscriptionPutRequest.md) + - [StreamSubscriptionSearchFilter](docs/StreamSubscriptionSearchFilter.md) + - [StreamSubscriptionSearchFilters](docs/StreamSubscriptionSearchFilters.md) + - [StreamSubscriptionSearchOrFilter](docs/StreamSubscriptionSearchOrFilter.md) + - [StreamSubscriptionSearchRequest](docs/StreamSubscriptionSearchRequest.md) + - [StreamSubscriptionSearchSimpleExpression](docs/StreamSubscriptionSearchSimpleExpression.md) + - [StreamSubscriptionSearchSortBy](docs/StreamSubscriptionSearchSortBy.md) + - [StreamSubscriptionSearchSortCriteria](docs/StreamSubscriptionSearchSortCriteria.md) + - [StreamSubscriptionSearchSortDirection](docs/StreamSubscriptionSearchSortDirection.md) - [StreamSubscriptionSelector](docs/StreamSubscriptionSelector.md) - [StreamSubscriptionSink](docs/StreamSubscriptionSink.md) - [StreamSubscriptionSinkCredential](docs/StreamSubscriptionSinkCredential.md) - [StreamSubscriptionSinkResponse](docs/StreamSubscriptionSinkResponse.md) - [StreamSubscriptionSinkSetting](docs/StreamSubscriptionSinkSetting.md) + - [Style](docs/Style.md) - [SubInterface](docs/SubInterface.md) - [SubmitIpBlockRequestBody](docs/SubmitIpBlockRequestBody.md) - [SubscriptionAsset](docs/SubscriptionAsset.md) @@ -965,7 +1260,6 @@ Class | Method | HTTP request | Description - [TimeServiceSortCriteria](docs/TimeServiceSortCriteria.md) - [TimeServiceSortDirection](docs/TimeServiceSortDirection.md) - [TimeServicesSearchRequest](docs/TimeServicesSearchRequest.md) - - [ToolCallInformationInner](docs/ToolCallInformationInner.md) - [TypeOfIpBlockProduct](docs/TypeOfIpBlockProduct.md) - [ValidateConnectionResponse](docs/ValidateConnectionResponse.md) - [ValidateRequest](docs/ValidateRequest.md) diff --git a/services/fabricv4/docs/AccessPoint.md b/services/fabricv4/docs/AccessPoint.md index 2520ba16..f8a82474 100644 --- a/services/fabricv4/docs/AccessPoint.md +++ b/services/fabricv4/docs/AccessPoint.md @@ -18,6 +18,7 @@ Access point object |**virtualDevice** | [**VirtualDevice**](VirtualDevice.md) | | [optional] | |**_interface** | [**ModelInterface**](ModelInterface.md) | | [optional] | |**network** | [**SimplifiedNetwork**](SimplifiedNetwork.md) | | [optional] | +|**interconnect** | [**Interconnect**](Interconnect.md) | | [optional] | |**environment** | [**ProviderEnvironment**](ProviderEnvironment.md) | | [optional] | |**sellerRegion** | **String** | Access point seller region | [optional] | |**peeringType** | **PeeringType** | | [optional] | @@ -27,6 +28,10 @@ Access point object |**virtualNetwork** | [**VirtualNetwork**](VirtualNetwork.md) | | [optional] | |**interconnection** | [**MetalInterconnection**](MetalInterconnection.md) | | [optional] | |**role** | [**RoleEnum**](#RoleEnum) | E-Tree network connection role | [optional] | +|**productOffering** | [**ProductOffering**](ProductOffering.md) | | [optional] | +|**bandwidthCommit** | **Integer** | Bandwidth commit in Mbps | [optional] | +|**providerIdentifier** | **String** | Provider identifier | [optional] | +|**address** | [**Address**](Address.md) | | [optional] | diff --git a/services/fabricv4/docs/AccessPointType.md b/services/fabricv4/docs/AccessPointType.md index c4bf9297..41abac46 100644 --- a/services/fabricv4/docs/AccessPointType.md +++ b/services/fabricv4/docs/AccessPointType.md @@ -27,5 +27,7 @@ * `APP_LINK` (value: `"APP_LINK"`) +* `XF_IC` (value: `"XF_IC"`) + diff --git a/services/fabricv4/docs/Account.md b/services/fabricv4/docs/Account.md new file mode 100644 index 00000000..219ec8bb --- /dev/null +++ b/services/fabricv4/docs/Account.md @@ -0,0 +1,26 @@ + + +# Account + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**accountId** | **Integer** | Account identifier | [optional] | +|**accountNumber** | **Integer** | Account number | [optional] | +|**accountName** | **String** | Account name | [optional] | +|**ucmId** | **String** | Account ucm id | [optional] | +|**globalCustId** | **String** | Global customer organization id | [optional] | +|**orgId** | **Integer** | Customer organization id | [optional] | +|**organizationName** | **String** | Customer organization name | [optional] | +|**subCustomes** | [**List<Account>**](Account.md) | All sub customer accounts | [optional] | +|**countryCode** | **String** | Account country code | [optional] | +|**operationalUnit** | **String** | Account operational unit | [optional] | +|**operationalUnitMetros** | **List<String>** | Account operational unit metros | [optional] | +|**signatureRequired** | **Boolean** | Is signature required | [optional] | +|**poBearing** | **Boolean** | Purchase order bearing | [optional] | +|**_default** | **Boolean** | Default account or not | [optional] | + + + diff --git a/services/fabricv4/docs/ActivationKeyDetails.md b/services/fabricv4/docs/ActivationKeyDetails.md new file mode 100644 index 00000000..6e088bda --- /dev/null +++ b/services/fabricv4/docs/ActivationKeyDetails.md @@ -0,0 +1,18 @@ + + +# ActivationKeyDetails + +Activation Key Details Beta + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**value** | **String** | Provider Encoded activation key | [optional] | +|**providerId** | **String** | AWS Connection identifier | [optional] | +|**accountId** | **String** | Account identifier | [optional] | +|**bandwidth** | **Integer** | Bandwidth in Mbps | [optional] | +|**region** | **String** | Cloud provider region identifier | [optional] | + + + diff --git a/services/fabricv4/docs/AddOperation.md b/services/fabricv4/docs/AddOperation.md index d07ac11b..ee98815a 100644 --- a/services/fabricv4/docs/AddOperation.md +++ b/services/fabricv4/docs/AddOperation.md @@ -8,9 +8,17 @@ Add Sub-Resource to the existing model | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**op** | **OpEnum** | | | +|**op** | [**OpEnum**](#OpEnum) | | | |**path** | **String** | A JSON Pointer path. | | |**value** | **Object** | value to add | | +## Enum: OpEnum + +| Name | Value | +|---- | -----| +| ADD | "add" | + + + diff --git a/services/fabricv4/docs/Address.md b/services/fabricv4/docs/Address.md new file mode 100644 index 00000000..8d64bf73 --- /dev/null +++ b/services/fabricv4/docs/Address.md @@ -0,0 +1,20 @@ + + +# Address + +Address. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | Address identifier | [optional] | +|**streetNr** | **String** | Street number of address | [optional] | +|**streetName** | **String** | Street name of address | [optional] | +|**city** | **String** | City of address | [optional] | +|**stateOrProvince** | **String** | State of address | [optional] | +|**postCode** | **String** | Postal code of address | [optional] | +|**country** | **String** | Country of address | [optional] | + + + diff --git a/services/fabricv4/docs/AgentActivities.md b/services/fabricv4/docs/AgentActivities.md deleted file mode 100644 index 8e64d1a0..00000000 --- a/services/fabricv4/docs/AgentActivities.md +++ /dev/null @@ -1,20 +0,0 @@ - - -# AgentActivities - -Agent Activities object - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**href** | **UUID** | Agent Activities URI | [optional] | -|**type** | **String** | type | [optional] | -|**uuid** | **UUID** | Equinix-assigned agent operation identifier | [optional] [readonly] | -|**agent** | [**Agent**](Agent.md) | | [optional] | -|**status** | **String** | Agent activities state COMPLETED, PENDING, PENDING_USER_INPUT, FAILED | [optional] | -|**metadata** | [**AgentActivitiesMetadata**](AgentActivitiesMetadata.md) | | [optional] | -|**changeLog** | [**Changelog**](Changelog.md) | | [optional] | - - - diff --git a/services/fabricv4/docs/AgentActivitiesMetadata.md b/services/fabricv4/docs/AgentActivitiesMetadata.md deleted file mode 100644 index 7df6aa65..00000000 --- a/services/fabricv4/docs/AgentActivitiesMetadata.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# AgentActivitiesMetadata - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**chatMessage** | [**ChatMessage**](ChatMessage.md) | | [optional] | -|**toolCallInformation** | [**List<ToolCallInformationInner>**](ToolCallInformationInner.md) | List of tools called during the agent operation | [optional] | - - - diff --git a/services/fabricv4/docs/AgentPatchRequest.md b/services/fabricv4/docs/AgentPatchRequest.md deleted file mode 100644 index a442a7a5..00000000 --- a/services/fabricv4/docs/AgentPatchRequest.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# AgentPatchRequest - -Update Agent - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**path** | **String** | path inside document leading to updated parameters for /name, /description, /enabled, and /configration/prompt | | -|**op** | **String** | Handy shortcut for operation name | | -|**value** | **Object** | new value for updated parameter | | - - - diff --git a/services/fabricv4/docs/AgentPostRequest.md b/services/fabricv4/docs/AgentPostRequest.md deleted file mode 100644 index 0b3dcadd..00000000 --- a/services/fabricv4/docs/AgentPostRequest.md +++ /dev/null @@ -1,20 +0,0 @@ - - -# AgentPostRequest - -Create Agent - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**type** | **String** | | | -|**name** | **String** | Customer-provided agent name | | -|**description** | **String** | Customer-provided agent description | [optional] | -|**enabled** | **Boolean** | Customer-provided agent enabled status | [optional] | -|**project** | [**Project**](Project.md) | | | -|**agentTemplate** | [**AgentTemplate**](AgentTemplate.md) | | | -|**_configuration** | [**ModelConfiguration**](ModelConfiguration.md) | | [optional] | - - - diff --git a/services/fabricv4/docs/AgentTemplates.md b/services/fabricv4/docs/AgentTemplates.md deleted file mode 100644 index 41550d4e..00000000 --- a/services/fabricv4/docs/AgentTemplates.md +++ /dev/null @@ -1,35 +0,0 @@ - - -# AgentTemplates - -Agent Template object - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**href** | **UUID** | Agent Template URI | [optional] | -|**type** | **String** | type | [optional] | -|**uuid** | **UUID** | Equinix-assigned access point identifier | [optional] | -|**name** | **String** | Equinix-provided agent template name | [optional] | -|**description** | **String** | Equinix-provided agent template description | [optional] | -|**state** | [**StateEnum**](#StateEnum) | Agent state | [optional] | -|**enabled** | **Boolean** | Equinix-provided agent template enabled status | [optional] | -|**agentDefinition** | [**AgentDefinition**](AgentDefinition.md) | | [optional] | -|**changeLog** | [**Changelog**](Changelog.md) | | [optional] | - - - -## Enum: StateEnum - -| Name | Value | -|---- | -----| -| PROVISIONING | "PROVISIONING" | -| PROVISIONED | "PROVISIONED" | -| REPROVISIONING | "REPROVISIONING" | -| DEPROVISIONING | "DEPROVISIONING" | -| DEPROVISIONED | "DEPROVISIONED" | -| FAILED | "FAILED" | - - - diff --git a/services/fabricv4/docs/Agents.md b/services/fabricv4/docs/Agents.md deleted file mode 100644 index 43c3bd9f..00000000 --- a/services/fabricv4/docs/Agents.md +++ /dev/null @@ -1,37 +0,0 @@ - - -# Agents - -Agent object - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**href** | **URI** | Agent URI | [optional] [readonly] | -|**type** | **String** | type | [optional] | -|**uuid** | **UUID** | Equinix-assigned access point identifier | [optional] | -|**name** | **String** | Customer-provided agent name | [optional] | -|**description** | **String** | Customer-provided agent description | [optional] | -|**state** | [**StateEnum**](#StateEnum) | Agent state | [optional] | -|**enabled** | **Boolean** | Customer-provided agent enabled status | [optional] | -|**project** | [**Project**](Project.md) | | [optional] | -|**agentTemplate** | [**AgentTemplate**](AgentTemplate.md) | | [optional] | -|**_configuration** | [**ModelConfiguration**](ModelConfiguration.md) | | [optional] | -|**changeLog** | [**Changelog**](Changelog.md) | | [optional] | - - - -## Enum: StateEnum - -| Name | Value | -|---- | -----| -| PROVISIONING | "PROVISIONING" | -| PROVISIONED | "PROVISIONED" | -| REPROVISIONING | "REPROVISIONING" | -| DEPROVISIONING | "DEPROVISIONING" | -| DEPROVISIONED | "DEPROVISIONED" | -| FAILED | "FAILED" | - - - diff --git a/services/fabricv4/docs/AllInterconnectPackagesResponse.md b/services/fabricv4/docs/AllInterconnectPackagesResponse.md new file mode 100644 index 00000000..cc6c99e1 --- /dev/null +++ b/services/fabricv4/docs/AllInterconnectPackagesResponse.md @@ -0,0 +1,15 @@ + + +# AllInterconnectPackagesResponse + +Interconnect Packages response Beta + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**pagination** | [**Pagination**](Pagination.md) | | [optional] | +|**data** | [**List<InterconnectPackage>**](InterconnectPackage.md) | List of Interconnect Packages | | + + + diff --git a/services/fabricv4/docs/AppDomain.md b/services/fabricv4/docs/AppDomain.md new file mode 100644 index 00000000..7e91a81f --- /dev/null +++ b/services/fabricv4/docs/AppDomain.md @@ -0,0 +1,22 @@ + + +# AppDomain + +App Domain object + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**href** | **URI** | Resource URI | [optional] [readonly] | +|**type** | **AppDomainType** | | | +|**uuid** | **UUID** | Equinix-assigned access point identifier | [optional] | +|**name** | **String** | Customer-provided App Domain name | | +|**description** | **String** | Customer-provided App Domain description | [optional] | +|**state** | **AppDomainState** | | [optional] | +|**project** | [**Project**](Project.md) | | | +|**changeLog** | [**Changelog**](Changelog.md) | | [optional] | +|**change** | [**AppDomainChange**](AppDomainChange.md) | | [optional] | + + + diff --git a/services/fabricv4/docs/AppDomainAttachedAppLink.md b/services/fabricv4/docs/AppDomainAttachedAppLink.md new file mode 100644 index 00000000..12b7e085 --- /dev/null +++ b/services/fabricv4/docs/AppDomainAttachedAppLink.md @@ -0,0 +1,23 @@ + + +# AppDomainAttachedAppLink + +App Link object + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**href** | **URI** | Resource URI | [optional] [readonly] | +|**type** | **AppLinkType** | | | +|**uuid** | **UUID** | Equinix-assigned access point identifier | | +|**name** | **String** | Customer-provided App Link name | [optional] | +|**description** | **String** | Customer-provided App Link description | [optional] | +|**state** | **AppLinkState** | | [optional] | +|**router** | [**AppLinkCloudRouter**](AppLinkCloudRouter.md) | | [optional] | +|**ipv4Address** | **String** | App Link IP address | [optional] | +|**bandwidth** | **Integer** | App Link aggregated data transfer capacity in Mbps | [optional] | +|**project** | [**Project**](Project.md) | | [optional] | + + + diff --git a/services/fabricv4/docs/AppDomainAttachedAppLinks.md b/services/fabricv4/docs/AppDomainAttachedAppLinks.md new file mode 100644 index 00000000..95f55fbe --- /dev/null +++ b/services/fabricv4/docs/AppDomainAttachedAppLinks.md @@ -0,0 +1,14 @@ + + +# AppDomainAttachedAppLinks + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**pagination** | [**Pagination**](Pagination.md) | | [optional] | +|**data** | [**List<AppDomainAttachedAppLink>**](AppDomainAttachedAppLink.md) | Data returned from the API call. | [optional] | + + + diff --git a/services/fabricv4/docs/AppDomainChange.md b/services/fabricv4/docs/AppDomainChange.md new file mode 100644 index 00000000..85c6b20b --- /dev/null +++ b/services/fabricv4/docs/AppDomainChange.md @@ -0,0 +1,37 @@ + + +# AppDomainChange + +Current state of latest AppDomain change + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**uuid** | **String** | Uniquely identifies a change | [optional] | +|**type** | [**TypeEnum**](#TypeEnum) | Type of change | | +|**status** | [**StatusEnum**](#StatusEnum) | Current outcome of the change flow | [optional] | +|**createdDateTime** | **OffsetDateTime** | Set when change flow starts | [optional] | +|**updatedDateTime** | **OffsetDateTime** | Set when change object is updated | | +|**data** | [**List<AppDomainChangeOperation>**](AppDomainChangeOperation.md) | | [optional] | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| APP_DOMAIN_UPDATE | "APP_DOMAIN_UPDATE" | + + + +## Enum: StatusEnum + +| Name | Value | +|---- | -----| +| COMPLETED | "COMPLETED" | +| FAILED | "FAILED" | +| REQUESTED | "REQUESTED" | + + + diff --git a/services/fabricv4/docs/AppDomainChangeOperation.md b/services/fabricv4/docs/AppDomainChangeOperation.md new file mode 100644 index 00000000..72257dbc --- /dev/null +++ b/services/fabricv4/docs/AppDomainChangeOperation.md @@ -0,0 +1,34 @@ + + +# AppDomainChangeOperation + +App Domain change operation data + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**op** | [**OpEnum**](#OpEnum) | Handy shortcut for operation name | | +|**path** | [**PathEnum**](#PathEnum) | path inside document leading to updated parameter | | +|**value** | **Object** | new value for updated parameter | | + + + +## Enum: OpEnum + +| Name | Value | +|---- | -----| +| REPLACE | "replace" | +| ADD | "add" | +| REMOVE | "remove" | + + + +## Enum: PathEnum + +| Name | Value | +|---- | -----| +| _DESCRIPTION | "/description" | + + + diff --git a/services/fabricv4/docs/AppDomainFilter.md b/services/fabricv4/docs/AppDomainFilter.md new file mode 100644 index 00000000..b175254d --- /dev/null +++ b/services/fabricv4/docs/AppDomainFilter.md @@ -0,0 +1,16 @@ + + +# AppDomainFilter + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**property** | **String** | Possible field names to use on filters: * `/project/projectId` - project id * `/uuid` - App Domain uuid * `/name` - App Domain name * `/description` - App Domain description * `/state` - App Domain status * `/changeLog/createdDateTime` - App Domain creation timestamp * `/changeLog/updatedDateTime` - App Domain last updated timestamp * `/changeLog/deletedDateTime` - App Domain deletion timestamp | [optional] | +|**operator** | **String** | Possible operators to use on filters: * `=` - equal * `!=` - not equal * `>` - greater than * `<` - less than * `IN` - in * `NOT IN` - not in * `LIKE` - like * `ILIKE` - case-insensitive like * `BETWEEN` - between * `NOT BETWEEN` - not between | [optional] | +|**values** | **List<String>** | | [optional] | +|**or** | [**List<AppDomainSimpleExpression>**](AppDomainSimpleExpression.md) | | [optional] | + + + diff --git a/services/fabricv4/docs/BulkPortRequest.md b/services/fabricv4/docs/AppDomainFilters.md similarity index 50% rename from services/fabricv4/docs/BulkPortRequest.md rename to services/fabricv4/docs/AppDomainFilters.md index 24b58dfe..4c222b6e 100644 --- a/services/fabricv4/docs/BulkPortRequest.md +++ b/services/fabricv4/docs/AppDomainFilters.md @@ -1,14 +1,13 @@ -# BulkPortRequest +# AppDomainFilters -Create bulk port request ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**data** | [**List<PortRequest>**](PortRequest.md) | | [optional] | +|**and** | [**List<AppDomainFilter>**](AppDomainFilter.md) | | [optional] | diff --git a/services/fabricv4/docs/AppDomainOrFilter.md b/services/fabricv4/docs/AppDomainOrFilter.md new file mode 100644 index 00000000..339ff84f --- /dev/null +++ b/services/fabricv4/docs/AppDomainOrFilter.md @@ -0,0 +1,13 @@ + + +# AppDomainOrFilter + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**or** | [**List<AppDomainSimpleExpression>**](AppDomainSimpleExpression.md) | | [optional] | + + + diff --git a/services/fabricv4/docs/AppDomainPostRequest.md b/services/fabricv4/docs/AppDomainPostRequest.md new file mode 100644 index 00000000..14ad6394 --- /dev/null +++ b/services/fabricv4/docs/AppDomainPostRequest.md @@ -0,0 +1,17 @@ + + +# AppDomainPostRequest + +Create App Domain + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | **AppDomainType** | | | +|**name** | **String** | Customer-provided App Domain name | | +|**description** | **String** | Customer-provided App Domain description | [optional] | +|**project** | [**Project**](Project.md) | | | + + + diff --git a/services/fabricv4/docs/AppDomainSearchRequest.md b/services/fabricv4/docs/AppDomainSearchRequest.md new file mode 100644 index 00000000..13266b7c --- /dev/null +++ b/services/fabricv4/docs/AppDomainSearchRequest.md @@ -0,0 +1,16 @@ + + +# AppDomainSearchRequest + +Search requests containing criteria + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**filter** | [**AppDomainFilters**](AppDomainFilters.md) | | [optional] | +|**pagination** | [**PaginationRequest**](PaginationRequest.md) | | [optional] | +|**sort** | [**List<AppDomainSortCriteria>**](AppDomainSortCriteria.md) | | [optional] | + + + diff --git a/services/fabricv4/docs/GetAllStreamAssetResponse.md b/services/fabricv4/docs/AppDomainSearchResponse.md similarity index 58% rename from services/fabricv4/docs/GetAllStreamAssetResponse.md rename to services/fabricv4/docs/AppDomainSearchResponse.md index 4d5f1efc..9be1d603 100644 --- a/services/fabricv4/docs/GetAllStreamAssetResponse.md +++ b/services/fabricv4/docs/AppDomainSearchResponse.md @@ -1,6 +1,6 @@ -# GetAllStreamAssetResponse +# AppDomainSearchResponse ## Properties @@ -8,7 +8,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**pagination** | [**Pagination**](Pagination.md) | | [optional] | -|**data** | [**List<StreamAsset>**](StreamAsset.md) | Data returned from the API call. | [optional] | +|**data** | [**List<AppDomain>**](AppDomain.md) | Data returned from the API call. | [optional] | diff --git a/services/fabricv4/docs/AppDomainSimpleExpression.md b/services/fabricv4/docs/AppDomainSimpleExpression.md new file mode 100644 index 00000000..da08d05c --- /dev/null +++ b/services/fabricv4/docs/AppDomainSimpleExpression.md @@ -0,0 +1,15 @@ + + +# AppDomainSimpleExpression + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**property** | **String** | Possible field names to use on filters: * `/project/projectId` - project id * `/uuid` - App Domain uuid * `/name` - App Domain name * `/description` - App Domain description * `/state` - App Domain status * `/changeLog/createdDateTime` - App Domain creation timestamp * `/changeLog/updatedDateTime` - App Domain last updated timestamp * `/changeLog/deletedDateTime` - App Domain deletion timestamp | [optional] | +|**operator** | **String** | Possible operators to use on filters: * `=` - equal * `!=` - not equal * `>` - greater than * `<` - less than * `IN` - in * `NOT IN` - not in * `LIKE` - like * `ILIKE` - case-insensitive like * `BETWEEN` - between * `NOT BETWEEN` - not between | [optional] | +|**values** | **List<String>** | | [optional] | + + + diff --git a/services/fabricv4/docs/AppDomainSortCriteria.md b/services/fabricv4/docs/AppDomainSortCriteria.md new file mode 100644 index 00000000..3497a777 --- /dev/null +++ b/services/fabricv4/docs/AppDomainSortCriteria.md @@ -0,0 +1,14 @@ + + +# AppDomainSortCriteria + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**direction** | **AppDomainSortDirection** | | [optional] | +|**property** | **String** | Possible field names to use on '400_InvalidSorting': * `/name` - App Domain name * `/uuid` - App Domain uuid * `/state` - App Domain status * `/changeLog/createdDateTime` - Date and time when change flow starts * `/changeLog/updatedDateTime` - Date and time when change object is updated | [optional] | + + + diff --git a/services/fabricv4/docs/AppDomainSortDirection.md b/services/fabricv4/docs/AppDomainSortDirection.md new file mode 100644 index 00000000..f52f9997 --- /dev/null +++ b/services/fabricv4/docs/AppDomainSortDirection.md @@ -0,0 +1,13 @@ + + +# AppDomainSortDirection + +## Enum + + +* `DESC` (value: `"DESC"`) + +* `ASC` (value: `"ASC"`) + + + diff --git a/services/fabricv4/docs/AppDomainState.md b/services/fabricv4/docs/AppDomainState.md new file mode 100644 index 00000000..3f4f144b --- /dev/null +++ b/services/fabricv4/docs/AppDomainState.md @@ -0,0 +1,21 @@ + + +# AppDomainState + +## Enum + + +* `PENDING_VERIFICATION` (value: `"PENDING_VERIFICATION"`) + +* `PROVISIONING_FAILED` (value: `"PROVISIONING_FAILED"`) + +* `PROVISIONED` (value: `"PROVISIONED"`) + +* `DEPROVISIONING` (value: `"DEPROVISIONING"`) + +* `DEPROVISIONING_FAILED` (value: `"DEPROVISIONING_FAILED"`) + +* `DEPROVISIONED` (value: `"DEPROVISIONED"`) + + + diff --git a/services/fabricv4/docs/AppDomainType.md b/services/fabricv4/docs/AppDomainType.md new file mode 100644 index 00000000..e5f76a17 --- /dev/null +++ b/services/fabricv4/docs/AppDomainType.md @@ -0,0 +1,11 @@ + + +# AppDomainType + +## Enum + + +* `APP_DOMAIN` (value: `"APP_DOMAIN"`) + + + diff --git a/services/fabricv4/docs/AppLink.md b/services/fabricv4/docs/AppLink.md new file mode 100644 index 00000000..3174c99f --- /dev/null +++ b/services/fabricv4/docs/AppLink.md @@ -0,0 +1,25 @@ + + +# AppLink + +App Link object + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**href** | **URI** | Resource URI | [optional] [readonly] | +|**type** | **AppLinkType** | | | +|**uuid** | **UUID** | Equinix-assigned access point identifier | [optional] | +|**name** | **String** | Customer-provided App Link name | | +|**description** | **String** | Customer-provided App Link description | [optional] | +|**state** | **AppLinkState** | | [optional] | +|**router** | [**AppLinkCloudRouter**](AppLinkCloudRouter.md) | | | +|**ipv4Address** | **String** | App Link IP address | [optional] | +|**bandwidth** | **Integer** | App Link aggregated data transfer capacity in Mbps | | +|**project** | [**Project**](Project.md) | | | +|**changeLog** | [**Changelog**](Changelog.md) | | [optional] | +|**change** | [**AppLinkChange**](AppLinkChange.md) | | [optional] | + + + diff --git a/services/fabricv4/docs/AppLinkAppDomainAttachment.md b/services/fabricv4/docs/AppLinkAppDomainAttachment.md new file mode 100644 index 00000000..db4804d1 --- /dev/null +++ b/services/fabricv4/docs/AppLinkAppDomainAttachment.md @@ -0,0 +1,19 @@ + + +# AppLinkAppDomainAttachment + +App Link Attached App Domain object + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**href** | **URI** | Resource URI | [optional] [readonly] | +|**type** | **AppDomainType** | | [optional] | +|**uuid** | **UUID** | Equinix-assigned access point identifier | | +|**name** | **String** | Customer-provided App Domain name | [optional] | +|**attachmentStatus** | **AppLinkAttachState** | | [optional] | +|**changeLog** | [**Changelog**](Changelog.md) | | [optional] | + + + diff --git a/services/fabricv4/docs/AppLinkAppServiceAttachment.md b/services/fabricv4/docs/AppLinkAppServiceAttachment.md new file mode 100644 index 00000000..9610f012 --- /dev/null +++ b/services/fabricv4/docs/AppLinkAppServiceAttachment.md @@ -0,0 +1,21 @@ + + +# AppLinkAppServiceAttachment + +App Link Attached App Service object + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**href** | **URI** | Resource URI | [optional] [readonly] | +|**type** | **AppServiceType** | | [optional] | +|**uuid** | **UUID** | Equinix-assigned access point identifier | | +|**geoScope** | **String** | Geo scope for the App Service | | +|**destinationIp** | **String** | Target IP for forwarding API requests | | +|**attachmentStatus** | **AppLinkAttachState** | | [optional] | +|**changeLog** | [**Changelog**](Changelog.md) | | [optional] | +|**change** | [**AppLinkAppServiceAttachmentChange**](AppLinkAppServiceAttachmentChange.md) | | [optional] | + + + diff --git a/services/fabricv4/docs/AppLinkAppServiceAttachmentChange.md b/services/fabricv4/docs/AppLinkAppServiceAttachmentChange.md new file mode 100644 index 00000000..88aeb4fa --- /dev/null +++ b/services/fabricv4/docs/AppLinkAppServiceAttachmentChange.md @@ -0,0 +1,37 @@ + + +# AppLinkAppServiceAttachmentChange + +Current state of latest AppLink change + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**uuid** | **String** | Uniquely identifies a change | [optional] | +|**type** | [**TypeEnum**](#TypeEnum) | Type of change | | +|**status** | [**StatusEnum**](#StatusEnum) | Current outcome of the change flow | [optional] | +|**createdDateTime** | **OffsetDateTime** | Set when change flow starts | [optional] | +|**updatedDateTime** | **OffsetDateTime** | Set when change object is updated | | +|**data** | [**List<AppLinkChangeOperation>**](AppLinkChangeOperation.md) | | [optional] | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| APP_LINK_UPDATE | "APP_LINK_UPDATE" | + + + +## Enum: StatusEnum + +| Name | Value | +|---- | -----| +| COMPLETED | "COMPLETED" | +| FAILED | "FAILED" | +| REQUESTED | "REQUESTED" | + + + diff --git a/services/fabricv4/docs/AppLinkAppServiceAttachmentChangeOperation.md b/services/fabricv4/docs/AppLinkAppServiceAttachmentChangeOperation.md new file mode 100644 index 00000000..53fbba07 --- /dev/null +++ b/services/fabricv4/docs/AppLinkAppServiceAttachmentChangeOperation.md @@ -0,0 +1,34 @@ + + +# AppLinkAppServiceAttachmentChangeOperation + +App Link change operation data + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**op** | [**OpEnum**](#OpEnum) | Handy shortcut for operation name | | +|**path** | [**PathEnum**](#PathEnum) | path inside document leading to updated parameter | | +|**value** | **Object** | new value for updated parameter | | + + + +## Enum: OpEnum + +| Name | Value | +|---- | -----| +| REPLACE | "replace" | +| ADD | "add" | +| REMOVE | "remove" | + + + +## Enum: PathEnum + +| Name | Value | +|---- | -----| +| _DESTINATIONIP | "/destinationIp" | + + + diff --git a/services/fabricv4/docs/AppLinkAttachDomainFilter.md b/services/fabricv4/docs/AppLinkAttachDomainFilter.md new file mode 100644 index 00000000..5a66907c --- /dev/null +++ b/services/fabricv4/docs/AppLinkAttachDomainFilter.md @@ -0,0 +1,16 @@ + + +# AppLinkAttachDomainFilter + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**property** | **String** | Possible field names to use on filters: * `/uuid` - App Domain attach to App Link uuid * `/attachmentStatus` - App Domain attach to App Link status | [optional] | +|**operator** | **String** | Possible operators to use on filters: * `=` - equal * `!=` - not equal * `IN` - in * `NOT IN` - not in | [optional] | +|**values** | **List<String>** | | [optional] | +|**or** | [**List<AppLinkAttachDomainSimpleExpression>**](AppLinkAttachDomainSimpleExpression.md) | | [optional] | + + + diff --git a/services/fabricv4/docs/AppLinkAttachDomainFilters.md b/services/fabricv4/docs/AppLinkAttachDomainFilters.md new file mode 100644 index 00000000..63a446a3 --- /dev/null +++ b/services/fabricv4/docs/AppLinkAttachDomainFilters.md @@ -0,0 +1,13 @@ + + +# AppLinkAttachDomainFilters + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**and** | [**List<AppLinkAttachDomainFilter>**](AppLinkAttachDomainFilter.md) | | [optional] | + + + diff --git a/services/fabricv4/docs/AppLinkAttachDomainOrFilter.md b/services/fabricv4/docs/AppLinkAttachDomainOrFilter.md new file mode 100644 index 00000000..50e7a37c --- /dev/null +++ b/services/fabricv4/docs/AppLinkAttachDomainOrFilter.md @@ -0,0 +1,13 @@ + + +# AppLinkAttachDomainOrFilter + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**or** | [**List<AppLinkAttachDomainSimpleExpression>**](AppLinkAttachDomainSimpleExpression.md) | | [optional] | + + + diff --git a/services/fabricv4/docs/AppLinkAttachDomainSearchRequest.md b/services/fabricv4/docs/AppLinkAttachDomainSearchRequest.md new file mode 100644 index 00000000..36eadbcd --- /dev/null +++ b/services/fabricv4/docs/AppLinkAttachDomainSearchRequest.md @@ -0,0 +1,16 @@ + + +# AppLinkAttachDomainSearchRequest + +Search requests containing criteria + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**filter** | [**AppLinkAttachDomainFilters**](AppLinkAttachDomainFilters.md) | | [optional] | +|**pagination** | [**PaginationRequest**](PaginationRequest.md) | | [optional] | +|**sort** | [**List<AppLinkAttachDomainSortCriteria>**](AppLinkAttachDomainSortCriteria.md) | | [optional] | + + + diff --git a/services/fabricv4/docs/AppLinkAttachDomainSearchResponse.md b/services/fabricv4/docs/AppLinkAttachDomainSearchResponse.md new file mode 100644 index 00000000..4f680475 --- /dev/null +++ b/services/fabricv4/docs/AppLinkAttachDomainSearchResponse.md @@ -0,0 +1,14 @@ + + +# AppLinkAttachDomainSearchResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**pagination** | [**Pagination**](Pagination.md) | | [optional] | +|**data** | [**List<AppLinkAppDomainAttachment>**](AppLinkAppDomainAttachment.md) | Data returned from the API call. | [optional] | + + + diff --git a/services/fabricv4/docs/AppLinkAttachDomainSimpleExpression.md b/services/fabricv4/docs/AppLinkAttachDomainSimpleExpression.md new file mode 100644 index 00000000..9a9f36a0 --- /dev/null +++ b/services/fabricv4/docs/AppLinkAttachDomainSimpleExpression.md @@ -0,0 +1,15 @@ + + +# AppLinkAttachDomainSimpleExpression + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**property** | **String** | Possible field names to use on filters: * `/uuid` - App Domain attach to App Link uuid * `/attachmentStatus` - App Domain attach to App Link status | [optional] | +|**operator** | **String** | Possible operators to use on filters: * `=` - equal * `!=` - not equal * `IN` - in * `NOT IN` - not in | [optional] | +|**values** | **List<String>** | | [optional] | + + + diff --git a/services/fabricv4/docs/AppLinkAttachDomainSortCriteria.md b/services/fabricv4/docs/AppLinkAttachDomainSortCriteria.md new file mode 100644 index 00000000..eb2e53ba --- /dev/null +++ b/services/fabricv4/docs/AppLinkAttachDomainSortCriteria.md @@ -0,0 +1,14 @@ + + +# AppLinkAttachDomainSortCriteria + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**direction** | **AppLinkAttachDomainSortDirection** | | [optional] | +|**property** | **String** | Possible field names to use on '400_InvalidSorting': * `/uuid` - App Domain attach to App Link uuid * `/attachmentStatus` - App Domain attach to App Link status * `/changeLog/createdDateTime` - Date and time when change flow starts * `/changeLog/updatedDateTime` - Date and time when change object is updated | [optional] | + + + diff --git a/services/fabricv4/docs/AppLinkAttachDomainSortDirection.md b/services/fabricv4/docs/AppLinkAttachDomainSortDirection.md new file mode 100644 index 00000000..b55cf669 --- /dev/null +++ b/services/fabricv4/docs/AppLinkAttachDomainSortDirection.md @@ -0,0 +1,13 @@ + + +# AppLinkAttachDomainSortDirection + +## Enum + + +* `DESC` (value: `"DESC"`) + +* `ASC` (value: `"ASC"`) + + + diff --git a/services/fabricv4/docs/AppLinkAttachServiceFilter.md b/services/fabricv4/docs/AppLinkAttachServiceFilter.md new file mode 100644 index 00000000..5db8ec99 --- /dev/null +++ b/services/fabricv4/docs/AppLinkAttachServiceFilter.md @@ -0,0 +1,16 @@ + + +# AppLinkAttachServiceFilter + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**property** | **String** | Possible field names to use on filters: * `/uuid` - App Service attach to App Link uuid * `/attachmentStatus` - App Service attach to App Link status | [optional] | +|**operator** | **String** | Possible operators to use on filters: * `=` - equal * `!=` - not equal * `IN` - in * `NOT IN` - not in | [optional] | +|**values** | **List<String>** | | [optional] | +|**or** | [**List<AppLinkAttachServiceSimpleExpression>**](AppLinkAttachServiceSimpleExpression.md) | | [optional] | + + + diff --git a/services/fabricv4/docs/AppLinkAttachServiceFilters.md b/services/fabricv4/docs/AppLinkAttachServiceFilters.md new file mode 100644 index 00000000..6407b3be --- /dev/null +++ b/services/fabricv4/docs/AppLinkAttachServiceFilters.md @@ -0,0 +1,13 @@ + + +# AppLinkAttachServiceFilters + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**and** | [**List<AppLinkAttachServiceFilter>**](AppLinkAttachServiceFilter.md) | | [optional] | + + + diff --git a/services/fabricv4/docs/AppLinkAttachServiceOrFilter.md b/services/fabricv4/docs/AppLinkAttachServiceOrFilter.md new file mode 100644 index 00000000..f7bad38f --- /dev/null +++ b/services/fabricv4/docs/AppLinkAttachServiceOrFilter.md @@ -0,0 +1,13 @@ + + +# AppLinkAttachServiceOrFilter + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**or** | [**List<AppLinkAttachServiceSimpleExpression>**](AppLinkAttachServiceSimpleExpression.md) | | [optional] | + + + diff --git a/services/fabricv4/docs/AppLinkAttachServiceRequest.md b/services/fabricv4/docs/AppLinkAttachServiceRequest.md new file mode 100644 index 00000000..447cef42 --- /dev/null +++ b/services/fabricv4/docs/AppLinkAttachServiceRequest.md @@ -0,0 +1,15 @@ + + +# AppLinkAttachServiceRequest + +Attach App Service to App Link + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**geoScope** | **String** | Geo scope for the App Service | | +|**destinationIp** | **String** | Target IP for forwarding API requests | | + + + diff --git a/services/fabricv4/docs/AppLinkAttachServiceSearchRequest.md b/services/fabricv4/docs/AppLinkAttachServiceSearchRequest.md new file mode 100644 index 00000000..563aca89 --- /dev/null +++ b/services/fabricv4/docs/AppLinkAttachServiceSearchRequest.md @@ -0,0 +1,16 @@ + + +# AppLinkAttachServiceSearchRequest + +Search requests containing criteria + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**filter** | [**AppLinkAttachServiceFilters**](AppLinkAttachServiceFilters.md) | | [optional] | +|**pagination** | [**PaginationRequest**](PaginationRequest.md) | | [optional] | +|**sort** | [**List<AppLinkAttachServiceSortCriteria>**](AppLinkAttachServiceSortCriteria.md) | | [optional] | + + + diff --git a/services/fabricv4/docs/AppLinkAttachServiceSearchResponse.md b/services/fabricv4/docs/AppLinkAttachServiceSearchResponse.md new file mode 100644 index 00000000..a1039a98 --- /dev/null +++ b/services/fabricv4/docs/AppLinkAttachServiceSearchResponse.md @@ -0,0 +1,14 @@ + + +# AppLinkAttachServiceSearchResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**pagination** | [**Pagination**](Pagination.md) | | [optional] | +|**data** | [**List<AppLinkAppServiceAttachment>**](AppLinkAppServiceAttachment.md) | Data returned from the API call. | [optional] | + + + diff --git a/services/fabricv4/docs/AppLinkAttachServiceSimpleExpression.md b/services/fabricv4/docs/AppLinkAttachServiceSimpleExpression.md new file mode 100644 index 00000000..88f99e9c --- /dev/null +++ b/services/fabricv4/docs/AppLinkAttachServiceSimpleExpression.md @@ -0,0 +1,15 @@ + + +# AppLinkAttachServiceSimpleExpression + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**property** | **String** | Possible field names to use on filters: * `/uuid` - App Service attach to App Link uuid * `/attachmentStatus` - App Service attach to App Link status | [optional] | +|**operator** | **String** | Possible operators to use on filters: * `=` - equal * `!=` - not equal * `IN` - in * `NOT IN` - not in | [optional] | +|**values** | **List<String>** | | [optional] | + + + diff --git a/services/fabricv4/docs/AppLinkAttachServiceSortCriteria.md b/services/fabricv4/docs/AppLinkAttachServiceSortCriteria.md new file mode 100644 index 00000000..41bcd23a --- /dev/null +++ b/services/fabricv4/docs/AppLinkAttachServiceSortCriteria.md @@ -0,0 +1,14 @@ + + +# AppLinkAttachServiceSortCriteria + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**direction** | **AppLinkAttachServiceSortDirection** | | [optional] | +|**property** | **String** | Possible field names to use on '400_InvalidSorting': * `/uuid` - App Service attach to App Link uuid * `/attachmentStatus` - App Service attach to App Link status * `/changeLog/createdDateTime` - Date and time when change flow starts * `/changeLog/updatedDateTime` - Date and time when change object is updated | [optional] | + + + diff --git a/services/fabricv4/docs/AppLinkAttachServiceSortDirection.md b/services/fabricv4/docs/AppLinkAttachServiceSortDirection.md new file mode 100644 index 00000000..13e1ea74 --- /dev/null +++ b/services/fabricv4/docs/AppLinkAttachServiceSortDirection.md @@ -0,0 +1,13 @@ + + +# AppLinkAttachServiceSortDirection + +## Enum + + +* `DESC` (value: `"DESC"`) + +* `ASC` (value: `"ASC"`) + + + diff --git a/services/fabricv4/docs/AppLinkAttachState.md b/services/fabricv4/docs/AppLinkAttachState.md new file mode 100644 index 00000000..df3dc7e6 --- /dev/null +++ b/services/fabricv4/docs/AppLinkAttachState.md @@ -0,0 +1,19 @@ + + +# AppLinkAttachState + +## Enum + + +* `ATTACHING` (value: `"ATTACHING"`) + +* `ATTACHED` (value: `"ATTACHED"`) + +* `DETACHING` (value: `"DETACHING"`) + +* `DETACHED` (value: `"DETACHED"`) + +* `FAILED` (value: `"FAILED"`) + + + diff --git a/services/fabricv4/docs/AppLinkAttachedAppDomain.md b/services/fabricv4/docs/AppLinkAttachedAppDomain.md new file mode 100644 index 00000000..d083be9c --- /dev/null +++ b/services/fabricv4/docs/AppLinkAttachedAppDomain.md @@ -0,0 +1,21 @@ + + +# AppLinkAttachedAppDomain + +App Domain object associated with App Link + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**href** | **URI** | Resource URI | [optional] [readonly] | +|**type** | **AppDomainType** | | | +|**uuid** | **UUID** | Equinix-assigned access point identifier | | +|**name** | **String** | Customer-provided App Domain name | [optional] | +|**description** | **String** | Customer-provided App Domain description | [optional] | +|**state** | **AppDomainState** | | [optional] | +|**project** | [**Project**](Project.md) | | [optional] | +|**attachmentStatus** | **AppLinkAttachState** | | [optional] | + + + diff --git a/services/fabricv4/docs/AppLinkAttachedAppDomains.md b/services/fabricv4/docs/AppLinkAttachedAppDomains.md new file mode 100644 index 00000000..d7bb6fd7 --- /dev/null +++ b/services/fabricv4/docs/AppLinkAttachedAppDomains.md @@ -0,0 +1,14 @@ + + +# AppLinkAttachedAppDomains + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**pagination** | [**Pagination**](Pagination.md) | | [optional] | +|**data** | [**List<AppLinkAttachedAppDomain>**](AppLinkAttachedAppDomain.md) | Data returned from the API call. | [optional] | + + + diff --git a/services/fabricv4/docs/AppLinkAttachedAppService.md b/services/fabricv4/docs/AppLinkAttachedAppService.md new file mode 100644 index 00000000..a4d898b6 --- /dev/null +++ b/services/fabricv4/docs/AppLinkAttachedAppService.md @@ -0,0 +1,25 @@ + + +# AppLinkAttachedAppService + +App Service object associated with App Link + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**href** | **URI** | Resource URI | [optional] [readonly] | +|**type** | **AppServiceType** | | | +|**uuid** | **UUID** | Equinix-assigned access point identifier | | +|**name** | **String** | Customer-provided App Service name | [optional] | +|**description** | **String** | Customer-provided App Service description | [optional] | +|**state** | **AppServiceState** | | [optional] | +|**endpoint** | **String** | Accessible endpoint through this service | [optional] | +|**sourceDomains** | **List<String>** | List of source domains from where traffic is allowed | [optional] | +|**project** | [**Project**](Project.md) | | [optional] | +|**geoScope** | **String** | Geo scope for the App Service | | +|**destinationIp** | **String** | Target IP for forwarding API requests | | +|**attachmentStatus** | **AppLinkAttachState** | | [optional] | + + + diff --git a/services/fabricv4/docs/AppLinkAttachedAppServices.md b/services/fabricv4/docs/AppLinkAttachedAppServices.md new file mode 100644 index 00000000..8967fd17 --- /dev/null +++ b/services/fabricv4/docs/AppLinkAttachedAppServices.md @@ -0,0 +1,14 @@ + + +# AppLinkAttachedAppServices + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**pagination** | [**Pagination**](Pagination.md) | | [optional] | +|**data** | [**List<AppLinkAttachedAppService>**](AppLinkAttachedAppService.md) | Data returned from the API call. | [optional] | + + + diff --git a/services/fabricv4/docs/AppLinkChange.md b/services/fabricv4/docs/AppLinkChange.md new file mode 100644 index 00000000..e4b2c36f --- /dev/null +++ b/services/fabricv4/docs/AppLinkChange.md @@ -0,0 +1,37 @@ + + +# AppLinkChange + +Current state of latest AppLink change + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**uuid** | **String** | Uniquely identifies a change | [optional] | +|**type** | [**TypeEnum**](#TypeEnum) | Type of change | | +|**status** | [**StatusEnum**](#StatusEnum) | Current outcome of the change flow | [optional] | +|**createdDateTime** | **OffsetDateTime** | Set when change flow starts | [optional] | +|**updatedDateTime** | **OffsetDateTime** | Set when change object is updated | | +|**data** | [**List<AppLinkChangeOperation>**](AppLinkChangeOperation.md) | | [optional] | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| APP_LINK_UPDATE | "APP_LINK_UPDATE" | + + + +## Enum: StatusEnum + +| Name | Value | +|---- | -----| +| COMPLETED | "COMPLETED" | +| FAILED | "FAILED" | +| REQUESTED | "REQUESTED" | + + + diff --git a/services/fabricv4/docs/AppLinkChangeOperation.md b/services/fabricv4/docs/AppLinkChangeOperation.md new file mode 100644 index 00000000..5732c53a --- /dev/null +++ b/services/fabricv4/docs/AppLinkChangeOperation.md @@ -0,0 +1,37 @@ + + +# AppLinkChangeOperation + +App Link change operation data + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**op** | [**OpEnum**](#OpEnum) | Handy shortcut for operation name | | +|**path** | [**PathEnum**](#PathEnum) | path inside document leading to updated parameter | | +|**value** | **Object** | new value for updated parameter | | + + + +## Enum: OpEnum + +| Name | Value | +|---- | -----| +| REPLACE | "replace" | +| ADD | "add" | +| REMOVE | "remove" | + + + +## Enum: PathEnum + +| Name | Value | +|---- | -----| +| NAME | "/name" | +| DESCRIPTION | "/description" | +| BANDWIDTH | "/bandwidth" | +| IPV4ADDRESS | "/ipv4Address" | + + + diff --git a/services/fabricv4/docs/AppLinkCloudRouter.md b/services/fabricv4/docs/AppLinkCloudRouter.md new file mode 100644 index 00000000..fb9a85cb --- /dev/null +++ b/services/fabricv4/docs/AppLinkCloudRouter.md @@ -0,0 +1,24 @@ + + +# AppLinkCloudRouter + +App Link Cloud Router + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**href** | **URI** | Resource URI | [optional] | +|**type** | [**TypeEnum**](#TypeEnum) | Cloud Router Type | [optional] | +|**uuid** | **UUID** | Cloud Router UUID | [optional] | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| XF_ROUTER | "XF_ROUTER" | + + + diff --git a/services/fabricv4/docs/AppLinkFilter.md b/services/fabricv4/docs/AppLinkFilter.md new file mode 100644 index 00000000..5f19f099 --- /dev/null +++ b/services/fabricv4/docs/AppLinkFilter.md @@ -0,0 +1,16 @@ + + +# AppLinkFilter + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**property** | **String** | Possible field names to use on filters: * `/project/projectId` - project id * `/uuid` - App Link uuid * `/name` - App Link name * `/description` - App Link description * `/state` - App Link status * `/ipv4Address` - App Link ipv4 address * `/bandwidth` - App Link bandwidth * `/changeLog/createdDateTime` - App Link creation timestamp * `/changeLog/updatedDateTime` - App Link last updated timestamp * `/changeLog/deletedDateTime` - App Link deletion timestamp | [optional] | +|**operator** | **String** | Possible operators to use on filters: * `=` - equal * `!=` - not equal * `>` - greater than * `<` - less than * `IN` - in * `NOT IN` - not in * `LIKE` - like * `ILIKE` - case-insensitive like * `BETWEEN` - between * `NOT BETWEEN` - not between | [optional] | +|**values** | **List<String>** | | [optional] | +|**or** | [**List<AppLinkSimpleExpression>**](AppLinkSimpleExpression.md) | | [optional] | + + + diff --git a/services/fabricv4/docs/AgentDefinition.md b/services/fabricv4/docs/AppLinkFilters.md similarity index 55% rename from services/fabricv4/docs/AgentDefinition.md rename to services/fabricv4/docs/AppLinkFilters.md index f996478d..8ce432b5 100644 --- a/services/fabricv4/docs/AgentDefinition.md +++ b/services/fabricv4/docs/AppLinkFilters.md @@ -1,13 +1,13 @@ -# AgentDefinition +# AppLinkFilters ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**url** | **String** | Agent Template ReadMe (.md) Definition | [optional] | +|**and** | [**List<AppLinkFilter>**](AppLinkFilter.md) | | [optional] | diff --git a/services/fabricv4/docs/AppLinkOrFilter.md b/services/fabricv4/docs/AppLinkOrFilter.md new file mode 100644 index 00000000..4f72882c --- /dev/null +++ b/services/fabricv4/docs/AppLinkOrFilter.md @@ -0,0 +1,13 @@ + + +# AppLinkOrFilter + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**or** | [**List<AppLinkSimpleExpression>**](AppLinkSimpleExpression.md) | | [optional] | + + + diff --git a/services/fabricv4/docs/AppLinkPostRequest.md b/services/fabricv4/docs/AppLinkPostRequest.md new file mode 100644 index 00000000..6eb18270 --- /dev/null +++ b/services/fabricv4/docs/AppLinkPostRequest.md @@ -0,0 +1,20 @@ + + +# AppLinkPostRequest + +Create App Link + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | **AppLinkType** | | | +|**name** | **String** | Customer-provided App Link name | | +|**description** | **String** | Customer-provided App Link description | [optional] | +|**router** | [**AppLinkPostRequestRouter**](AppLinkPostRequestRouter.md) | | | +|**ipv4Address** | **String** | AppLink IP address | [optional] | +|**bandwidth** | **Integer** | App Link aggregated data transfer capacity in Mbps | | +|**project** | [**Project**](Project.md) | | | + + + diff --git a/services/fabricv4/docs/AppLinkPostRequestRouter.md b/services/fabricv4/docs/AppLinkPostRequestRouter.md new file mode 100644 index 00000000..b020e060 --- /dev/null +++ b/services/fabricv4/docs/AppLinkPostRequestRouter.md @@ -0,0 +1,14 @@ + + +# AppLinkPostRequestRouter + +Cloud Router reference for App Link + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**uuid** | **UUID** | Cloud Router UUID | | + + + diff --git a/services/fabricv4/docs/AppLinkSearchRequest.md b/services/fabricv4/docs/AppLinkSearchRequest.md new file mode 100644 index 00000000..9d7b4b6c --- /dev/null +++ b/services/fabricv4/docs/AppLinkSearchRequest.md @@ -0,0 +1,16 @@ + + +# AppLinkSearchRequest + +Search requests containing criteria + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**filter** | [**AppLinkFilters**](AppLinkFilters.md) | | [optional] | +|**pagination** | [**PaginationRequest**](PaginationRequest.md) | | [optional] | +|**sort** | [**List<AppLinkSortCriteria>**](AppLinkSortCriteria.md) | | [optional] | + + + diff --git a/services/fabricv4/docs/AgentTemplateGetAllResponse.md b/services/fabricv4/docs/AppLinkSearchResponse.md similarity index 56% rename from services/fabricv4/docs/AgentTemplateGetAllResponse.md rename to services/fabricv4/docs/AppLinkSearchResponse.md index 448a56da..f1232c5a 100644 --- a/services/fabricv4/docs/AgentTemplateGetAllResponse.md +++ b/services/fabricv4/docs/AppLinkSearchResponse.md @@ -1,6 +1,6 @@ -# AgentTemplateGetAllResponse +# AppLinkSearchResponse ## Properties @@ -8,7 +8,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**pagination** | [**Pagination**](Pagination.md) | | [optional] | -|**data** | [**List<AgentTemplates>**](AgentTemplates.md) | Data returned from the API call. | [optional] | +|**data** | [**List<AppLink>**](AppLink.md) | Data returned from the API call. | [optional] | diff --git a/services/fabricv4/docs/AppLinkSimpleExpression.md b/services/fabricv4/docs/AppLinkSimpleExpression.md new file mode 100644 index 00000000..35e93542 --- /dev/null +++ b/services/fabricv4/docs/AppLinkSimpleExpression.md @@ -0,0 +1,15 @@ + + +# AppLinkSimpleExpression + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**property** | **String** | Possible field names to use on filters: * `/project/projectId` - project id * `/uuid` - App Link uuid * `/name` - App Link name * `/description` - App Link description * `/state` - App Link status * `/ipv4Address` - App Link ipv4 address * `/bandwidth` - App Link bandwidth * `/changeLog/createdDateTime` - App Link creation timestamp * `/changeLog/updatedDateTime` - App Link last updated timestamp * `/changeLog/deletedDateTime` - App Link deletion timestamp | [optional] | +|**operator** | **String** | Possible operators to use on filters: * `=` - equal * `!=` - not equal * `>` - greater than * `<` - less than * `IN` - in * `NOT IN` - not in * `LIKE` - like * `ILIKE` - case-insensitive like * `BETWEEN` - between * `NOT BETWEEN` - not between | [optional] | +|**values** | **List<String>** | | [optional] | + + + diff --git a/services/fabricv4/docs/AppLinkSortCriteria.md b/services/fabricv4/docs/AppLinkSortCriteria.md new file mode 100644 index 00000000..5f5af1b4 --- /dev/null +++ b/services/fabricv4/docs/AppLinkSortCriteria.md @@ -0,0 +1,14 @@ + + +# AppLinkSortCriteria + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**direction** | **AppLinkSortDirection** | | [optional] | +|**property** | **String** | Possible field names to use on '400_InvalidSorting': * `/name` - App Link name * `/uuid` - App Link uuid * `/state` - App Link status * `/changeLog/createdDateTime` - Date and time when change flow starts * `/changeLog/updatedDateTime` - Date and time when change object is updated | [optional] | + + + diff --git a/services/fabricv4/docs/AppLinkSortDirection.md b/services/fabricv4/docs/AppLinkSortDirection.md new file mode 100644 index 00000000..b3259f00 --- /dev/null +++ b/services/fabricv4/docs/AppLinkSortDirection.md @@ -0,0 +1,13 @@ + + +# AppLinkSortDirection + +## Enum + + +* `DESC` (value: `"DESC"`) + +* `ASC` (value: `"ASC"`) + + + diff --git a/services/fabricv4/docs/AppLinkState.md b/services/fabricv4/docs/AppLinkState.md new file mode 100644 index 00000000..a3bfe87f --- /dev/null +++ b/services/fabricv4/docs/AppLinkState.md @@ -0,0 +1,23 @@ + + +# AppLinkState + +## Enum + + +* `PROVISIONING` (value: `"PROVISIONING"`) + +* `PROVISIONING_FAILED` (value: `"PROVISIONING_FAILED"`) + +* `PROVISIONED` (value: `"PROVISIONED"`) + +* `DEPROVISIONING` (value: `"DEPROVISIONING"`) + +* `DEPROVISIONING_FAILED` (value: `"DEPROVISIONING_FAILED"`) + +* `DEPROVISIONED` (value: `"DEPROVISIONED"`) + +* `REPROVISIONING` (value: `"REPROVISIONING"`) + + + diff --git a/services/fabricv4/docs/AppLinkType.md b/services/fabricv4/docs/AppLinkType.md new file mode 100644 index 00000000..1e727cc0 --- /dev/null +++ b/services/fabricv4/docs/AppLinkType.md @@ -0,0 +1,11 @@ + + +# AppLinkType + +## Enum + + +* `APP_LINK` (value: `"APP_LINK"`) + + + diff --git a/services/fabricv4/docs/AppService.md b/services/fabricv4/docs/AppService.md new file mode 100644 index 00000000..2b7e550f --- /dev/null +++ b/services/fabricv4/docs/AppService.md @@ -0,0 +1,25 @@ + + +# AppService + +App Service object + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**href** | **URI** | Resource URI | [optional] [readonly] | +|**type** | **AppServiceType** | | | +|**uuid** | **UUID** | Equinix-assigned access point identifier | [optional] | +|**name** | **String** | Customer-provided App Service name | | +|**description** | **String** | Customer-provided App Service description | [optional] | +|**state** | **AppServiceState** | | [optional] | +|**endpoint** | **String** | Accessible endpoint through this service | [optional] | +|**sourceDomains** | **List<String>** | List of source domains from where traffic is allowed | [optional] | +|**account** | [**SimplifiedAccount**](SimplifiedAccount.md) | | [optional] | +|**project** | [**Project**](Project.md) | | [optional] | +|**changeLog** | [**Changelog**](Changelog.md) | | [optional] | +|**change** | [**AppServiceChange**](AppServiceChange.md) | | [optional] | + + + diff --git a/services/fabricv4/docs/AppServiceAttachedAppLink.md b/services/fabricv4/docs/AppServiceAttachedAppLink.md new file mode 100644 index 00000000..c245c833 --- /dev/null +++ b/services/fabricv4/docs/AppServiceAttachedAppLink.md @@ -0,0 +1,23 @@ + + +# AppServiceAttachedAppLink + +App Link object + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**href** | **URI** | Resource URI | [optional] [readonly] | +|**type** | **AppLinkType** | | | +|**uuid** | **UUID** | Equinix-assigned access point identifier | | +|**name** | **String** | Customer-provided App Link name | [optional] | +|**description** | **String** | Customer-provided App Link description | [optional] | +|**state** | **AppLinkState** | | [optional] | +|**router** | [**AppLinkCloudRouter**](AppLinkCloudRouter.md) | | [optional] | +|**ipv4Address** | **String** | App Link IP address | [optional] | +|**bandwidth** | **Integer** | App Link aggregated data transfer capacity in Mbps | [optional] | +|**project** | [**Project**](Project.md) | | [optional] | + + + diff --git a/services/fabricv4/docs/AppServiceAttachedAppLinks.md b/services/fabricv4/docs/AppServiceAttachedAppLinks.md new file mode 100644 index 00000000..31c9526f --- /dev/null +++ b/services/fabricv4/docs/AppServiceAttachedAppLinks.md @@ -0,0 +1,14 @@ + + +# AppServiceAttachedAppLinks + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**pagination** | [**Pagination**](Pagination.md) | | [optional] | +|**data** | [**List<AppServiceAttachedAppLink>**](AppServiceAttachedAppLink.md) | Data returned from the API call. | [optional] | + + + diff --git a/services/fabricv4/docs/AppServiceAttachedAppSubscription.md b/services/fabricv4/docs/AppServiceAttachedAppSubscription.md new file mode 100644 index 00000000..d8969d95 --- /dev/null +++ b/services/fabricv4/docs/AppServiceAttachedAppSubscription.md @@ -0,0 +1,18 @@ + + +# AppServiceAttachedAppSubscription + +App Subscription object attached to an App Service + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**href** | **URI** | Resource URI | [optional] [readonly] | +|**type** | **AppSubscriptionType** | | | +|**uuid** | **UUID** | Equinix-assigned access point identifier | | +|**state** | **AppSubscriptionState** | | | +|**account** | [**SimplifiedAccount**](SimplifiedAccount.md) | | [optional] | + + + diff --git a/services/fabricv4/docs/AppServiceAttachedAppSubscriptionFilter.md b/services/fabricv4/docs/AppServiceAttachedAppSubscriptionFilter.md new file mode 100644 index 00000000..739a32b4 --- /dev/null +++ b/services/fabricv4/docs/AppServiceAttachedAppSubscriptionFilter.md @@ -0,0 +1,16 @@ + + +# AppServiceAttachedAppSubscriptionFilter + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**property** | **String** | Possible field names to use on filters: * `/uuid` - App Subscription UUID * `/state` - App Subscription lifecycle state | [optional] | +|**operator** | **String** | Possible operators to use on filters: * `=` - equal * `!=` - not equal * `IN` - in * `NOT IN` - not in | [optional] | +|**values** | **List<String>** | | [optional] | +|**or** | [**List<AppServiceAttachedAppSubscriptionSimpleExpression>**](AppServiceAttachedAppSubscriptionSimpleExpression.md) | | [optional] | + + + diff --git a/services/fabricv4/docs/AppServiceAttachedAppSubscriptionFilters.md b/services/fabricv4/docs/AppServiceAttachedAppSubscriptionFilters.md new file mode 100644 index 00000000..0b8ad82f --- /dev/null +++ b/services/fabricv4/docs/AppServiceAttachedAppSubscriptionFilters.md @@ -0,0 +1,13 @@ + + +# AppServiceAttachedAppSubscriptionFilters + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**and** | [**List<AppServiceAttachedAppSubscriptionFilter>**](AppServiceAttachedAppSubscriptionFilter.md) | | [optional] | + + + diff --git a/services/fabricv4/docs/AppServiceAttachedAppSubscriptionOrFilter.md b/services/fabricv4/docs/AppServiceAttachedAppSubscriptionOrFilter.md new file mode 100644 index 00000000..91ea4550 --- /dev/null +++ b/services/fabricv4/docs/AppServiceAttachedAppSubscriptionOrFilter.md @@ -0,0 +1,13 @@ + + +# AppServiceAttachedAppSubscriptionOrFilter + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**or** | [**List<AppServiceAttachedAppSubscriptionSimpleExpression>**](AppServiceAttachedAppSubscriptionSimpleExpression.md) | | [optional] | + + + diff --git a/services/fabricv4/docs/AppServiceAttachedAppSubscriptionSearchRequest.md b/services/fabricv4/docs/AppServiceAttachedAppSubscriptionSearchRequest.md new file mode 100644 index 00000000..eea36f26 --- /dev/null +++ b/services/fabricv4/docs/AppServiceAttachedAppSubscriptionSearchRequest.md @@ -0,0 +1,16 @@ + + +# AppServiceAttachedAppSubscriptionSearchRequest + +Search requests containing criteria + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**filter** | [**AppServiceAttachedAppSubscriptionFilters**](AppServiceAttachedAppSubscriptionFilters.md) | | [optional] | +|**pagination** | [**PaginationRequest**](PaginationRequest.md) | | [optional] | +|**sort** | [**List<AppServiceAttachedAppSubscriptionSortCriteria>**](AppServiceAttachedAppSubscriptionSortCriteria.md) | | [optional] | + + + diff --git a/services/fabricv4/docs/AppServiceAttachedAppSubscriptionSearchResponse.md b/services/fabricv4/docs/AppServiceAttachedAppSubscriptionSearchResponse.md new file mode 100644 index 00000000..bd883005 --- /dev/null +++ b/services/fabricv4/docs/AppServiceAttachedAppSubscriptionSearchResponse.md @@ -0,0 +1,14 @@ + + +# AppServiceAttachedAppSubscriptionSearchResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**pagination** | [**Pagination**](Pagination.md) | | [optional] | +|**data** | [**List<AppServiceAttachedAppSubscription>**](AppServiceAttachedAppSubscription.md) | Data returned from the API call. | [optional] | + + + diff --git a/services/fabricv4/docs/AppServiceAttachedAppSubscriptionSimpleExpression.md b/services/fabricv4/docs/AppServiceAttachedAppSubscriptionSimpleExpression.md new file mode 100644 index 00000000..a4144b9f --- /dev/null +++ b/services/fabricv4/docs/AppServiceAttachedAppSubscriptionSimpleExpression.md @@ -0,0 +1,15 @@ + + +# AppServiceAttachedAppSubscriptionSimpleExpression + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**property** | **String** | Possible field names to use on filters: * `/uuid` - App Subscription UUID * `/state` - App Subscription lifecycle state | [optional] | +|**operator** | **String** | Possible operators to use on filters: * `=` - equal * `!=` - not equal * `IN` - in * `NOT IN` - not in | [optional] | +|**values** | **List<String>** | | [optional] | + + + diff --git a/services/fabricv4/docs/AppServiceAttachedAppSubscriptionSortCriteria.md b/services/fabricv4/docs/AppServiceAttachedAppSubscriptionSortCriteria.md new file mode 100644 index 00000000..5c2e36b2 --- /dev/null +++ b/services/fabricv4/docs/AppServiceAttachedAppSubscriptionSortCriteria.md @@ -0,0 +1,14 @@ + + +# AppServiceAttachedAppSubscriptionSortCriteria + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**direction** | **AppServiceAttachedAppSubscriptionSortDirection** | | [optional] | +|**property** | **String** | Possible field names to use on '400_InvalidSorting': * `/uuid` - App Subscription UUID * `/state` - App Subscription lifecycle state | [optional] | + + + diff --git a/services/fabricv4/docs/AppServiceAttachedAppSubscriptionSortDirection.md b/services/fabricv4/docs/AppServiceAttachedAppSubscriptionSortDirection.md new file mode 100644 index 00000000..438a0dea --- /dev/null +++ b/services/fabricv4/docs/AppServiceAttachedAppSubscriptionSortDirection.md @@ -0,0 +1,13 @@ + + +# AppServiceAttachedAppSubscriptionSortDirection + +## Enum + + +* `DESC` (value: `"DESC"`) + +* `ASC` (value: `"ASC"`) + + + diff --git a/services/fabricv4/docs/AppServiceAttachedAppSubscriptions.md b/services/fabricv4/docs/AppServiceAttachedAppSubscriptions.md new file mode 100644 index 00000000..2f23ef91 --- /dev/null +++ b/services/fabricv4/docs/AppServiceAttachedAppSubscriptions.md @@ -0,0 +1,14 @@ + + +# AppServiceAttachedAppSubscriptions + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**pagination** | [**Pagination**](Pagination.md) | | [optional] | +|**data** | [**List<AppServiceAttachedAppSubscription>**](AppServiceAttachedAppSubscription.md) | Data returned from the API call. | [optional] | + + + diff --git a/services/fabricv4/docs/AppServiceChange.md b/services/fabricv4/docs/AppServiceChange.md new file mode 100644 index 00000000..e527df7c --- /dev/null +++ b/services/fabricv4/docs/AppServiceChange.md @@ -0,0 +1,37 @@ + + +# AppServiceChange + +Current state of latest AppService change + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**uuid** | **String** | Uniquely identifies a change | [optional] | +|**type** | [**TypeEnum**](#TypeEnum) | Type of change | | +|**status** | [**StatusEnum**](#StatusEnum) | Current outcome of the change flow | [optional] | +|**createdDateTime** | **OffsetDateTime** | Set when change flow starts | [optional] | +|**updatedDateTime** | **OffsetDateTime** | Set when change object is updated | | +|**data** | [**List<AppServiceChangeOperation>**](AppServiceChangeOperation.md) | | [optional] | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| APP_SERVICE_UPDATE | "APP_SERVICE_UPDATE" | + + + +## Enum: StatusEnum + +| Name | Value | +|---- | -----| +| COMPLETED | "COMPLETED" | +| FAILED | "FAILED" | +| REQUESTED | "REQUESTED" | + + + diff --git a/services/fabricv4/docs/AppServiceChangeOperation.md b/services/fabricv4/docs/AppServiceChangeOperation.md new file mode 100644 index 00000000..076d50d0 --- /dev/null +++ b/services/fabricv4/docs/AppServiceChangeOperation.md @@ -0,0 +1,36 @@ + + +# AppServiceChangeOperation + +App Service change operation data + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**op** | [**OpEnum**](#OpEnum) | Handy shortcut for operation name | | +|**path** | [**PathEnum**](#PathEnum) | path inside document leading to updated parameter | | +|**value** | **Object** | new value for updated parameter | | + + + +## Enum: OpEnum + +| Name | Value | +|---- | -----| +| REPLACE | "replace" | +| ADD | "add" | +| REMOVE | "remove" | + + + +## Enum: PathEnum + +| Name | Value | +|---- | -----| +| NAME | "/name" | +| DESCRIPTION | "/description" | +| SOURCEDOMAINS | "/sourceDomains" | + + + diff --git a/services/fabricv4/docs/AppServiceFilter.md b/services/fabricv4/docs/AppServiceFilter.md new file mode 100644 index 00000000..89ebbb51 --- /dev/null +++ b/services/fabricv4/docs/AppServiceFilter.md @@ -0,0 +1,16 @@ + + +# AppServiceFilter + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**property** | **String** | Possible field names to use on filters: * `/project/projectId` - project id * `/uuid` - App Service uuid * `/name` - App Service name * `/description` - App Service description * `/state` - App Service status * `/endpoint` - App Service endpoint * `/sourceDomains` - App Service source domains * `/changeLog/createdDateTime` - App Service creation timestamp * `/changeLog/updatedDateTime` - App Service last updated timestamp * `/changeLog/deletedDateTime` - App Service deletion timestamp | [optional] | +|**operator** | **String** | Possible operators to use on filters: * `=` - equal * `!=` - not equal * `>` - greater than * `<` - less than * `IN` - in * `NOT IN` - not in * `LIKE` - like * `ILIKE` - case-insensitive like * `BETWEEN` - between * `NOT BETWEEN` - not between | [optional] | +|**values** | **List<String>** | | [optional] | +|**or** | [**List<AppServiceSimpleExpression>**](AppServiceSimpleExpression.md) | | [optional] | + + + diff --git a/services/fabricv4/docs/AppServiceFilters.md b/services/fabricv4/docs/AppServiceFilters.md new file mode 100644 index 00000000..06f240b8 --- /dev/null +++ b/services/fabricv4/docs/AppServiceFilters.md @@ -0,0 +1,13 @@ + + +# AppServiceFilters + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**and** | [**List<AppServiceFilter>**](AppServiceFilter.md) | | [optional] | + + + diff --git a/services/fabricv4/docs/AppServiceOrFilter.md b/services/fabricv4/docs/AppServiceOrFilter.md new file mode 100644 index 00000000..c130ad73 --- /dev/null +++ b/services/fabricv4/docs/AppServiceOrFilter.md @@ -0,0 +1,13 @@ + + +# AppServiceOrFilter + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**or** | [**List<AppServiceSimpleExpression>**](AppServiceSimpleExpression.md) | | [optional] | + + + diff --git a/services/fabricv4/docs/AppServicePostRequest.md b/services/fabricv4/docs/AppServicePostRequest.md new file mode 100644 index 00000000..dc52dc63 --- /dev/null +++ b/services/fabricv4/docs/AppServicePostRequest.md @@ -0,0 +1,19 @@ + + +# AppServicePostRequest + +Create App Service + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | **AppServiceType** | | | +|**name** | **String** | Customer-provided App Service name | | +|**description** | **String** | Customer-provided App Service description | [optional] | +|**endpoint** | **String** | Accessible endpoint through this service | | +|**sourceDomains** | **List<String>** | List of source domains from where traffic is allowed | [optional] | +|**project** | [**Project**](Project.md) | | | + + + diff --git a/services/fabricv4/docs/AppServiceSearchRequest.md b/services/fabricv4/docs/AppServiceSearchRequest.md new file mode 100644 index 00000000..3a2be482 --- /dev/null +++ b/services/fabricv4/docs/AppServiceSearchRequest.md @@ -0,0 +1,16 @@ + + +# AppServiceSearchRequest + +Search requests containing criteria + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**filter** | [**AppServiceFilters**](AppServiceFilters.md) | | [optional] | +|**pagination** | [**PaginationRequest**](PaginationRequest.md) | | [optional] | +|**sort** | [**List<AppServiceSortCriteria>**](AppServiceSortCriteria.md) | | [optional] | + + + diff --git a/services/fabricv4/docs/AppServiceSearchResponse.md b/services/fabricv4/docs/AppServiceSearchResponse.md new file mode 100644 index 00000000..a392b500 --- /dev/null +++ b/services/fabricv4/docs/AppServiceSearchResponse.md @@ -0,0 +1,14 @@ + + +# AppServiceSearchResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**pagination** | [**Pagination**](Pagination.md) | | [optional] | +|**data** | [**List<AppService>**](AppService.md) | Data returned from the API call. | [optional] | + + + diff --git a/services/fabricv4/docs/AppServiceSimpleExpression.md b/services/fabricv4/docs/AppServiceSimpleExpression.md new file mode 100644 index 00000000..f42e27fa --- /dev/null +++ b/services/fabricv4/docs/AppServiceSimpleExpression.md @@ -0,0 +1,15 @@ + + +# AppServiceSimpleExpression + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**property** | **String** | Possible field names to use on filters: * `/project/projectId` - project id * `/uuid` - App Service uuid * `/name` - App Service name * `/description` - App Service description * `/state` - App Service status * `/endpoint` - App Service endpoint * `/sourceDomains` - App Service source domains * `/changeLog/createdDateTime` - App Service creation timestamp * `/changeLog/updatedDateTime` - App Service last updated timestamp * `/changeLog/deletedDateTime` - App Service deletion timestamp | [optional] | +|**operator** | **String** | Possible operators to use on filters: * `=` - equal * `!=` - not equal * `>` - greater than * `<` - less than * `IN` - in * `NOT IN` - not in * `LIKE` - like * `ILIKE` - case-insensitive like * `BETWEEN` - between * `NOT BETWEEN` - not between | [optional] | +|**values** | **List<String>** | | [optional] | + + + diff --git a/services/fabricv4/docs/AppServiceSortCriteria.md b/services/fabricv4/docs/AppServiceSortCriteria.md new file mode 100644 index 00000000..0dafa6bf --- /dev/null +++ b/services/fabricv4/docs/AppServiceSortCriteria.md @@ -0,0 +1,14 @@ + + +# AppServiceSortCriteria + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**direction** | **AppServiceSortDirection** | | [optional] | +|**property** | **String** | Possible field names to use on '400_InvalidSorting': * `/name` - App Service name * `/uuid` - App Service uuid * `/state` - App Service status * `/changeLog/createdDateTime` - Date and time when change flow starts * `/changeLog/updatedDateTime` - Date and time when change object is updated | [optional] | + + + diff --git a/services/fabricv4/docs/AppServiceSortDirection.md b/services/fabricv4/docs/AppServiceSortDirection.md new file mode 100644 index 00000000..91737c8a --- /dev/null +++ b/services/fabricv4/docs/AppServiceSortDirection.md @@ -0,0 +1,13 @@ + + +# AppServiceSortDirection + +## Enum + + +* `DESC` (value: `"DESC"`) + +* `ASC` (value: `"ASC"`) + + + diff --git a/services/fabricv4/docs/AppServiceState.md b/services/fabricv4/docs/AppServiceState.md new file mode 100644 index 00000000..33d063ab --- /dev/null +++ b/services/fabricv4/docs/AppServiceState.md @@ -0,0 +1,19 @@ + + +# AppServiceState + +## Enum + + +* `PROVISIONING` (value: `"PROVISIONING"`) + +* `PROVISIONED` (value: `"PROVISIONED"`) + +* `DEPROVISIONING` (value: `"DEPROVISIONING"`) + +* `DEPROVISIONED` (value: `"DEPROVISIONED"`) + +* `REPROVISIONING` (value: `"REPROVISIONING"`) + + + diff --git a/services/fabricv4/docs/AppServiceType.md b/services/fabricv4/docs/AppServiceType.md new file mode 100644 index 00000000..c77265c6 --- /dev/null +++ b/services/fabricv4/docs/AppServiceType.md @@ -0,0 +1,11 @@ + + +# AppServiceType + +## Enum + + +* `APP_SERVICE` (value: `"APP_SERVICE"`) + + + diff --git a/services/fabricv4/docs/AppSubscription.md b/services/fabricv4/docs/AppSubscription.md new file mode 100644 index 00000000..dfd3762c --- /dev/null +++ b/services/fabricv4/docs/AppSubscription.md @@ -0,0 +1,22 @@ + + +# AppSubscription + +App Subscription object + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**href** | **URI** | Resource URI | [optional] [readonly] | +|**type** | **AppSubscriptionType** | | | +|**uuid** | **UUID** | Equinix-assigned access point identifier | [optional] | +|**source** | [**AppSubscriptionSource**](AppSubscriptionSource.md) | | | +|**target** | [**AppSubscriptionTarget**](AppSubscriptionTarget.md) | | | +|**state** | **AppSubscriptionState** | | [optional] | +|**project** | [**Project**](Project.md) | | | +|**changeLog** | [**Changelog**](Changelog.md) | | [optional] | +|**change** | [**AppSubscriptionChange**](AppSubscriptionChange.md) | | [optional] | + + + diff --git a/services/fabricv4/docs/AppSubscriptionChange.md b/services/fabricv4/docs/AppSubscriptionChange.md new file mode 100644 index 00000000..89b1935d --- /dev/null +++ b/services/fabricv4/docs/AppSubscriptionChange.md @@ -0,0 +1,37 @@ + + +# AppSubscriptionChange + +Current state of latest AppSubscription change + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**uuid** | **String** | Uniquely identifies a change | [optional] | +|**type** | [**TypeEnum**](#TypeEnum) | Type of change | | +|**status** | [**StatusEnum**](#StatusEnum) | Current outcome of the change flow | [optional] | +|**createdDateTime** | **OffsetDateTime** | Set when change flow starts | [optional] | +|**updatedDateTime** | **OffsetDateTime** | Set when change object is updated | | +|**data** | [**List<AppSubscriptionChangeOperation>**](AppSubscriptionChangeOperation.md) | | [optional] | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| APP_SUBSCRIPTION_UPDATE | "APP_SUBSCRIPTION_UPDATE" | + + + +## Enum: StatusEnum + +| Name | Value | +|---- | -----| +| COMPLETED | "COMPLETED" | +| FAILED | "FAILED" | +| REQUESTED | "REQUESTED" | + + + diff --git a/services/fabricv4/docs/AppSubscriptionChangeOperation.md b/services/fabricv4/docs/AppSubscriptionChangeOperation.md new file mode 100644 index 00000000..7737ff33 --- /dev/null +++ b/services/fabricv4/docs/AppSubscriptionChangeOperation.md @@ -0,0 +1,26 @@ + + +# AppSubscriptionChangeOperation + +App Subscription change operation data + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**op** | [**OpEnum**](#OpEnum) | Handy shortcut for operation name | | +|**path** | **String** | path inside document leading to updated parameter | | +|**value** | **Object** | new value for updated parameter | | + + + +## Enum: OpEnum + +| Name | Value | +|---- | -----| +| REPLACE | "replace" | +| ADD | "add" | +| REMOVE | "remove" | + + + diff --git a/services/fabricv4/docs/AppSubscriptionFilter.md b/services/fabricv4/docs/AppSubscriptionFilter.md new file mode 100644 index 00000000..12bbec02 --- /dev/null +++ b/services/fabricv4/docs/AppSubscriptionFilter.md @@ -0,0 +1,16 @@ + + +# AppSubscriptionFilter + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**property** | **String** | Possible field names to use on filters: * `/project/projectId` - project id * `/uuid` - App Subscription uuid * `/state` - App Subscription status * `/source/appLink/uuid` - Source App Link uuid * `/source/ipSubnets` - Source App Link ip subnets * `/target/appService/uuid` - Target App Service uuid * `/target/geoScope` - Target App Service geo scope * `/target/prioritization` - Target App Service prioritization * `/changeLog/createdDateTime` - App Subscription creation timestamp * `/changeLog/updatedDateTime` - App Subscription last updated timestamp * `/changeLog/deletedDateTime` - App Subscription deletion timestamp | [optional] | +|**operator** | **String** | Possible operators to use on filters: * `=` - equal * `!=` - not equal * `>` - greater than * `<` - less than * `IN` - in * `NOT IN` - not in * `LIKE` - like * `ILIKE` - case-insensitive like * `BETWEEN` - between * `NOT BETWEEN` - not between | [optional] | +|**values** | **List<String>** | | [optional] | +|**or** | [**List<AppSubscriptionSimpleExpression>**](AppSubscriptionSimpleExpression.md) | | [optional] | + + + diff --git a/services/fabricv4/docs/AppSubscriptionFilters.md b/services/fabricv4/docs/AppSubscriptionFilters.md new file mode 100644 index 00000000..0cde0787 --- /dev/null +++ b/services/fabricv4/docs/AppSubscriptionFilters.md @@ -0,0 +1,13 @@ + + +# AppSubscriptionFilters + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**and** | [**List<AppSubscriptionFilter>**](AppSubscriptionFilter.md) | | [optional] | + + + diff --git a/services/fabricv4/docs/AppSubscriptionOrFilter.md b/services/fabricv4/docs/AppSubscriptionOrFilter.md new file mode 100644 index 00000000..25ef39ea --- /dev/null +++ b/services/fabricv4/docs/AppSubscriptionOrFilter.md @@ -0,0 +1,13 @@ + + +# AppSubscriptionOrFilter + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**or** | [**List<AppSubscriptionSimpleExpression>**](AppSubscriptionSimpleExpression.md) | | [optional] | + + + diff --git a/services/fabricv4/docs/AppSubscriptionPostRequest.md b/services/fabricv4/docs/AppSubscriptionPostRequest.md new file mode 100644 index 00000000..e056a9d6 --- /dev/null +++ b/services/fabricv4/docs/AppSubscriptionPostRequest.md @@ -0,0 +1,17 @@ + + +# AppSubscriptionPostRequest + +Create App Subscription + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | **AppSubscriptionType** | | | +|**source** | [**AppSubscriptionSourceRequest**](AppSubscriptionSourceRequest.md) | | [optional] | +|**target** | [**AppSubscriptionTargetRequest**](AppSubscriptionTargetRequest.md) | | [optional] | +|**project** | [**Project**](Project.md) | | | + + + diff --git a/services/fabricv4/docs/AppSubscriptionPrioritization.md b/services/fabricv4/docs/AppSubscriptionPrioritization.md new file mode 100644 index 00000000..d4f1f0ab --- /dev/null +++ b/services/fabricv4/docs/AppSubscriptionPrioritization.md @@ -0,0 +1,19 @@ + + +# AppSubscriptionPrioritization + +## Enum + + +* `LATENCY` (value: `"LATENCY"`) + +* `PERFORMANCE` (value: `"PERFORMANCE"`) + +* `UTILIZATION` (value: `"UTILIZATION"`) + +* `THRESHOLD` (value: `"THRESHOLD"`) + +* `ANY_TAG` (value: `"ANY_TAG"`) + + + diff --git a/services/fabricv4/docs/AppSubscriptionSearchRequest.md b/services/fabricv4/docs/AppSubscriptionSearchRequest.md new file mode 100644 index 00000000..5503cf74 --- /dev/null +++ b/services/fabricv4/docs/AppSubscriptionSearchRequest.md @@ -0,0 +1,16 @@ + + +# AppSubscriptionSearchRequest + +Search requests containing criteria + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**filter** | [**AppSubscriptionFilters**](AppSubscriptionFilters.md) | | [optional] | +|**pagination** | [**PaginationRequest**](PaginationRequest.md) | | [optional] | +|**sort** | [**List<AppSubscriptionSortCriteria>**](AppSubscriptionSortCriteria.md) | | [optional] | + + + diff --git a/services/fabricv4/docs/AgentGetActivities.md b/services/fabricv4/docs/AppSubscriptionSearchResponse.md similarity index 71% rename from services/fabricv4/docs/AgentGetActivities.md rename to services/fabricv4/docs/AppSubscriptionSearchResponse.md index 354c691a..cce737c8 100644 --- a/services/fabricv4/docs/AgentGetActivities.md +++ b/services/fabricv4/docs/AppSubscriptionSearchResponse.md @@ -1,6 +1,6 @@ -# AgentGetActivities +# AppSubscriptionSearchResponse ## Properties @@ -8,7 +8,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**pagination** | [**Pagination**](Pagination.md) | | [optional] | -|**data** | [**List<AgentActivities>**](AgentActivities.md) | Data returned from the API call. | [optional] | +|**data** | [**List<AppSubscription>**](AppSubscription.md) | Data returned from the API call. | [optional] | diff --git a/services/fabricv4/docs/AppSubscriptionSimpleExpression.md b/services/fabricv4/docs/AppSubscriptionSimpleExpression.md new file mode 100644 index 00000000..1af34ec2 --- /dev/null +++ b/services/fabricv4/docs/AppSubscriptionSimpleExpression.md @@ -0,0 +1,15 @@ + + +# AppSubscriptionSimpleExpression + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**property** | **String** | Possible field names to use on filters: * `/project/projectId` - project id * `/uuid` - App Subscription uuid * `/state` - App Subscription status * `/source/appLink/uuid` - Source App Link uuid * `/source/ipSubnets` - Source App Link ip subnets * `/target/appService/uuid` - Target App Service uuid * `/target/geoScope` - Target App Service geo scope * `/target/prioritization` - Target App Service prioritization * `/changeLog/createdDateTime` - App Subscription creation timestamp * `/changeLog/updatedDateTime` - App Subscription last updated timestamp * `/changeLog/deletedDateTime` - App Subscription deletion timestamp | [optional] | +|**operator** | **String** | Possible operators to use on filters: * `=` - equal * `!=` - not equal * `>` - greater than * `<` - less than * `IN` - in * `NOT IN` - not in * `LIKE` - like * `ILIKE` - case-insensitive like * `BETWEEN` - between * `NOT BETWEEN` - not between | [optional] | +|**values** | **List<String>** | | [optional] | + + + diff --git a/services/fabricv4/docs/AppSubscriptionSortCriteria.md b/services/fabricv4/docs/AppSubscriptionSortCriteria.md new file mode 100644 index 00000000..738a8fb8 --- /dev/null +++ b/services/fabricv4/docs/AppSubscriptionSortCriteria.md @@ -0,0 +1,14 @@ + + +# AppSubscriptionSortCriteria + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**direction** | **AppSubscriptionSortDirection** | | [optional] | +|**property** | **String** | Possible field names to use on '400_InvalidSorting': * `/uuid` - App Subscription uuid * `/state` - App Subscription status * `/changeLog/createdDateTime` - Date and time when change flow starts * `/changeLog/updatedDateTime` - Date and time when change object is updated | [optional] | + + + diff --git a/services/fabricv4/docs/AppSubscriptionSortDirection.md b/services/fabricv4/docs/AppSubscriptionSortDirection.md new file mode 100644 index 00000000..1a1f0e74 --- /dev/null +++ b/services/fabricv4/docs/AppSubscriptionSortDirection.md @@ -0,0 +1,13 @@ + + +# AppSubscriptionSortDirection + +## Enum + + +* `DESC` (value: `"DESC"`) + +* `ASC` (value: `"ASC"`) + + + diff --git a/services/fabricv4/docs/AppSubscriptionSource.md b/services/fabricv4/docs/AppSubscriptionSource.md new file mode 100644 index 00000000..92c6666b --- /dev/null +++ b/services/fabricv4/docs/AppSubscriptionSource.md @@ -0,0 +1,15 @@ + + +# AppSubscriptionSource + +Source details for the Subscription + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**appLink** | [**AppSubscriptionSourceAppLink**](AppSubscriptionSourceAppLink.md) | | [optional] | +|**ipSubnets** | **List<String>** | List of IP subnets in CIDR notation | | + + + diff --git a/services/fabricv4/docs/AppSubscriptionSourceAppLink.md b/services/fabricv4/docs/AppSubscriptionSourceAppLink.md new file mode 100644 index 00000000..0a7cace6 --- /dev/null +++ b/services/fabricv4/docs/AppSubscriptionSourceAppLink.md @@ -0,0 +1,16 @@ + + +# AppSubscriptionSourceAppLink + +App Link reference for App Subscription + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**href** | **URI** | Resource URI | [optional] [readonly] | +|**type** | **String** | App Link Type | [optional] | +|**uuid** | **UUID** | Equinix-assigned access point identifier | | + + + diff --git a/services/fabricv4/docs/AppSubscriptionSourceRequest.md b/services/fabricv4/docs/AppSubscriptionSourceRequest.md new file mode 100644 index 00000000..52f7d8c2 --- /dev/null +++ b/services/fabricv4/docs/AppSubscriptionSourceRequest.md @@ -0,0 +1,15 @@ + + +# AppSubscriptionSourceRequest + +Source details for the Subscription + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**appLink** | [**AppSubscriptionSourceRequestAppLink**](AppSubscriptionSourceRequestAppLink.md) | | [optional] | +|**ipSubnets** | **List<String>** | List of IP subnets in CIDR notation | | + + + diff --git a/services/fabricv4/docs/AppSubscriptionSourceRequestAppLink.md b/services/fabricv4/docs/AppSubscriptionSourceRequestAppLink.md new file mode 100644 index 00000000..898075f9 --- /dev/null +++ b/services/fabricv4/docs/AppSubscriptionSourceRequestAppLink.md @@ -0,0 +1,14 @@ + + +# AppSubscriptionSourceRequestAppLink + +App Link reference for App Subscription + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**uuid** | **UUID** | Equinix-assigned access point identifier | | + + + diff --git a/services/fabricv4/docs/AppSubscriptionState.md b/services/fabricv4/docs/AppSubscriptionState.md new file mode 100644 index 00000000..f01e78ad --- /dev/null +++ b/services/fabricv4/docs/AppSubscriptionState.md @@ -0,0 +1,23 @@ + + +# AppSubscriptionState + +## Enum + + +* `PROVISIONING` (value: `"PROVISIONING"`) + +* `PROVISIONING_FAILED` (value: `"PROVISIONING_FAILED"`) + +* `PROVISIONED` (value: `"PROVISIONED"`) + +* `DEPROVISIONING` (value: `"DEPROVISIONING"`) + +* `DEPROVISIONING_FAILED` (value: `"DEPROVISIONING_FAILED"`) + +* `DEPROVISIONED` (value: `"DEPROVISIONED"`) + +* `REPROVISIONING` (value: `"REPROVISIONING"`) + + + diff --git a/services/fabricv4/docs/AppSubscriptionTarget.md b/services/fabricv4/docs/AppSubscriptionTarget.md new file mode 100644 index 00000000..4e017a66 --- /dev/null +++ b/services/fabricv4/docs/AppSubscriptionTarget.md @@ -0,0 +1,16 @@ + + +# AppSubscriptionTarget + +Target details for the Subscription + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**appService** | [**AppSubscriptionTargetAppService**](AppSubscriptionTargetAppService.md) | | [optional] | +|**geoScope** | **String** | Geo scope | | +|**prioritization** | **AppSubscriptionPrioritization** | | | + + + diff --git a/services/fabricv4/docs/AppSubscriptionTargetAppService.md b/services/fabricv4/docs/AppSubscriptionTargetAppService.md new file mode 100644 index 00000000..6bbd2739 --- /dev/null +++ b/services/fabricv4/docs/AppSubscriptionTargetAppService.md @@ -0,0 +1,16 @@ + + +# AppSubscriptionTargetAppService + +App Service reference for App Subscription + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**href** | **URI** | Resource URI | [optional] [readonly] | +|**type** | **String** | App Service Type | [optional] | +|**uuid** | **UUID** | Equinix-assigned access point identifier | | + + + diff --git a/services/fabricv4/docs/AppSubscriptionTargetRequest.md b/services/fabricv4/docs/AppSubscriptionTargetRequest.md new file mode 100644 index 00000000..14d9d728 --- /dev/null +++ b/services/fabricv4/docs/AppSubscriptionTargetRequest.md @@ -0,0 +1,16 @@ + + +# AppSubscriptionTargetRequest + +Target details for the Subscription + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**appService** | [**AppSubscriptionTargetRequestAppService**](AppSubscriptionTargetRequestAppService.md) | | [optional] | +|**geoScope** | **String** | Geo scope | | +|**prioritization** | **AppSubscriptionPrioritization** | | | + + + diff --git a/services/fabricv4/docs/AppSubscriptionTargetRequestAppService.md b/services/fabricv4/docs/AppSubscriptionTargetRequestAppService.md new file mode 100644 index 00000000..329170cc --- /dev/null +++ b/services/fabricv4/docs/AppSubscriptionTargetRequestAppService.md @@ -0,0 +1,14 @@ + + +# AppSubscriptionTargetRequestAppService + +App Service reference for App Subscription + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**uuid** | **UUID** | Equinix-assigned access point identifier | | + + + diff --git a/services/fabricv4/docs/AppSubscriptionType.md b/services/fabricv4/docs/AppSubscriptionType.md new file mode 100644 index 00000000..31915715 --- /dev/null +++ b/services/fabricv4/docs/AppSubscriptionType.md @@ -0,0 +1,11 @@ + + +# AppSubscriptionType + +## Enum + + +* `APP_SUBSCRIPTION` (value: `"APP_SUBSCRIPTION"`) + + + diff --git a/services/fabricv4/docs/AgentsApi.md b/services/fabricv4/docs/ApplicationDomainsApi.md similarity index 58% rename from services/fabricv4/docs/AgentsApi.md rename to services/fabricv4/docs/ApplicationDomainsApi.md index 8218bbfe..16e84b45 100644 --- a/services/fabricv4/docs/AgentsApi.md +++ b/services/fabricv4/docs/ApplicationDomainsApi.md @@ -1,24 +1,24 @@ -# AgentsApi +# ApplicationDomainsApi All URIs are relative to *https://api.equinix.com* | Method | HTTP request | Description | |------------- | ------------- | -------------| -| [**createAgent**](AgentsApi.md#createAgent) | **POST** /fabric/v4/agents | Create Agent | -| [**deleteAgentByUuid**](AgentsApi.md#deleteAgentByUuid) | **DELETE** /fabric/v4/agents/{agentId} | Delete Agent by UUID | -| [**getAgentActivities**](AgentsApi.md#getAgentActivities) | **GET** /fabric/v4/agents/{agentId}/activities | Get Agent Activities | -| [**getAgentByUuid**](AgentsApi.md#getAgentByUuid) | **GET** /fabric/v4/agents/{agentId} | Get Agent by UUID | -| [**getAgents**](AgentsApi.md#getAgents) | **GET** /fabric/v4/agents | Get Agents | -| [**patchAgentByUuid**](AgentsApi.md#patchAgentByUuid) | **PATCH** /fabric/v4/agents/{agentId} | Update Agent by UUID | +| [**createAppDomain**](ApplicationDomainsApi.md#createAppDomain) | **POST** /fabric/v4/appDomains | Create App Domain | +| [**deleteAppDomainByUuid**](ApplicationDomainsApi.md#deleteAppDomainByUuid) | **DELETE** /fabric/v4/appDomains/{appDomainId} | Delete App Domain | +| [**getAppDomainByUuid**](ApplicationDomainsApi.md#getAppDomainByUuid) | **GET** /fabric/v4/appDomains/{appDomainId} | Get App Domain | +| [**getAttachedAppLinksByAppDomainId**](ApplicationDomainsApi.md#getAttachedAppLinksByAppDomainId) | **GET** /fabric/v4/appDomains/{appDomainId}/appLinks | Get attached App Links for App Domain | +| [**searchAppDomains**](ApplicationDomainsApi.md#searchAppDomains) | **POST** /fabric/v4/appDomains/search | Search App Domains | +| [**updateAppDomainByUuid**](ApplicationDomainsApi.md#updateAppDomainByUuid) | **PATCH** /fabric/v4/appDomains/{appDomainId} | Update App Domain | - -# **createAgent** -> Agents createAgent(agentPostRequest) + +# **createAppDomain** +> AppDomain createAppDomain(appDomainPostRequest) -Create Agent +Create App Domain -This API provides capability to create user's agent <font color=\"red\"> <sup color='red'>Beta</sup></font> +This API provides capability to create user's App Domain ### Example ```java @@ -28,7 +28,7 @@ import com.equinix.sdk.fabricv4.ApiException; import com.equinix.sdk.fabricv4.Configuration; import com.equinix.sdk.fabricv4.auth.*; import com.equinix.sdk.fabricv4.models.*; -import com.equinix.sdk.fabricv4.api.AgentsApi; +import com.equinix.sdk.fabricv4.api.ApplicationDomainsApi; public class Example { public static void main(String[] args) { @@ -39,13 +39,13 @@ public class Example { HttpBearerAuth BearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("BearerAuth"); BearerAuth.setBearerToken("BEARER TOKEN"); - AgentsApi apiInstance = new AgentsApi(defaultClient); - AgentPostRequest agentPostRequest = new AgentPostRequest(); // AgentPostRequest | + ApplicationDomainsApi apiInstance = new ApplicationDomainsApi(defaultClient); + AppDomainPostRequest appDomainPostRequest = new AppDomainPostRequest(); // AppDomainPostRequest | try { - Agents result = apiInstance.createAgent(agentPostRequest); + AppDomain result = apiInstance.createAppDomain(appDomainPostRequest); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AgentsApi#createAgent"); + System.err.println("Exception when calling ApplicationDomainsApi#createAppDomain"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -59,11 +59,11 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **agentPostRequest** | [**AgentPostRequest**](AgentPostRequest.md)| | | +| **appDomainPostRequest** | [**AppDomainPostRequest**](AppDomainPostRequest.md)| | | ### Return type -[**Agents**](Agents.md) +[**AppDomain**](AppDomain.md) ### Authorization @@ -77,20 +77,20 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **202** | Agent object | - | +| **202** | App Domain object | - | | **400** | Bad request | - | | **401** | Unauthorized | - | | **403** | Forbidden | - | | **415** | Unsupported Media Type | - | | **500** | Internal server error | - | - -# **deleteAgentByUuid** -> Agents deleteAgentByUuid(agentId, offset, limit) + +# **deleteAppDomainByUuid** +> AppDomain deleteAppDomainByUuid(appDomainId) -Delete Agent by UUID +Delete App Domain -This API provides capability to delete an agent by uuid <font color=\"red\"> <sup color='red'>Beta</sup></font> +This API provides capability to delete user's App Domain ### Example ```java @@ -100,7 +100,7 @@ import com.equinix.sdk.fabricv4.ApiException; import com.equinix.sdk.fabricv4.Configuration; import com.equinix.sdk.fabricv4.auth.*; import com.equinix.sdk.fabricv4.models.*; -import com.equinix.sdk.fabricv4.api.AgentsApi; +import com.equinix.sdk.fabricv4.api.ApplicationDomainsApi; public class Example { public static void main(String[] args) { @@ -111,15 +111,13 @@ public class Example { HttpBearerAuth BearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("BearerAuth"); BearerAuth.setBearerToken("BEARER TOKEN"); - AgentsApi apiInstance = new AgentsApi(defaultClient); - UUID agentId = UUID.randomUUID(); // UUID | Agent UUID - Integer offset = 1; // Integer | offset - Integer limit = 10; // Integer | number of records to fetch + ApplicationDomainsApi apiInstance = new ApplicationDomainsApi(defaultClient); + UUID appDomainId = UUID.randomUUID(); // UUID | App Domain UUID try { - Agents result = apiInstance.deleteAgentByUuid(agentId, offset, limit); + AppDomain result = apiInstance.deleteAppDomainByUuid(appDomainId); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AgentsApi#deleteAgentByUuid"); + System.err.println("Exception when calling ApplicationDomainsApi#deleteAppDomainByUuid"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -133,13 +131,11 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **agentId** | **UUID**| Agent UUID | | -| **offset** | **Integer**| offset | [optional] | -| **limit** | **Integer**| number of records to fetch | [optional] | +| **appDomainId** | **UUID**| App Domain UUID | | ### Return type -[**Agents**](Agents.md) +[**AppDomain**](AppDomain.md) ### Authorization @@ -153,19 +149,20 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **202** | Agent object | - | +| **202** | App Domain object | - | +| **400** | Bad request | - | | **401** | Unauthorized | - | | **403** | Forbidden | - | | **404** | Not Found | - | | **500** | Internal server error | - | - -# **getAgentActivities** -> AgentGetActivities getAgentActivities(agentId, offset, limit) + +# **getAppDomainByUuid** +> AppDomain getAppDomainByUuid(appDomainId) -Get Agent Activities +Get App Domain -This API provides capability to retrieve an agent activities <font color=\"red\"> <sup color='red'>Beta</sup></font> +This API provides capability to retrieve user's App Domain ### Example ```java @@ -175,7 +172,7 @@ import com.equinix.sdk.fabricv4.ApiException; import com.equinix.sdk.fabricv4.Configuration; import com.equinix.sdk.fabricv4.auth.*; import com.equinix.sdk.fabricv4.models.*; -import com.equinix.sdk.fabricv4.api.AgentsApi; +import com.equinix.sdk.fabricv4.api.ApplicationDomainsApi; public class Example { public static void main(String[] args) { @@ -186,15 +183,13 @@ public class Example { HttpBearerAuth BearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("BearerAuth"); BearerAuth.setBearerToken("BEARER TOKEN"); - AgentsApi apiInstance = new AgentsApi(defaultClient); - UUID agentId = UUID.randomUUID(); // UUID | Agent UUID - Integer offset = 1; // Integer | offset - Integer limit = 10; // Integer | number of records to fetch + ApplicationDomainsApi apiInstance = new ApplicationDomainsApi(defaultClient); + UUID appDomainId = UUID.randomUUID(); // UUID | App Domain UUID try { - AgentGetActivities result = apiInstance.getAgentActivities(agentId, offset, limit); + AppDomain result = apiInstance.getAppDomainByUuid(appDomainId); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AgentsApi#getAgentActivities"); + System.err.println("Exception when calling ApplicationDomainsApi#getAppDomainByUuid"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -208,13 +203,11 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **agentId** | **UUID**| Agent UUID | | -| **offset** | **Integer**| offset | [optional] | -| **limit** | **Integer**| number of records to fetch | [optional] | +| **appDomainId** | **UUID**| App Domain UUID | | ### Return type -[**AgentGetActivities**](AgentGetActivities.md) +[**AppDomain**](AppDomain.md) ### Authorization @@ -228,19 +221,19 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | Successful operation | - | +| **200** | App Domain object | - | | **401** | Unauthorized | - | | **403** | Forbidden | - | | **404** | Not Found | - | | **500** | Internal server error | - | - -# **getAgentByUuid** -> Agents getAgentByUuid(agentId, offset, limit) + +# **getAttachedAppLinksByAppDomainId** +> AppDomainAttachedAppLinks getAttachedAppLinksByAppDomainId(appDomainId, offset, limit, state, order, style) -Get Agent by UUID +Get attached App Links for App Domain -This API provides capability to retrieve an agent by uuid <font color=\"red\"> <sup color='red'>Beta</sup></font> +This API provides capability to retrieve App Links attached to an App Domain. ### Example ```java @@ -250,7 +243,7 @@ import com.equinix.sdk.fabricv4.ApiException; import com.equinix.sdk.fabricv4.Configuration; import com.equinix.sdk.fabricv4.auth.*; import com.equinix.sdk.fabricv4.models.*; -import com.equinix.sdk.fabricv4.api.AgentsApi; +import com.equinix.sdk.fabricv4.api.ApplicationDomainsApi; public class Example { public static void main(String[] args) { @@ -261,15 +254,18 @@ public class Example { HttpBearerAuth BearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("BearerAuth"); BearerAuth.setBearerToken("BEARER TOKEN"); - AgentsApi apiInstance = new AgentsApi(defaultClient); - UUID agentId = UUID.randomUUID(); // UUID | Agent UUID + ApplicationDomainsApi apiInstance = new ApplicationDomainsApi(defaultClient); + UUID appDomainId = UUID.randomUUID(); // UUID | App Domain UUID Integer offset = 1; // Integer | offset Integer limit = 10; // Integer | number of records to fetch + List state = Arrays.asList(); // List | Filter attached App Links by one or more lifecycle states. + AttachedAppLinkOrder order = AttachedAppLinkOrder.fromValue("DESC"); // AttachedAppLinkOrder | Sort order for attached App Links. + Style style = Style.fromValue("MIN"); // Style | Detail level of the response. try { - Agents result = apiInstance.getAgentByUuid(agentId, offset, limit); + AppDomainAttachedAppLinks result = apiInstance.getAttachedAppLinksByAppDomainId(appDomainId, offset, limit, state, order, style); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AgentsApi#getAgentByUuid"); + System.err.println("Exception when calling ApplicationDomainsApi#getAttachedAppLinksByAppDomainId"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -283,13 +279,16 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **agentId** | **UUID**| Agent UUID | | +| **appDomainId** | **UUID**| App Domain UUID | | | **offset** | **Integer**| offset | [optional] | | **limit** | **Integer**| number of records to fetch | [optional] | +| **state** | [**List<AppLinkState>**](AppLinkState.md)| Filter attached App Links by one or more lifecycle states. | [optional] | +| **order** | [**AttachedAppLinkOrder**](.md)| Sort order for attached App Links. | [optional] [default to DESC] [enum: DESC, ASC] | +| **style** | [**Style**](.md)| Detail level of the response. | [optional] [default to MEDIUM] [enum: MIN, MEDIUM, FULL] | ### Return type -[**Agents**](Agents.md) +[**AppDomainAttachedAppLinks**](AppDomainAttachedAppLinks.md) ### Authorization @@ -303,19 +302,20 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | Agent object | - | +| **200** | Successful operation | - | +| **400** | Bad request | - | | **401** | Unauthorized | - | | **403** | Forbidden | - | | **404** | Not Found | - | | **500** | Internal server error | - | - -# **getAgents** -> AgentGetAllResponse getAgents(offset, limit) + +# **searchAppDomains** +> AppDomainSearchResponse searchAppDomains(appDomainSearchRequest) -Get Agents +Search App Domains -This API provides capability to retrieve agents <font color=\"red\"> <sup color='red'>Beta</sup></font> +The API provides capability to get list of user's App Domains using search criteria, including optional filtering, pagination and sorting ### Example ```java @@ -325,7 +325,7 @@ import com.equinix.sdk.fabricv4.ApiException; import com.equinix.sdk.fabricv4.Configuration; import com.equinix.sdk.fabricv4.auth.*; import com.equinix.sdk.fabricv4.models.*; -import com.equinix.sdk.fabricv4.api.AgentsApi; +import com.equinix.sdk.fabricv4.api.ApplicationDomainsApi; public class Example { public static void main(String[] args) { @@ -336,14 +336,13 @@ public class Example { HttpBearerAuth BearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("BearerAuth"); BearerAuth.setBearerToken("BEARER TOKEN"); - AgentsApi apiInstance = new AgentsApi(defaultClient); - Integer offset = 1; // Integer | offset - Integer limit = 10; // Integer | number of records to fetch + ApplicationDomainsApi apiInstance = new ApplicationDomainsApi(defaultClient); + AppDomainSearchRequest appDomainSearchRequest = new AppDomainSearchRequest(); // AppDomainSearchRequest | try { - AgentGetAllResponse result = apiInstance.getAgents(offset, limit); + AppDomainSearchResponse result = apiInstance.searchAppDomains(appDomainSearchRequest); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AgentsApi#getAgents"); + System.err.println("Exception when calling ApplicationDomainsApi#searchAppDomains"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -357,12 +356,11 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **offset** | **Integer**| offset | [optional] | -| **limit** | **Integer**| number of records to fetch | [optional] | +| **appDomainSearchRequest** | [**AppDomainSearchRequest**](AppDomainSearchRequest.md)| | | ### Return type -[**AgentGetAllResponse**](AgentGetAllResponse.md) +[**AppDomainSearchResponse**](AppDomainSearchResponse.md) ### Authorization @@ -370,25 +368,26 @@ public class Example { ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| | **200** | Successful operation | - | +| **400** | Bad request | - | | **401** | Unauthorized | - | | **403** | Forbidden | - | -| **404** | Not Found | - | +| **415** | Unsupported Media Type | - | | **500** | Internal server error | - | - -# **patchAgentByUuid** -> Agents patchAgentByUuid(agentId, agentPatchRequest) + +# **updateAppDomainByUuid** +> AppDomain updateAppDomainByUuid(appDomainId, appDomainChangeOperation) -Update Agent by UUID +Update App Domain -This API provides capability to update an agent by uuid <font color=\"red\"> <sup color='red'>Beta</sup></font> +This API provides capability to update user's App Domain ### Example ```java @@ -398,7 +397,7 @@ import com.equinix.sdk.fabricv4.ApiException; import com.equinix.sdk.fabricv4.Configuration; import com.equinix.sdk.fabricv4.auth.*; import com.equinix.sdk.fabricv4.models.*; -import com.equinix.sdk.fabricv4.api.AgentsApi; +import com.equinix.sdk.fabricv4.api.ApplicationDomainsApi; public class Example { public static void main(String[] args) { @@ -409,14 +408,14 @@ public class Example { HttpBearerAuth BearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("BearerAuth"); BearerAuth.setBearerToken("BEARER TOKEN"); - AgentsApi apiInstance = new AgentsApi(defaultClient); - UUID agentId = UUID.randomUUID(); // UUID | Agent UUID - AgentPatchRequest agentPatchRequest = new AgentPatchRequest(); // AgentPatchRequest | + ApplicationDomainsApi apiInstance = new ApplicationDomainsApi(defaultClient); + UUID appDomainId = UUID.randomUUID(); // UUID | App Domain UUID + List appDomainChangeOperation = Arrays.asList(); // List | try { - Agents result = apiInstance.patchAgentByUuid(agentId, agentPatchRequest); + AppDomain result = apiInstance.updateAppDomainByUuid(appDomainId, appDomainChangeOperation); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AgentsApi#patchAgentByUuid"); + System.err.println("Exception when calling ApplicationDomainsApi#updateAppDomainByUuid"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -430,12 +429,12 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **agentId** | **UUID**| Agent UUID | | -| **agentPatchRequest** | [**AgentPatchRequest**](AgentPatchRequest.md)| | | +| **appDomainId** | **UUID**| App Domain UUID | | +| **appDomainChangeOperation** | [**List<AppDomainChangeOperation>**](AppDomainChangeOperation.md)| | | ### Return type -[**Agents**](Agents.md) +[**AppDomain**](AppDomain.md) ### Authorization @@ -443,15 +442,17 @@ public class Example { ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: application/json-patch+json - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **202** | Agent object | - | +| **202** | App Domain object | - | +| **400** | Bad request | - | | **401** | Unauthorized | - | | **403** | Forbidden | - | | **404** | Not Found | - | +| **415** | Unsupported Media Type | - | | **500** | Internal server error | - | diff --git a/services/fabricv4/docs/ApplicationLinksApi.md b/services/fabricv4/docs/ApplicationLinksApi.md new file mode 100644 index 00000000..c0ad0eb2 --- /dev/null +++ b/services/fabricv4/docs/ApplicationLinksApi.md @@ -0,0 +1,1218 @@ +# ApplicationLinksApi + +All URIs are relative to *https://api.equinix.com* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**attachAppDomainToAppLink**](ApplicationLinksApi.md#attachAppDomainToAppLink) | **PUT** /fabric/v4/appLinks/{appLinkId}/appDomains/{appDomainId} | Attach App Domain to App Link | +| [**attachAppServiceToAppLink**](ApplicationLinksApi.md#attachAppServiceToAppLink) | **PUT** /fabric/v4/appLinks/{appLinkId}/appServices/{appServiceId} | Attach App Service to App Link | +| [**createAppLink**](ApplicationLinksApi.md#createAppLink) | **POST** /fabric/v4/appLinks | Create App Link | +| [**deleteAppLinkByUuid**](ApplicationLinksApi.md#deleteAppLinkByUuid) | **DELETE** /fabric/v4/appLinks/{appLinkId} | Delete App Link | +| [**detachAppDomainFromAppLink**](ApplicationLinksApi.md#detachAppDomainFromAppLink) | **DELETE** /fabric/v4/appLinks/{appLinkId}/appDomains/{appDomainId} | Detach App Domain from App Link | +| [**detachAppServiceFromAppLink**](ApplicationLinksApi.md#detachAppServiceFromAppLink) | **DELETE** /fabric/v4/appLinks/{appLinkId}/appServices/{appServiceId} | Detach App Service from App Link | +| [**getAppLinkByUuid**](ApplicationLinksApi.md#getAppLinkByUuid) | **GET** /fabric/v4/appLinks/{appLinkId} | Get App Link | +| [**getAttachedAppDomainByUuid**](ApplicationLinksApi.md#getAttachedAppDomainByUuid) | **GET** /fabric/v4/appLinks/{appLinkId}/appDomains/{appDomainId} | Get attached App Domain for App Link | +| [**getAttachedAppDomainsByAppLinkId**](ApplicationLinksApi.md#getAttachedAppDomainsByAppLinkId) | **GET** /fabric/v4/appLinks/{appLinkId}/appDomains | Get attached App Domains for App Link | +| [**getAttachedAppServiceByUuid**](ApplicationLinksApi.md#getAttachedAppServiceByUuid) | **GET** /fabric/v4/appLinks/{appLinkId}/appServices/{appServiceId} | Get attached App Service for App Link | +| [**getAttachedAppServicesByAppLinkId**](ApplicationLinksApi.md#getAttachedAppServicesByAppLinkId) | **GET** /fabric/v4/appLinks/{appLinkId}/appServices | Get attached App Services for App Link | +| [**searchAppLinks**](ApplicationLinksApi.md#searchAppLinks) | **POST** /fabric/v4/appLinks/search | Search App Links | +| [**searchAttachedAppDomains**](ApplicationLinksApi.md#searchAttachedAppDomains) | **POST** /fabric/v4/appLinks/{appLinkId}/appDomains/search | Search attached App Domain to App Link | +| [**searchAttachedAppServices**](ApplicationLinksApi.md#searchAttachedAppServices) | **POST** /fabric/v4/appLinks/{appLinkId}/appServices/search | Search attached App Service to App Link | +| [**updateAppLinkByUuid**](ApplicationLinksApi.md#updateAppLinkByUuid) | **PATCH** /fabric/v4/appLinks/{appLinkId} | Update App Link | +| [**updateAppServiceAttachmentToAppLink**](ApplicationLinksApi.md#updateAppServiceAttachmentToAppLink) | **PATCH** /fabric/v4/appLinks/{appLinkId}/appServices/{appServiceId} | Update App Service attachment to App Link | + + + +# **attachAppDomainToAppLink** +> AppLinkAppDomainAttachment attachAppDomainToAppLink(appLinkId, appDomainId) + +Attach App Domain to App Link + +This API provides ability to attach the user's App Domain to App Link. + +### Example +```java +// Import classes: +import com.equinix.sdk.fabricv4.ApiClient; +import com.equinix.sdk.fabricv4.ApiException; +import com.equinix.sdk.fabricv4.Configuration; +import com.equinix.sdk.fabricv4.auth.*; +import com.equinix.sdk.fabricv4.models.*; +import com.equinix.sdk.fabricv4.api.ApplicationLinksApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.equinix.com"); + + // Configure HTTP bearer authorization: BearerAuth + HttpBearerAuth BearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("BearerAuth"); + BearerAuth.setBearerToken("BEARER TOKEN"); + + ApplicationLinksApi apiInstance = new ApplicationLinksApi(defaultClient); + UUID appLinkId = UUID.randomUUID(); // UUID | App Link UUID + UUID appDomainId = UUID.randomUUID(); // UUID | App Domain UUID + try { + AppLinkAppDomainAttachment result = apiInstance.attachAppDomainToAppLink(appLinkId, appDomainId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ApplicationLinksApi#attachAppDomainToAppLink"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **appLinkId** | **UUID**| App Link UUID | | +| **appDomainId** | **UUID**| App Domain UUID | | + +### Return type + +[**AppLinkAppDomainAttachment**](AppLinkAppDomainAttachment.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **202** | Attach App Domain object | - | +| **400** | Bad request | - | +| **401** | Unauthorized | - | +| **403** | Forbidden | - | +| **404** | Not Found | - | +| **500** | Internal server error | - | + + +# **attachAppServiceToAppLink** +> AppLinkAppServiceAttachment attachAppServiceToAppLink(appLinkId, appServiceId, appLinkAttachServiceRequest) + +Attach App Service to App Link + +This API provides ability to attach the user's App Service to App Link. + +### Example +```java +// Import classes: +import com.equinix.sdk.fabricv4.ApiClient; +import com.equinix.sdk.fabricv4.ApiException; +import com.equinix.sdk.fabricv4.Configuration; +import com.equinix.sdk.fabricv4.auth.*; +import com.equinix.sdk.fabricv4.models.*; +import com.equinix.sdk.fabricv4.api.ApplicationLinksApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.equinix.com"); + + // Configure HTTP bearer authorization: BearerAuth + HttpBearerAuth BearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("BearerAuth"); + BearerAuth.setBearerToken("BEARER TOKEN"); + + ApplicationLinksApi apiInstance = new ApplicationLinksApi(defaultClient); + UUID appLinkId = UUID.randomUUID(); // UUID | App Link UUID + UUID appServiceId = UUID.randomUUID(); // UUID | App Service UUID + AppLinkAttachServiceRequest appLinkAttachServiceRequest = new AppLinkAttachServiceRequest(); // AppLinkAttachServiceRequest | + try { + AppLinkAppServiceAttachment result = apiInstance.attachAppServiceToAppLink(appLinkId, appServiceId, appLinkAttachServiceRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ApplicationLinksApi#attachAppServiceToAppLink"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **appLinkId** | **UUID**| App Link UUID | | +| **appServiceId** | **UUID**| App Service UUID | | +| **appLinkAttachServiceRequest** | [**AppLinkAttachServiceRequest**](AppLinkAttachServiceRequest.md)| | | + +### Return type + +[**AppLinkAppServiceAttachment**](AppLinkAppServiceAttachment.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **202** | Attach App Service object | - | +| **401** | Unauthorized | - | +| **403** | Forbidden | - | +| **404** | Not Found | - | +| **500** | Internal server error | - | + + +# **createAppLink** +> AppLink createAppLink(appLinkPostRequest) + +Create App Link + +This API provides capability to create user's App Link + +### Example +```java +// Import classes: +import com.equinix.sdk.fabricv4.ApiClient; +import com.equinix.sdk.fabricv4.ApiException; +import com.equinix.sdk.fabricv4.Configuration; +import com.equinix.sdk.fabricv4.auth.*; +import com.equinix.sdk.fabricv4.models.*; +import com.equinix.sdk.fabricv4.api.ApplicationLinksApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.equinix.com"); + + // Configure HTTP bearer authorization: BearerAuth + HttpBearerAuth BearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("BearerAuth"); + BearerAuth.setBearerToken("BEARER TOKEN"); + + ApplicationLinksApi apiInstance = new ApplicationLinksApi(defaultClient); + AppLinkPostRequest appLinkPostRequest = new AppLinkPostRequest(); // AppLinkPostRequest | + try { + AppLink result = apiInstance.createAppLink(appLinkPostRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ApplicationLinksApi#createAppLink"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **appLinkPostRequest** | [**AppLinkPostRequest**](AppLinkPostRequest.md)| | | + +### Return type + +[**AppLink**](AppLink.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **202** | App Link object | - | +| **400** | Bad request | - | +| **401** | Unauthorized | - | +| **403** | Forbidden | - | +| **415** | Unsupported Media Type | - | +| **500** | Internal server error | - | + + +# **deleteAppLinkByUuid** +> AppLink deleteAppLinkByUuid(appLinkId) + +Delete App Link + +This API provides capability to delete user's App Link + +### Example +```java +// Import classes: +import com.equinix.sdk.fabricv4.ApiClient; +import com.equinix.sdk.fabricv4.ApiException; +import com.equinix.sdk.fabricv4.Configuration; +import com.equinix.sdk.fabricv4.auth.*; +import com.equinix.sdk.fabricv4.models.*; +import com.equinix.sdk.fabricv4.api.ApplicationLinksApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.equinix.com"); + + // Configure HTTP bearer authorization: BearerAuth + HttpBearerAuth BearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("BearerAuth"); + BearerAuth.setBearerToken("BEARER TOKEN"); + + ApplicationLinksApi apiInstance = new ApplicationLinksApi(defaultClient); + UUID appLinkId = UUID.randomUUID(); // UUID | App Link UUID + try { + AppLink result = apiInstance.deleteAppLinkByUuid(appLinkId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ApplicationLinksApi#deleteAppLinkByUuid"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **appLinkId** | **UUID**| App Link UUID | | + +### Return type + +[**AppLink**](AppLink.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **202** | App Link object | - | +| **400** | Bad request | - | +| **401** | Unauthorized | - | +| **403** | Forbidden | - | +| **404** | Not Found | - | +| **500** | Internal server error | - | + + +# **detachAppDomainFromAppLink** +> AppLinkAppDomainAttachment detachAppDomainFromAppLink(appLinkId, appDomainId) + +Detach App Domain from App Link + +This API provides ability to detach App Domain from App Link + +### Example +```java +// Import classes: +import com.equinix.sdk.fabricv4.ApiClient; +import com.equinix.sdk.fabricv4.ApiException; +import com.equinix.sdk.fabricv4.Configuration; +import com.equinix.sdk.fabricv4.auth.*; +import com.equinix.sdk.fabricv4.models.*; +import com.equinix.sdk.fabricv4.api.ApplicationLinksApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.equinix.com"); + + // Configure HTTP bearer authorization: BearerAuth + HttpBearerAuth BearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("BearerAuth"); + BearerAuth.setBearerToken("BEARER TOKEN"); + + ApplicationLinksApi apiInstance = new ApplicationLinksApi(defaultClient); + UUID appLinkId = UUID.randomUUID(); // UUID | App Link UUID + UUID appDomainId = UUID.randomUUID(); // UUID | App Domain UUID + try { + AppLinkAppDomainAttachment result = apiInstance.detachAppDomainFromAppLink(appLinkId, appDomainId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ApplicationLinksApi#detachAppDomainFromAppLink"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **appLinkId** | **UUID**| App Link UUID | | +| **appDomainId** | **UUID**| App Domain UUID | | + +### Return type + +[**AppLinkAppDomainAttachment**](AppLinkAppDomainAttachment.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **202** | Detach App Domain object | - | +| **400** | Bad request | - | +| **401** | Unauthorized | - | +| **403** | Forbidden | - | +| **404** | Not Found | - | +| **500** | Internal server error | - | + + +# **detachAppServiceFromAppLink** +> AppLinkAppServiceAttachment detachAppServiceFromAppLink(appLinkId, appServiceId) + +Detach App Service from App Link + +This API provides ability to detach App Service from App Link + +### Example +```java +// Import classes: +import com.equinix.sdk.fabricv4.ApiClient; +import com.equinix.sdk.fabricv4.ApiException; +import com.equinix.sdk.fabricv4.Configuration; +import com.equinix.sdk.fabricv4.auth.*; +import com.equinix.sdk.fabricv4.models.*; +import com.equinix.sdk.fabricv4.api.ApplicationLinksApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.equinix.com"); + + // Configure HTTP bearer authorization: BearerAuth + HttpBearerAuth BearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("BearerAuth"); + BearerAuth.setBearerToken("BEARER TOKEN"); + + ApplicationLinksApi apiInstance = new ApplicationLinksApi(defaultClient); + UUID appLinkId = UUID.randomUUID(); // UUID | App Link UUID + UUID appServiceId = UUID.randomUUID(); // UUID | App Service UUID + try { + AppLinkAppServiceAttachment result = apiInstance.detachAppServiceFromAppLink(appLinkId, appServiceId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ApplicationLinksApi#detachAppServiceFromAppLink"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **appLinkId** | **UUID**| App Link UUID | | +| **appServiceId** | **UUID**| App Service UUID | | + +### Return type + +[**AppLinkAppServiceAttachment**](AppLinkAppServiceAttachment.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **202** | Detach App Service object | - | +| **400** | Bad request | - | +| **401** | Unauthorized | - | +| **403** | Forbidden | - | +| **404** | Not Found | - | +| **500** | Internal server error | - | + + +# **getAppLinkByUuid** +> AppLink getAppLinkByUuid(appLinkId) + +Get App Link + +This API provides capability to retrieve user's App Link + +### Example +```java +// Import classes: +import com.equinix.sdk.fabricv4.ApiClient; +import com.equinix.sdk.fabricv4.ApiException; +import com.equinix.sdk.fabricv4.Configuration; +import com.equinix.sdk.fabricv4.auth.*; +import com.equinix.sdk.fabricv4.models.*; +import com.equinix.sdk.fabricv4.api.ApplicationLinksApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.equinix.com"); + + // Configure HTTP bearer authorization: BearerAuth + HttpBearerAuth BearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("BearerAuth"); + BearerAuth.setBearerToken("BEARER TOKEN"); + + ApplicationLinksApi apiInstance = new ApplicationLinksApi(defaultClient); + UUID appLinkId = UUID.randomUUID(); // UUID | App Link UUID + try { + AppLink result = apiInstance.getAppLinkByUuid(appLinkId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ApplicationLinksApi#getAppLinkByUuid"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **appLinkId** | **UUID**| App Link UUID | | + +### Return type + +[**AppLink**](AppLink.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | App Link object | - | +| **401** | Unauthorized | - | +| **403** | Forbidden | - | +| **404** | Not Found | - | +| **500** | Internal server error | - | + + +# **getAttachedAppDomainByUuid** +> AppLinkAppDomainAttachment getAttachedAppDomainByUuid(appLinkId, appDomainId) + +Get attached App Domain for App Link + +This API provides ability to retrieve an App Domain attached to an App Link. + +### Example +```java +// Import classes: +import com.equinix.sdk.fabricv4.ApiClient; +import com.equinix.sdk.fabricv4.ApiException; +import com.equinix.sdk.fabricv4.Configuration; +import com.equinix.sdk.fabricv4.auth.*; +import com.equinix.sdk.fabricv4.models.*; +import com.equinix.sdk.fabricv4.api.ApplicationLinksApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.equinix.com"); + + // Configure HTTP bearer authorization: BearerAuth + HttpBearerAuth BearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("BearerAuth"); + BearerAuth.setBearerToken("BEARER TOKEN"); + + ApplicationLinksApi apiInstance = new ApplicationLinksApi(defaultClient); + UUID appLinkId = UUID.randomUUID(); // UUID | App Link UUID + UUID appDomainId = UUID.randomUUID(); // UUID | App Domain UUID + try { + AppLinkAppDomainAttachment result = apiInstance.getAttachedAppDomainByUuid(appLinkId, appDomainId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ApplicationLinksApi#getAttachedAppDomainByUuid"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **appLinkId** | **UUID**| App Link UUID | | +| **appDomainId** | **UUID**| App Domain UUID | | + +### Return type + +[**AppLinkAppDomainAttachment**](AppLinkAppDomainAttachment.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Attached App Domain object | - | +| **401** | Unauthorized | - | +| **403** | Forbidden | - | +| **404** | Not Found | - | +| **500** | Internal server error | - | + + +# **getAttachedAppDomainsByAppLinkId** +> AppLinkAttachedAppDomains getAttachedAppDomainsByAppLinkId(appLinkId, offset, limit, attachmentStatus, order, style) + +Get attached App Domains for App Link + +This API provides capability to retrieve App Domains attached to an App Link. + +### Example +```java +// Import classes: +import com.equinix.sdk.fabricv4.ApiClient; +import com.equinix.sdk.fabricv4.ApiException; +import com.equinix.sdk.fabricv4.Configuration; +import com.equinix.sdk.fabricv4.auth.*; +import com.equinix.sdk.fabricv4.models.*; +import com.equinix.sdk.fabricv4.api.ApplicationLinksApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.equinix.com"); + + // Configure HTTP bearer authorization: BearerAuth + HttpBearerAuth BearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("BearerAuth"); + BearerAuth.setBearerToken("BEARER TOKEN"); + + ApplicationLinksApi apiInstance = new ApplicationLinksApi(defaultClient); + UUID appLinkId = UUID.randomUUID(); // UUID | App Link UUID + Integer offset = 1; // Integer | offset + Integer limit = 10; // Integer | number of records to fetch + List attachmentStatus = Arrays.asList(); // List | Filter attached App Domains by one or more attachment lifecycle states. + AttachedAppDomainOrder order = AttachedAppDomainOrder.fromValue("DESC"); // AttachedAppDomainOrder | Sort order for attached App Domains. + Style style = Style.fromValue("MIN"); // Style | Detail level of the response. + try { + AppLinkAttachedAppDomains result = apiInstance.getAttachedAppDomainsByAppLinkId(appLinkId, offset, limit, attachmentStatus, order, style); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ApplicationLinksApi#getAttachedAppDomainsByAppLinkId"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **appLinkId** | **UUID**| App Link UUID | | +| **offset** | **Integer**| offset | [optional] | +| **limit** | **Integer**| number of records to fetch | [optional] | +| **attachmentStatus** | [**List<AppLinkAttachState>**](AppLinkAttachState.md)| Filter attached App Domains by one or more attachment lifecycle states. | [optional] | +| **order** | [**AttachedAppDomainOrder**](.md)| Sort order for attached App Domains. | [optional] [default to DESC] [enum: DESC, ASC] | +| **style** | [**Style**](.md)| Detail level of the response. | [optional] [default to MEDIUM] [enum: MIN, MEDIUM, FULL] | + +### Return type + +[**AppLinkAttachedAppDomains**](AppLinkAttachedAppDomains.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful operation | - | +| **400** | Bad request | - | +| **401** | Unauthorized | - | +| **403** | Forbidden | - | +| **404** | Not Found | - | +| **500** | Internal server error | - | + + +# **getAttachedAppServiceByUuid** +> AppLinkAppServiceAttachment getAttachedAppServiceByUuid(appLinkId, appServiceId) + +Get attached App Service for App Link + +This API provides ability to retrieve an App Service attached to an App Link. + +### Example +```java +// Import classes: +import com.equinix.sdk.fabricv4.ApiClient; +import com.equinix.sdk.fabricv4.ApiException; +import com.equinix.sdk.fabricv4.Configuration; +import com.equinix.sdk.fabricv4.auth.*; +import com.equinix.sdk.fabricv4.models.*; +import com.equinix.sdk.fabricv4.api.ApplicationLinksApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.equinix.com"); + + // Configure HTTP bearer authorization: BearerAuth + HttpBearerAuth BearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("BearerAuth"); + BearerAuth.setBearerToken("BEARER TOKEN"); + + ApplicationLinksApi apiInstance = new ApplicationLinksApi(defaultClient); + UUID appLinkId = UUID.randomUUID(); // UUID | App Link UUID + UUID appServiceId = UUID.randomUUID(); // UUID | App Service UUID + try { + AppLinkAppServiceAttachment result = apiInstance.getAttachedAppServiceByUuid(appLinkId, appServiceId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ApplicationLinksApi#getAttachedAppServiceByUuid"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **appLinkId** | **UUID**| App Link UUID | | +| **appServiceId** | **UUID**| App Service UUID | | + +### Return type + +[**AppLinkAppServiceAttachment**](AppLinkAppServiceAttachment.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Attached App Service object | - | +| **401** | Unauthorized | - | +| **403** | Forbidden | - | +| **404** | Not Found | - | +| **500** | Internal server error | - | + + +# **getAttachedAppServicesByAppLinkId** +> AppLinkAttachedAppServices getAttachedAppServicesByAppLinkId(appLinkId, offset, limit, attachmentStatus, order, style) + +Get attached App Services for App Link + +This API provides capability to retrieve App Services attached to an App Link. + +### Example +```java +// Import classes: +import com.equinix.sdk.fabricv4.ApiClient; +import com.equinix.sdk.fabricv4.ApiException; +import com.equinix.sdk.fabricv4.Configuration; +import com.equinix.sdk.fabricv4.auth.*; +import com.equinix.sdk.fabricv4.models.*; +import com.equinix.sdk.fabricv4.api.ApplicationLinksApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.equinix.com"); + + // Configure HTTP bearer authorization: BearerAuth + HttpBearerAuth BearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("BearerAuth"); + BearerAuth.setBearerToken("BEARER TOKEN"); + + ApplicationLinksApi apiInstance = new ApplicationLinksApi(defaultClient); + UUID appLinkId = UUID.randomUUID(); // UUID | App Link UUID + Integer offset = 1; // Integer | offset + Integer limit = 10; // Integer | number of records to fetch + List attachmentStatus = Arrays.asList(); // List | Filter attached App Services by one or more attachment lifecycle states. + AttachedAppServiceOrder order = AttachedAppServiceOrder.fromValue("DESC"); // AttachedAppServiceOrder | Sort order for attached App Services. + Style style = Style.fromValue("MIN"); // Style | Detail level of the response. + try { + AppLinkAttachedAppServices result = apiInstance.getAttachedAppServicesByAppLinkId(appLinkId, offset, limit, attachmentStatus, order, style); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ApplicationLinksApi#getAttachedAppServicesByAppLinkId"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **appLinkId** | **UUID**| App Link UUID | | +| **offset** | **Integer**| offset | [optional] | +| **limit** | **Integer**| number of records to fetch | [optional] | +| **attachmentStatus** | [**List<AppLinkAttachState>**](AppLinkAttachState.md)| Filter attached App Services by one or more attachment lifecycle states. | [optional] | +| **order** | [**AttachedAppServiceOrder**](.md)| Sort order for attached App Services. | [optional] [default to DESC] [enum: DESC, ASC] | +| **style** | [**Style**](.md)| Detail level of the response. | [optional] [default to MEDIUM] [enum: MIN, MEDIUM, FULL] | + +### Return type + +[**AppLinkAttachedAppServices**](AppLinkAttachedAppServices.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful operation | - | +| **400** | Bad request | - | +| **401** | Unauthorized | - | +| **403** | Forbidden | - | +| **404** | Not Found | - | +| **500** | Internal server error | - | + + +# **searchAppLinks** +> AppLinkSearchResponse searchAppLinks(appLinkSearchRequest) + +Search App Links + +The API provides capability to get list of user's App Links using search criteria, including optional filtering, pagination and sorting + +### Example +```java +// Import classes: +import com.equinix.sdk.fabricv4.ApiClient; +import com.equinix.sdk.fabricv4.ApiException; +import com.equinix.sdk.fabricv4.Configuration; +import com.equinix.sdk.fabricv4.auth.*; +import com.equinix.sdk.fabricv4.models.*; +import com.equinix.sdk.fabricv4.api.ApplicationLinksApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.equinix.com"); + + // Configure HTTP bearer authorization: BearerAuth + HttpBearerAuth BearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("BearerAuth"); + BearerAuth.setBearerToken("BEARER TOKEN"); + + ApplicationLinksApi apiInstance = new ApplicationLinksApi(defaultClient); + AppLinkSearchRequest appLinkSearchRequest = new AppLinkSearchRequest(); // AppLinkSearchRequest | + try { + AppLinkSearchResponse result = apiInstance.searchAppLinks(appLinkSearchRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ApplicationLinksApi#searchAppLinks"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **appLinkSearchRequest** | [**AppLinkSearchRequest**](AppLinkSearchRequest.md)| | | + +### Return type + +[**AppLinkSearchResponse**](AppLinkSearchResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful operation | - | +| **400** | Bad request | - | +| **401** | Unauthorized | - | +| **403** | Forbidden | - | +| **415** | Unsupported Media Type | - | +| **500** | Internal server error | - | + + +# **searchAttachedAppDomains** +> AppLinkAttachDomainSearchResponse searchAttachedAppDomains(appLinkId, appLinkAttachDomainSearchRequest) + +Search attached App Domain to App Link + +The API provides capability to get list of user's attached App Domains using search criteria, including optional filtering, pagination and sorting + +### Example +```java +// Import classes: +import com.equinix.sdk.fabricv4.ApiClient; +import com.equinix.sdk.fabricv4.ApiException; +import com.equinix.sdk.fabricv4.Configuration; +import com.equinix.sdk.fabricv4.auth.*; +import com.equinix.sdk.fabricv4.models.*; +import com.equinix.sdk.fabricv4.api.ApplicationLinksApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.equinix.com"); + + // Configure HTTP bearer authorization: BearerAuth + HttpBearerAuth BearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("BearerAuth"); + BearerAuth.setBearerToken("BEARER TOKEN"); + + ApplicationLinksApi apiInstance = new ApplicationLinksApi(defaultClient); + UUID appLinkId = UUID.randomUUID(); // UUID | App Link UUID + AppLinkAttachDomainSearchRequest appLinkAttachDomainSearchRequest = new AppLinkAttachDomainSearchRequest(); // AppLinkAttachDomainSearchRequest | + try { + AppLinkAttachDomainSearchResponse result = apiInstance.searchAttachedAppDomains(appLinkId, appLinkAttachDomainSearchRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ApplicationLinksApi#searchAttachedAppDomains"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **appLinkId** | **UUID**| App Link UUID | | +| **appLinkAttachDomainSearchRequest** | [**AppLinkAttachDomainSearchRequest**](AppLinkAttachDomainSearchRequest.md)| | | + +### Return type + +[**AppLinkAttachDomainSearchResponse**](AppLinkAttachDomainSearchResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful operation | - | +| **400** | Bad request | - | +| **401** | Unauthorized | - | +| **403** | Forbidden | - | +| **415** | Unsupported Media Type | - | +| **500** | Internal server error | - | + + +# **searchAttachedAppServices** +> AppLinkAttachServiceSearchResponse searchAttachedAppServices(appLinkId, appLinkAttachServiceSearchRequest) + +Search attached App Service to App Link + +The API provides capability to get list of user's attached App Services using search criteria, including optional filtering, pagination and sorting + +### Example +```java +// Import classes: +import com.equinix.sdk.fabricv4.ApiClient; +import com.equinix.sdk.fabricv4.ApiException; +import com.equinix.sdk.fabricv4.Configuration; +import com.equinix.sdk.fabricv4.auth.*; +import com.equinix.sdk.fabricv4.models.*; +import com.equinix.sdk.fabricv4.api.ApplicationLinksApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.equinix.com"); + + // Configure HTTP bearer authorization: BearerAuth + HttpBearerAuth BearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("BearerAuth"); + BearerAuth.setBearerToken("BEARER TOKEN"); + + ApplicationLinksApi apiInstance = new ApplicationLinksApi(defaultClient); + UUID appLinkId = UUID.randomUUID(); // UUID | App Link UUID + AppLinkAttachServiceSearchRequest appLinkAttachServiceSearchRequest = new AppLinkAttachServiceSearchRequest(); // AppLinkAttachServiceSearchRequest | + try { + AppLinkAttachServiceSearchResponse result = apiInstance.searchAttachedAppServices(appLinkId, appLinkAttachServiceSearchRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ApplicationLinksApi#searchAttachedAppServices"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **appLinkId** | **UUID**| App Link UUID | | +| **appLinkAttachServiceSearchRequest** | [**AppLinkAttachServiceSearchRequest**](AppLinkAttachServiceSearchRequest.md)| | | + +### Return type + +[**AppLinkAttachServiceSearchResponse**](AppLinkAttachServiceSearchResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful operation | - | +| **400** | Bad request | - | +| **401** | Unauthorized | - | +| **403** | Forbidden | - | +| **415** | Unsupported Media Type | - | +| **500** | Internal server error | - | + + +# **updateAppLinkByUuid** +> AppLink updateAppLinkByUuid(appLinkId, appLinkChangeOperation) + +Update App Link + +This API provides capability to update user's App Link + +### Example +```java +// Import classes: +import com.equinix.sdk.fabricv4.ApiClient; +import com.equinix.sdk.fabricv4.ApiException; +import com.equinix.sdk.fabricv4.Configuration; +import com.equinix.sdk.fabricv4.auth.*; +import com.equinix.sdk.fabricv4.models.*; +import com.equinix.sdk.fabricv4.api.ApplicationLinksApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.equinix.com"); + + // Configure HTTP bearer authorization: BearerAuth + HttpBearerAuth BearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("BearerAuth"); + BearerAuth.setBearerToken("BEARER TOKEN"); + + ApplicationLinksApi apiInstance = new ApplicationLinksApi(defaultClient); + UUID appLinkId = UUID.randomUUID(); // UUID | App Link UUID + List appLinkChangeOperation = Arrays.asList(); // List | + try { + AppLink result = apiInstance.updateAppLinkByUuid(appLinkId, appLinkChangeOperation); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ApplicationLinksApi#updateAppLinkByUuid"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **appLinkId** | **UUID**| App Link UUID | | +| **appLinkChangeOperation** | [**List<AppLinkChangeOperation>**](AppLinkChangeOperation.md)| | | + +### Return type + +[**AppLink**](AppLink.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json-patch+json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **202** | App Link object | - | +| **400** | Bad request | - | +| **401** | Unauthorized | - | +| **403** | Forbidden | - | +| **404** | Not Found | - | +| **415** | Unsupported Media Type | - | +| **500** | Internal server error | - | + + +# **updateAppServiceAttachmentToAppLink** +> AppLinkAppServiceAttachment updateAppServiceAttachmentToAppLink(appLinkId, appServiceId, appLinkAppServiceAttachmentChangeOperation) + +Update App Service attachment to App Link + +This API provides ability to update the App Service attachment to App Link. + +### Example +```java +// Import classes: +import com.equinix.sdk.fabricv4.ApiClient; +import com.equinix.sdk.fabricv4.ApiException; +import com.equinix.sdk.fabricv4.Configuration; +import com.equinix.sdk.fabricv4.auth.*; +import com.equinix.sdk.fabricv4.models.*; +import com.equinix.sdk.fabricv4.api.ApplicationLinksApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.equinix.com"); + + // Configure HTTP bearer authorization: BearerAuth + HttpBearerAuth BearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("BearerAuth"); + BearerAuth.setBearerToken("BEARER TOKEN"); + + ApplicationLinksApi apiInstance = new ApplicationLinksApi(defaultClient); + UUID appLinkId = UUID.randomUUID(); // UUID | App Link UUID + UUID appServiceId = UUID.randomUUID(); // UUID | App Service UUID + List appLinkAppServiceAttachmentChangeOperation = Arrays.asList(); // List | + try { + AppLinkAppServiceAttachment result = apiInstance.updateAppServiceAttachmentToAppLink(appLinkId, appServiceId, appLinkAppServiceAttachmentChangeOperation); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ApplicationLinksApi#updateAppServiceAttachmentToAppLink"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **appLinkId** | **UUID**| App Link UUID | | +| **appServiceId** | **UUID**| App Service UUID | | +| **appLinkAppServiceAttachmentChangeOperation** | [**List<AppLinkAppServiceAttachmentChangeOperation>**](AppLinkAppServiceAttachmentChangeOperation.md)| | | + +### Return type + +[**AppLinkAppServiceAttachment**](AppLinkAppServiceAttachment.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json-patch+json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **202** | Update App Service attachment object | - | +| **400** | Bad request | - | +| **401** | Unauthorized | - | +| **403** | Forbidden | - | +| **404** | Not Found | - | +| **415** | Unsupported Media Type | - | +| **500** | Internal server error | - | + diff --git a/services/fabricv4/docs/ApplicationServicesApi.md b/services/fabricv4/docs/ApplicationServicesApi.md new file mode 100644 index 00000000..f0a30cb8 --- /dev/null +++ b/services/fabricv4/docs/ApplicationServicesApi.md @@ -0,0 +1,616 @@ +# ApplicationServicesApi + +All URIs are relative to *https://api.equinix.com* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**createAppService**](ApplicationServicesApi.md#createAppService) | **POST** /fabric/v4/appServices | Create App Service | +| [**deleteAppServiceByUuid**](ApplicationServicesApi.md#deleteAppServiceByUuid) | **DELETE** /fabric/v4/appServices/{appServiceId} | Delete App Service | +| [**getAppServiceByUuid**](ApplicationServicesApi.md#getAppServiceByUuid) | **GET** /fabric/v4/appServices/{appServiceId} | Get App Service | +| [**getAttachedAppLinksByAppServiceId**](ApplicationServicesApi.md#getAttachedAppLinksByAppServiceId) | **GET** /fabric/v4/appServices/{appServiceId}/appLinks | Get attached App Links for App Service | +| [**getAttachedAppSubscriptionsByAppServiceId**](ApplicationServicesApi.md#getAttachedAppSubscriptionsByAppServiceId) | **GET** /fabric/v4/appServices/{appServiceId}/appSubscriptions | Get attached App Subscriptions for App Service | +| [**searchAppServices**](ApplicationServicesApi.md#searchAppServices) | **POST** /fabric/v4/appServices/search | Search App Services | +| [**searchAttachedAppSubscriptionsByAppServiceId**](ApplicationServicesApi.md#searchAttachedAppSubscriptionsByAppServiceId) | **POST** /fabric/v4/appServices/{appServiceId}/appSubscriptions/search | Search attached App Subscriptions | +| [**updateAppServiceByUuid**](ApplicationServicesApi.md#updateAppServiceByUuid) | **PATCH** /fabric/v4/appServices/{appServiceId} | Update App Service | + + + +# **createAppService** +> AppService createAppService(appServicePostRequest) + +Create App Service + +This API provides capability to create user's App Service + +### Example +```java +// Import classes: +import com.equinix.sdk.fabricv4.ApiClient; +import com.equinix.sdk.fabricv4.ApiException; +import com.equinix.sdk.fabricv4.Configuration; +import com.equinix.sdk.fabricv4.auth.*; +import com.equinix.sdk.fabricv4.models.*; +import com.equinix.sdk.fabricv4.api.ApplicationServicesApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.equinix.com"); + + // Configure HTTP bearer authorization: BearerAuth + HttpBearerAuth BearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("BearerAuth"); + BearerAuth.setBearerToken("BEARER TOKEN"); + + ApplicationServicesApi apiInstance = new ApplicationServicesApi(defaultClient); + AppServicePostRequest appServicePostRequest = new AppServicePostRequest(); // AppServicePostRequest | + try { + AppService result = apiInstance.createAppService(appServicePostRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ApplicationServicesApi#createAppService"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **appServicePostRequest** | [**AppServicePostRequest**](AppServicePostRequest.md)| | | + +### Return type + +[**AppService**](AppService.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **202** | App Service object | - | +| **400** | Bad request | - | +| **401** | Unauthorized | - | +| **403** | Forbidden | - | +| **415** | Unsupported Media Type | - | +| **500** | Internal server error | - | + + +# **deleteAppServiceByUuid** +> AppService deleteAppServiceByUuid(appServiceId) + +Delete App Service + +This API provides capability to delete user's App Service + +### Example +```java +// Import classes: +import com.equinix.sdk.fabricv4.ApiClient; +import com.equinix.sdk.fabricv4.ApiException; +import com.equinix.sdk.fabricv4.Configuration; +import com.equinix.sdk.fabricv4.auth.*; +import com.equinix.sdk.fabricv4.models.*; +import com.equinix.sdk.fabricv4.api.ApplicationServicesApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.equinix.com"); + + // Configure HTTP bearer authorization: BearerAuth + HttpBearerAuth BearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("BearerAuth"); + BearerAuth.setBearerToken("BEARER TOKEN"); + + ApplicationServicesApi apiInstance = new ApplicationServicesApi(defaultClient); + UUID appServiceId = UUID.randomUUID(); // UUID | App Service UUID + try { + AppService result = apiInstance.deleteAppServiceByUuid(appServiceId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ApplicationServicesApi#deleteAppServiceByUuid"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **appServiceId** | **UUID**| App Service UUID | | + +### Return type + +[**AppService**](AppService.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **202** | App Service object | - | +| **400** | Bad request | - | +| **401** | Unauthorized | - | +| **403** | Forbidden | - | +| **404** | Not Found | - | +| **500** | Internal server error | - | + + +# **getAppServiceByUuid** +> AppService getAppServiceByUuid(appServiceId) + +Get App Service + +This API provides capability to retrieve user's App Service + +### Example +```java +// Import classes: +import com.equinix.sdk.fabricv4.ApiClient; +import com.equinix.sdk.fabricv4.ApiException; +import com.equinix.sdk.fabricv4.Configuration; +import com.equinix.sdk.fabricv4.auth.*; +import com.equinix.sdk.fabricv4.models.*; +import com.equinix.sdk.fabricv4.api.ApplicationServicesApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.equinix.com"); + + // Configure HTTP bearer authorization: BearerAuth + HttpBearerAuth BearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("BearerAuth"); + BearerAuth.setBearerToken("BEARER TOKEN"); + + ApplicationServicesApi apiInstance = new ApplicationServicesApi(defaultClient); + UUID appServiceId = UUID.randomUUID(); // UUID | App Service UUID + try { + AppService result = apiInstance.getAppServiceByUuid(appServiceId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ApplicationServicesApi#getAppServiceByUuid"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **appServiceId** | **UUID**| App Service UUID | | + +### Return type + +[**AppService**](AppService.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | App Service object | - | +| **401** | Unauthorized | - | +| **403** | Forbidden | - | +| **404** | Not Found | - | +| **500** | Internal server error | - | + + +# **getAttachedAppLinksByAppServiceId** +> AppServiceAttachedAppLinks getAttachedAppLinksByAppServiceId(appServiceId, offset, limit, state, order, style) + +Get attached App Links for App Service + +This API provides capability to retrieve App Links attached to an App Service. + +### Example +```java +// Import classes: +import com.equinix.sdk.fabricv4.ApiClient; +import com.equinix.sdk.fabricv4.ApiException; +import com.equinix.sdk.fabricv4.Configuration; +import com.equinix.sdk.fabricv4.auth.*; +import com.equinix.sdk.fabricv4.models.*; +import com.equinix.sdk.fabricv4.api.ApplicationServicesApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.equinix.com"); + + // Configure HTTP bearer authorization: BearerAuth + HttpBearerAuth BearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("BearerAuth"); + BearerAuth.setBearerToken("BEARER TOKEN"); + + ApplicationServicesApi apiInstance = new ApplicationServicesApi(defaultClient); + UUID appServiceId = UUID.randomUUID(); // UUID | App Service UUID + Integer offset = 1; // Integer | offset + Integer limit = 10; // Integer | number of records to fetch + List state = Arrays.asList(); // List | Filter attached App Links by one or more lifecycle states. + AttachedAppLinkOrder order = AttachedAppLinkOrder.fromValue("DESC"); // AttachedAppLinkOrder | Sort order for attached App Links. + Style style = Style.fromValue("MIN"); // Style | Detail level of the response. + try { + AppServiceAttachedAppLinks result = apiInstance.getAttachedAppLinksByAppServiceId(appServiceId, offset, limit, state, order, style); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ApplicationServicesApi#getAttachedAppLinksByAppServiceId"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **appServiceId** | **UUID**| App Service UUID | | +| **offset** | **Integer**| offset | [optional] | +| **limit** | **Integer**| number of records to fetch | [optional] | +| **state** | [**List<AppLinkState>**](AppLinkState.md)| Filter attached App Links by one or more lifecycle states. | [optional] | +| **order** | [**AttachedAppLinkOrder**](.md)| Sort order for attached App Links. | [optional] [default to DESC] [enum: DESC, ASC] | +| **style** | [**Style**](.md)| Detail level of the response. | [optional] [default to MEDIUM] [enum: MIN, MEDIUM, FULL] | + +### Return type + +[**AppServiceAttachedAppLinks**](AppServiceAttachedAppLinks.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful operation | - | +| **400** | Bad request | - | +| **401** | Unauthorized | - | +| **403** | Forbidden | - | +| **404** | Not Found | - | +| **500** | Internal server error | - | + + +# **getAttachedAppSubscriptionsByAppServiceId** +> AppServiceAttachedAppSubscriptions getAttachedAppSubscriptionsByAppServiceId(appServiceId, offset, limit, state, order, style) + +Get attached App Subscriptions for App Service + +This API provides capability to retrieve App Subscriptions attached to an App Service. + +### Example +```java +// Import classes: +import com.equinix.sdk.fabricv4.ApiClient; +import com.equinix.sdk.fabricv4.ApiException; +import com.equinix.sdk.fabricv4.Configuration; +import com.equinix.sdk.fabricv4.auth.*; +import com.equinix.sdk.fabricv4.models.*; +import com.equinix.sdk.fabricv4.api.ApplicationServicesApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.equinix.com"); + + // Configure HTTP bearer authorization: BearerAuth + HttpBearerAuth BearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("BearerAuth"); + BearerAuth.setBearerToken("BEARER TOKEN"); + + ApplicationServicesApi apiInstance = new ApplicationServicesApi(defaultClient); + UUID appServiceId = UUID.randomUUID(); // UUID | App Service UUID + Integer offset = 1; // Integer | offset + Integer limit = 10; // Integer | number of records to fetch + List state = Arrays.asList(); // List | Filter attached App Subscriptions by one or more lifecycle states. + AttachedAppSubscriptionOrder order = AttachedAppSubscriptionOrder.fromValue("DESC"); // AttachedAppSubscriptionOrder | Sort order for attached App Subscriptions. + Style style = Style.fromValue("MIN"); // Style | Detail level of the response. + try { + AppServiceAttachedAppSubscriptions result = apiInstance.getAttachedAppSubscriptionsByAppServiceId(appServiceId, offset, limit, state, order, style); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ApplicationServicesApi#getAttachedAppSubscriptionsByAppServiceId"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **appServiceId** | **UUID**| App Service UUID | | +| **offset** | **Integer**| offset | [optional] | +| **limit** | **Integer**| number of records to fetch | [optional] | +| **state** | [**List<AppSubscriptionState>**](AppSubscriptionState.md)| Filter attached App Subscriptions by one or more lifecycle states. | [optional] | +| **order** | [**AttachedAppSubscriptionOrder**](.md)| Sort order for attached App Subscriptions. | [optional] [default to DESC] [enum: DESC, ASC] | +| **style** | [**Style**](.md)| Detail level of the response. | [optional] [default to MEDIUM] [enum: MIN, MEDIUM, FULL] | + +### Return type + +[**AppServiceAttachedAppSubscriptions**](AppServiceAttachedAppSubscriptions.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful operation | - | +| **400** | Bad request | - | +| **401** | Unauthorized | - | +| **403** | Forbidden | - | +| **404** | Not Found | - | +| **500** | Internal server error | - | + + +# **searchAppServices** +> AppServiceSearchResponse searchAppServices(appServiceSearchRequest) + +Search App Services + +The API provides capability to get list of user's App Services using search criteria, including optional filtering, pagination and sorting + +### Example +```java +// Import classes: +import com.equinix.sdk.fabricv4.ApiClient; +import com.equinix.sdk.fabricv4.ApiException; +import com.equinix.sdk.fabricv4.Configuration; +import com.equinix.sdk.fabricv4.auth.*; +import com.equinix.sdk.fabricv4.models.*; +import com.equinix.sdk.fabricv4.api.ApplicationServicesApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.equinix.com"); + + // Configure HTTP bearer authorization: BearerAuth + HttpBearerAuth BearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("BearerAuth"); + BearerAuth.setBearerToken("BEARER TOKEN"); + + ApplicationServicesApi apiInstance = new ApplicationServicesApi(defaultClient); + AppServiceSearchRequest appServiceSearchRequest = new AppServiceSearchRequest(); // AppServiceSearchRequest | + try { + AppServiceSearchResponse result = apiInstance.searchAppServices(appServiceSearchRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ApplicationServicesApi#searchAppServices"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **appServiceSearchRequest** | [**AppServiceSearchRequest**](AppServiceSearchRequest.md)| | | + +### Return type + +[**AppServiceSearchResponse**](AppServiceSearchResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful operation | - | +| **400** | Bad request | - | +| **401** | Unauthorized | - | +| **403** | Forbidden | - | +| **415** | Unsupported Media Type | - | +| **500** | Internal server error | - | + + +# **searchAttachedAppSubscriptionsByAppServiceId** +> AppServiceAttachedAppSubscriptionSearchResponse searchAttachedAppSubscriptionsByAppServiceId(appServiceId, appServiceAttachedAppSubscriptionSearchRequest) + +Search attached App Subscriptions + +The API provides capability to get list of App Subscriptions attached to an App Service using search criteria. + +### Example +```java +// Import classes: +import com.equinix.sdk.fabricv4.ApiClient; +import com.equinix.sdk.fabricv4.ApiException; +import com.equinix.sdk.fabricv4.Configuration; +import com.equinix.sdk.fabricv4.auth.*; +import com.equinix.sdk.fabricv4.models.*; +import com.equinix.sdk.fabricv4.api.ApplicationServicesApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.equinix.com"); + + // Configure HTTP bearer authorization: BearerAuth + HttpBearerAuth BearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("BearerAuth"); + BearerAuth.setBearerToken("BEARER TOKEN"); + + ApplicationServicesApi apiInstance = new ApplicationServicesApi(defaultClient); + UUID appServiceId = UUID.randomUUID(); // UUID | App Service UUID + AppServiceAttachedAppSubscriptionSearchRequest appServiceAttachedAppSubscriptionSearchRequest = new AppServiceAttachedAppSubscriptionSearchRequest(); // AppServiceAttachedAppSubscriptionSearchRequest | + try { + AppServiceAttachedAppSubscriptionSearchResponse result = apiInstance.searchAttachedAppSubscriptionsByAppServiceId(appServiceId, appServiceAttachedAppSubscriptionSearchRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ApplicationServicesApi#searchAttachedAppSubscriptionsByAppServiceId"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **appServiceId** | **UUID**| App Service UUID | | +| **appServiceAttachedAppSubscriptionSearchRequest** | [**AppServiceAttachedAppSubscriptionSearchRequest**](AppServiceAttachedAppSubscriptionSearchRequest.md)| | | + +### Return type + +[**AppServiceAttachedAppSubscriptionSearchResponse**](AppServiceAttachedAppSubscriptionSearchResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful operation | - | +| **400** | Bad request | - | +| **401** | Unauthorized | - | +| **403** | Forbidden | - | +| **415** | Unsupported Media Type | - | +| **500** | Internal server error | - | + + +# **updateAppServiceByUuid** +> AppService updateAppServiceByUuid(appServiceId, appServiceChangeOperation) + +Update App Service + +This API provides capability to update user's App Service + +### Example +```java +// Import classes: +import com.equinix.sdk.fabricv4.ApiClient; +import com.equinix.sdk.fabricv4.ApiException; +import com.equinix.sdk.fabricv4.Configuration; +import com.equinix.sdk.fabricv4.auth.*; +import com.equinix.sdk.fabricv4.models.*; +import com.equinix.sdk.fabricv4.api.ApplicationServicesApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.equinix.com"); + + // Configure HTTP bearer authorization: BearerAuth + HttpBearerAuth BearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("BearerAuth"); + BearerAuth.setBearerToken("BEARER TOKEN"); + + ApplicationServicesApi apiInstance = new ApplicationServicesApi(defaultClient); + UUID appServiceId = UUID.randomUUID(); // UUID | App Service UUID + List appServiceChangeOperation = Arrays.asList(); // List | + try { + AppService result = apiInstance.updateAppServiceByUuid(appServiceId, appServiceChangeOperation); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ApplicationServicesApi#updateAppServiceByUuid"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **appServiceId** | **UUID**| App Service UUID | | +| **appServiceChangeOperation** | [**List<AppServiceChangeOperation>**](AppServiceChangeOperation.md)| | | + +### Return type + +[**AppService**](AppService.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json-patch+json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **202** | App Service object | - | +| **400** | Bad request | - | +| **401** | Unauthorized | - | +| **403** | Forbidden | - | +| **404** | Not Found | - | +| **415** | Unsupported Media Type | - | +| **500** | Internal server error | - | + diff --git a/services/fabricv4/docs/ApplicationSubscriptionsApi.md b/services/fabricv4/docs/ApplicationSubscriptionsApi.md new file mode 100644 index 00000000..807f1502 --- /dev/null +++ b/services/fabricv4/docs/ApplicationSubscriptionsApi.md @@ -0,0 +1,374 @@ +# ApplicationSubscriptionsApi + +All URIs are relative to *https://api.equinix.com* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**createAppSubscription**](ApplicationSubscriptionsApi.md#createAppSubscription) | **POST** /fabric/v4/appSubscriptions | Create App Subscription | +| [**deleteAppSubscriptionByUuid**](ApplicationSubscriptionsApi.md#deleteAppSubscriptionByUuid) | **DELETE** /fabric/v4/appSubscriptions/{appSubscriptionId} | Delete App Subscription | +| [**getAppSubscriptionByUuid**](ApplicationSubscriptionsApi.md#getAppSubscriptionByUuid) | **GET** /fabric/v4/appSubscriptions/{appSubscriptionId} | Get App Subscription | +| [**searchAppSubscriptions**](ApplicationSubscriptionsApi.md#searchAppSubscriptions) | **POST** /fabric/v4/appSubscriptions/search | Search App Subscriptions | +| [**updateAppSubscriptionByUuid**](ApplicationSubscriptionsApi.md#updateAppSubscriptionByUuid) | **PATCH** /fabric/v4/appSubscriptions/{appSubscriptionId} | Update App Subscription | + + + +# **createAppSubscription** +> AppSubscription createAppSubscription(appSubscriptionPostRequest) + +Create App Subscription + +This API provides capability to create user's App Subscription + +### Example +```java +// Import classes: +import com.equinix.sdk.fabricv4.ApiClient; +import com.equinix.sdk.fabricv4.ApiException; +import com.equinix.sdk.fabricv4.Configuration; +import com.equinix.sdk.fabricv4.auth.*; +import com.equinix.sdk.fabricv4.models.*; +import com.equinix.sdk.fabricv4.api.ApplicationSubscriptionsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.equinix.com"); + + // Configure HTTP bearer authorization: BearerAuth + HttpBearerAuth BearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("BearerAuth"); + BearerAuth.setBearerToken("BEARER TOKEN"); + + ApplicationSubscriptionsApi apiInstance = new ApplicationSubscriptionsApi(defaultClient); + AppSubscriptionPostRequest appSubscriptionPostRequest = new AppSubscriptionPostRequest(); // AppSubscriptionPostRequest | + try { + AppSubscription result = apiInstance.createAppSubscription(appSubscriptionPostRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ApplicationSubscriptionsApi#createAppSubscription"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **appSubscriptionPostRequest** | [**AppSubscriptionPostRequest**](AppSubscriptionPostRequest.md)| | | + +### Return type + +[**AppSubscription**](AppSubscription.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **202** | App Subscription object | - | +| **401** | Unauthorized | - | +| **403** | Forbidden | - | +| **415** | Unsupported Media Type | - | +| **500** | Internal server error | - | + + +# **deleteAppSubscriptionByUuid** +> AppSubscription deleteAppSubscriptionByUuid(appSubscriptionId) + +Delete App Subscription + +This API provides capability to delete user's App Subscription + +### Example +```java +// Import classes: +import com.equinix.sdk.fabricv4.ApiClient; +import com.equinix.sdk.fabricv4.ApiException; +import com.equinix.sdk.fabricv4.Configuration; +import com.equinix.sdk.fabricv4.auth.*; +import com.equinix.sdk.fabricv4.models.*; +import com.equinix.sdk.fabricv4.api.ApplicationSubscriptionsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.equinix.com"); + + // Configure HTTP bearer authorization: BearerAuth + HttpBearerAuth BearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("BearerAuth"); + BearerAuth.setBearerToken("BEARER TOKEN"); + + ApplicationSubscriptionsApi apiInstance = new ApplicationSubscriptionsApi(defaultClient); + UUID appSubscriptionId = UUID.randomUUID(); // UUID | App Subscription UUID + try { + AppSubscription result = apiInstance.deleteAppSubscriptionByUuid(appSubscriptionId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ApplicationSubscriptionsApi#deleteAppSubscriptionByUuid"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **appSubscriptionId** | **UUID**| App Subscription UUID | | + +### Return type + +[**AppSubscription**](AppSubscription.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **202** | App Subscription object | - | +| **400** | Bad request | - | +| **401** | Unauthorized | - | +| **403** | Forbidden | - | +| **404** | Not Found | - | +| **500** | Internal server error | - | + + +# **getAppSubscriptionByUuid** +> AppSubscription getAppSubscriptionByUuid(appSubscriptionId) + +Get App Subscription + +This API provides capability to retrieve user's App Subscription + +### Example +```java +// Import classes: +import com.equinix.sdk.fabricv4.ApiClient; +import com.equinix.sdk.fabricv4.ApiException; +import com.equinix.sdk.fabricv4.Configuration; +import com.equinix.sdk.fabricv4.auth.*; +import com.equinix.sdk.fabricv4.models.*; +import com.equinix.sdk.fabricv4.api.ApplicationSubscriptionsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.equinix.com"); + + // Configure HTTP bearer authorization: BearerAuth + HttpBearerAuth BearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("BearerAuth"); + BearerAuth.setBearerToken("BEARER TOKEN"); + + ApplicationSubscriptionsApi apiInstance = new ApplicationSubscriptionsApi(defaultClient); + UUID appSubscriptionId = UUID.randomUUID(); // UUID | App Subscription UUID + try { + AppSubscription result = apiInstance.getAppSubscriptionByUuid(appSubscriptionId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ApplicationSubscriptionsApi#getAppSubscriptionByUuid"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **appSubscriptionId** | **UUID**| App Subscription UUID | | + +### Return type + +[**AppSubscription**](AppSubscription.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | App Subscription object | - | +| **401** | Unauthorized | - | +| **403** | Forbidden | - | +| **404** | Not Found | - | +| **500** | Internal server error | - | + + +# **searchAppSubscriptions** +> AppSubscriptionSearchResponse searchAppSubscriptions(appSubscriptionSearchRequest) + +Search App Subscriptions + +The API provides capability to get list of user's App Subscriptions using search criteria, including optional filtering, pagination and sorting + +### Example +```java +// Import classes: +import com.equinix.sdk.fabricv4.ApiClient; +import com.equinix.sdk.fabricv4.ApiException; +import com.equinix.sdk.fabricv4.Configuration; +import com.equinix.sdk.fabricv4.auth.*; +import com.equinix.sdk.fabricv4.models.*; +import com.equinix.sdk.fabricv4.api.ApplicationSubscriptionsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.equinix.com"); + + // Configure HTTP bearer authorization: BearerAuth + HttpBearerAuth BearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("BearerAuth"); + BearerAuth.setBearerToken("BEARER TOKEN"); + + ApplicationSubscriptionsApi apiInstance = new ApplicationSubscriptionsApi(defaultClient); + AppSubscriptionSearchRequest appSubscriptionSearchRequest = new AppSubscriptionSearchRequest(); // AppSubscriptionSearchRequest | + try { + AppSubscriptionSearchResponse result = apiInstance.searchAppSubscriptions(appSubscriptionSearchRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ApplicationSubscriptionsApi#searchAppSubscriptions"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **appSubscriptionSearchRequest** | [**AppSubscriptionSearchRequest**](AppSubscriptionSearchRequest.md)| | | + +### Return type + +[**AppSubscriptionSearchResponse**](AppSubscriptionSearchResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful operation | - | +| **400** | Bad request | - | +| **401** | Unauthorized | - | +| **403** | Forbidden | - | +| **415** | Unsupported Media Type | - | +| **500** | Internal server error | - | + + +# **updateAppSubscriptionByUuid** +> AppSubscription updateAppSubscriptionByUuid(appSubscriptionId, appSubscriptionChangeOperation) + +Update App Subscription + +This API provides capability to update user's App Subscription + +### Example +```java +// Import classes: +import com.equinix.sdk.fabricv4.ApiClient; +import com.equinix.sdk.fabricv4.ApiException; +import com.equinix.sdk.fabricv4.Configuration; +import com.equinix.sdk.fabricv4.auth.*; +import com.equinix.sdk.fabricv4.models.*; +import com.equinix.sdk.fabricv4.api.ApplicationSubscriptionsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.equinix.com"); + + // Configure HTTP bearer authorization: BearerAuth + HttpBearerAuth BearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("BearerAuth"); + BearerAuth.setBearerToken("BEARER TOKEN"); + + ApplicationSubscriptionsApi apiInstance = new ApplicationSubscriptionsApi(defaultClient); + UUID appSubscriptionId = UUID.randomUUID(); // UUID | App Subscription UUID + List appSubscriptionChangeOperation = Arrays.asList(); // List | + try { + AppSubscription result = apiInstance.updateAppSubscriptionByUuid(appSubscriptionId, appSubscriptionChangeOperation); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ApplicationSubscriptionsApi#updateAppSubscriptionByUuid"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **appSubscriptionId** | **UUID**| App Subscription UUID | | +| **appSubscriptionChangeOperation** | [**List<AppSubscriptionChangeOperation>**](AppSubscriptionChangeOperation.md)| | | + +### Return type + +[**AppSubscription**](AppSubscription.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json-patch+json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **202** | App Subscription object | - | +| **400** | Bad request | - | +| **401** | Unauthorized | - | +| **403** | Forbidden | - | +| **404** | Not Found | - | +| **415** | Unsupported Media Type | - | +| **500** | Internal server error | - | + diff --git a/services/fabricv4/docs/AttachLogoResponse.md b/services/fabricv4/docs/AttachLogoResponse.md deleted file mode 100644 index ab51e59f..00000000 --- a/services/fabricv4/docs/AttachLogoResponse.md +++ /dev/null @@ -1,17 +0,0 @@ - - -# AttachLogoResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**href** | **String** | URL to the attached logo | [optional] | -|**type** | **String** | Type of the logo or attachment | | -|**uuid** | **String** | Unique identifier for the logo | | -|**attachmentStatus** | **String** | Status of the attachment operation | [optional] | -|**extensionType** | **String** | Extension type of logo | [optional] | - - - diff --git a/services/fabricv4/docs/AttachedAppDomainOrder.md b/services/fabricv4/docs/AttachedAppDomainOrder.md new file mode 100644 index 00000000..1419d0f9 --- /dev/null +++ b/services/fabricv4/docs/AttachedAppDomainOrder.md @@ -0,0 +1,13 @@ + + +# AttachedAppDomainOrder + +## Enum + + +* `DESC` (value: `"DESC"`) + +* `ASC` (value: `"ASC"`) + + + diff --git a/services/fabricv4/docs/AttachedAppLinkOrder.md b/services/fabricv4/docs/AttachedAppLinkOrder.md new file mode 100644 index 00000000..df2337a6 --- /dev/null +++ b/services/fabricv4/docs/AttachedAppLinkOrder.md @@ -0,0 +1,13 @@ + + +# AttachedAppLinkOrder + +## Enum + + +* `DESC` (value: `"DESC"`) + +* `ASC` (value: `"ASC"`) + + + diff --git a/services/fabricv4/docs/AttachedAppServiceOrder.md b/services/fabricv4/docs/AttachedAppServiceOrder.md new file mode 100644 index 00000000..262a5c5b --- /dev/null +++ b/services/fabricv4/docs/AttachedAppServiceOrder.md @@ -0,0 +1,13 @@ + + +# AttachedAppServiceOrder + +## Enum + + +* `DESC` (value: `"DESC"`) + +* `ASC` (value: `"ASC"`) + + + diff --git a/services/fabricv4/docs/AttachedAppSubscriptionOrder.md b/services/fabricv4/docs/AttachedAppSubscriptionOrder.md new file mode 100644 index 00000000..501d7a49 --- /dev/null +++ b/services/fabricv4/docs/AttachedAppSubscriptionOrder.md @@ -0,0 +1,13 @@ + + +# AttachedAppSubscriptionOrder + +## Enum + + +* `DESC` (value: `"DESC"`) + +* `ASC` (value: `"ASC"`) + + + diff --git a/services/fabricv4/docs/BulkOpticalConnectRequest.md b/services/fabricv4/docs/BulkOpticalConnectRequest.md new file mode 100644 index 00000000..a9ba6f2c --- /dev/null +++ b/services/fabricv4/docs/BulkOpticalConnectRequest.md @@ -0,0 +1,14 @@ + + +# BulkOpticalConnectRequest + +Request to create a dual diverse pair of Optical Connect connections. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**data** | [**List<OpticalConnectPostRequest>**](OpticalConnectPostRequest.md) | The two connections forming the diverse pair — one PRIMARY and one SECONDARY. | [optional] | + + + diff --git a/services/fabricv4/docs/ChatMessage.md b/services/fabricv4/docs/ChatMessage.md deleted file mode 100644 index c02bbe9b..00000000 --- a/services/fabricv4/docs/ChatMessage.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# ChatMessage - -Chat message and tool call information during the agent operation - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**messages** | [**List<MessagesInner>**](MessagesInner.md) | List of chat messages | [optional] | - - - diff --git a/services/fabricv4/docs/CloudEventSimpleExpression.md b/services/fabricv4/docs/CloudEventSimpleExpression.md index a1ecad81..f7ed9e95 100644 --- a/services/fabricv4/docs/CloudEventSimpleExpression.md +++ b/services/fabricv4/docs/CloudEventSimpleExpression.md @@ -8,7 +8,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**property** | **String** | Possible field names to use on filters: * `/id` - Cloud Event identifier * `/subject` - Cloud Event subject description * `/type` - Cloud Event type * `/time` - Time of Cloud Events * `/equinixproject` - Equinix Project of Cloud Events * `/equinixorganization` - Equinix Organization of Cloud Events * `/equinixalert` - Equinix Alert Identifier for raise/clear Cloud Events * `/severitytext` - cloud event severity text * `/authid` - Equinix user key to identify the user that performed the action that triggered the Cloud Event * `/authtype` - Equinix user type either user or system | [optional] | -|**operator** | **String** | Possible operators to use on filters: * `=` - equal * `!=` - not equal * `>` - greater than * `>=` - greater than or equal to * `<` - less than * `<=` - less than or equal to * `BETWEEN` - between * `IN` - in * `LIKE` - like * `ILIKE` - like case-insensitive * `NOT IN` - not in * `IS NULL` - is null * `IS NOT NULL` - is not null | [optional] | +|**operator** | **String** | Possible operators to use on filters: * `=` - equal * `!=` - not equal * `>` - greater than * `>=` - greater than or equal to * `<` - less than * `<=` - less than or equal to * `BETWEEN` - between * `IN` - in * `LIKE` - like * `ILIKE` - like case-insensitive * `IS NULL` - is null * `IS NOT NULL` - is not null | [optional] | |**values** | **List<String>** | | [optional] | diff --git a/services/fabricv4/docs/CloudEventsApi.md b/services/fabricv4/docs/CloudEventsApi.md index 43837593..c52c47b3 100644 --- a/services/fabricv4/docs/CloudEventsApi.md +++ b/services/fabricv4/docs/CloudEventsApi.md @@ -7,6 +7,7 @@ All URIs are relative to *https://api.equinix.com* | [**getCloudEvent**](CloudEventsApi.md#getCloudEvent) | **GET** /fabric/v4/cloudevents/{cloudEventId} | Get Cloud Event | | [**getCloudEventByAssetId**](CloudEventsApi.md#getCloudEventByAssetId) | **GET** /fabric/v4/{asset}/{assetId}/cloudevents | Get Cloud Events by Asset Id | | [**searchCloudEvents**](CloudEventsApi.md#searchCloudEvents) | **POST** /fabric/v4/cloudevents/search | Search Cloud Events | +| [**searchLastOpEvents**](CloudEventsApi.md#searchLastOpEvents) | **POST** /fabric/v4/latestOperationalEvents/search | Search Last Operational Cloud Events | @@ -232,3 +233,74 @@ public class Example { | **404** | Not Found | - | | **500** | Internal server error | - | + +# **searchLastOpEvents** +> SearchOperationalEventResponse searchLastOpEvents(operationalEventSearchRequest) + +Search Last Operational Cloud Events + +This API provides capability to search last operational cloud events from a filtered query + +### Example +```java +// Import classes: +import com.equinix.sdk.fabricv4.ApiClient; +import com.equinix.sdk.fabricv4.ApiException; +import com.equinix.sdk.fabricv4.Configuration; +import com.equinix.sdk.fabricv4.auth.*; +import com.equinix.sdk.fabricv4.models.*; +import com.equinix.sdk.fabricv4.api.CloudEventsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.equinix.com"); + + // Configure HTTP bearer authorization: BearerAuth + HttpBearerAuth BearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("BearerAuth"); + BearerAuth.setBearerToken("BEARER TOKEN"); + + CloudEventsApi apiInstance = new CloudEventsApi(defaultClient); + OperationalEventSearchRequest operationalEventSearchRequest = new OperationalEventSearchRequest(); // OperationalEventSearchRequest | + try { + SearchOperationalEventResponse result = apiInstance.searchLastOpEvents(operationalEventSearchRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling CloudEventsApi#searchLastOpEvents"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **operationalEventSearchRequest** | [**OperationalEventSearchRequest**](OperationalEventSearchRequest.md)| | | + +### Return type + +[**SearchOperationalEventResponse**](SearchOperationalEventResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful operation | - | +| **401** | Unauthorized | - | +| **403** | Forbidden | - | +| **404** | Not Found | - | +| **500** | Internal server error | - | + diff --git a/services/fabricv4/docs/CloudRouterReadResponse.md b/services/fabricv4/docs/CloudRouterReadResponse.md new file mode 100644 index 00000000..d4fb5511 --- /dev/null +++ b/services/fabricv4/docs/CloudRouterReadResponse.md @@ -0,0 +1,38 @@ + + +# CloudRouterReadResponse + +Fabric Cloud Router read response object + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | [**TypeEnum**](#TypeEnum) | | [optional] | +|**name** | **String** | Customer-provided Cloud Router name | [optional] | +|**location** | [**SimplifiedLocationWithoutIBX**](SimplifiedLocationWithoutIBX.md) | | [optional] | +|**_package** | [**CloudRouterPostRequestPackage**](CloudRouterPostRequestPackage.md) | | [optional] | +|**order** | [**Order**](Order.md) | | [optional] | +|**project** | [**Project**](Project.md) | | [optional] | +|**account** | [**SimplifiedAccount**](SimplifiedAccount.md) | | [optional] | +|**notifications** | [**List<SimplifiedNotification>**](SimplifiedNotification.md) | Preferences for notifications on connection configuration or status changes | [optional] | +|**href** | **URI** | Cloud Routers URI | [optional] [readonly] | +|**uuid** | **UUID** | Equinix-assigned access point identifier | [optional] | +|**state** | **CloudRouterAccessPointState** | | [optional] | +|**equinixAsn** | **Long** | Equinix ASN | [optional] | +|**connectionsCount** | **Integer** | Number of connections associated with this Access point | [optional] | +|**marketplaceSubscription** | [**MarketplaceSubscription**](MarketplaceSubscription.md) | | [optional] | +|**changeLog** | [**Changelog**](Changelog.md) | | [optional] | +|**change** | [**CloudRouterChange**](CloudRouterChange.md) | | [optional] | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| IC_ROUTER | "IC_ROUTER" | +| XF_ROUTER | "XF_ROUTER" | + + + diff --git a/services/fabricv4/docs/CloudRoutersApi.md b/services/fabricv4/docs/CloudRoutersApi.md index bc505690..dce435ee 100644 --- a/services/fabricv4/docs/CloudRoutersApi.md +++ b/services/fabricv4/docs/CloudRoutersApi.md @@ -620,7 +620,7 @@ public class Example { # **getCloudRouterByUuid** -> CloudRouter getCloudRouterByUuid(routerId) +> CloudRouterReadResponse getCloudRouterByUuid(routerId) Get Routers @@ -648,7 +648,7 @@ public class Example { CloudRoutersApi apiInstance = new CloudRoutersApi(defaultClient); UUID routerId = UUID.randomUUID(); // UUID | Cloud Router UUID try { - CloudRouter result = apiInstance.getCloudRouterByUuid(routerId); + CloudRouterReadResponse result = apiInstance.getCloudRouterByUuid(routerId); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling CloudRoutersApi#getCloudRouterByUuid"); @@ -669,7 +669,7 @@ public class Example { ### Return type -[**CloudRouter**](CloudRouter.md) +[**CloudRouterReadResponse**](CloudRouterReadResponse.md) ### Authorization diff --git a/services/fabricv4/docs/CompanyProfileActionRequest.md b/services/fabricv4/docs/CompanyProfileActionRequest.md deleted file mode 100644 index 9d44fa61..00000000 --- a/services/fabricv4/docs/CompanyProfileActionRequest.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# CompanyProfileActionRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**type** | **String** | CompanyProfile Action Type | | -|**comments** | **String** | Optional comments for the action | [optional] | - - - diff --git a/services/fabricv4/docs/CompanyProfileContact.md b/services/fabricv4/docs/CompanyProfileContact.md new file mode 100644 index 00000000..2d714d3f --- /dev/null +++ b/services/fabricv4/docs/CompanyProfileContact.md @@ -0,0 +1,22 @@ + + +# CompanyProfileContact + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | [**TypeEnum**](#TypeEnum) | Contact Type | [optional] | +|**contacts** | [**List<CompanyProfileContactContacts>**](CompanyProfileContactContacts.md) | | [optional] | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| SUPPORT | "SUPPORT" | + + + diff --git a/services/fabricv4/docs/CompanyProfileContactContacts.md b/services/fabricv4/docs/CompanyProfileContactContacts.md new file mode 100644 index 00000000..cd2d8a6e --- /dev/null +++ b/services/fabricv4/docs/CompanyProfileContactContacts.md @@ -0,0 +1,15 @@ + + +# CompanyProfileContactContacts + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | +|**role** | **String** | | [optional] | +|**email** | **String** | | | + + + diff --git a/services/fabricv4/docs/CompanyProfileRequest.md b/services/fabricv4/docs/CompanyProfileRequest.md index 8e7b6e6f..5200fe2e 100644 --- a/services/fabricv4/docs/CompanyProfileRequest.md +++ b/services/fabricv4/docs/CompanyProfileRequest.md @@ -11,8 +11,10 @@ |**name** | **String** | | | |**summary** | **String** | | | |**description** | **String** | | | -|**notifications** | **List<Object>** | | [optional] | -|**webUrl** | **String** | | [optional] | +|**pointOfContacts** | [**List<CompanyProfileContact>**](CompanyProfileContact.md) | | [optional] | +|**notifications** | [**List<SimplifiedNotification>**](SimplifiedNotification.md) | | [optional] | +|**overview** | **String** | | [optional] | +|**webUrl** | **String** | | | |**contactUrl** | **String** | | [optional] | diff --git a/services/fabricv4/docs/CompanyProfileResponse.md b/services/fabricv4/docs/CompanyProfileResponse.md index 17d1f93f..6d0d48b1 100644 --- a/services/fabricv4/docs/CompanyProfileResponse.md +++ b/services/fabricv4/docs/CompanyProfileResponse.md @@ -13,14 +13,16 @@ |**name** | **String** | | [optional] | |**summary** | **String** | | [optional] | |**description** | **String** | | [optional] | -|**state** | **Object** | | [optional] | +|**state** | **String** | Company Profile State | [optional] | |**account** | [**CompanyProfileResponseAccount**](CompanyProfileResponseAccount.md) | | [optional] | |**metros** | [**List<CompanyMetro>**](CompanyMetro.md) | | [optional] | |**logo** | [**CompanyLogo**](CompanyLogo.md) | | [optional] | |**tags** | [**List<TagResponse>**](TagResponse.md) | | [optional] | |**serviceProfiles** | [**List<CompanyServiceProfile>**](CompanyServiceProfile.md) | | [optional] | |**privateServices** | [**List<PrivateService>**](PrivateService.md) | | [optional] | -|**notifications** | **List<Object>** | | [optional] | +|**pointOfContacts** | [**List<CompanyProfileContact>**](CompanyProfileContact.md) | | [optional] | +|**notifications** | [**List<SimplifiedNotification>**](SimplifiedNotification.md) | | [optional] | +|**overview** | **String** | | [optional] | |**webUrl** | **String** | | [optional] | |**contactUrl** | **String** | | [optional] | |**change** | [**CompanyProfileChange**](CompanyProfileChange.md) | | [optional] | diff --git a/services/fabricv4/docs/CompanyProfileSearchFieldName.md b/services/fabricv4/docs/CompanyProfileSearchFieldName.md new file mode 100644 index 00000000..129d7ac7 --- /dev/null +++ b/services/fabricv4/docs/CompanyProfileSearchFieldName.md @@ -0,0 +1,25 @@ + + +# CompanyProfileSearchFieldName + +## Enum + + +* `NAME` (value: `"/name"`) + +* `UUID` (value: `"/uuid"`) + +* `TAGS_NAME` (value: `"/tags/name"`) + +* `TAGS_UUID` (value: `"/tags/uuid"`) + +* `TAGS_DISPLAYNAME` (value: `"/tags/displayName"`) + +* `STATE` (value: `"/state"`) + +* `METROS_METROCODE` (value: `"/metros/metroCode"`) + +* `CHANGE_STATUS` (value: `"/change/status"`) + + + diff --git a/services/fabricv4/docs/CompanyProfileSearchFilter.md b/services/fabricv4/docs/CompanyProfileSearchFilter.md index db40579a..81981223 100644 --- a/services/fabricv4/docs/CompanyProfileSearchFilter.md +++ b/services/fabricv4/docs/CompanyProfileSearchFilter.md @@ -7,11 +7,10 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**and** | [**List<CompanyProfileSearchFilter>**](CompanyProfileSearchFilter.md) | | [optional] | -|**or** | [**List<CompanyProfileSearchFilter>**](CompanyProfileSearchFilter.md) | | [optional] | -|**property** | **String** | Searchable field names in company profile | [optional] | -|**operator** | **String** | Comparison operators for filtering | [optional] | -|**values** | **List<String>** | Values to compare against | [optional] | +|**property** | **CompanyProfileSearchFieldName** | Searchable field name. Properties are grouped by their supported operators: String properties (support all operators): * `/name` - Company profile name * `/uuid` - Company profile UUID * `/tags/name` - Tag name * `/tags/uuid` - Tag UUID * `/tags/displayName` - Tag display name Discrete value properties (only support `=`, `!=`, `IN`, `NOT IN`): * `/state` - Company profile state (`PENDING`, `PROVISIONED`, `DEPROVISIONED`, `REJECTED`) * `/metros/metroCode` - Metro code (e.g. `SV`, `NY`, `DC`) * `/change/status` - Change status (`PENDING`, `COMPLETED`, `REJECTED`) — seller and admin users only | | +|**operator** | **OperatorEnum** | Comparison operator. `LIKE`, `NOT LIKE`, `ILIKE`, and `NOT ILIKE` require exactly one value. All other operators accept one or more values. * `=` - equal; equivalent to `IN` when multiple values are provided * `!=` - not equal; equivalent to `NOT IN` when multiple values are provided * `LIKE` - case-sensitive partial match (single value) * `NOT LIKE` - case-sensitive partial non-match (single value) * `ILIKE` - case-insensitive partial match (single value) * `NOT ILIKE` - case-insensitive partial non-match (single value) * `IN` - matches any of the provided values * `NOT IN` - does not match any of the provided values | | +|**values** | **List<String>** | | | +|**or** | [**List<CompanyProfileSearchSimpleExpression>**](CompanyProfileSearchSimpleExpression.md) | | | diff --git a/services/fabricv4/docs/CompanyProfileSearchFilters.md b/services/fabricv4/docs/CompanyProfileSearchFilters.md new file mode 100644 index 00000000..3ab1a884 --- /dev/null +++ b/services/fabricv4/docs/CompanyProfileSearchFilters.md @@ -0,0 +1,14 @@ + + +# CompanyProfileSearchFilters + +Filter criteria for company profile search. The `and` array combines conditions where all must match. Each item in `and` is either a simple expression (property/operator/values) or an `or` group. At most one `or` group is allowed per request. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**and** | [**List<CompanyProfileSearchFilter>**](CompanyProfileSearchFilter.md) | | [optional] | + + + diff --git a/services/fabricv4/docs/CompanyProfileSearchOrFilter.md b/services/fabricv4/docs/CompanyProfileSearchOrFilter.md new file mode 100644 index 00000000..dd54453b --- /dev/null +++ b/services/fabricv4/docs/CompanyProfileSearchOrFilter.md @@ -0,0 +1,14 @@ + + +# CompanyProfileSearchOrFilter + +Groups multiple simple expressions with OR logic. At most one `or` group is allowed within the top-level `and` array. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**or** | [**List<CompanyProfileSearchSimpleExpression>**](CompanyProfileSearchSimpleExpression.md) | | | + + + diff --git a/services/fabricv4/docs/CompanyProfileSearchRequest.md b/services/fabricv4/docs/CompanyProfileSearchRequest.md index 6fb738d3..80889478 100644 --- a/services/fabricv4/docs/CompanyProfileSearchRequest.md +++ b/services/fabricv4/docs/CompanyProfileSearchRequest.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**filter** | [**CompanyProfileSearchFilter**](CompanyProfileSearchFilter.md) | | [optional] | +|**filter** | [**CompanyProfileSearchFilters**](CompanyProfileSearchFilters.md) | | [optional] | |**pagination** | [**Pagination**](Pagination.md) | | [optional] | |**sort** | [**Sort**](Sort.md) | | [optional] | diff --git a/services/fabricv4/docs/CompanyProfileSearchSimpleExpression.md b/services/fabricv4/docs/CompanyProfileSearchSimpleExpression.md new file mode 100644 index 00000000..1324bad2 --- /dev/null +++ b/services/fabricv4/docs/CompanyProfileSearchSimpleExpression.md @@ -0,0 +1,15 @@ + + +# CompanyProfileSearchSimpleExpression + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**property** | **CompanyProfileSearchFieldName** | Searchable field name. Properties are grouped by their supported operators: String properties (support all operators): * `/name` - Company profile name * `/uuid` - Company profile UUID * `/tags/name` - Tag name * `/tags/uuid` - Tag UUID * `/tags/displayName` - Tag display name Discrete value properties (only support `=`, `!=`, `IN`, `NOT IN`): * `/state` - Company profile state (`PENDING`, `PROVISIONED`, `DEPROVISIONED`, `REJECTED`) * `/metros/metroCode` - Metro code (e.g. `SV`, `NY`, `DC`) * `/change/status` - Change status (`PENDING`, `COMPLETED`, `REJECTED`) — seller and admin users only | | +|**operator** | **OperatorEnum** | Comparison operator. `LIKE`, `NOT LIKE`, `ILIKE`, and `NOT ILIKE` require exactly one value. All other operators accept one or more values. * `=` - equal; equivalent to `IN` when multiple values are provided * `!=` - not equal; equivalent to `NOT IN` when multiple values are provided * `LIKE` - case-sensitive partial match (single value) * `NOT LIKE` - case-sensitive partial non-match (single value) * `ILIKE` - case-insensitive partial match (single value) * `NOT ILIKE` - case-insensitive partial non-match (single value) * `IN` - matches any of the provided values * `NOT IN` - does not match any of the provided values | | +|**values** | **List<String>** | | | + + + diff --git a/services/fabricv4/docs/CompanyProfilesApi.md b/services/fabricv4/docs/CompanyProfilesApi.md index 458b71b8..252a8e56 100644 --- a/services/fabricv4/docs/CompanyProfilesApi.md +++ b/services/fabricv4/docs/CompanyProfilesApi.md @@ -300,7 +300,7 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **201** | Company profile created successfully | - | +| **202** | Company profile created and pending for approval | - | | **400** | Bad request | - | | **401** | Unauthorized | - | | **403** | Forbidden | - | diff --git a/services/fabricv4/docs/ConnectionCompanyProfile.md b/services/fabricv4/docs/ConnectionCompanyProfile.md deleted file mode 100644 index 775d6cf7..00000000 --- a/services/fabricv4/docs/ConnectionCompanyProfile.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# ConnectionCompanyProfile - -Connection Company Profile Details - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **BigDecimal** | company profile identifier | [optional] | -|**name** | **String** | company profile name | [optional] | -|**globalOrgId** | **String** | global customer organization value | [optional] | - - - diff --git a/services/fabricv4/docs/ConnectionOperation.md b/services/fabricv4/docs/ConnectionOperation.md index 30b41ab8..c965ff0f 100644 --- a/services/fabricv4/docs/ConnectionOperation.md +++ b/services/fabricv4/docs/ConnectionOperation.md @@ -13,6 +13,7 @@ Connection type-specific operational data |**operationalStatus** | [**OperationalStatusEnum**](#OperationalStatusEnum) | Connection operational status | [optional] | |**errors** | [**List<Error>**](Error.md) | | [optional] | |**opStatusChangedAt** | **OffsetDateTime** | When connection transitioned into current operational status | [optional] | +|**maintenanceStatus** | **MaintenanceState** | | [optional] | diff --git a/services/fabricv4/docs/ConnectionType.md b/services/fabricv4/docs/ConnectionType.md index d5ecd94f..16ca139b 100644 --- a/services/fabricv4/docs/ConnectionType.md +++ b/services/fabricv4/docs/ConnectionType.md @@ -33,7 +33,9 @@ * `IX_VC` (value: `"IX_VC"`) -* `IC_VC` (value: `"IC_VC"`) +* `GW_VC` (value: `"GW_VC"`) + +* `IPX_VC` (value: `"IPX_VC"`) diff --git a/services/fabricv4/docs/ContactPreference.md b/services/fabricv4/docs/ContactPreference.md new file mode 100644 index 00000000..0c835f1d --- /dev/null +++ b/services/fabricv4/docs/ContactPreference.md @@ -0,0 +1,24 @@ + + +# ContactPreference + +Contact preference for the phone number + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**timezone** | **String** | Timezone of the contact preference | [optional] | +|**availability** | [**AvailabilityEnum**](#AvailabilityEnum) | Availability of the contact preference | [optional] | + + + +## Enum: AvailabilityEnum + +| Name | Value | +|---- | -----| +| WORK_HOURS | "WORK_HOURS" | +| ANYTIME | "ANYTIME" | + + + diff --git a/services/fabricv4/docs/CreateLoa.md b/services/fabricv4/docs/CreateLoa.md new file mode 100644 index 00000000..3da707f8 --- /dev/null +++ b/services/fabricv4/docs/CreateLoa.md @@ -0,0 +1,22 @@ + + +# CreateLoa + +Create Loa + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | **LoaType** | | | +|**name** | **String** | A short, descriptive name for this LOA. | | +|**description** | **String** | Additional context about this LOA. | [optional] | +|**authorizedProductType** | **LoaProductType** | | | +|**expirationDateTime** | **OffsetDateTime** | Date and time when this LOA expires.<br> Default to 3 months from the creation date | [optional] | +|**requestor** | [**LoaRequestor**](LoaRequestor.md) | | [optional] | +|**demarcationPoint** | [**LoaDemarcationPoint**](LoaDemarcationPoint.md) | | | +|**issuer** | [**LoaIssuer**](LoaIssuer.md) | | [optional] | +|**location** | [**LoaLocation**](LoaLocation.md) | | | + + + diff --git a/services/fabricv4/docs/CreateLoaNote.md b/services/fabricv4/docs/CreateLoaNote.md new file mode 100644 index 00000000..14fc3c7c --- /dev/null +++ b/services/fabricv4/docs/CreateLoaNote.md @@ -0,0 +1,14 @@ + + +# CreateLoaNote + +Create Loa Note + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**comments** | **String** | The note content to add to this LOA. Notes are visible to both the issuer and requestor organizations. Use notes to communicate updates, clarifications, or additional context about the LOA. | | + + + diff --git a/services/fabricv4/docs/EnvironmentActionRequest.md b/services/fabricv4/docs/EnvironmentActionRequest.md new file mode 100644 index 00000000..51872518 --- /dev/null +++ b/services/fabricv4/docs/EnvironmentActionRequest.md @@ -0,0 +1,15 @@ + + +# EnvironmentActionRequest + +Request payload for environment action + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | **EnvironmentActionTypeEnum** | | | +|**keyDetails** | [**ActivationKeyDetails**](ActivationKeyDetails.md) | | | + + + diff --git a/services/fabricv4/docs/EnvironmentActionResponse.md b/services/fabricv4/docs/EnvironmentActionResponse.md new file mode 100644 index 00000000..8d369a27 --- /dev/null +++ b/services/fabricv4/docs/EnvironmentActionResponse.md @@ -0,0 +1,19 @@ + + +# EnvironmentActionResponse + +Response from environment action Beta + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**href** | **URI** | Environment action URI | [optional] [readonly] | +|**type** | **EnvironmentActionTypeEnum** | | [optional] | +|**uuid** | **UUID** | Equinix-assigned action identifier | [optional] | +|**state** | **EnvironmentActionStateEnum** | | [optional] | +|**keyDetails** | [**ActivationKeyDetails**](ActivationKeyDetails.md) | | [optional] | +|**changeLog** | [**Changelog**](Changelog.md) | | [optional] | + + + diff --git a/services/fabricv4/docs/EnvironmentActionStateEnum.md b/services/fabricv4/docs/EnvironmentActionStateEnum.md new file mode 100644 index 00000000..b2c94a15 --- /dev/null +++ b/services/fabricv4/docs/EnvironmentActionStateEnum.md @@ -0,0 +1,13 @@ + + +# EnvironmentActionStateEnum + +## Enum + + +* `ACTIVE` (value: `"ACTIVE"`) + +* `INACTIVE` (value: `"INACTIVE"`) + + + diff --git a/services/fabricv4/docs/EnvironmentActionTypeEnum.md b/services/fabricv4/docs/EnvironmentActionTypeEnum.md new file mode 100644 index 00000000..5a4a44c7 --- /dev/null +++ b/services/fabricv4/docs/EnvironmentActionTypeEnum.md @@ -0,0 +1,11 @@ + + +# EnvironmentActionTypeEnum + +## Enum + + +* `VALIDATE_ACTIVATION_KEY` (value: `"VALIDATE_ACTIVATION_KEY"`) + + + diff --git a/services/fabricv4/docs/ExchangeServiceAndExpression.md b/services/fabricv4/docs/ExchangeServiceAndExpression.md new file mode 100644 index 00000000..d17ebddb --- /dev/null +++ b/services/fabricv4/docs/ExchangeServiceAndExpression.md @@ -0,0 +1,13 @@ + + +# ExchangeServiceAndExpression + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**and** | [**List<ExchangeServiceSearchExpression>**](ExchangeServiceSearchExpression.md) | | | + + + diff --git a/services/fabricv4/docs/ExchangeServiceNotification.md b/services/fabricv4/docs/ExchangeServiceNotification.md new file mode 100644 index 00000000..94a1c659 --- /dev/null +++ b/services/fabricv4/docs/ExchangeServiceNotification.md @@ -0,0 +1,26 @@ + + +# ExchangeServiceNotification + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | [**TypeEnum**](#TypeEnum) | Internet Exchange Service Notification Type | | +|**registeredUsers** | **List<String>** | Array of registered users | | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| NOTIFICATION | "NOTIFICATION" | +| TECHNICAL | "TECHNICAL" | +| PEERING | "PEERING" | +| ESCALATION | "ESCALATION" | +| ORDERING | "ORDERING" | + + + diff --git a/services/fabricv4/docs/ExchangeServiceOrExpression.md b/services/fabricv4/docs/ExchangeServiceOrExpression.md new file mode 100644 index 00000000..68d0759f --- /dev/null +++ b/services/fabricv4/docs/ExchangeServiceOrExpression.md @@ -0,0 +1,13 @@ + + +# ExchangeServiceOrExpression + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**or** | [**List<ExchangeServiceSearchExpression>**](ExchangeServiceSearchExpression.md) | | | + + + diff --git a/services/fabricv4/docs/ExchangeServicePropertyExpression.md b/services/fabricv4/docs/ExchangeServicePropertyExpression.md new file mode 100644 index 00000000..8d36939b --- /dev/null +++ b/services/fabricv4/docs/ExchangeServicePropertyExpression.md @@ -0,0 +1,31 @@ + + +# ExchangeServicePropertyExpression + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**property** | [**PropertyEnum**](#PropertyEnum) | Possible field names to use on filters | | +|**operator** | [**OperatorEnum**](#OperatorEnum) | | | +|**values** | **List<String>** | | | + + + +## Enum: PropertyEnum + +| Name | Value | +|---- | -----| +| _PROJECT_PROJECTID | "/project/projectId" | + + + +## Enum: OperatorEnum + +| Name | Value | +|---- | -----| +| EQUAL | "=" | + + + diff --git a/services/fabricv4/docs/ExchangeServiceResponse.md b/services/fabricv4/docs/ExchangeServiceResponse.md new file mode 100644 index 00000000..84f651b1 --- /dev/null +++ b/services/fabricv4/docs/ExchangeServiceResponse.md @@ -0,0 +1,53 @@ + + +# ExchangeServiceResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**href** | **String** | Internet Exchange Service URI | [optional] | +|**uuid** | **UUID** | Internet Exchange Service identifier | [optional] | +|**type** | [**TypeEnum**](#TypeEnum) | Internet Exchange Service Type | [optional] | +|**name** | **String** | Name | [optional] | +|**bandwidth** | **Integer** | bandwidth in Mbps | [optional] | +|**description** | **String** | Description | [optional] | +|**state** | [**StateEnum**](#StateEnum) | State | [optional] | +|**location** | [**SimplifiedLocation**](SimplifiedLocation.md) | | [optional] | +|**publicPeeringConnection** | [**PublicPeeringConnectionResponse**](PublicPeeringConnectionResponse.md) | | [optional] | +|**routingProtocol** | [**RoutingProtocolResponse**](RoutingProtocolResponse.md) | | [optional] | +|**order** | [**Order**](Order.md) | | [optional] | +|**project** | [**Project**](Project.md) | | [optional] | +|**account** | [**SimplifiedAccount**](SimplifiedAccount.md) | | [optional] | +|**notifications** | [**List<ExchangeServiceNotification>**](ExchangeServiceNotification.md) | Preferences for notifications on Internet Exchange Service configuration or status changes | [optional] | +|**changelog** | [**PlatformChangelog**](PlatformChangelog.md) | | [optional] | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| IX | "IX" | + + + +## Enum: StateEnum + +| Name | Value | +|---- | -----| +| PROVISIONING | "PROVISIONING" | +| PROVISIONING_FAILED | "PROVISIONING_FAILED" | +| PENDING_ACTIVATION | "PENDING_ACTIVATION" | +| ACTIVATING | "ACTIVATING" | +| ACTIVATING_FAILED | "ACTIVATING_FAILED" | +| PROVISIONED | "PROVISIONED" | +| REPROVISIONING | "REPROVISIONING" | +| REPROVISIONING_FAILED | "REPROVISIONING_FAILED" | +| DEPROVISIONING | "DEPROVISIONING" | +| DEPROVISIONED | "DEPROVISIONED" | +| DEPROVISIONING_FAILED | "DEPROVISIONING_FAILED" | + + + diff --git a/services/fabricv4/docs/ExchangeServiceResponseBgp.md b/services/fabricv4/docs/ExchangeServiceResponseBgp.md new file mode 100644 index 00000000..43410c34 --- /dev/null +++ b/services/fabricv4/docs/ExchangeServiceResponseBgp.md @@ -0,0 +1,23 @@ + + +# ExchangeServiceResponseBgp + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**customerPeerIp** | **String** | | [optional] | +|**domainName** | **String** | | [optional] | +|**primaryRouteServerIp** | **String** | | [optional] | +|**secondaryRouteServerIp** | **String** | | [optional] | +|**asSet** | **String** | | [optional] | +|**mlpeEnabled** | **Boolean** | | [optional] | +|**md5AuthKey** | **String** | | [optional] | +|**rcMd5AuthKey** | **String** | | [optional] | +|**prefixes** | **List<String>** | List of IP prefix | [optional] | +|**maxPrefixLimit** | **Long** | | [optional] | +|**prependSelfEnabled** | **Boolean** | | [optional] | + + + diff --git a/services/fabricv4/docs/ExchangeServiceSearchExpression.md b/services/fabricv4/docs/ExchangeServiceSearchExpression.md new file mode 100644 index 00000000..0b4a16e0 --- /dev/null +++ b/services/fabricv4/docs/ExchangeServiceSearchExpression.md @@ -0,0 +1,33 @@ + + +# ExchangeServiceSearchExpression + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**and** | [**List<ExchangeServiceSearchExpression>**](ExchangeServiceSearchExpression.md) | | | +|**or** | [**List<ExchangeServiceSearchExpression>**](ExchangeServiceSearchExpression.md) | | | +|**property** | [**PropertyEnum**](#PropertyEnum) | Possible field names to use on filters | | +|**operator** | [**OperatorEnum**](#OperatorEnum) | | | +|**values** | **List<String>** | | | + + + +## Enum: PropertyEnum + +| Name | Value | +|---- | -----| +| _PROJECT_PROJECTID | "/project/projectId" | + + + +## Enum: OperatorEnum + +| Name | Value | +|---- | -----| +| EQUAL | "=" | + + + diff --git a/services/fabricv4/docs/ExchangeServiceSearchRequest.md b/services/fabricv4/docs/ExchangeServiceSearchRequest.md new file mode 100644 index 00000000..299f2044 --- /dev/null +++ b/services/fabricv4/docs/ExchangeServiceSearchRequest.md @@ -0,0 +1,16 @@ + + +# ExchangeServiceSearchRequest + +Search requests containing criteria + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**filter** | [**ExchangeServiceSearchExpression**](ExchangeServiceSearchExpression.md) | | [optional] | +|**pagination** | [**PaginationRequest**](PaginationRequest.md) | | [optional] | +|**sort** | [**List<ExchangeServiceSearchSortCriteria>**](ExchangeServiceSearchSortCriteria.md) | | [optional] | + + + diff --git a/services/fabricv4/docs/ExchangeServiceSearchResponse.md b/services/fabricv4/docs/ExchangeServiceSearchResponse.md new file mode 100644 index 00000000..a4d4f539 --- /dev/null +++ b/services/fabricv4/docs/ExchangeServiceSearchResponse.md @@ -0,0 +1,16 @@ + + +# ExchangeServiceSearchResponse + +List of Internet Exchange Service + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**pagination** | [**Pagination**](Pagination.md) | | [optional] | +|**sort** | [**List<ExchangeServiceSearchSortCriteria>**](ExchangeServiceSearchSortCriteria.md) | | [optional] | +|**data** | [**List<ExchangeServiceResponse>**](ExchangeServiceResponse.md) | | [optional] | + + + diff --git a/services/fabricv4/docs/ExchangeServiceSearchSortCriteria.md b/services/fabricv4/docs/ExchangeServiceSearchSortCriteria.md new file mode 100644 index 00000000..2c25aee5 --- /dev/null +++ b/services/fabricv4/docs/ExchangeServiceSearchSortCriteria.md @@ -0,0 +1,33 @@ + + +# ExchangeServiceSearchSortCriteria + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**direction** | [**DirectionEnum**](#DirectionEnum) | Sorting direction | [optional] | +|**property** | [**PropertyEnum**](#PropertyEnum) | Possible field names to use on sorting | [optional] | + + + +## Enum: DirectionEnum + +| Name | Value | +|---- | -----| +| DESC | "DESC" | +| ASC | "ASC" | + + + +## Enum: PropertyEnum + +| Name | Value | +|---- | -----| +| NAME | "/name" | +| CHANGELOG_CREATEDDATETIME | "/changeLog/createdDateTime" | +| CHANGELOG_UPDATEDDATETIME | "/changeLog/updatedDateTime" | + + + diff --git a/services/fabricv4/docs/FabricOneApi.md b/services/fabricv4/docs/FabricOneApi.md new file mode 100644 index 00000000..565ad7b1 --- /dev/null +++ b/services/fabricv4/docs/FabricOneApi.md @@ -0,0 +1,372 @@ +# FabricOneApi + +All URIs are relative to *https://api.equinix.com* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**createInterconnect**](FabricOneApi.md#createInterconnect) | **POST** /fabric/v4/interconnects | Create Interconnect | +| [**deleteInterconnectByUuid**](FabricOneApi.md#deleteInterconnectByUuid) | **DELETE** /fabric/v4/interconnects/{interconnectId} | Delete Interconnect By ID | +| [**getInterconnectByUuid**](FabricOneApi.md#getInterconnectByUuid) | **GET** /fabric/v4/interconnects/{interconnectId} | Get Interconnect By ID | +| [**getInterconnectPackages**](FabricOneApi.md#getInterconnectPackages) | **GET** /fabric/v4/interconnectPackages | Get All Interconnect Packages | +| [**searchInterconnects**](FabricOneApi.md#searchInterconnects) | **POST** /fabric/v4/interconnects/search | Search Interconnects | + + + +# **createInterconnect** +> Interconnect createInterconnect(interconnectPostRequest) + +Create Interconnect + +This API provides capability to create user's Interconnect <font color=\"red\"> <sup color='red'>Beta</sup></font> + +### Example +```java +// Import classes: +import com.equinix.sdk.fabricv4.ApiClient; +import com.equinix.sdk.fabricv4.ApiException; +import com.equinix.sdk.fabricv4.Configuration; +import com.equinix.sdk.fabricv4.auth.*; +import com.equinix.sdk.fabricv4.models.*; +import com.equinix.sdk.fabricv4.api.FabricOneApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.equinix.com"); + + // Configure HTTP bearer authorization: BearerAuth + HttpBearerAuth BearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("BearerAuth"); + BearerAuth.setBearerToken("BEARER TOKEN"); + + FabricOneApi apiInstance = new FabricOneApi(defaultClient); + InterconnectPostRequest interconnectPostRequest = new InterconnectPostRequest(); // InterconnectPostRequest | + try { + Interconnect result = apiInstance.createInterconnect(interconnectPostRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FabricOneApi#createInterconnect"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **interconnectPostRequest** | [**InterconnectPostRequest**](InterconnectPostRequest.md)| | | + +### Return type + +[**Interconnect**](Interconnect.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Interconnect created successfully | - | +| **400** | Bad request | - | +| **401** | Unauthorized | - | +| **403** | Forbidden | - | +| **415** | Unsupported Media Type | - | +| **500** | Internal server error | - | + + +# **deleteInterconnectByUuid** +> Interconnect deleteInterconnectByUuid(interconnectId) + +Delete Interconnect By ID + +This API provides capability to delete user's Interconnect <font color=\"red\"> <sup color='red'>Beta</sup></font> + +### Example +```java +// Import classes: +import com.equinix.sdk.fabricv4.ApiClient; +import com.equinix.sdk.fabricv4.ApiException; +import com.equinix.sdk.fabricv4.Configuration; +import com.equinix.sdk.fabricv4.auth.*; +import com.equinix.sdk.fabricv4.models.*; +import com.equinix.sdk.fabricv4.api.FabricOneApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.equinix.com"); + + // Configure HTTP bearer authorization: BearerAuth + HttpBearerAuth BearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("BearerAuth"); + BearerAuth.setBearerToken("BEARER TOKEN"); + + FabricOneApi apiInstance = new FabricOneApi(defaultClient); + UUID interconnectId = UUID.randomUUID(); // UUID | Interconnect UUID + try { + Interconnect result = apiInstance.deleteInterconnectByUuid(interconnectId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FabricOneApi#deleteInterconnectByUuid"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **interconnectId** | **UUID**| Interconnect UUID | | + +### Return type + +[**Interconnect**](Interconnect.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **202** | Fabric Interconnect object | - | +| **400** | Bad request | - | +| **401** | Unauthorized | - | +| **403** | Forbidden | - | +| **404** | Not Found | - | + + +# **getInterconnectByUuid** +> Interconnect getInterconnectByUuid(interconnectId) + +Get Interconnect By ID + +This API provides capability to retrieve user's Interconnect <font color=\"red\"> <sup color='red'>Beta</sup></font> + +### Example +```java +// Import classes: +import com.equinix.sdk.fabricv4.ApiClient; +import com.equinix.sdk.fabricv4.ApiException; +import com.equinix.sdk.fabricv4.Configuration; +import com.equinix.sdk.fabricv4.auth.*; +import com.equinix.sdk.fabricv4.models.*; +import com.equinix.sdk.fabricv4.api.FabricOneApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.equinix.com"); + + // Configure HTTP bearer authorization: BearerAuth + HttpBearerAuth BearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("BearerAuth"); + BearerAuth.setBearerToken("BEARER TOKEN"); + + FabricOneApi apiInstance = new FabricOneApi(defaultClient); + UUID interconnectId = UUID.randomUUID(); // UUID | Interconnect UUID + try { + Interconnect result = apiInstance.getInterconnectByUuid(interconnectId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FabricOneApi#getInterconnectByUuid"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **interconnectId** | **UUID**| Interconnect UUID | | + +### Return type + +[**Interconnect**](Interconnect.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Interconnect object | - | +| **401** | Unauthorized | - | +| **403** | Forbidden | - | +| **404** | Not Found | - | + + +# **getInterconnectPackages** +> AllInterconnectPackagesResponse getInterconnectPackages(offset, limit) + +Get All Interconnect Packages + +Get All Interconnect Packages returns details of all available interconnect packages for the specified user credentials. <font color=\"red\"> <sup color='red'>Beta</sup></font> + +### Example +```java +// Import classes: +import com.equinix.sdk.fabricv4.ApiClient; +import com.equinix.sdk.fabricv4.ApiException; +import com.equinix.sdk.fabricv4.Configuration; +import com.equinix.sdk.fabricv4.auth.*; +import com.equinix.sdk.fabricv4.models.*; +import com.equinix.sdk.fabricv4.api.FabricOneApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.equinix.com"); + + // Configure HTTP bearer authorization: BearerAuth + HttpBearerAuth BearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("BearerAuth"); + BearerAuth.setBearerToken("BEARER TOKEN"); + + FabricOneApi apiInstance = new FabricOneApi(defaultClient); + Integer offset = 1; // Integer | offset + Integer limit = 10; // Integer | number of records to fetch + try { + AllInterconnectPackagesResponse result = apiInstance.getInterconnectPackages(offset, limit); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FabricOneApi#getInterconnectPackages"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **offset** | **Integer**| offset | [optional] | +| **limit** | **Integer**| number of records to fetch | [optional] | + +### Return type + +[**AllInterconnectPackagesResponse**](AllInterconnectPackagesResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful operation | - | +| **400** | Bad request | - | +| **401** | Unauthorized | - | +| **403** | Forbidden | - | +| **404** | Not Found | - | +| **415** | Unsupported Media Type | - | + + +# **searchInterconnects** +> InterconnectSearchResponse searchInterconnects(interconnectSearchRequest) + +Search Interconnects + +The API provides capability to get list of user's Interconnects using search criteria, including optional filtering, pagination and sorting <font color=\"red\"> <sup color='red'>Beta</sup></font> + +### Example +```java +// Import classes: +import com.equinix.sdk.fabricv4.ApiClient; +import com.equinix.sdk.fabricv4.ApiException; +import com.equinix.sdk.fabricv4.Configuration; +import com.equinix.sdk.fabricv4.auth.*; +import com.equinix.sdk.fabricv4.models.*; +import com.equinix.sdk.fabricv4.api.FabricOneApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.equinix.com"); + + // Configure HTTP bearer authorization: BearerAuth + HttpBearerAuth BearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("BearerAuth"); + BearerAuth.setBearerToken("BEARER TOKEN"); + + FabricOneApi apiInstance = new FabricOneApi(defaultClient); + InterconnectSearchRequest interconnectSearchRequest = new InterconnectSearchRequest(); // InterconnectSearchRequest | + try { + InterconnectSearchResponse result = apiInstance.searchInterconnects(interconnectSearchRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FabricOneApi#searchInterconnects"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **interconnectSearchRequest** | [**InterconnectSearchRequest**](InterconnectSearchRequest.md)| | | + +### Return type + +[**InterconnectSearchResponse**](InterconnectSearchResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Fabric Interconnect Search Response | - | +| **400** | Bad request | - | +| **401** | Unauthorized | - | +| **403** | Forbidden | - | +| **415** | Unsupported Media Type | - | +| **500** | Internal server error | - | + diff --git a/services/fabricv4/docs/Gateway.md b/services/fabricv4/docs/Gateway.md new file mode 100644 index 00000000..6d3ec30f --- /dev/null +++ b/services/fabricv4/docs/Gateway.md @@ -0,0 +1,27 @@ + + +# Gateway + +Gateway object + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**href** | **URI** | Gateways URI | [optional] [readonly] | +|**type** | **GatewayType** | | [optional] | +|**uuid** | **UUID** | Equinix-assigned access point identifier | [optional] | +|**name** | **String** | Customer-provided Gateway name | [optional] | +|**description** | **String** | Customer-provided Gateway description | [optional] | +|**state** | **GatewayState** | | [optional] | +|**bandwidth** | **Integer** | Gateway bandwidth in Mbps | [optional] | +|**localAsn** | **Integer** | Gateway local Autonomous System Number | [optional] | +|**router** | [**Router**](Router.md) | | [optional] | +|**ipv4** | [**GatewayIpv4**](GatewayIpv4.md) | | [optional] | +|**project** | [**Project**](Project.md) | | [optional] | +|**account** | [**Account**](Account.md) | | [optional] | +|**order** | [**Order**](Order.md) | | [optional] | +|**changeLog** | [**Changelog**](Changelog.md) | | [optional] | + + + diff --git a/services/fabricv4/docs/GatewayAttachmentListResponse.md b/services/fabricv4/docs/GatewayAttachmentListResponse.md deleted file mode 100644 index 2e61ebf8..00000000 --- a/services/fabricv4/docs/GatewayAttachmentListResponse.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# GatewayAttachmentListResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**pagination** | [**Pagination**](Pagination.md) | | | -|**data** | [**List<GatewayAttachmentResponse>**](GatewayAttachmentResponse.md) | | | - - - diff --git a/services/fabricv4/docs/GatewayAttachmentResponse.md b/services/fabricv4/docs/GatewayAttachmentResponse.md deleted file mode 100644 index ce84ca24..00000000 --- a/services/fabricv4/docs/GatewayAttachmentResponse.md +++ /dev/null @@ -1,39 +0,0 @@ - - -# GatewayAttachmentResponse - -Schema representing a Gateway attaching or detaching on a Cloud Router. This schema defines the structure of the response returned when a Gateway is attached or detached to a Cloud Router. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**href** | **URI** | | [optional] | -|**type** | [**TypeEnum**](#TypeEnum) | | [optional] | -|**uuid** | **UUID** | | [optional] | -|**attachmentStatus** | [**AttachmentStatusEnum**](#AttachmentStatusEnum) | | [optional] | -|**errors** | [**List<Error>**](Error.md) | | [optional] | -|**changeLog** | [**Changelog**](Changelog.md) | | [optional] | - - - -## Enum: TypeEnum - -| Name | Value | -|---- | -----| -| VPN_GATEWAY | "VPN_GATEWAY" | - - - -## Enum: AttachmentStatusEnum - -| Name | Value | -|---- | -----| -| ATTACHING | "ATTACHING" | -| ATTACHED | "ATTACHED" | -| DETACHING | "DETACHING" | -| DETACHED | "DETACHED" | -| FAILED | "FAILED" | - - - diff --git a/services/fabricv4/docs/GatewayChangeOperation.md b/services/fabricv4/docs/GatewayChangeOperation.md new file mode 100644 index 00000000..b1b56acb --- /dev/null +++ b/services/fabricv4/docs/GatewayChangeOperation.md @@ -0,0 +1,25 @@ + + +# GatewayChangeOperation + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**op** | [**OpEnum**](#OpEnum) | Handy shortcut for operation name | | +|**path** | **String** | path inside document leading to updated parameter | | +|**value** | **Object** | new value for updated parameter | | + + + +## Enum: OpEnum + +| Name | Value | +|---- | -----| +| REPLACE | "replace" | +| ADD | "add" | +| REMOVE | "remove" | + + + diff --git a/services/fabricv4/docs/GatewayIpv4.md b/services/fabricv4/docs/GatewayIpv4.md new file mode 100644 index 00000000..d6491fc4 --- /dev/null +++ b/services/fabricv4/docs/GatewayIpv4.md @@ -0,0 +1,15 @@ + + +# GatewayIpv4 + +Gateway IPv4 address + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**primaryIp** | **String** | | [optional] | +|**secondaryIp** | **String** | | [optional] | + + + diff --git a/services/fabricv4/docs/GatewayPostRequest.md b/services/fabricv4/docs/GatewayPostRequest.md new file mode 100644 index 00000000..f14ab638 --- /dev/null +++ b/services/fabricv4/docs/GatewayPostRequest.md @@ -0,0 +1,23 @@ + + +# GatewayPostRequest + +Create Gateway + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | **GatewayType** | | | +|**name** | **String** | Customer-provided Gateway name | | +|**description** | **String** | Customer-provided Gateway description | [optional] | +|**bandwidth** | **Integer** | Gateway bandwidth in Mbps | | +|**localAsn** | **Integer** | Gateway local Autonomous System Number | | +|**router** | [**Router**](Router.md) | | | +|**haEnabled** | **Boolean** | High availability enabled | [optional] | +|**account** | [**SimplifiedAccount**](SimplifiedAccount.md) | | | +|**project** | [**Project**](Project.md) | | | +|**order** | [**Order**](Order.md) | | [optional] | + + + diff --git a/services/fabricv4/docs/GatewayState.md b/services/fabricv4/docs/GatewayState.md new file mode 100644 index 00000000..d40e1c7d --- /dev/null +++ b/services/fabricv4/docs/GatewayState.md @@ -0,0 +1,23 @@ + + +# GatewayState + +## Enum + + +* `PROVISIONING` (value: `"PROVISIONING"`) + +* `PROVISIONED` (value: `"PROVISIONED"`) + +* `REPROVISIONING` (value: `"REPROVISIONING"`) + +* `DEPROVISIONING` (value: `"DEPROVISIONING"`) + +* `DEPROVISIONED` (value: `"DEPROVISIONED"`) + +* `NOT_PROVISIONED` (value: `"NOT_PROVISIONED"`) + +* `NOT_DEPROVISIONED` (value: `"NOT_DEPROVISIONED"`) + + + diff --git a/services/fabricv4/docs/GatewayType.md b/services/fabricv4/docs/GatewayType.md new file mode 100644 index 00000000..0a906699 --- /dev/null +++ b/services/fabricv4/docs/GatewayType.md @@ -0,0 +1,11 @@ + + +# GatewayType + +## Enum + + +* `VPN_GW` (value: `"VPN_GW"`) + + + diff --git a/services/fabricv4/docs/GatewaysApi.md b/services/fabricv4/docs/GatewaysApi.md new file mode 100644 index 00000000..e6b6a374 --- /dev/null +++ b/services/fabricv4/docs/GatewaysApi.md @@ -0,0 +1,300 @@ +# GatewaysApi + +All URIs are relative to *https://api.equinix.com* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**createGateway**](GatewaysApi.md#createGateway) | **POST** /fabric/v4/gateways | Create Gateway | +| [**deleteGatewayByUuid**](GatewaysApi.md#deleteGatewayByUuid) | **DELETE** /fabric/v4/gateways/{gatewayId} | Delete Gateway | +| [**getGatewayByUuid**](GatewaysApi.md#getGatewayByUuid) | **GET** /fabric/v4/gateways/{gatewayId} | Get Gateway | +| [**updateGatewayByUuid**](GatewaysApi.md#updateGatewayByUuid) | **PATCH** /fabric/v4/gateways/{gatewayId} | Update Gateway by ID | + + + +# **createGateway** +> Gateway createGateway(gatewayPostRequest) + +Create Gateway + +This API provides capability to create user's Gateways + +### Example +```java +// Import classes: +import com.equinix.sdk.fabricv4.ApiClient; +import com.equinix.sdk.fabricv4.ApiException; +import com.equinix.sdk.fabricv4.Configuration; +import com.equinix.sdk.fabricv4.auth.*; +import com.equinix.sdk.fabricv4.models.*; +import com.equinix.sdk.fabricv4.api.GatewaysApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.equinix.com"); + + // Configure HTTP bearer authorization: BearerAuth + HttpBearerAuth BearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("BearerAuth"); + BearerAuth.setBearerToken("BEARER TOKEN"); + + GatewaysApi apiInstance = new GatewaysApi(defaultClient); + GatewayPostRequest gatewayPostRequest = new GatewayPostRequest(); // GatewayPostRequest | + try { + Gateway result = apiInstance.createGateway(gatewayPostRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling GatewaysApi#createGateway"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **gatewayPostRequest** | [**GatewayPostRequest**](GatewayPostRequest.md)| | | + +### Return type + +[**Gateway**](Gateway.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **202** | Gateway object | - | +| **400** | Bad request | - | +| **401** | Unauthorized | - | +| **403** | Forbidden | - | +| **415** | Unsupported Media Type | - | +| **500** | Internal server error | - | + + +# **deleteGatewayByUuid** +> Gateway deleteGatewayByUuid(gatewayId) + +Delete Gateway + +This API provides capability to delete user's Gateways + +### Example +```java +// Import classes: +import com.equinix.sdk.fabricv4.ApiClient; +import com.equinix.sdk.fabricv4.ApiException; +import com.equinix.sdk.fabricv4.Configuration; +import com.equinix.sdk.fabricv4.auth.*; +import com.equinix.sdk.fabricv4.models.*; +import com.equinix.sdk.fabricv4.api.GatewaysApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.equinix.com"); + + // Configure HTTP bearer authorization: BearerAuth + HttpBearerAuth BearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("BearerAuth"); + BearerAuth.setBearerToken("BEARER TOKEN"); + + GatewaysApi apiInstance = new GatewaysApi(defaultClient); + UUID gatewayId = UUID.randomUUID(); // UUID | Gateway UUID + try { + Gateway result = apiInstance.deleteGatewayByUuid(gatewayId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling GatewaysApi#deleteGatewayByUuid"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **gatewayId** | **UUID**| Gateway UUID | | + +### Return type + +[**Gateway**](Gateway.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **202** | Gateway object | - | +| **400** | Bad request | - | +| **401** | Unauthorized | - | +| **403** | Forbidden | - | +| **404** | Not Found | - | +| **500** | Internal server error | - | + + +# **getGatewayByUuid** +> Gateway getGatewayByUuid(gatewayId) + +Get Gateway + +This API provides capability to retrieve user's Gateways + +### Example +```java +// Import classes: +import com.equinix.sdk.fabricv4.ApiClient; +import com.equinix.sdk.fabricv4.ApiException; +import com.equinix.sdk.fabricv4.Configuration; +import com.equinix.sdk.fabricv4.auth.*; +import com.equinix.sdk.fabricv4.models.*; +import com.equinix.sdk.fabricv4.api.GatewaysApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.equinix.com"); + + // Configure HTTP bearer authorization: BearerAuth + HttpBearerAuth BearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("BearerAuth"); + BearerAuth.setBearerToken("BEARER TOKEN"); + + GatewaysApi apiInstance = new GatewaysApi(defaultClient); + UUID gatewayId = UUID.randomUUID(); // UUID | Gateway UUID + try { + Gateway result = apiInstance.getGatewayByUuid(gatewayId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling GatewaysApi#getGatewayByUuid"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **gatewayId** | **UUID**| Gateway UUID | | + +### Return type + +[**Gateway**](Gateway.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Gateway object | - | +| **401** | Unauthorized | - | +| **403** | Forbidden | - | +| **404** | Not Found | - | +| **500** | Internal server error | - | + + +# **updateGatewayByUuid** +> Gateway updateGatewayByUuid(gatewayId, gatewayChangeOperation) + +Update Gateway by ID + +Update Gateway by Uuid + +### Example +```java +// Import classes: +import com.equinix.sdk.fabricv4.ApiClient; +import com.equinix.sdk.fabricv4.ApiException; +import com.equinix.sdk.fabricv4.Configuration; +import com.equinix.sdk.fabricv4.auth.*; +import com.equinix.sdk.fabricv4.models.*; +import com.equinix.sdk.fabricv4.api.GatewaysApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.equinix.com"); + + // Configure HTTP bearer authorization: BearerAuth + HttpBearerAuth BearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("BearerAuth"); + BearerAuth.setBearerToken("BEARER TOKEN"); + + GatewaysApi apiInstance = new GatewaysApi(defaultClient); + UUID gatewayId = UUID.randomUUID(); // UUID | Gateway UUID + List gatewayChangeOperation = Arrays.asList(); // List | + try { + Gateway result = apiInstance.updateGatewayByUuid(gatewayId, gatewayChangeOperation); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling GatewaysApi#updateGatewayByUuid"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **gatewayId** | **UUID**| Gateway UUID | | +| **gatewayChangeOperation** | [**List<GatewayChangeOperation>**](GatewayChangeOperation.md)| | | + +### Return type + +[**Gateway**](Gateway.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json-patch+json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **202** | Gateway object | - | +| **401** | Unauthorized | - | +| **403** | Forbidden | - | +| **404** | Not Found | - | +| **500** | Internal server error | - | + diff --git a/services/fabricv4/docs/Interconnect.md b/services/fabricv4/docs/Interconnect.md new file mode 100644 index 00000000..55a7db84 --- /dev/null +++ b/services/fabricv4/docs/Interconnect.md @@ -0,0 +1,36 @@ + + +# Interconnect + +Interconnect specification Beta + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**href** | **String** | Interconnect URI | [optional] | +|**uuid** | **UUID** | Equinix-assigned interconnect identifier | [optional] | +|**type** | [**TypeEnum**](#TypeEnum) | Interconnect type | [optional] | +|**name** | **String** | Interconnect name | [optional] | +|**description** | **String** | Interconnect description | [optional] | +|**state** | **InterconnectState** | | [optional] | +|**location** | [**InterconnectLocation**](InterconnectLocation.md) | | [optional] | +|**usedBandwidth** | **Integer** | Interconnect used bandwidth in Mbps | [optional] | +|**_package** | [**InterconnectPackage**](InterconnectPackage.md) | | [optional] | +|**router** | [**InterconnectRouter**](InterconnectRouter.md) | | [optional] | +|**order** | [**Order**](Order.md) | | [optional] | +|**account** | [**SimplifiedAccount**](SimplifiedAccount.md) | | [optional] | +|**project** | [**Project**](Project.md) | | [optional] | +|**notifications** | [**List<InterconnectNotification>**](InterconnectNotification.md) | Interconnect notification preferences | [optional] | +|**changeLog** | [**Changelog**](Changelog.md) | | [optional] | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| XF_IC | "XF_IC" | + + + diff --git a/services/fabricv4/docs/InterconnectFilter.md b/services/fabricv4/docs/InterconnectFilter.md new file mode 100644 index 00000000..51138840 --- /dev/null +++ b/services/fabricv4/docs/InterconnectFilter.md @@ -0,0 +1,38 @@ + + +# InterconnectFilter + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**and** | [**List<InterconnectFilter>**](InterconnectFilter.md) | | [optional] | +|**or** | [**List<InterconnectFilter>**](InterconnectFilter.md) | | [optional] | +|**property** | **InterconnectSearchFieldName** | | [optional] | +|**operator** | [**OperatorEnum**](#OperatorEnum) | | [optional] | +|**values** | **List<String>** | | [optional] | + + + +## Enum: OperatorEnum + +| Name | Value | +|---- | -----| +| EQUAL | "=" | +| NOT_EQUAL | "!=" | +| GREATER_THAN | ">" | +| GREATER_THAN_OR_EQUAL_TO | ">=" | +| LESS_THAN | "<" | +| LESS_THAN_OR_EQUAL_TO | "<=" | +| BETWEEN | "BETWEEN" | +| NOT_BETWEEN | "NOT BETWEEN" | +| LIKE | "LIKE" | +| NOT_LIKE | "NOT LIKE" | +| ILIKE | "ILIKE" | +| NOT_ILIKE | "NOT ILIKE" | +| IN | "IN" | +| NOT_IN | "NOT IN" | + + + diff --git a/services/fabricv4/docs/InterconnectLocation.md b/services/fabricv4/docs/InterconnectLocation.md new file mode 100644 index 00000000..7fb36bec --- /dev/null +++ b/services/fabricv4/docs/InterconnectLocation.md @@ -0,0 +1,15 @@ + + +# InterconnectLocation + +Interconnect metro location + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**href** | **String** | Metro URI | [optional] | +|**metroCode** | **String** | Metro code where the interconnect is created | [optional] | + + + diff --git a/services/fabricv4/docs/InterconnectLocationRequest.md b/services/fabricv4/docs/InterconnectLocationRequest.md new file mode 100644 index 00000000..7721452b --- /dev/null +++ b/services/fabricv4/docs/InterconnectLocationRequest.md @@ -0,0 +1,14 @@ + + +# InterconnectLocationRequest + +Interconnect location for create request + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**metroCode** | **String** | Metro code where the interconnect is created | [optional] | + + + diff --git a/services/fabricv4/docs/InterconnectNotification.md b/services/fabricv4/docs/InterconnectNotification.md new file mode 100644 index 00000000..3021d4d1 --- /dev/null +++ b/services/fabricv4/docs/InterconnectNotification.md @@ -0,0 +1,23 @@ + + +# InterconnectNotification + +Interconnect notification preference + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | [**TypeEnum**](#TypeEnum) | Notification type | [optional] | +|**emails** | **List<String>** | Array of contact emails | [optional] | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| NOTIFICATIONS | "NOTIFICATIONS" | + + + diff --git a/services/fabricv4/docs/InterconnectPackage.md b/services/fabricv4/docs/InterconnectPackage.md new file mode 100644 index 00000000..32e073af --- /dev/null +++ b/services/fabricv4/docs/InterconnectPackage.md @@ -0,0 +1,21 @@ + + +# InterconnectPackage + +Interconnect Package details Beta + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**href** | **String** | Interconnect Package URI | [optional] [readonly] | +|**type** | **String** | Interconnect Package Type | | +|**uuid** | **String** | Equinix-assigned Interconnect Package identifier | [optional] | +|**code** | **String** | Interconnect Package code (e.g. LAB, BASIC, STANDARD, PREMIUM) | | +|**description** | **String** | Interconnect Package description | [optional] | +|**routesMax** | **Integer** | Maximum number of routes | [optional] | +|**bandwidthMax** | **Integer** | Maximum bandwidth in Mbps | [optional] | +|**isRemote** | **Boolean** | Authorization to connect remotely | [optional] | + + + diff --git a/services/fabricv4/docs/InterconnectPostRequest.md b/services/fabricv4/docs/InterconnectPostRequest.md new file mode 100644 index 00000000..d580fa9a --- /dev/null +++ b/services/fabricv4/docs/InterconnectPostRequest.md @@ -0,0 +1,30 @@ + + +# InterconnectPostRequest + +Create Interconnect request + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | [**TypeEnum**](#TypeEnum) | Interconnect type | | +|**name** | **String** | Customer-provided interconnect name | | +|**description** | **String** | Customer-provided interconnect description | [optional] | +|**location** | [**InterconnectLocationRequest**](InterconnectLocationRequest.md) | | | +|**_package** | [**InterconnectPackage**](InterconnectPackage.md) | | | +|**order** | [**Order**](Order.md) | | [optional] | +|**account** | [**SimplifiedAccount**](SimplifiedAccount.md) | | | +|**project** | [**Project**](Project.md) | | | +|**notifications** | [**List<InterconnectNotification>**](InterconnectNotification.md) | Preferences for notifications on interconnect configuration or status changes | | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| XF_IC | "XF_IC" | + + + diff --git a/services/fabricv4/docs/InterconnectRouter.md b/services/fabricv4/docs/InterconnectRouter.md new file mode 100644 index 00000000..12139b1d --- /dev/null +++ b/services/fabricv4/docs/InterconnectRouter.md @@ -0,0 +1,24 @@ + + +# InterconnectRouter + +Router associated with the interconnect Beta + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**href** | **String** | Router URI | [optional] | +|**type** | [**TypeEnum**](#TypeEnum) | Router type | [optional] | +|**uuid** | **UUID** | Router identifier | [optional] | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| IC_ROUTER | "IC_ROUTER" | + + + diff --git a/services/fabricv4/docs/InterconnectSearchFieldName.md b/services/fabricv4/docs/InterconnectSearchFieldName.md new file mode 100644 index 00000000..c60b30f2 --- /dev/null +++ b/services/fabricv4/docs/InterconnectSearchFieldName.md @@ -0,0 +1,35 @@ + + +# InterconnectSearchFieldName + +## Enum + + +* `UUID` (value: `"/uuid"`) + +* `TYPE` (value: `"/type"`) + +* `NAME` (value: `"/name"`) + +* `STATE` (value: `"/state"`) + +* `DESCRIPTION` (value: `"/description"`) + +* `LOCATION_METROCODE` (value: `"/location/metroCode"`) + +* `PACKAGE_CODE` (value: `"/package/code"`) + +* `PROJECT_PROJECTID` (value: `"/project/projectId"`) + +* `CHANGELOG_CREATEDDATETIME` (value: `"/changeLog/createdDateTime"`) + +* `CHANGELOG_UPDATEDDATETIME` (value: `"/changeLog/updatedDateTime"`) + +* `CHANGELOG_DELETEDDATETIME` (value: `"/changeLog/deletedDateTime"`) + +* `ROUTER_UUID` (value: `"/router/uuid"`) + +* `STAR` (value: `"/_*"`) + + + diff --git a/services/fabricv4/docs/InterconnectSearchRequest.md b/services/fabricv4/docs/InterconnectSearchRequest.md new file mode 100644 index 00000000..85d4c58b --- /dev/null +++ b/services/fabricv4/docs/InterconnectSearchRequest.md @@ -0,0 +1,16 @@ + + +# InterconnectSearchRequest + +Search requests containing criteria + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**filter** | [**InterconnectFilter**](InterconnectFilter.md) | | [optional] | +|**pagination** | [**PaginationRequest**](PaginationRequest.md) | | [optional] | +|**sort** | [**List<InterconnectSortCriteria>**](InterconnectSortCriteria.md) | | [optional] | + + + diff --git a/services/fabricv4/docs/InterconnectSearchResponse.md b/services/fabricv4/docs/InterconnectSearchResponse.md new file mode 100644 index 00000000..76384e2f --- /dev/null +++ b/services/fabricv4/docs/InterconnectSearchResponse.md @@ -0,0 +1,16 @@ + + +# InterconnectSearchResponse + +List of interconnects + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**pagination** | [**Pagination**](Pagination.md) | | [optional] | +|**sort** | [**List<InterconnectSortCriteriaResponse>**](InterconnectSortCriteriaResponse.md) | | [optional] | +|**data** | [**List<Interconnect>**](Interconnect.md) | | [optional] | + + + diff --git a/services/fabricv4/docs/InterconnectSortBy.md b/services/fabricv4/docs/InterconnectSortBy.md new file mode 100644 index 00000000..3a474077 --- /dev/null +++ b/services/fabricv4/docs/InterconnectSortBy.md @@ -0,0 +1,17 @@ + + +# InterconnectSortBy + +## Enum + + +* `CHANGELOG_CREATEDDATETIME` (value: `"/changeLog/createdDateTime"`) + +* `CHANGELOG_UPDATEDDATETIME` (value: `"/changeLog/updatedDateTime"`) + +* `NAME` (value: `"/name"`) + +* `STATE` (value: `"/state"`) + + + diff --git a/services/fabricv4/docs/InterconnectSortByResponse.md b/services/fabricv4/docs/InterconnectSortByResponse.md new file mode 100644 index 00000000..5ad59686 --- /dev/null +++ b/services/fabricv4/docs/InterconnectSortByResponse.md @@ -0,0 +1,17 @@ + + +# InterconnectSortByResponse + +## Enum + + +* `CHANGELOG_CREATEDDATETIME` (value: `"/changeLog/createdDateTime"`) + +* `CHANGELOG_UPDATEDDATETIME` (value: `"/changeLog/updatedDateTime"`) + +* `NAME` (value: `"/name"`) + +* `STATE` (value: `"/state"`) + + + diff --git a/services/fabricv4/docs/InterconnectSortCriteria.md b/services/fabricv4/docs/InterconnectSortCriteria.md new file mode 100644 index 00000000..4cbf1a5f --- /dev/null +++ b/services/fabricv4/docs/InterconnectSortCriteria.md @@ -0,0 +1,14 @@ + + +# InterconnectSortCriteria + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**direction** | **InterconnectSortDirection** | | [optional] | +|**property** | **InterconnectSortBy** | | [optional] | + + + diff --git a/services/fabricv4/docs/InterconnectSortCriteriaResponse.md b/services/fabricv4/docs/InterconnectSortCriteriaResponse.md new file mode 100644 index 00000000..777b8c8f --- /dev/null +++ b/services/fabricv4/docs/InterconnectSortCriteriaResponse.md @@ -0,0 +1,14 @@ + + +# InterconnectSortCriteriaResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**direction** | **InterconnectSortDirectionResponse** | | [optional] | +|**property** | **InterconnectSortByResponse** | | [optional] | + + + diff --git a/services/fabricv4/docs/InterconnectSortDirection.md b/services/fabricv4/docs/InterconnectSortDirection.md new file mode 100644 index 00000000..8240459f --- /dev/null +++ b/services/fabricv4/docs/InterconnectSortDirection.md @@ -0,0 +1,13 @@ + + +# InterconnectSortDirection + +## Enum + + +* `DESC` (value: `"DESC"`) + +* `ASC` (value: `"ASC"`) + + + diff --git a/services/fabricv4/docs/InterconnectSortDirectionResponse.md b/services/fabricv4/docs/InterconnectSortDirectionResponse.md new file mode 100644 index 00000000..3edadc1e --- /dev/null +++ b/services/fabricv4/docs/InterconnectSortDirectionResponse.md @@ -0,0 +1,13 @@ + + +# InterconnectSortDirectionResponse + +## Enum + + +* `DESC` (value: `"DESC"`) + +* `ASC` (value: `"ASC"`) + + + diff --git a/services/fabricv4/docs/InterconnectState.md b/services/fabricv4/docs/InterconnectState.md new file mode 100644 index 00000000..bd9102d4 --- /dev/null +++ b/services/fabricv4/docs/InterconnectState.md @@ -0,0 +1,17 @@ + + +# InterconnectState + +## Enum + + +* `PROVISIONING` (value: `"PROVISIONING"`) + +* `PROVISIONED` (value: `"PROVISIONED"`) + +* `DEPROVISIONING` (value: `"DEPROVISIONING"`) + +* `DEPROVISIONED` (value: `"DEPROVISIONED"`) + + + diff --git a/services/fabricv4/docs/InternetAccessRoutingProtocolBgp.md b/services/fabricv4/docs/InternetAccessRoutingProtocolBgp.md index fe4518f2..a1fa3630 100644 --- a/services/fabricv4/docs/InternetAccessRoutingProtocolBgp.md +++ b/services/fabricv4/docs/InternetAccessRoutingProtocolBgp.md @@ -8,6 +8,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**exportPolicy** | **InternetAccessExportPolicy** | | | +|**asn** | [**InternetAccessRoutingProtocolBgpAsn**](InternetAccessRoutingProtocolBgpAsn.md) | | [optional] | |**customerAsn** | **Long** | Customer ASN. Valid range is 1-64495 or 131072-4199999999. Currently this option is only available for EIA over dedicated port. | [optional] | |**bgpAuthKey** | **String** | BGP authentication key | [optional] | |**customerAsnRange** | **InternetAccessCustomerAsnRange** | | | diff --git a/services/fabricv4/docs/InternetAccessRoutingProtocolBgpAsn.md b/services/fabricv4/docs/InternetAccessRoutingProtocolBgpAsn.md new file mode 100644 index 00000000..d2ece3a3 --- /dev/null +++ b/services/fabricv4/docs/InternetAccessRoutingProtocolBgpAsn.md @@ -0,0 +1,14 @@ + + +# InternetAccessRoutingProtocolBgpAsn + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**href** | **String** | URI of the ASN resource | [optional] | +|**uuid** | **UUID** | Unique identifier of the ASN | | + + + diff --git a/services/fabricv4/docs/InternetAccessRoutingProtocolBgpRequest.md b/services/fabricv4/docs/InternetAccessRoutingProtocolBgpRequest.md index 76b4fdcc..86266f8c 100644 --- a/services/fabricv4/docs/InternetAccessRoutingProtocolBgpRequest.md +++ b/services/fabricv4/docs/InternetAccessRoutingProtocolBgpRequest.md @@ -9,6 +9,7 @@ |------------ | ------------- | ------------- | -------------| |**connections** | [**List<InternetAccessConnectionBgpRequest>**](InternetAccessConnectionBgpRequest.md) | | | |**exportPolicy** | **InternetAccessExportPolicy** | | | +|**asn** | [**InternetAccessRoutingProtocolBgpRequestAsn**](InternetAccessRoutingProtocolBgpRequestAsn.md) | | [optional] | |**customerAsn** | **Long** | Customer ASN. Valid range is 1-64495 or 65536-4199999999. | [optional] | |**bgpAuthKey** | **String** | BGP authentication key | [optional] | |**customerAsnRange** | **InternetAccessCustomerAsnRange** | | [optional] | diff --git a/services/fabricv4/docs/InternetAccessRoutingProtocolBgpRequestAsn.md b/services/fabricv4/docs/InternetAccessRoutingProtocolBgpRequestAsn.md new file mode 100644 index 00000000..502dc5f8 --- /dev/null +++ b/services/fabricv4/docs/InternetAccessRoutingProtocolBgpRequestAsn.md @@ -0,0 +1,13 @@ + + +# InternetAccessRoutingProtocolBgpRequestAsn + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**uuid** | **UUID** | Unique identifier of the ASN | | + + + diff --git a/services/fabricv4/docs/AgentTemplatesApi.md b/services/fabricv4/docs/InternetExchangeServicesApi.md similarity index 55% rename from services/fabricv4/docs/AgentTemplatesApi.md rename to services/fabricv4/docs/InternetExchangeServicesApi.md index 1c578cbd..c529da38 100644 --- a/services/fabricv4/docs/AgentTemplatesApi.md +++ b/services/fabricv4/docs/InternetExchangeServicesApi.md @@ -1,20 +1,20 @@ -# AgentTemplatesApi +# InternetExchangeServicesApi All URIs are relative to *https://api.equinix.com* | Method | HTTP request | Description | |------------- | ------------- | -------------| -| [**getAgentTemplateByUuid**](AgentTemplatesApi.md#getAgentTemplateByUuid) | **GET** /fabric/v4/agentTemplates/{agentTemplateId} | Get Agent Template by UUID | -| [**getAgentTemplates**](AgentTemplatesApi.md#getAgentTemplates) | **GET** /fabric/v4/agentTemplates | Get Agent Templates | +| [**getExchangeServiceById**](InternetExchangeServicesApi.md#getExchangeServiceById) | **GET** /fabric/v4/exchangeServices/{exchangeServiceId} | Get Internet Exchange Service | +| [**searchExchangeService**](InternetExchangeServicesApi.md#searchExchangeService) | **POST** /fabric/v4/exchangeServices/search | Search Internet Exchange Service | - -# **getAgentTemplateByUuid** -> AgentTemplates getAgentTemplateByUuid(agentTemplateId, offset, limit) + +# **getExchangeServiceById** +> ExchangeServiceResponse getExchangeServiceById(exchangeServiceId) -Get Agent Template by UUID +Get Internet Exchange Service -This API provides capability to retrieve an agent template by uuid <font color=\"red\"> <sup color='red'>Beta</sup></font> +The API provides capability to get Internet Exchange Service ### Example ```java @@ -24,7 +24,7 @@ import com.equinix.sdk.fabricv4.ApiException; import com.equinix.sdk.fabricv4.Configuration; import com.equinix.sdk.fabricv4.auth.*; import com.equinix.sdk.fabricv4.models.*; -import com.equinix.sdk.fabricv4.api.AgentTemplatesApi; +import com.equinix.sdk.fabricv4.api.InternetExchangeServicesApi; public class Example { public static void main(String[] args) { @@ -35,15 +35,13 @@ public class Example { HttpBearerAuth BearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("BearerAuth"); BearerAuth.setBearerToken("BEARER TOKEN"); - AgentTemplatesApi apiInstance = new AgentTemplatesApi(defaultClient); - UUID agentTemplateId = UUID.randomUUID(); // UUID | Agent Template UUID - Integer offset = 1; // Integer | offset - Integer limit = 10; // Integer | number of records to fetch + InternetExchangeServicesApi apiInstance = new InternetExchangeServicesApi(defaultClient); + UUID exchangeServiceId = UUID.randomUUID(); // UUID | Internet Exchange Service Id try { - AgentTemplates result = apiInstance.getAgentTemplateByUuid(agentTemplateId, offset, limit); + ExchangeServiceResponse result = apiInstance.getExchangeServiceById(exchangeServiceId); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AgentTemplatesApi#getAgentTemplateByUuid"); + System.err.println("Exception when calling InternetExchangeServicesApi#getExchangeServiceById"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -57,13 +55,11 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **agentTemplateId** | **UUID**| Agent Template UUID | | -| **offset** | **Integer**| offset | [optional] | -| **limit** | **Integer**| number of records to fetch | [optional] | +| **exchangeServiceId** | **UUID**| Internet Exchange Service Id | | ### Return type -[**AgentTemplates**](AgentTemplates.md) +[**ExchangeServiceResponse**](ExchangeServiceResponse.md) ### Authorization @@ -77,19 +73,20 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | Agent object | - | +| **200** | Successful Operation | - | +| **400** | Bad request | - | | **401** | Unauthorized | - | | **403** | Forbidden | - | | **404** | Not Found | - | -| **500** | Internal server error | - | +| **500** | Internal Server error | - | - -# **getAgentTemplates** -> AgentTemplateGetAllResponse getAgentTemplates(offset, limit) + +# **searchExchangeService** +> ExchangeServiceSearchResponse searchExchangeService(exchangeServiceSearchRequest) -Get Agent Templates +Search Internet Exchange Service -This API provides capability to retrieve agent templates <font color=\"red\"> <sup color='red'>Beta</sup></font> +The API provides capability to get list of user's Internet Exchange Service using search criteria, including optional filtering, pagination and sorting. ### Example ```java @@ -99,7 +96,7 @@ import com.equinix.sdk.fabricv4.ApiException; import com.equinix.sdk.fabricv4.Configuration; import com.equinix.sdk.fabricv4.auth.*; import com.equinix.sdk.fabricv4.models.*; -import com.equinix.sdk.fabricv4.api.AgentTemplatesApi; +import com.equinix.sdk.fabricv4.api.InternetExchangeServicesApi; public class Example { public static void main(String[] args) { @@ -110,14 +107,13 @@ public class Example { HttpBearerAuth BearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("BearerAuth"); BearerAuth.setBearerToken("BEARER TOKEN"); - AgentTemplatesApi apiInstance = new AgentTemplatesApi(defaultClient); - Integer offset = 1; // Integer | offset - Integer limit = 10; // Integer | number of records to fetch + InternetExchangeServicesApi apiInstance = new InternetExchangeServicesApi(defaultClient); + ExchangeServiceSearchRequest exchangeServiceSearchRequest = new ExchangeServiceSearchRequest(); // ExchangeServiceSearchRequest | try { - AgentTemplateGetAllResponse result = apiInstance.getAgentTemplates(offset, limit); + ExchangeServiceSearchResponse result = apiInstance.searchExchangeService(exchangeServiceSearchRequest); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AgentTemplatesApi#getAgentTemplates"); + System.err.println("Exception when calling InternetExchangeServicesApi#searchExchangeService"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -131,12 +127,11 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **offset** | **Integer**| offset | [optional] | -| **limit** | **Integer**| number of records to fetch | [optional] | +| **exchangeServiceSearchRequest** | [**ExchangeServiceSearchRequest**](ExchangeServiceSearchRequest.md)| | | ### Return type -[**AgentTemplateGetAllResponse**](AgentTemplateGetAllResponse.md) +[**ExchangeServiceSearchResponse**](ExchangeServiceSearchResponse.md) ### Authorization @@ -144,15 +139,15 @@ public class Example { ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| | **200** | Successful operation | - | +| **400** | Bad request | - | | **401** | Unauthorized | - | | **403** | Forbidden | - | -| **404** | Not Found | - | -| **500** | Internal server error | - | +| **500** | Internal Server error | - | diff --git a/services/fabricv4/docs/IpBlock.md b/services/fabricv4/docs/IpBlock.md index 0bf27822..4ef57171 100644 --- a/services/fabricv4/docs/IpBlock.md +++ b/services/fabricv4/docs/IpBlock.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**uuid** | **UUID** | Unique identifier for the Ip Block | | -|**href** | **String** | Resource URL path for the Ip Block | | +|**uuid** | **UUID** | Unique identifier for the IP Block | | +|**href** | **String** | Resource URL path for the IP Block | | |**type** | **TypeOfIpBlockProduct** | | | |**state** | **IpBlockState** | | | |**ownership** | **IpBlockOwnership** | | | @@ -19,7 +19,7 @@ |**account** | [**IpBlockAccount**](IpBlockAccount.md) | | [optional] | |**project** | [**IpBlockProject**](IpBlockProject.md) | | | |**regulations** | [**IpBlockRegulations**](IpBlockRegulations.md) | | [optional] | -|**assets** | [**List<IpBlockAsset>**](IpBlockAsset.md) | Products using this Ip Block | [optional] | +|**assets** | [**List<IpBlockAsset>**](IpBlockAsset.md) | Products using this IP Block | [optional] | |**change** | [**IpBlockChange**](IpBlockChange.md) | | [optional] | |**changeLog** | [**IpBlockChangeLog**](IpBlockChangeLog.md) | | | |**error** | [**Error**](Error.md) | | [optional] | diff --git a/services/fabricv4/docs/IpBlocksApi.md b/services/fabricv4/docs/IpBlocksApi.md index e432b87d..ee411971 100644 --- a/services/fabricv4/docs/IpBlocksApi.md +++ b/services/fabricv4/docs/IpBlocksApi.md @@ -4,20 +4,20 @@ All URIs are relative to *https://api.equinix.com* | Method | HTTP request | Description | |------------- | ------------- | -------------| -| [**deleteIpBlockById**](IpBlocksApi.md#deleteIpBlockById) | **DELETE** /fabric/v4/ipBlocks/{uuid} | Delete Ip Block by UUID | -| [**getIpBlock**](IpBlocksApi.md#getIpBlock) | **GET** /fabric/v4/ipBlocks/{uuid} | Retrieve Ip Block by UUID | -| [**patchIpBlockById**](IpBlocksApi.md#patchIpBlockById) | **PATCH** /fabric/v4/ipBlocks/{uuid} | patch Ip Block by UUID | -| [**searchIpBlocks**](IpBlocksApi.md#searchIpBlocks) | **POST** /fabric/v4/ipBlocks/search | Search for Ip Blocks | -| [**submitIpBlock**](IpBlocksApi.md#submitIpBlock) | **POST** /fabric/v4/ipBlocks | Submits new Equinix owned or customer owned Ip Block request | +| [**deleteIpBlockById**](IpBlocksApi.md#deleteIpBlockById) | **DELETE** /fabric/v4/ipBlocks/{uuid} | Delete IP Block by UUID | +| [**getIpBlock**](IpBlocksApi.md#getIpBlock) | **GET** /fabric/v4/ipBlocks/{uuid} | Retrieve IP Block by UUID | +| [**patchIpBlockById**](IpBlocksApi.md#patchIpBlockById) | **PATCH** /fabric/v4/ipBlocks/{uuid} | patch IP Block by UUID | +| [**searchIpBlocks**](IpBlocksApi.md#searchIpBlocks) | **POST** /fabric/v4/ipBlocks/search | Search for IP Blocks | +| [**submitIpBlock**](IpBlocksApi.md#submitIpBlock) | **POST** /fabric/v4/ipBlocks | Submits new Equinix owned or customer owned IP Block request | # **deleteIpBlockById** > IpBlock deleteIpBlockById(uuid) -Delete Ip Block by UUID +Delete IP Block by UUID -Delete Ip Block by UUID +Delete IP Block by UUID ### Example ```java @@ -39,7 +39,7 @@ public class Example { BearerAuth.setBearerToken("BEARER TOKEN"); IpBlocksApi apiInstance = new IpBlocksApi(defaultClient); - UUID uuid = UUID.randomUUID(); // UUID | UUID of the Ip Block + UUID uuid = UUID.randomUUID(); // UUID | UUID of the IP Block try { IpBlock result = apiInstance.deleteIpBlockById(uuid); System.out.println(result); @@ -58,7 +58,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **uuid** | **UUID**| UUID of the Ip Block | | +| **uuid** | **UUID**| UUID of the IP Block | | ### Return type @@ -76,20 +76,20 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **202** | Ip Block submitted, patched, or deletion accepted | - | +| **202** | IP Block submitted, patched, or deletion accepted | - | | **400** | Invalid input parameter | - | | **403** | Forbidden | - | -| **404** | Ip Block not found | - | -| **409** | Ip Block cannot be deleted due to active products | - | +| **404** | IP Block not found | - | +| **409** | IP Block cannot be deleted due to active products | - | | **500** | Internal server error | - | # **getIpBlock** > IpBlock getIpBlock(uuid) -Retrieve Ip Block by UUID +Retrieve IP Block by UUID -Retrieve Ip Block by UUID +Retrieve IP Block by UUID ### Example ```java @@ -111,7 +111,7 @@ public class Example { BearerAuth.setBearerToken("BEARER TOKEN"); IpBlocksApi apiInstance = new IpBlocksApi(defaultClient); - UUID uuid = UUID.randomUUID(); // UUID | UUID of the Ip Block + UUID uuid = UUID.randomUUID(); // UUID | UUID of the IP Block try { IpBlock result = apiInstance.getIpBlock(uuid); System.out.println(result); @@ -130,7 +130,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **uuid** | **UUID**| UUID of the Ip Block | | +| **uuid** | **UUID**| UUID of the IP Block | | ### Return type @@ -148,18 +148,18 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | Ip Block retrieved successfully | - | +| **200** | IP Block retrieved successfully | - | | **403** | Forbidden | - | -| **404** | Ip Block not found | - | +| **404** | IP Block not found | - | | **500** | Internal server error | - | # **patchIpBlockById** > IpBlock patchIpBlockById(uuid, patchIpBlockRequestBodyItem) -patch Ip Block by UUID +patch IP Block by UUID -patch Ip Block by UUID +patch IP Block by UUID ### Example ```java @@ -181,7 +181,7 @@ public class Example { BearerAuth.setBearerToken("BEARER TOKEN"); IpBlocksApi apiInstance = new IpBlocksApi(defaultClient); - UUID uuid = UUID.randomUUID(); // UUID | UUID of the Ip Block + UUID uuid = UUID.randomUUID(); // UUID | UUID of the IP Block List patchIpBlockRequestBodyItem = Arrays.asList(); // List | try { IpBlock result = apiInstance.patchIpBlockById(uuid, patchIpBlockRequestBodyItem); @@ -201,7 +201,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **uuid** | **UUID**| UUID of the Ip Block | | +| **uuid** | **UUID**| UUID of the IP Block | | | **patchIpBlockRequestBodyItem** | [**List<PatchIpBlockRequestBodyItem>**](PatchIpBlockRequestBodyItem.md)| | | ### Return type @@ -220,17 +220,17 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **202** | Ip Block submitted, patched, or deletion accepted | - | -| **404** | Ip Block not found | - | +| **202** | IP Block submitted, patched, or deletion accepted | - | +| **404** | IP Block not found | - | | **500** | Internal server error | - | # **searchIpBlocks** > IpBlockSearchResponseBody searchIpBlocks(ipBlocksSearchRequestBody) -Search for Ip Blocks +Search for IP Blocks -Search for Ip Blocks based on criteria +Search for IP Blocks based on criteria ### Example ```java @@ -289,7 +289,7 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | Ip Blocks found successfully | - | +| **200** | IP Blocks found successfully | - | | **400** | Invalid input parameter | - | | **500** | Internal server error | - | @@ -297,9 +297,9 @@ public class Example { # **submitIpBlock** > IpBlock submitIpBlock(submitIpBlockRequestBody) -Submits new Equinix owned or customer owned Ip Block request +Submits new Equinix owned or customer owned IP Block request -Submits new Equinix owned or customer owned Ip Block request +Submits new Equinix owned or customer owned IP Block request ### Example ```java @@ -358,7 +358,7 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **202** | Ip Block submitted, patched, or deletion accepted | - | +| **202** | IP Block submitted, patched, or deletion accepted | - | | **400** | Invalid input parameter | - | | **403** | Forbidden | - | | **500** | Internal server error | - | diff --git a/services/fabricv4/docs/IssueLoa.md b/services/fabricv4/docs/IssueLoa.md new file mode 100644 index 00000000..ceeace8a --- /dev/null +++ b/services/fabricv4/docs/IssueLoa.md @@ -0,0 +1,20 @@ + + +# IssueLoa + +Issue Loa + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | **LoaType** | | | +|**name** | **String** | A short, descriptive name for this LOA. | | +|**description** | **String** | Additional context about this LOA. | [optional] | +|**authorizedProductType** | **LoaProductType** | | | +|**expirationDateTime** | **OffsetDateTime** | Date and time when this LOA expires.<br> Default to 3 months from the creation date | [optional] | +|**requestor** | [**LoaRequestor**](LoaRequestor.md) | | [optional] | +|**demarcationPoint** | [**LoaDemarcationPoint**](LoaDemarcationPoint.md) | | | + + + diff --git a/services/fabricv4/docs/LastMileConfig.md b/services/fabricv4/docs/LastMileConfig.md deleted file mode 100644 index ff8a58d9..00000000 --- a/services/fabricv4/docs/LastMileConfig.md +++ /dev/null @@ -1,17 +0,0 @@ - - -# LastMileConfig - -Last mile configuration for the connection. Applicable to zSide only. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**serviceType** | **String** | Last mile service type | [optional] | -|**bandwidth** | **Integer** | Last mile bandwidth in Mbps | [optional] | -|**address** | **String** | Last mile address | [optional] | -|**notifications** | [**List<LastMileNotificationInfo>**](LastMileNotificationInfo.md) | Last mile notification contacts | [optional] | - - - diff --git a/services/fabricv4/docs/LastMileNotificationInfo.md b/services/fabricv4/docs/LastMileNotificationInfo.md deleted file mode 100644 index e275f895..00000000 --- a/services/fabricv4/docs/LastMileNotificationInfo.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# LastMileNotificationInfo - -Last mile notification contact information - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**key** | **String** | Key | [optional] | -|**value** | **String** | Value | [optional] | - - - diff --git a/services/fabricv4/docs/LoaActionData.md b/services/fabricv4/docs/LoaActionData.md new file mode 100644 index 00000000..78c76988 --- /dev/null +++ b/services/fabricv4/docs/LoaActionData.md @@ -0,0 +1,16 @@ + + +# LoaActionData + +Action Data.
For LOA_ISSUER_AUTHORIZATION — always required. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**demarcationPoint** | [**LoaDemarcationPoint**](LoaDemarcationPoint.md) | | [optional] | +|**expirationDateTime** | **OffsetDateTime** | Date and time when this LOA expires.<br> Default to 3 months from the creation date | [optional] | +|**portalUrl** | **String** | Portal URL for the LOA to either accept from requestor <br> or authorize from the issuer. | [optional] [readonly] | + + + diff --git a/services/fabricv4/docs/LoaActionFieldName.md b/services/fabricv4/docs/LoaActionFieldName.md new file mode 100644 index 00000000..16e6c626 --- /dev/null +++ b/services/fabricv4/docs/LoaActionFieldName.md @@ -0,0 +1,15 @@ + + +# LoaActionFieldName + +## Enum + + +* `TYPE` (value: `"/type"`) + +* `STATE` (value: `"/state"`) + +* `UUID` (value: `"/uuid"`) + + + diff --git a/services/fabricv4/docs/LoaActionFilter.md b/services/fabricv4/docs/LoaActionFilter.md new file mode 100644 index 00000000..1c66750f --- /dev/null +++ b/services/fabricv4/docs/LoaActionFilter.md @@ -0,0 +1,35 @@ + + +# LoaActionFilter + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**property** | **LoaActionFieldName** | | [optional] | +|**operator** | [**OperatorEnum**](#OperatorEnum) | | [optional] | +|**values** | **List<String>** | | [optional] | +|**or** | [**List<LoaActionSearchSimpleExpressions>**](LoaActionSearchSimpleExpressions.md) | | [optional] | + + + +## Enum: OperatorEnum + +| Name | Value | +|---- | -----| +| EQUAL | "=" | +| NOT_EQUAL | "!=" | +| LIKE | "LIKE" | +| ILIKE | "ILIKE" | +| BETWEEN | "BETWEEN" | +| NOT_BETWEEN | "NOT BETWEEN" | +| IN | "IN" | +| NOT_IN | "NOT IN" | +| GREATER_THAN | ">" | +| LESS_THAN | "<" | +| GREATER_THAN_OR_EQUAL_TO | ">=" | +| LESS_THAN_OR_EQUAL_TO | "<=" | + + + diff --git a/services/fabricv4/docs/LoaActionOrFilter.md b/services/fabricv4/docs/LoaActionOrFilter.md new file mode 100644 index 00000000..f45c5e10 --- /dev/null +++ b/services/fabricv4/docs/LoaActionOrFilter.md @@ -0,0 +1,13 @@ + + +# LoaActionOrFilter + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**or** | [**List<LoaActionSearchSimpleExpressions>**](LoaActionSearchSimpleExpressions.md) | | [optional] | + + + diff --git a/services/fabricv4/docs/LoaActionRequest.md b/services/fabricv4/docs/LoaActionRequest.md new file mode 100644 index 00000000..3be89ae5 --- /dev/null +++ b/services/fabricv4/docs/LoaActionRequest.md @@ -0,0 +1,15 @@ + + +# LoaActionRequest + +Action Request + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | **LoaActionType** | | | +|**data** | [**LoaActionData**](LoaActionData.md) | | [optional] | + + + diff --git a/services/fabricv4/docs/LoaActionResponse.md b/services/fabricv4/docs/LoaActionResponse.md new file mode 100644 index 00000000..3fe4526a --- /dev/null +++ b/services/fabricv4/docs/LoaActionResponse.md @@ -0,0 +1,19 @@ + + +# LoaActionResponse + +Action Response + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**href** | **URI** | Action URI | [optional] | +|**uuid** | **UUID** | Action Identifier | [optional] | +|**state** | **LoaActionState** | | [optional] | +|**type** | **LoaActionType** | | [optional] | +|**data** | [**LoaActionData**](LoaActionData.md) | | [optional] | +|**changeLog** | [**LoaChangelog**](LoaChangelog.md) | | [optional] | + + + diff --git a/services/fabricv4/docs/LoaActionSearchFilters.md b/services/fabricv4/docs/LoaActionSearchFilters.md new file mode 100644 index 00000000..0f141698 --- /dev/null +++ b/services/fabricv4/docs/LoaActionSearchFilters.md @@ -0,0 +1,13 @@ + + +# LoaActionSearchFilters + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**and** | [**List<LoaActionFilter>**](LoaActionFilter.md) | | [optional] | + + + diff --git a/services/fabricv4/docs/LoaActionSearchRequest.md b/services/fabricv4/docs/LoaActionSearchRequest.md new file mode 100644 index 00000000..2f3c0e8e --- /dev/null +++ b/services/fabricv4/docs/LoaActionSearchRequest.md @@ -0,0 +1,16 @@ + + +# LoaActionSearchRequest + +Search loa actions based on filter criteria + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**filter** | [**LoaActionSearchFilters**](LoaActionSearchFilters.md) | | [optional] | +|**pagination** | [**PaginationRequest**](PaginationRequest.md) | | [optional] | +|**sort** | [**List<LoaActionSortCriteria>**](LoaActionSortCriteria.md) | | [optional] | + + + diff --git a/services/fabricv4/docs/LoaActionSearchResponse.md b/services/fabricv4/docs/LoaActionSearchResponse.md new file mode 100644 index 00000000..cefea9b7 --- /dev/null +++ b/services/fabricv4/docs/LoaActionSearchResponse.md @@ -0,0 +1,16 @@ + + +# LoaActionSearchResponse + +List of LOA Actions + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**pagination** | [**Pagination**](Pagination.md) | | [optional] | +|**sort** | [**List<LoaActionSortCriteria>**](LoaActionSortCriteria.md) | | [optional] | +|**data** | [**List<LoaActionResponse>**](LoaActionResponse.md) | | [optional] | + + + diff --git a/services/fabricv4/docs/LoaActionSearchSimpleExpressions.md b/services/fabricv4/docs/LoaActionSearchSimpleExpressions.md new file mode 100644 index 00000000..b7d0d224 --- /dev/null +++ b/services/fabricv4/docs/LoaActionSearchSimpleExpressions.md @@ -0,0 +1,34 @@ + + +# LoaActionSearchSimpleExpressions + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**property** | **LoaActionFieldName** | | [optional] | +|**operator** | [**OperatorEnum**](#OperatorEnum) | | [optional] | +|**values** | **List<String>** | | [optional] | + + + +## Enum: OperatorEnum + +| Name | Value | +|---- | -----| +| EQUAL | "=" | +| NOT_EQUAL | "!=" | +| LIKE | "LIKE" | +| ILIKE | "ILIKE" | +| BETWEEN | "BETWEEN" | +| NOT_BETWEEN | "NOT BETWEEN" | +| IN | "IN" | +| NOT_IN | "NOT IN" | +| GREATER_THAN | ">" | +| LESS_THAN | "<" | +| GREATER_THAN_OR_EQUAL_TO | ">=" | +| LESS_THAN_OR_EQUAL_TO | "<=" | + + + diff --git a/services/fabricv4/docs/LoaActionSortCriteria.md b/services/fabricv4/docs/LoaActionSortCriteria.md new file mode 100644 index 00000000..255625c3 --- /dev/null +++ b/services/fabricv4/docs/LoaActionSortCriteria.md @@ -0,0 +1,31 @@ + + +# LoaActionSortCriteria + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**direction** | [**DirectionEnum**](#DirectionEnum) | Sorting direction | [optional] | +|**property** | [**PropertyEnum**](#PropertyEnum) | Possible field names to use on sorting | [optional] | + + + +## Enum: DirectionEnum + +| Name | Value | +|---- | -----| +| DESC | "DESC" | +| ASC | "ASC" | + + + +## Enum: PropertyEnum + +| Name | Value | +|---- | -----| +| _CHANGELOG_CREATEDDATETIME | "/changeLog/createdDateTime" | + + + diff --git a/services/fabricv4/docs/LoaActionType.md b/services/fabricv4/docs/LoaActionType.md index a5329d2a..b4e192d8 100644 --- a/services/fabricv4/docs/LoaActionType.md +++ b/services/fabricv4/docs/LoaActionType.md @@ -5,15 +5,15 @@ ## Enum -* `AUTHORIZE_LOA` (value: `"AUTHORIZE_LOA"`) +* `ISSUER_AUTHORIZATION` (value: `"LOA_ISSUER_AUTHORIZATION"`) -* `ACCEPT_LOA` (value: `"ACCEPT_LOA"`) +* `REQUESTOR_ACCEPTANCE` (value: `"LOA_REQUESTOR_ACCEPTANCE"`) -* `COPY_LOA` (value: `"COPY_LOA"`) +* `COPY_LINK` (value: `"LOA_COPY_LINK"`) -* `SEND_LOA` (value: `"SEND_LOA"`) +* `SEND_EMAIL_NOTIFICATION` (value: `"LOA_SEND_EMAIL_NOTIFICATION"`) -* `CANCEL_LOA` (value: `"CANCEL_LOA"`) +* `CANCEL` (value: `"LOA_CANCEL"`) diff --git a/services/fabricv4/docs/LoaChangelog.md b/services/fabricv4/docs/LoaChangelog.md new file mode 100644 index 00000000..29b796e3 --- /dev/null +++ b/services/fabricv4/docs/LoaChangelog.md @@ -0,0 +1,21 @@ + + +# LoaChangelog + +Change log + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**createdBy** | **String** | Created by User Key | [optional] | +|**createdByFullName** | **String** | Created by User Full Name | [optional] | +|**createdByEmail** | **String** | Created by User Email Address | [optional] | +|**createdDateTime** | **OffsetDateTime** | Created by Date and Time | [optional] | +|**updatedBy** | **String** | Updated by User Key | [optional] | +|**updatedByFullName** | **String** | Updated by User Full Name | [optional] | +|**updatedByEmail** | **String** | Updated by User Email Address | [optional] | +|**updatedDateTime** | **OffsetDateTime** | Updated by Date and Time | [optional] | + + + diff --git a/services/fabricv4/docs/LoaConsumer.md b/services/fabricv4/docs/LoaConsumer.md new file mode 100644 index 00000000..6993cc43 --- /dev/null +++ b/services/fabricv4/docs/LoaConsumer.md @@ -0,0 +1,17 @@ + + +# LoaConsumer + +Associated consumer response + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**href** | **URI** | Consumer URI | [optional] | +|**uuid** | **UUID** | Consumer Identifier | [optional] | +|**type** | **LoaProductType** | | [optional] | +|**changeLog** | [**LoaChangelog**](LoaChangelog.md) | | [optional] | + + + diff --git a/services/fabricv4/docs/LoaConsumersResponse.md b/services/fabricv4/docs/LoaConsumersResponse.md new file mode 100644 index 00000000..be043634 --- /dev/null +++ b/services/fabricv4/docs/LoaConsumersResponse.md @@ -0,0 +1,15 @@ + + +# LoaConsumersResponse + +List of Consumers associated with a LOA + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**pagination** | [**Pagination**](Pagination.md) | | [optional] | +|**data** | [**List<LoaConsumer>**](LoaConsumer.md) | | [optional] | + + + diff --git a/services/fabricv4/docs/LoaDemarcationPoint.md b/services/fabricv4/docs/LoaDemarcationPoint.md new file mode 100644 index 00000000..8a1ded4e --- /dev/null +++ b/services/fabricv4/docs/LoaDemarcationPoint.md @@ -0,0 +1,18 @@ + + +# LoaDemarcationPoint + +Specifies the demarcation point.
For CAGE_LOA - cageUniqueSpaceId is required.
For PATCH_PANEL_LOA - patchPanelId is required.
For PATCH_PANEL_PORT_LOA - patchPanelId, patchPanelPortA, patchPanelPortB and connectorType is required. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**cageUniqueSpaceId** | **String** | Unique identifier of the Cage. | [optional] | +|**patchPanelId** | **String** | Unique identifier of the Patch Panel. | [optional] | +|**patchPanelPortA** | **Integer** | Specify the desired port number. <br> When ports are not provided, next available ports will be used. | [optional] | +|**patchPanelPortB** | **Integer** | Specify the desired port number. <br> When ports are not provided, next available ports will be used. <br> Required for Connector type FC and ST only. | [optional] | +|**connectorType** | **LoaPatchPanelConnectorType** | | [optional] | + + + diff --git a/services/fabricv4/docs/LoaFieldName.md b/services/fabricv4/docs/LoaFieldName.md new file mode 100644 index 00000000..7c3efdf3 --- /dev/null +++ b/services/fabricv4/docs/LoaFieldName.md @@ -0,0 +1,49 @@ + + +# LoaFieldName + +## Enum + + +* `UUID` (value: `"/uuid"`) + +* `STATE` (value: `"/state"`) + +* `TYPE` (value: `"/type"`) + +* `NAME` (value: `"/name"`) + +* `AUTHORIZEDPRODUCTTYPE` (value: `"/authorizedProductType"`) + +* `EXPIRATIONDATETIME` (value: `"/expirationDateTime"`) + +* `REQUESTOR_EMAIL` (value: `"/requestor/email"`) + +* `REQUESTOR_ORGID` (value: `"/requestor/orgId"`) + +* `REQUESTOR_ORGNAME` (value: `"/requestor/orgName"`) + +* `ISSUER_EMAIL` (value: `"/issuer/email"`) + +* `ISSUER_ORGID` (value: `"/issuer/orgId"`) + +* `ISSUER_ORGNAME` (value: `"/issuer/orgName"`) + +* `DEMARCATIONPOINT_PATCHPANELID` (value: `"/demarcationPoint/patchPanelId"`) + +* `DEMARCATIONPOINT_PATCHPANELPORTA` (value: `"/demarcationPoint/patchPanelPortA"`) + +* `DEMARCATIONPOINT_PATCHPANELPORTB` (value: `"/demarcationPoint/patchPanelPortB"`) + +* `DEMARCATIONPOINT_CONNECTORTYPE` (value: `"/demarcationPoint/connectorType"`) + +* `DEMARCATIONPOINT_CAGEUNIQUESPACEID` (value: `"/demarcationPoint/cageUniqueSpaceId"`) + +* `LOCATION_IBXCODE` (value: `"/location/ibxCode"`) + +* `CHANGELOG_CREATEDDATETIME` (value: `"/changeLog/createdDateTime"`) + +* `CHANGELOG_UPDATEDDATETIME` (value: `"/changeLog/updatedDateTime"`) + + + diff --git a/services/fabricv4/docs/LoaFilter.md b/services/fabricv4/docs/LoaFilter.md new file mode 100644 index 00000000..0bc033d7 --- /dev/null +++ b/services/fabricv4/docs/LoaFilter.md @@ -0,0 +1,35 @@ + + +# LoaFilter + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**property** | **LoaFieldName** | | [optional] | +|**operator** | [**OperatorEnum**](#OperatorEnum) | | [optional] | +|**values** | **List<String>** | | [optional] | +|**or** | [**List<LoaSimpleExpression>**](LoaSimpleExpression.md) | | [optional] | + + + +## Enum: OperatorEnum + +| Name | Value | +|---- | -----| +| EQUAL | "=" | +| NOT_EQUAL | "!=" | +| LIKE | "LIKE" | +| ILIKE | "ILIKE" | +| BETWEEN | "BETWEEN" | +| NOT_BETWEEN | "NOT BETWEEN" | +| IN | "IN" | +| NOT_IN | "NOT IN" | +| GREATER_THAN | ">" | +| LESS_THAN | "<" | +| GREATER_THAN_OR_EQUAL_TO | ">=" | +| LESS_THAN_OR_EQUAL_TO | "<=" | + + + diff --git a/services/fabricv4/docs/LoaIssuer.md b/services/fabricv4/docs/LoaIssuer.md new file mode 100644 index 00000000..6f977a29 --- /dev/null +++ b/services/fabricv4/docs/LoaIssuer.md @@ -0,0 +1,16 @@ + + +# LoaIssuer + +Issuer + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**email** | **String** | Email address of the issuer contact. | [optional] | +|**orgId** | **Integer** | Organization ID of the issuer. | [optional] | +|**orgName** | **String** | Organization name of the issuer. | [optional] | + + + diff --git a/services/fabricv4/docs/LoaLocation.md b/services/fabricv4/docs/LoaLocation.md new file mode 100644 index 00000000..426215c4 --- /dev/null +++ b/services/fabricv4/docs/LoaLocation.md @@ -0,0 +1,14 @@ + + +# LoaLocation + +Eligible location where LOA can be issued. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**ibxCode** | **String** | IBX Code | [optional] | + + + diff --git a/services/fabricv4/docs/LoaNoteDetails.md b/services/fabricv4/docs/LoaNoteDetails.md new file mode 100644 index 00000000..10002a85 --- /dev/null +++ b/services/fabricv4/docs/LoaNoteDetails.md @@ -0,0 +1,27 @@ + + +# LoaNoteDetails + +Represents a note added to a LOA by an authorized user from either the issuer or requestor organization + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | [**TypeEnum**](#TypeEnum) | Indicates which party added the note. <br> ISSUER — note was added by a user from the issuer organization. <br> REQUESTOR — note was added by a user from the requestor organization. | [optional] | +|**href** | **URI** | URI to note resource. | [optional] | +|**uuid** | **UUID** | Unique identifier of this note. | [optional] | +|**comments** | **String** | Content of the note as submitted by the user. | [optional] | +|**createdDateTime** | **OffsetDateTime** | Date and time when the note was created. | [optional] | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| ISSUER | "ISSUER" | +| REQUESTOR | "REQUESTOR" | + + + diff --git a/services/fabricv4/docs/LoaNotesResponse.md b/services/fabricv4/docs/LoaNotesResponse.md new file mode 100644 index 00000000..f422d6a8 --- /dev/null +++ b/services/fabricv4/docs/LoaNotesResponse.md @@ -0,0 +1,14 @@ + + +# LoaNotesResponse + +List of Loa note details + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**data** | [**List<LoaNoteDetails>**](LoaNoteDetails.md) | | [optional] | + + + diff --git a/services/fabricv4/docs/OpEnum.md b/services/fabricv4/docs/LoaOpEnum.md similarity index 89% rename from services/fabricv4/docs/OpEnum.md rename to services/fabricv4/docs/LoaOpEnum.md index c2555ced..94a4e699 100644 --- a/services/fabricv4/docs/OpEnum.md +++ b/services/fabricv4/docs/LoaOpEnum.md @@ -1,15 +1,15 @@ -# OpEnum +# LoaOpEnum ## Enum +* `REPLACE` (value: `"replace"`) + * `ADD` (value: `"add"`) * `REMOVE` (value: `"remove"`) -* `REPLACE` (value: `"replace"`) - diff --git a/services/fabricv4/docs/LoaOrFilter.md b/services/fabricv4/docs/LoaOrFilter.md new file mode 100644 index 00000000..24328d87 --- /dev/null +++ b/services/fabricv4/docs/LoaOrFilter.md @@ -0,0 +1,13 @@ + + +# LoaOrFilter + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**or** | [**List<LoaSimpleExpression>**](LoaSimpleExpression.md) | | [optional] | + + + diff --git a/services/fabricv4/docs/LoaPatchPanelConnectorType.md b/services/fabricv4/docs/LoaPatchPanelConnectorType.md new file mode 100644 index 00000000..1adc8d64 --- /dev/null +++ b/services/fabricv4/docs/LoaPatchPanelConnectorType.md @@ -0,0 +1,17 @@ + + +# LoaPatchPanelConnectorType + +## Enum + + +* `FC` (value: `"FC"`) + +* `SC` (value: `"SC"`) + +* `LC` (value: `"LC"`) + +* `ST` (value: `"ST"`) + + + diff --git a/services/fabricv4/docs/LoaProductType.md b/services/fabricv4/docs/LoaProductType.md new file mode 100644 index 00000000..aa9acb5d --- /dev/null +++ b/services/fabricv4/docs/LoaProductType.md @@ -0,0 +1,15 @@ + + +# LoaProductType + +## Enum + + +* `XC` (value: `"XC"`) + +* `XF_PORT` (value: `"XF_PORT"`) + +* `VD` (value: `"VD"`) + + + diff --git a/services/fabricv4/docs/LoaReplaceOperation.md b/services/fabricv4/docs/LoaReplaceOperation.md new file mode 100644 index 00000000..91b3f0cf --- /dev/null +++ b/services/fabricv4/docs/LoaReplaceOperation.md @@ -0,0 +1,16 @@ + + +# LoaReplaceOperation + +Replace attribute value or sub-resource in the existing model + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**op** | **LoaOpEnum** | | | +|**path** | **String** | ### A JSON Pointer path. * `/name` - Name of the Loa * `/description` - Description of the Loa * `/requestor/email` - Email of the requestor contact * `/requestor/orgName` - Organization name of the requestor * `/issuer/email` - Email of the issuer contact * `/issuer/orgName` - Organization name of the issuer * `/demarcationPoint/patchPanelId` - Patch Panel Identifier * `/demarcationPoint/patchPanelPortA` - Patch Panel Port A * `/demarcationPoint/patchPanelPortB` - Patch Panel Port B * `/demarcationPoint/connectorType` - Connector Type * `/demarcationPoint/cageUniqueSpaceId` - Cage Unique Space Identifier * `/expirationDateTime` - Expiration date and time of the Loa * `/location/ibxCode` - IBX code of the Eligible location | | +|**value** | **Object** | New value for updated parameter | | + + + diff --git a/services/fabricv4/docs/LoaRequest.md b/services/fabricv4/docs/LoaRequest.md new file mode 100644 index 00000000..cb1a8ac4 --- /dev/null +++ b/services/fabricv4/docs/LoaRequest.md @@ -0,0 +1,17 @@ + + +# LoaRequest + +Create Loa + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | **LoaType** | | | +|**name** | **String** | A short, descriptive name for this LOA. | | +|**description** | **String** | Additional context about this LOA. | [optional] | +|**authorizedProductType** | **LoaProductType** | | | + + + diff --git a/services/fabricv4/docs/LoaRequestor.md b/services/fabricv4/docs/LoaRequestor.md new file mode 100644 index 00000000..e9e041fb --- /dev/null +++ b/services/fabricv4/docs/LoaRequestor.md @@ -0,0 +1,16 @@ + + +# LoaRequestor + +Requestor + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**email** | **String** | Email address of the requestor contact. | [optional] | +|**orgId** | **Integer** | Organization ID of the requestor. | [optional] | +|**orgName** | **String** | Organization name of the requestor. | [optional] | + + + diff --git a/services/fabricv4/docs/LoaResponse.md b/services/fabricv4/docs/LoaResponse.md new file mode 100644 index 00000000..cea61d7b --- /dev/null +++ b/services/fabricv4/docs/LoaResponse.md @@ -0,0 +1,27 @@ + + +# LoaResponse + +Loa Response + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**href** | **URI** | URI of this LOA resource. | [optional] | +|**uuid** | **UUID** | Unique identifier of this LOA. | [optional] | +|**type** | **LoaType** | | [optional] | +|**name** | **String** | A short, descriptive name for this LOA | [optional] | +|**description** | **String** | Additional context about this LOA | [optional] | +|**authorizedProductType** | **LoaProductType** | | [optional] | +|**state** | **LoaState** | | [optional] | +|**operation** | [**LoaResponseOperation**](LoaResponseOperation.md) | | [optional] | +|**requestor** | [**LoaRequestor**](LoaRequestor.md) | | [optional] | +|**issuer** | [**LoaIssuer**](LoaIssuer.md) | | [optional] | +|**demarcationPoint** | [**LoaDemarcationPoint**](LoaDemarcationPoint.md) | | [optional] | +|**location** | [**LoaLocation**](LoaLocation.md) | | [optional] | +|**expirationDateTime** | **OffsetDateTime** | Date and time when this LOA expires.<br> Default to 3 months from the creation date | [optional] | +|**changeLog** | [**LoaChangelog**](LoaChangelog.md) | | [optional] | + + + diff --git a/services/fabricv4/docs/LoaResponseOperation.md b/services/fabricv4/docs/LoaResponseOperation.md new file mode 100644 index 00000000..a446460f --- /dev/null +++ b/services/fabricv4/docs/LoaResponseOperation.md @@ -0,0 +1,13 @@ + + +# LoaResponseOperation + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**consumersCount** | **Integer** | Number of consumers associated with this LOA. | [optional] | + + + diff --git a/services/fabricv4/docs/AgentTemplate.md b/services/fabricv4/docs/LoaSearchFilters.md similarity index 57% rename from services/fabricv4/docs/AgentTemplate.md rename to services/fabricv4/docs/LoaSearchFilters.md index 3d5d53bf..82000300 100644 --- a/services/fabricv4/docs/AgentTemplate.md +++ b/services/fabricv4/docs/LoaSearchFilters.md @@ -1,13 +1,13 @@ -# AgentTemplate +# LoaSearchFilters ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**uuid** | **String** | Agent Template Uuid | [optional] | +|**and** | [**List<LoaFilter>**](LoaFilter.md) | | [optional] | diff --git a/services/fabricv4/docs/LoaSearchRequest.md b/services/fabricv4/docs/LoaSearchRequest.md new file mode 100644 index 00000000..8732f1a5 --- /dev/null +++ b/services/fabricv4/docs/LoaSearchRequest.md @@ -0,0 +1,16 @@ + + +# LoaSearchRequest + +Search loas based on filter criteria + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**filter** | [**LoaSearchFilters**](LoaSearchFilters.md) | | [optional] | +|**pagination** | [**PaginationRequest**](PaginationRequest.md) | | [optional] | +|**sort** | [**List<LoaSortCriteria>**](LoaSortCriteria.md) | | [optional] | + + + diff --git a/services/fabricv4/docs/LoaSearchResponse.md b/services/fabricv4/docs/LoaSearchResponse.md new file mode 100644 index 00000000..1622ef4f --- /dev/null +++ b/services/fabricv4/docs/LoaSearchResponse.md @@ -0,0 +1,16 @@ + + +# LoaSearchResponse + +List of LOAs + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**pagination** | [**Pagination**](Pagination.md) | | [optional] | +|**sort** | [**List<LoaSortCriteria>**](LoaSortCriteria.md) | | [optional] | +|**data** | [**List<LoaResponse>**](LoaResponse.md) | | [optional] | + + + diff --git a/services/fabricv4/docs/LoaSimpleExpression.md b/services/fabricv4/docs/LoaSimpleExpression.md new file mode 100644 index 00000000..c88e3668 --- /dev/null +++ b/services/fabricv4/docs/LoaSimpleExpression.md @@ -0,0 +1,34 @@ + + +# LoaSimpleExpression + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**property** | **LoaFieldName** | | [optional] | +|**operator** | [**OperatorEnum**](#OperatorEnum) | | [optional] | +|**values** | **List<String>** | | [optional] | + + + +## Enum: OperatorEnum + +| Name | Value | +|---- | -----| +| EQUAL | "=" | +| NOT_EQUAL | "!=" | +| LIKE | "LIKE" | +| ILIKE | "ILIKE" | +| BETWEEN | "BETWEEN" | +| NOT_BETWEEN | "NOT BETWEEN" | +| IN | "IN" | +| NOT_IN | "NOT IN" | +| GREATER_THAN | ">" | +| LESS_THAN | "<" | +| GREATER_THAN_OR_EQUAL_TO | ">=" | +| LESS_THAN_OR_EQUAL_TO | "<=" | + + + diff --git a/services/fabricv4/docs/LoaSortCriteria.md b/services/fabricv4/docs/LoaSortCriteria.md new file mode 100644 index 00000000..f89699d2 --- /dev/null +++ b/services/fabricv4/docs/LoaSortCriteria.md @@ -0,0 +1,34 @@ + + +# LoaSortCriteria + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**direction** | [**DirectionEnum**](#DirectionEnum) | Sorting direction | [optional] | +|**property** | [**PropertyEnum**](#PropertyEnum) | Possible field names to use on sorting | [optional] | + + + +## Enum: DirectionEnum + +| Name | Value | +|---- | -----| +| DESC | "DESC" | +| ASC | "ASC" | + + + +## Enum: PropertyEnum + +| Name | Value | +|---- | -----| +| NAME | "/name" | +| EXPIRATIONDATETIME | "/expirationDateTime" | +| CHANGELOG_CREATEDDATETIME | "/changeLog/createdDateTime" | +| CHANGELOG_UPDATEDDATETIME | "/changeLog/updatedDateTime" | + + + diff --git a/services/fabricv4/docs/LoaState.md b/services/fabricv4/docs/LoaState.md index 1154f60e..246030b5 100644 --- a/services/fabricv4/docs/LoaState.md +++ b/services/fabricv4/docs/LoaState.md @@ -13,8 +13,6 @@ * `PENDING_ACCEPTANCE` (value: `"PENDING_ACCEPTANCE"`) -* `REJECTED` (value: `"REJECTED"`) - * `CANCELLED` (value: `"CANCELLED"`) * `INACTIVE` (value: `"INACTIVE"`) diff --git a/services/fabricv4/docs/LoaType.md b/services/fabricv4/docs/LoaType.md index 9755a439..0a4d5ef3 100644 --- a/services/fabricv4/docs/LoaType.md +++ b/services/fabricv4/docs/LoaType.md @@ -5,9 +5,11 @@ ## Enum -* `PATCH_PANEL_PORT_LOA` (value: `"PATCH_PANEL_PORT_LOA"`) - * `CAGE_LOA` (value: `"CAGE_LOA"`) +* `PATCH_PANEL_LOA` (value: `"PATCH_PANEL_LOA"`) + +* `PATCH_PANEL_PORT_LOA` (value: `"PATCH_PANEL_PORT_LOA"`) + diff --git a/services/fabricv4/docs/LoasApi.md b/services/fabricv4/docs/LoasApi.md new file mode 100644 index 00000000..091f03fb --- /dev/null +++ b/services/fabricv4/docs/LoasApi.md @@ -0,0 +1,748 @@ +# LoasApi + +All URIs are relative to *https://api.equinix.com* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**createLoa**](LoasApi.md#createLoa) | **POST** /fabric/v4/loas | Create Loa | +| [**createLoaNoteByLoaId**](LoasApi.md#createLoaNoteByLoaId) | **POST** /fabric/v4/loas/{loaId}/notes | Create Loa Note | +| [**getLoaActionsByUuid**](LoasApi.md#getLoaActionsByUuid) | **GET** /fabric/v4/loas/{loaId}/actions/{actionId} | Get Loa Action by Action ID | +| [**getLoaByUuid**](LoasApi.md#getLoaByUuid) | **GET** /fabric/v4/loas/{loaId} | Get Loa | +| [**getLoaConsumersByLoaId**](LoasApi.md#getLoaConsumersByLoaId) | **GET** /fabric/v4/loas/{loaId}/consumers | Get Loa Consumers | +| [**getLoaNotesByUuid**](LoasApi.md#getLoaNotesByUuid) | **GET** /fabric/v4/loas/{loaId}/notes | Get Loa Notes | +| [**performLoaAction**](LoasApi.md#performLoaAction) | **POST** /fabric/v4/loas/{loaId}/actions | Loa Actions | +| [**searchLoa**](LoasApi.md#searchLoa) | **POST** /fabric/v4/loas/search | Search Loas | +| [**searchLoaAction**](LoasApi.md#searchLoaAction) | **POST** /fabric/v4/loas/{loaId}/actions/search | Search Loa Actions | +| [**updateLoaByUuid**](LoasApi.md#updateLoaByUuid) | **PATCH** /fabric/v4/loas/{loaId} | Update Loa | + + + +# **createLoa** +> LoaResponse createLoa(createLoa) + +Create Loa + +The API provides capability to create a new Loa + +### Example +```java +// Import classes: +import com.equinix.sdk.fabricv4.ApiClient; +import com.equinix.sdk.fabricv4.ApiException; +import com.equinix.sdk.fabricv4.Configuration; +import com.equinix.sdk.fabricv4.auth.*; +import com.equinix.sdk.fabricv4.models.*; +import com.equinix.sdk.fabricv4.api.LoasApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.equinix.com"); + + // Configure HTTP bearer authorization: BearerAuth + HttpBearerAuth BearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("BearerAuth"); + BearerAuth.setBearerToken("BEARER TOKEN"); + + LoasApi apiInstance = new LoasApi(defaultClient); + CreateLoa createLoa = new CreateLoa(); // CreateLoa | + try { + LoaResponse result = apiInstance.createLoa(createLoa); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling LoasApi#createLoa"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **createLoa** | [**CreateLoa**](CreateLoa.md)| | | + +### Return type + +[**LoaResponse**](LoaResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **202** | Accepted | - | +| **400** | Bad request | - | +| **401** | Unauthorized request | - | +| **403** | Operation not allowed | - | +| **404** | Not found | - | +| **500** | Internal Server error | - | + + +# **createLoaNoteByLoaId** +> LoaNoteDetails createLoaNoteByLoaId(loaId, createLoaNote) + +Create Loa Note + +The API provides capability to create Loa note by Loa ID + +### Example +```java +// Import classes: +import com.equinix.sdk.fabricv4.ApiClient; +import com.equinix.sdk.fabricv4.ApiException; +import com.equinix.sdk.fabricv4.Configuration; +import com.equinix.sdk.fabricv4.auth.*; +import com.equinix.sdk.fabricv4.models.*; +import com.equinix.sdk.fabricv4.api.LoasApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.equinix.com"); + + // Configure HTTP bearer authorization: BearerAuth + HttpBearerAuth BearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("BearerAuth"); + BearerAuth.setBearerToken("BEARER TOKEN"); + + LoasApi apiInstance = new LoasApi(defaultClient); + UUID loaId = UUID.randomUUID(); // UUID | Loa UUID + CreateLoaNote createLoaNote = new CreateLoaNote(); // CreateLoaNote | + try { + LoaNoteDetails result = apiInstance.createLoaNoteByLoaId(loaId, createLoaNote); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling LoasApi#createLoaNoteByLoaId"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **loaId** | **UUID**| Loa UUID | | +| **createLoaNote** | [**CreateLoaNote**](CreateLoaNote.md)| | | + +### Return type + +[**LoaNoteDetails**](LoaNoteDetails.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Created | - | +| **400** | Bad request | - | +| **401** | Unauthorized request | - | +| **403** | Operation not allowed | - | +| **404** | Not found | - | +| **500** | Internal Server error | - | + + +# **getLoaActionsByUuid** +> LoaActionResponse getLoaActionsByUuid(loaId, actionId) + +Get Loa Action by Action ID + +This API provides capability to fetch action details + +### Example +```java +// Import classes: +import com.equinix.sdk.fabricv4.ApiClient; +import com.equinix.sdk.fabricv4.ApiException; +import com.equinix.sdk.fabricv4.Configuration; +import com.equinix.sdk.fabricv4.auth.*; +import com.equinix.sdk.fabricv4.models.*; +import com.equinix.sdk.fabricv4.api.LoasApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.equinix.com"); + + // Configure HTTP bearer authorization: BearerAuth + HttpBearerAuth BearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("BearerAuth"); + BearerAuth.setBearerToken("BEARER TOKEN"); + + LoasApi apiInstance = new LoasApi(defaultClient); + UUID loaId = UUID.randomUUID(); // UUID | Loa UUID + UUID actionId = UUID.randomUUID(); // UUID | Action UUID + try { + LoaActionResponse result = apiInstance.getLoaActionsByUuid(loaId, actionId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling LoasApi#getLoaActionsByUuid"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **loaId** | **UUID**| Loa UUID | | +| **actionId** | **UUID**| Action UUID | | + +### Return type + +[**LoaActionResponse**](LoaActionResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful Operation | - | +| **400** | Bad request | - | +| **401** | Unauthorized request | - | +| **403** | Operation not allowed | - | +| **404** | Not found | - | +| **500** | Internal Server error | - | + + +# **getLoaByUuid** +> LoaResponse getLoaByUuid(loaId) + +Get Loa + +The API provides capability to get Loa details by Loa ID + +### Example +```java +// Import classes: +import com.equinix.sdk.fabricv4.ApiClient; +import com.equinix.sdk.fabricv4.ApiException; +import com.equinix.sdk.fabricv4.Configuration; +import com.equinix.sdk.fabricv4.auth.*; +import com.equinix.sdk.fabricv4.models.*; +import com.equinix.sdk.fabricv4.api.LoasApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.equinix.com"); + + // Configure HTTP bearer authorization: BearerAuth + HttpBearerAuth BearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("BearerAuth"); + BearerAuth.setBearerToken("BEARER TOKEN"); + + LoasApi apiInstance = new LoasApi(defaultClient); + UUID loaId = UUID.randomUUID(); // UUID | Loa UUID + try { + LoaResponse result = apiInstance.getLoaByUuid(loaId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling LoasApi#getLoaByUuid"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **loaId** | **UUID**| Loa UUID | | + +### Return type + +[**LoaResponse**](LoaResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful Operation | - | +| **400** | Bad request | - | +| **401** | Unauthorized request | - | +| **403** | Operation not allowed | - | +| **404** | Not found | - | +| **500** | Internal Server error | - | + + +# **getLoaConsumersByLoaId** +> LoaConsumersResponse getLoaConsumersByLoaId(loaId) + +Get Loa Consumers + +The API provides capability to get Loa consumers by Loa ID + +### Example +```java +// Import classes: +import com.equinix.sdk.fabricv4.ApiClient; +import com.equinix.sdk.fabricv4.ApiException; +import com.equinix.sdk.fabricv4.Configuration; +import com.equinix.sdk.fabricv4.auth.*; +import com.equinix.sdk.fabricv4.models.*; +import com.equinix.sdk.fabricv4.api.LoasApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.equinix.com"); + + // Configure HTTP bearer authorization: BearerAuth + HttpBearerAuth BearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("BearerAuth"); + BearerAuth.setBearerToken("BEARER TOKEN"); + + LoasApi apiInstance = new LoasApi(defaultClient); + UUID loaId = UUID.randomUUID(); // UUID | Loa UUID + try { + LoaConsumersResponse result = apiInstance.getLoaConsumersByLoaId(loaId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling LoasApi#getLoaConsumersByLoaId"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **loaId** | **UUID**| Loa UUID | | + +### Return type + +[**LoaConsumersResponse**](LoaConsumersResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful Operation | - | +| **400** | Bad request | - | +| **401** | Unauthorized request | - | +| **403** | Operation not allowed | - | +| **404** | Not found | - | +| **500** | Internal Server error | - | + + +# **getLoaNotesByUuid** +> LoaNotesResponse getLoaNotesByUuid(loaId) + +Get Loa Notes + +The API provides capability to get Loa notes by Loa ID + +### Example +```java +// Import classes: +import com.equinix.sdk.fabricv4.ApiClient; +import com.equinix.sdk.fabricv4.ApiException; +import com.equinix.sdk.fabricv4.Configuration; +import com.equinix.sdk.fabricv4.auth.*; +import com.equinix.sdk.fabricv4.models.*; +import com.equinix.sdk.fabricv4.api.LoasApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.equinix.com"); + + // Configure HTTP bearer authorization: BearerAuth + HttpBearerAuth BearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("BearerAuth"); + BearerAuth.setBearerToken("BEARER TOKEN"); + + LoasApi apiInstance = new LoasApi(defaultClient); + UUID loaId = UUID.randomUUID(); // UUID | Loa UUID + try { + LoaNotesResponse result = apiInstance.getLoaNotesByUuid(loaId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling LoasApi#getLoaNotesByUuid"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **loaId** | **UUID**| Loa UUID | | + +### Return type + +[**LoaNotesResponse**](LoaNotesResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful Operation | - | +| **400** | Bad request | - | +| **401** | Unauthorized request | - | +| **403** | Operation not allowed | - | +| **404** | Not found | - | +| **500** | Internal Server error | - | + + +# **performLoaAction** +> LoaActionResponse performLoaAction(loaId, loaActionRequest) + +Loa Actions + +The API provides capability to perform actions on Loa + +### Example +```java +// Import classes: +import com.equinix.sdk.fabricv4.ApiClient; +import com.equinix.sdk.fabricv4.ApiException; +import com.equinix.sdk.fabricv4.Configuration; +import com.equinix.sdk.fabricv4.auth.*; +import com.equinix.sdk.fabricv4.models.*; +import com.equinix.sdk.fabricv4.api.LoasApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.equinix.com"); + + // Configure HTTP bearer authorization: BearerAuth + HttpBearerAuth BearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("BearerAuth"); + BearerAuth.setBearerToken("BEARER TOKEN"); + + LoasApi apiInstance = new LoasApi(defaultClient); + UUID loaId = UUID.randomUUID(); // UUID | Loa UUID + LoaActionRequest loaActionRequest = new LoaActionRequest(); // LoaActionRequest | + try { + LoaActionResponse result = apiInstance.performLoaAction(loaId, loaActionRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling LoasApi#performLoaAction"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **loaId** | **UUID**| Loa UUID | | +| **loaActionRequest** | [**LoaActionRequest**](LoaActionRequest.md)| | | + +### Return type + +[**LoaActionResponse**](LoaActionResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **202** | Accepted | - | +| **400** | Bad request | - | +| **401** | Unauthorized request | - | +| **403** | Operation not allowed | - | +| **404** | Not found | - | +| **500** | Internal Server error | - | + + +# **searchLoa** +> LoaSearchResponse searchLoa(loaSearchRequest) + +Search Loas + +The API provides capability to get list of user's Loa using search criteria, including optional filtering, pagination and sorting + +### Example +```java +// Import classes: +import com.equinix.sdk.fabricv4.ApiClient; +import com.equinix.sdk.fabricv4.ApiException; +import com.equinix.sdk.fabricv4.Configuration; +import com.equinix.sdk.fabricv4.auth.*; +import com.equinix.sdk.fabricv4.models.*; +import com.equinix.sdk.fabricv4.api.LoasApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.equinix.com"); + + // Configure HTTP bearer authorization: BearerAuth + HttpBearerAuth BearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("BearerAuth"); + BearerAuth.setBearerToken("BEARER TOKEN"); + + LoasApi apiInstance = new LoasApi(defaultClient); + LoaSearchRequest loaSearchRequest = new LoaSearchRequest(); // LoaSearchRequest | + try { + LoaSearchResponse result = apiInstance.searchLoa(loaSearchRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling LoasApi#searchLoa"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **loaSearchRequest** | [**LoaSearchRequest**](LoaSearchRequest.md)| | | + +### Return type + +[**LoaSearchResponse**](LoaSearchResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful operation | - | +| **400** | Bad request | - | +| **401** | Unauthorized request | - | +| **403** | Operation not allowed | - | +| **404** | Not found | - | +| **500** | Internal Server error | - | + + +# **searchLoaAction** +> LoaActionSearchResponse searchLoaAction(loaId, loaActionSearchRequest) + +Search Loa Actions + +The API provides capability to get list of user's Loa Actions using search criteria, including optional filtering, pagination and sorting + +### Example +```java +// Import classes: +import com.equinix.sdk.fabricv4.ApiClient; +import com.equinix.sdk.fabricv4.ApiException; +import com.equinix.sdk.fabricv4.Configuration; +import com.equinix.sdk.fabricv4.auth.*; +import com.equinix.sdk.fabricv4.models.*; +import com.equinix.sdk.fabricv4.api.LoasApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.equinix.com"); + + // Configure HTTP bearer authorization: BearerAuth + HttpBearerAuth BearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("BearerAuth"); + BearerAuth.setBearerToken("BEARER TOKEN"); + + LoasApi apiInstance = new LoasApi(defaultClient); + UUID loaId = UUID.randomUUID(); // UUID | Loa UUID + LoaActionSearchRequest loaActionSearchRequest = new LoaActionSearchRequest(); // LoaActionSearchRequest | + try { + LoaActionSearchResponse result = apiInstance.searchLoaAction(loaId, loaActionSearchRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling LoasApi#searchLoaAction"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **loaId** | **UUID**| Loa UUID | | +| **loaActionSearchRequest** | [**LoaActionSearchRequest**](LoaActionSearchRequest.md)| | | + +### Return type + +[**LoaActionSearchResponse**](LoaActionSearchResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful Operation | - | +| **400** | Bad request | - | +| **401** | Unauthorized request | - | +| **403** | Operation not allowed | - | +| **404** | Not found | - | +| **500** | Internal Server error | - | + + +# **updateLoaByUuid** +> LoaResponse updateLoaByUuid(loaId, loaReplaceOperation) + +Update Loa + +The API provides capability to update Loa details by Loa ID + +### Example +```java +// Import classes: +import com.equinix.sdk.fabricv4.ApiClient; +import com.equinix.sdk.fabricv4.ApiException; +import com.equinix.sdk.fabricv4.Configuration; +import com.equinix.sdk.fabricv4.auth.*; +import com.equinix.sdk.fabricv4.models.*; +import com.equinix.sdk.fabricv4.api.LoasApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.equinix.com"); + + // Configure HTTP bearer authorization: BearerAuth + HttpBearerAuth BearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("BearerAuth"); + BearerAuth.setBearerToken("BEARER TOKEN"); + + LoasApi apiInstance = new LoasApi(defaultClient); + UUID loaId = UUID.randomUUID(); // UUID | Loa UUID + List loaReplaceOperation = Arrays.asList(); // List | + try { + LoaResponse result = apiInstance.updateLoaByUuid(loaId, loaReplaceOperation); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling LoasApi#updateLoaByUuid"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **loaId** | **UUID**| Loa UUID | | +| **loaReplaceOperation** | [**List<LoaReplaceOperation>**](LoaReplaceOperation.md)| | | + +### Return type + +[**LoaResponse**](LoaResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful operation | - | +| **400** | Bad request | - | +| **401** | Unauthorized request | - | +| **403** | Operation not allowed | - | +| **404** | Not found | - | +| **500** | Internal Server error | - | + diff --git a/services/fabricv4/docs/LogoRequest.md b/services/fabricv4/docs/LogoRequest.md deleted file mode 100644 index 24aad4ca..00000000 --- a/services/fabricv4/docs/LogoRequest.md +++ /dev/null @@ -1,17 +0,0 @@ - - -# LogoRequest - -Equinix Fabric Logo Request Object - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**logo** | **File** | Logo image file | | -|**name** | **String** | Name of the Logo | | -|**description** | **String** | Description of the logo | | -|**type** | **String** | Type of logo | | - - - diff --git a/services/fabricv4/docs/LogosApi.md b/services/fabricv4/docs/LogosApi.md index 53d8d47a..108b2608 100644 --- a/services/fabricv4/docs/LogosApi.md +++ b/services/fabricv4/docs/LogosApi.md @@ -4,10 +4,88 @@ All URIs are relative to *https://api.equinix.com* | Method | HTTP request | Description | |------------- | ------------- | -------------| +| [**createLogo**](LogosApi.md#createLogo) | **POST** /fabric/v4/logos | Create Logo | | [**deleteLogoByUuid**](LogosApi.md#deleteLogoByUuid) | **DELETE** /fabric/v4/logos/{uuid} | Delete Logo | | [**getLogoByUuid**](LogosApi.md#getLogoByUuid) | **GET** /fabric/v4/logos/{uuid} | Get Logo | + +# **createLogo** +> LogoResponse createLogo(logo, name, description, type) + +Create Logo + +Create Logo for Equinix Fabric™ Company Profile. + +### Example +```java +// Import classes: +import com.equinix.sdk.fabricv4.ApiClient; +import com.equinix.sdk.fabricv4.ApiException; +import com.equinix.sdk.fabricv4.Configuration; +import com.equinix.sdk.fabricv4.auth.*; +import com.equinix.sdk.fabricv4.models.*; +import com.equinix.sdk.fabricv4.api.LogosApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.equinix.com"); + + // Configure HTTP bearer authorization: BearerAuth + HttpBearerAuth BearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("BearerAuth"); + BearerAuth.setBearerToken("BEARER TOKEN"); + + LogosApi apiInstance = new LogosApi(defaultClient); + File logo = new File("/path/to/file"); // File | Logo image file + String name = "name_example"; // String | Name of the Logo + String description = "description_example"; // String | Description of the logo + String type = "type_example"; // String | Type of logo + try { + LogoResponse result = apiInstance.createLogo(logo, name, description, type); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling LogosApi#createLogo"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **logo** | **File**| Logo image file | | +| **name** | **String**| Name of the Logo | | +| **description** | **String**| Description of the logo | | +| **type** | **String**| Type of logo | | + +### Return type + +[**LogoResponse**](LogoResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Successful Create operation | - | +| **400** | Bad request | - | +| **401** | Unauthorized | - | +| **403** | Forbidden | - | +| **500** | Internal Server Error | - | + # **deleteLogoByUuid** > LogoResponse deleteLogoByUuid(uuid) diff --git a/services/fabricv4/docs/MaintenanceState.md b/services/fabricv4/docs/MaintenanceState.md new file mode 100644 index 00000000..48f27821 --- /dev/null +++ b/services/fabricv4/docs/MaintenanceState.md @@ -0,0 +1,17 @@ + + +# MaintenanceState + +## Enum + + +* `SCHEDULED` (value: `"SCHEDULED"`) + +* `IN_PROGRESS` (value: `"IN_PROGRESS"`) + +* `COMPLETED` (value: `"COMPLETED"`) + +* `DEFERRED` (value: `"DEFERRED"`) + + + diff --git a/services/fabricv4/docs/MessagesInner.md b/services/fabricv4/docs/MessagesInner.md deleted file mode 100644 index bb3d1064..00000000 --- a/services/fabricv4/docs/MessagesInner.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# MessagesInner - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**type** | **String** | Role of the message sender user or assistant | [optional] | -|**content** | **String** | Content of the chat message | [optional] | - - - diff --git a/services/fabricv4/docs/ModelConfiguration.md b/services/fabricv4/docs/ModelConfiguration.md deleted file mode 100644 index c6e572b0..00000000 --- a/services/fabricv4/docs/ModelConfiguration.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# ModelConfiguration - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**prompt** | **String** | Agent configuration prompt to be used for agent specification | [optional] | - - - diff --git a/services/fabricv4/docs/OperationalEventFilters.md b/services/fabricv4/docs/OperationalEventFilters.md new file mode 100644 index 00000000..ccfa0a61 --- /dev/null +++ b/services/fabricv4/docs/OperationalEventFilters.md @@ -0,0 +1,13 @@ + + +# OperationalEventFilters + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**and** | [**List<OperationalEventSimpleExpression>**](OperationalEventSimpleExpression.md) | | [optional] | + + + diff --git a/services/fabricv4/docs/OperationalEventSearchRequest.md b/services/fabricv4/docs/OperationalEventSearchRequest.md new file mode 100644 index 00000000..1cd051b8 --- /dev/null +++ b/services/fabricv4/docs/OperationalEventSearchRequest.md @@ -0,0 +1,15 @@ + + +# OperationalEventSearchRequest + +Search requests containing criteria + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**filter** | [**OperationalEventFilters**](OperationalEventFilters.md) | | [optional] | +|**pagination** | [**PaginationRequest**](PaginationRequest.md) | | [optional] | + + + diff --git a/services/fabricv4/docs/OperationalEventSimpleExpression.md b/services/fabricv4/docs/OperationalEventSimpleExpression.md new file mode 100644 index 00000000..37144cc5 --- /dev/null +++ b/services/fabricv4/docs/OperationalEventSimpleExpression.md @@ -0,0 +1,15 @@ + + +# OperationalEventSimpleExpression + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**property** | **String** | Possible field names to use on filters: * `/subject` - Cloud Event subject description | [optional] | +|**operator** | **String** | Possible operators to use on filters: * `=` - equal * `IN` - in | [optional] | +|**values** | **List<String>** | | [optional] | + + + diff --git a/services/fabricv4/docs/OperatorEnum.md b/services/fabricv4/docs/OperatorEnum.md new file mode 100644 index 00000000..1606ea4d --- /dev/null +++ b/services/fabricv4/docs/OperatorEnum.md @@ -0,0 +1,25 @@ + + +# OperatorEnum + +## Enum + + +* `EQUAL` (value: `"="`) + +* `NOT_EQUAL` (value: `"!="`) + +* `LIKE` (value: `"LIKE"`) + +* `NOT_LIKE` (value: `"NOT LIKE"`) + +* `ILIKE` (value: `"ILIKE"`) + +* `NOT_ILIKE` (value: `"NOT ILIKE"`) + +* `IN` (value: `"IN"`) + +* `NOT_IN` (value: `"NOT IN"`) + + + diff --git a/services/fabricv4/docs/OpticalConnectASideRequest.md b/services/fabricv4/docs/OpticalConnectASideRequest.md new file mode 100644 index 00000000..aa03fd5c --- /dev/null +++ b/services/fabricv4/docs/OpticalConnectASideRequest.md @@ -0,0 +1,28 @@ + + +# OpticalConnectASideRequest + +A-Side configuration. Always a patch panel port from your cage. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**patchPanelId** | **String** | Unique identifier of the patch panel. | [optional] | +|**patchPanelPortA** | **String** | Specify the desired port number for Port A. <br> When ports are not provided, next available ports will be used. | [optional] | +|**patchPanelPortB** | **String** | Specify the desired port number for Port B. <br> When ports are not provided, next available ports will be used. <br> Required for Connector type FC, SC and ST only. | [optional] | +|**connectorType** | [**ConnectorTypeEnum**](#ConnectorTypeEnum) | Type of Connector | [optional] | + + + +## Enum: ConnectorTypeEnum + +| Name | Value | +|---- | -----| +| FC | "FC" | +| SC | "SC" | +| LC | "LC" | +| ST | "ST" | + + + diff --git a/services/fabricv4/docs/OpticalConnectASideResponse.md b/services/fabricv4/docs/OpticalConnectASideResponse.md new file mode 100644 index 00000000..ca44cfbf --- /dev/null +++ b/services/fabricv4/docs/OpticalConnectASideResponse.md @@ -0,0 +1,31 @@ + + +# OpticalConnectASideResponse + +Originating end as provisioned, with the cage, cabinet and IBX location. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**patchPanelId** | **String** | Unique identifier of the patch panel. | [optional] | +|**patchPanelPortA** | **String** | Specify the desired port number for Port A. <br> When ports are not provided, next available ports will be used. | [optional] | +|**patchPanelPortB** | **String** | Specify the desired port number for Port B. <br> When ports are not provided, next available ports will be used. <br> Required for Connector type FC, SC and ST only. | [optional] | +|**connectorType** | [**ConnectorTypeEnum**](#ConnectorTypeEnum) | Type of Connector | [optional] | +|**cageUniqueSpaceId** | **String** | Unique identifier of the cage. | [optional] | +|**cabinetUniqueSpaceId** | **String** | Unique identifier of the cabinet. | [optional] | +|**location** | [**OpticalConnectLocation**](OpticalConnectLocation.md) | | [optional] | + + + +## Enum: ConnectorTypeEnum + +| Name | Value | +|---- | -----| +| FC | "FC" | +| SC | "SC" | +| LC | "LC" | +| ST | "ST" | + + + diff --git a/services/fabricv4/docs/OpticalConnectBulk.md b/services/fabricv4/docs/OpticalConnectBulk.md new file mode 100644 index 00000000..37115368 --- /dev/null +++ b/services/fabricv4/docs/OpticalConnectBulk.md @@ -0,0 +1,14 @@ + + +# OpticalConnectBulk + +Dual diverse pair Connection + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**data** | [**List<OpticalConnectResponse>**](OpticalConnectResponse.md) | | [optional] | + + + diff --git a/services/fabricv4/docs/OpticalConnectConnectionDestinationType.md b/services/fabricv4/docs/OpticalConnectConnectionDestinationType.md new file mode 100644 index 00000000..52b54c9f --- /dev/null +++ b/services/fabricv4/docs/OpticalConnectConnectionDestinationType.md @@ -0,0 +1,15 @@ + + +# OpticalConnectConnectionDestinationType + +## Enum + + +* `COLO` (value: `"COLO"`) + +* `BMMR` (value: `"BMMR"`) + +* `REMOTE` (value: `"REMOTE"`) + + + diff --git a/services/fabricv4/docs/OpticalConnectFilter.md b/services/fabricv4/docs/OpticalConnectFilter.md new file mode 100644 index 00000000..21091f66 --- /dev/null +++ b/services/fabricv4/docs/OpticalConnectFilter.md @@ -0,0 +1,17 @@ + + +# OpticalConnectFilter + +A single condition, or a group of conditions combined with logical OR. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**property** | **String** | Possible field names to use on filters: * `/name` - Connection name * `/uuid` - Connection uuid * `/type` - type * `/state` - state * `/bandwidth` - Bandwidth | [optional] | +|**operator** | **String** | Possible operators to use on filters: * `=` - equal * `!=` - not equal * `[NOT] BETWEEN` - (not) between * `[NOT] LIKE` - (not) like * `[NOT] IN` - (not) in * `ILIKE` - case-insensitive like | [optional] | +|**values** | **List<String>** | | [optional] | +|**or** | [**List<OpticalConnectSimpleExpression>**](OpticalConnectSimpleExpression.md) | | [optional] | + + + diff --git a/services/fabricv4/docs/OpticalConnectFilters.md b/services/fabricv4/docs/OpticalConnectFilters.md new file mode 100644 index 00000000..9a2da8cc --- /dev/null +++ b/services/fabricv4/docs/OpticalConnectFilters.md @@ -0,0 +1,13 @@ + + +# OpticalConnectFilters + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**and** | [**List<OpticalConnectFilter>**](OpticalConnectFilter.md) | | [optional] | + + + diff --git a/services/fabricv4/docs/OpticalConnectLOA.md b/services/fabricv4/docs/OpticalConnectLOA.md new file mode 100644 index 00000000..07f403a1 --- /dev/null +++ b/services/fabricv4/docs/OpticalConnectLOA.md @@ -0,0 +1,14 @@ + + +# OpticalConnectLOA + +Letter of Authorization granting the right to terminate at the Z-side location.
Required for BMMR and REMOTE. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**uuid** | **String** | Identifier of the Letter of Authorization | [optional] | + + + diff --git a/services/fabricv4/docs/OpticalConnectLocation.md b/services/fabricv4/docs/OpticalConnectLocation.md new file mode 100644 index 00000000..047b34cf --- /dev/null +++ b/services/fabricv4/docs/OpticalConnectLocation.md @@ -0,0 +1,14 @@ + + +# OpticalConnectLocation + +Destination location for BMMR and REMOTE connections. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**ibxCode** | **String** | Equinix IBX data centre code. | [optional] | + + + diff --git a/services/fabricv4/docs/OpticalConnectNotification.md b/services/fabricv4/docs/OpticalConnectNotification.md new file mode 100644 index 00000000..e6f6012f --- /dev/null +++ b/services/fabricv4/docs/OpticalConnectNotification.md @@ -0,0 +1,26 @@ + + +# OpticalConnectNotification + +Notification preferences for this connection. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | [**TypeEnum**](#TypeEnum) | Notification category. <br> NOTIFICATION - states and configuration updates. <br> ORDERING - order and fulfilment correspondence. <br> TECHNICAL - maintenance and technical advisories. | | +|**emails** | **List<String>** | Email addresses to notify. | | +|**registeredUsers** | **List<String>** | Usernames of registered Equinix Portal users to notify. | [optional] | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| NOTIFICATION | "NOTIFICATION" | +| ORDERING | "ORDERING" | +| TECHNICAL | "TECHNICAL" | + + + diff --git a/services/fabricv4/docs/OpticalConnectOrFilter.md b/services/fabricv4/docs/OpticalConnectOrFilter.md new file mode 100644 index 00000000..473eda91 --- /dev/null +++ b/services/fabricv4/docs/OpticalConnectOrFilter.md @@ -0,0 +1,13 @@ + + +# OpticalConnectOrFilter + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**or** | [**List<OpticalConnectSimpleExpression>**](OpticalConnectSimpleExpression.md) | | [optional] | + + + diff --git a/services/fabricv4/docs/OpticalConnectOrder.md b/services/fabricv4/docs/OpticalConnectOrder.md new file mode 100644 index 00000000..afc336d1 --- /dev/null +++ b/services/fabricv4/docs/OpticalConnectOrder.md @@ -0,0 +1,16 @@ + + +# OpticalConnectOrder + +Ordering and billing reference details for this connection. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**purchaseOrderNumber** | **String** | Purchase order number reference. | [optional] | +|**customerReferenceId** | **String** | Your own reference for this connection. | [optional] | +|**orderNumber** | **String** | Equinix order reference number. | [optional] | + + + diff --git a/services/fabricv4/docs/OpticalConnectPatchPanelFields.md b/services/fabricv4/docs/OpticalConnectPatchPanelFields.md new file mode 100644 index 00000000..6c9ed0b8 --- /dev/null +++ b/services/fabricv4/docs/OpticalConnectPatchPanelFields.md @@ -0,0 +1,28 @@ + + +# OpticalConnectPatchPanelFields + +Patch Panel configuration. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**patchPanelId** | **String** | Unique identifier of the patch panel. | [optional] | +|**patchPanelPortA** | **String** | Specify the desired port number for Port A. <br> When ports are not provided, next available ports will be used. | [optional] | +|**patchPanelPortB** | **String** | Specify the desired port number for Port B. <br> When ports are not provided, next available ports will be used. <br> Required for Connector type FC, SC and ST only. | [optional] | +|**connectorType** | [**ConnectorTypeEnum**](#ConnectorTypeEnum) | Type of Connector | [optional] | + + + +## Enum: ConnectorTypeEnum + +| Name | Value | +|---- | -----| +| FC | "FC" | +| SC | "SC" | +| LC | "LC" | +| ST | "ST" | + + + diff --git a/services/fabricv4/docs/OpticalConnectPostRequest.md b/services/fabricv4/docs/OpticalConnectPostRequest.md new file mode 100644 index 00000000..3078abad --- /dev/null +++ b/services/fabricv4/docs/OpticalConnectPostRequest.md @@ -0,0 +1,61 @@ + + +# OpticalConnectPostRequest + +Request to order a single connection. The A-side is always a patch panel port in your own cage; the Z-side shape depends on connectionDestinationType. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | [**TypeEnum**](#TypeEnum) | OC - Optical Connect Type | | +|**bandwidth** | **Integer** | Connection bandwidth Mbps. <br> Available bandwidths depend on the IBX pair. <br> 1000 - 1 Gbps. <br> 10000 - 10 Gbps. <br> 100000 - 100 Gbps. <br> | | +|**connectionDestinationType** | [**ConnectionDestinationTypeEnum**](#ConnectionDestinationTypeEnum) | Where the Z-side terminates. <br> COLO - your own colocation space at another Equinix IBX. <br> BMMR - a Building Meet-Me Room. <br> REMOTE - another customer's colocation space at another Equinix IBX. <br> BMMR and REMOTE require a Letter of Authorization on the Z-side. | | +|**pathType** | [**PathTypeEnum**](#PathTypeEnum) | Level of resilience for the connection. <br> UNPROTECTED - a single fiber path with no node redundancy. <br> PROTECTED - two diverse fiber paths between single nodes at each IBX. <br> DUAL_DIVERSE - two diverse fiber paths terminating on redundant nodes at both IBXs. | | +|**redundancy** | [**OpticalConnectRedundancy**](OpticalConnectRedundancy.md) | | [optional] | +|**aSide** | [**OpticalConnectASideRequest**](OpticalConnectASideRequest.md) | | | +|**zSide** | [**OpticalConnectZSideRequest**](OpticalConnectZSideRequest.md) | | | +|**order** | [**OpticalConnectOrder**](OpticalConnectOrder.md) | | [optional] | +|**account** | [**SimplifiedAccount**](SimplifiedAccount.md) | | [optional] | +|**notifications** | [**List<OpticalConnectNotification>**](OpticalConnectNotification.md) | Contacts to notify about connection configuration and status changes | [optional] | +|**bmmrType** | [**BmmrTypeEnum**](#BmmrTypeEnum) | BMMR infrastructure ownership type. <br> EQUINIX - Equinix-operated. <br> SELF - customer-operated. <br> Required only when connectionDestinationType is BMMR. | [optional] | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| OC | "OC" | + + + +## Enum: ConnectionDestinationTypeEnum + +| Name | Value | +|---- | -----| +| COLO | "COLO" | +| BMMR | "BMMR" | +| REMOTE | "REMOTE" | + + + +## Enum: PathTypeEnum + +| Name | Value | +|---- | -----| +| DUAL_DIVERSE | "DUAL_DIVERSE" | +| PROTECTED | "PROTECTED" | +| UNPROTECTED | "UNPROTECTED" | + + + +## Enum: BmmrTypeEnum + +| Name | Value | +|---- | -----| +| EQUINIX | "EQUINIX" | +| SELF | "SELF" | + + + diff --git a/services/fabricv4/docs/OpticalConnectPrice.md b/services/fabricv4/docs/OpticalConnectPrice.md new file mode 100644 index 00000000..25f54ca1 --- /dev/null +++ b/services/fabricv4/docs/OpticalConnectPrice.md @@ -0,0 +1,19 @@ + + +# OpticalConnectPrice + +Optical Metro Connect Port Product configuration + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | **String** | Optical Connect type. | [optional] | +|**bandwidth** | **Integer** | Bandwidth in Mbps | [optional] | +|**pathType** | **OpticalConnectPricePathType** | | [optional] | +|**connectionDestinationType** | **OpticalConnectConnectionDestinationType** | | [optional] | +|**aSide** | [**OpticalConnectPriceASide**](OpticalConnectPriceASide.md) | | [optional] | +|**zSide** | [**OpticalConnectPriceZSide**](OpticalConnectPriceZSide.md) | | [optional] | + + + diff --git a/services/fabricv4/docs/OpticalConnectPriceASide.md b/services/fabricv4/docs/OpticalConnectPriceASide.md new file mode 100644 index 00000000..483b6d38 --- /dev/null +++ b/services/fabricv4/docs/OpticalConnectPriceASide.md @@ -0,0 +1,14 @@ + + +# OpticalConnectPriceASide + +Optical Connection ASide configuration + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**location** | [**OpticalConnectPriceLocation**](OpticalConnectPriceLocation.md) | | [optional] | + + + diff --git a/services/fabricv4/docs/OpticalConnectPriceLocation.md b/services/fabricv4/docs/OpticalConnectPriceLocation.md new file mode 100644 index 00000000..d45eb15e --- /dev/null +++ b/services/fabricv4/docs/OpticalConnectPriceLocation.md @@ -0,0 +1,14 @@ + + +# OpticalConnectPriceLocation + +Optical Connect Location + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**ibxCode** | **String** | IBX identifier | [optional] | + + + diff --git a/services/fabricv4/docs/OpticalConnectPricePathType.md b/services/fabricv4/docs/OpticalConnectPricePathType.md new file mode 100644 index 00000000..1451e36f --- /dev/null +++ b/services/fabricv4/docs/OpticalConnectPricePathType.md @@ -0,0 +1,15 @@ + + +# OpticalConnectPricePathType + +## Enum + + +* `PROTECTED` (value: `"PROTECTED"`) + +* `UNPROTECTED` (value: `"UNPROTECTED"`) + +* `DUAL_DIVERSE` (value: `"DUAL_DIVERSE"`) + + + diff --git a/services/fabricv4/docs/OpticalConnectPriceZSide.md b/services/fabricv4/docs/OpticalConnectPriceZSide.md new file mode 100644 index 00000000..57c7a417 --- /dev/null +++ b/services/fabricv4/docs/OpticalConnectPriceZSide.md @@ -0,0 +1,14 @@ + + +# OpticalConnectPriceZSide + +Optical Connection ZSide configuration + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**location** | [**OpticalConnectPriceLocation**](OpticalConnectPriceLocation.md) | | [optional] | + + + diff --git a/services/fabricv4/docs/OpticalConnectRedundancy.md b/services/fabricv4/docs/OpticalConnectRedundancy.md new file mode 100644 index 00000000..f9a48f6b --- /dev/null +++ b/services/fabricv4/docs/OpticalConnectRedundancy.md @@ -0,0 +1,24 @@ + + +# OpticalConnectRedundancy + +Optical Connect redundancy configuration.
Required only for DUAL_DIVERSE connection. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**priority** | [**PriorityEnum**](#PriorityEnum) | Role within the diverse pair. <br> PRIMARY - first connection of the pair. <br> SECONDARY - the diverse connection on a separate path. | [optional] | +|**group** | **UUID** | Redundancy group identifier | [optional] | + + + +## Enum: PriorityEnum + +| Name | Value | +|---- | -----| +| PRIMARY | "PRIMARY" | +| SECONDARY | "SECONDARY" | + + + diff --git a/services/fabricv4/docs/OpticalConnectResponse.md b/services/fabricv4/docs/OpticalConnectResponse.md new file mode 100644 index 00000000..104b4096 --- /dev/null +++ b/services/fabricv4/docs/OpticalConnectResponse.md @@ -0,0 +1,66 @@ + + +# OpticalConnectResponse + +Optical Metro Connect connection with its current state and the resolved physical termination points at both ends. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**href** | **URI** | URI of this Optical Connect resource. | [optional] [readonly] | +|**uuid** | **UUID** | Unique identifier of this Optical Connect. | [optional] [readonly] | +|**type** | [**TypeEnum**](#TypeEnum) | Connection Type. <br> OC - Optical Connect. | [optional] | +|**name** | **String** | Equinix-assigned name, derived from the account number and the two IBX locations. | [optional] [readonly] | +|**state** | **OpticalConnectState** | | [optional] | +|**bandwidth** | **Integer** | Provisioned connection bandwidth in Mbps. | [optional] | +|**connectionDestinationType** | [**ConnectionDestinationTypeEnum**](#ConnectionDestinationTypeEnum) | Where the Z-side terminates. <br> COLO - your own colocation space at another Equinix IBX. <br> BMMR - a Building Meet-Me Room. <br> REMOTE - another customer's colocation space at another Equinix IBX. <br> | [optional] | +|**pathType** | [**PathTypeEnum**](#PathTypeEnum) | Level of resilience for the connection. <br> UNPROTECTED - a single fiber path with no node redundancy. <br> PROTECTED - two diverse fiber paths between single nodes at each IBX. <br> DUAL_DIVERSE - two diverse fiber paths terminating on redundant nodes at both IBXs. | [optional] | +|**bmmrType** | [**BmmrTypeEnum**](#BmmrTypeEnum) | BMMR infrastructure ownership type. <br> EQUINIX - Equinix-operated. <br> SELF - customer-operated. <br> Required only when connectionDestinationType is BMMR. | [optional] | +|**redundancy** | [**OpticalConnectRedundancy**](OpticalConnectRedundancy.md) | | [optional] | +|**aSide** | [**OpticalConnectASideResponse**](OpticalConnectASideResponse.md) | | [optional] | +|**zSide** | [**OpticalConnectZSideResponse**](OpticalConnectZSideResponse.md) | | [optional] | +|**order** | [**OpticalConnectOrder**](OpticalConnectOrder.md) | | [optional] | +|**account** | [**SimplifiedAccount**](SimplifiedAccount.md) | | [optional] | +|**notifications** | [**List<OpticalConnectNotification>**](OpticalConnectNotification.md) | Preferences for notifications on connection configuration or status changes | [optional] | +|**changeLog** | [**Changelog**](Changelog.md) | | [optional] | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| OC | "OC" | + + + +## Enum: ConnectionDestinationTypeEnum + +| Name | Value | +|---- | -----| +| COLO | "COLO" | +| BMMR | "BMMR" | +| REMOTE | "REMOTE" | + + + +## Enum: PathTypeEnum + +| Name | Value | +|---- | -----| +| DUAL_DIVERSE | "DUAL_DIVERSE" | +| PROTECTED | "PROTECTED" | +| UNPROTECTED | "UNPROTECTED" | + + + +## Enum: BmmrTypeEnum + +| Name | Value | +|---- | -----| +| EQUINIX | "EQUINIX" | +| SELF | "SELF" | + + + diff --git a/services/fabricv4/docs/OpticalConnectSearchRequest.md b/services/fabricv4/docs/OpticalConnectSearchRequest.md new file mode 100644 index 00000000..209045cd --- /dev/null +++ b/services/fabricv4/docs/OpticalConnectSearchRequest.md @@ -0,0 +1,16 @@ + + +# OpticalConnectSearchRequest + +Search criteria for retrieving Optical Connects, with optional filtering, pagination and sorting. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**filter** | [**OpticalConnectFilters**](OpticalConnectFilters.md) | | [optional] | +|**pagination** | [**PaginationRequest**](PaginationRequest.md) | | [optional] | +|**sort** | [**List<OpticalConnectSortCriteria>**](OpticalConnectSortCriteria.md) | | [optional] | + + + diff --git a/services/fabricv4/docs/OpticalConnectServiceSearchResponse.md b/services/fabricv4/docs/OpticalConnectServiceSearchResponse.md new file mode 100644 index 00000000..ef33243a --- /dev/null +++ b/services/fabricv4/docs/OpticalConnectServiceSearchResponse.md @@ -0,0 +1,14 @@ + + +# OpticalConnectServiceSearchResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**pagination** | [**Pagination**](Pagination.md) | | [optional] | +|**data** | [**List<OpticalConnectResponse>**](OpticalConnectResponse.md) | Data returned from the API call. | [optional] | + + + diff --git a/services/fabricv4/docs/OpticalConnectSimpleExpression.md b/services/fabricv4/docs/OpticalConnectSimpleExpression.md new file mode 100644 index 00000000..16656f00 --- /dev/null +++ b/services/fabricv4/docs/OpticalConnectSimpleExpression.md @@ -0,0 +1,15 @@ + + +# OpticalConnectSimpleExpression + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**property** | **String** | Possible field names to use on filters: * `/name` - Connection name * `/uuid` - Connection uuid * `/type` - type * `/state` - state * `/bandwidth` - Bandwidth | [optional] | +|**operator** | **String** | Possible operators to use on filters: * `=` - equal * `!=` - not equal * `[NOT] BETWEEN` - (not) between * `[NOT] LIKE` - (not) like * `[NOT] IN` - (not) in * `ILIKE` - case-insensitive like | [optional] | +|**values** | **List<String>** | | [optional] | + + + diff --git a/services/fabricv4/docs/OpticalConnectSortBy.md b/services/fabricv4/docs/OpticalConnectSortBy.md new file mode 100644 index 00000000..e17881c7 --- /dev/null +++ b/services/fabricv4/docs/OpticalConnectSortBy.md @@ -0,0 +1,27 @@ + + +# OpticalConnectSortBy + +## Enum + + +* `NAME` (value: `"/name"`) + +* `UUID` (value: `"/uuid"`) + +* `STATE` (value: `"/state"`) + +* `TYPE` (value: `"/type"`) + +* `BANDWIDTH` (value: `"/bandwidth"`) + +* `ASIDE_LOCATION_IBXCODE` (value: `"/aSide/location/ibxCode"`) + +* `ZSIDE_LOCATION_IBXCODE` (value: `"/zSide/location/ibxCode"`) + +* `CHANGELOG_CREATEDDATETIME` (value: `"/changeLog/createdDateTime"`) + +* `CHANGELOG_UPDATEDDATETIME` (value: `"/changeLog/updatedDateTime"`) + + + diff --git a/services/fabricv4/docs/OpticalConnectSortCriteria.md b/services/fabricv4/docs/OpticalConnectSortCriteria.md new file mode 100644 index 00000000..c77f8b18 --- /dev/null +++ b/services/fabricv4/docs/OpticalConnectSortCriteria.md @@ -0,0 +1,15 @@ + + +# OpticalConnectSortCriteria + +Sorting to apply to search results. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**direction** | **OpticalConnectSortDirection** | | [optional] | +|**property** | **OpticalConnectSortBy** | | [optional] | + + + diff --git a/services/fabricv4/docs/OpticalConnectSortDirection.md b/services/fabricv4/docs/OpticalConnectSortDirection.md new file mode 100644 index 00000000..dd8bfaf6 --- /dev/null +++ b/services/fabricv4/docs/OpticalConnectSortDirection.md @@ -0,0 +1,13 @@ + + +# OpticalConnectSortDirection + +## Enum + + +* `DESC` (value: `"DESC"`) + +* `ASC` (value: `"ASC"`) + + + diff --git a/services/fabricv4/docs/OpticalConnectState.md b/services/fabricv4/docs/OpticalConnectState.md new file mode 100644 index 00000000..06b5fdd3 --- /dev/null +++ b/services/fabricv4/docs/OpticalConnectState.md @@ -0,0 +1,23 @@ + + +# OpticalConnectState + +## Enum + + +* `PROVISIONING` (value: `"PROVISIONING"`) + +* `PROVISIONED` (value: `"PROVISIONED"`) + +* `PROVISIONING_FAILED` (value: `"PROVISIONING_FAILED"`) + +* `REPROVISIONING` (value: `"REPROVISIONING"`) + +* `REPROVISIONING_FAILED` (value: `"REPROVISIONING_FAILED"`) + +* `DEPROVISIONING` (value: `"DEPROVISIONING"`) + +* `DEPROVISIONED` (value: `"DEPROVISIONED"`) + + + diff --git a/services/fabricv4/docs/OpticalConnectZSideRequest.md b/services/fabricv4/docs/OpticalConnectZSideRequest.md new file mode 100644 index 00000000..86be7567 --- /dev/null +++ b/services/fabricv4/docs/OpticalConnectZSideRequest.md @@ -0,0 +1,30 @@ + + +# OpticalConnectZSideRequest + +Z-Side configuration.
For COLO, specify the destination patch panel and ports.
For BMMR and REMOTE, specify the location and Letter of Authorization. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**patchPanelId** | **String** | Unique identifier of the patch panel. | [optional] | +|**patchPanelPortA** | **String** | Specify the desired port number for Port A. <br> When ports are not provided, next available ports will be used. | [optional] | +|**patchPanelPortB** | **String** | Specify the desired port number for Port B. <br> When ports are not provided, next available ports will be used. <br> Required for Connector type FC, SC and ST only. | [optional] | +|**connectorType** | [**ConnectorTypeEnum**](#ConnectorTypeEnum) | Type of Connector | [optional] | +|**location** | [**OpticalConnectLocation**](OpticalConnectLocation.md) | | [optional] | +|**loa** | [**OpticalConnectLOA**](OpticalConnectLOA.md) | | [optional] | + + + +## Enum: ConnectorTypeEnum + +| Name | Value | +|---- | -----| +| FC | "FC" | +| SC | "SC" | +| LC | "LC" | +| ST | "ST" | + + + diff --git a/services/fabricv4/docs/OpticalConnectZSideResponse.md b/services/fabricv4/docs/OpticalConnectZSideResponse.md new file mode 100644 index 00000000..cacf8b4c --- /dev/null +++ b/services/fabricv4/docs/OpticalConnectZSideResponse.md @@ -0,0 +1,32 @@ + + +# OpticalConnectZSideResponse + +Terminating end as provisioned, with the cage, cabinet and IBX location. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**patchPanelId** | **String** | Unique identifier of the patch panel. | [optional] | +|**patchPanelPortA** | **String** | Specify the desired port number for Port A. <br> When ports are not provided, next available ports will be used. | [optional] | +|**patchPanelPortB** | **String** | Specify the desired port number for Port B. <br> When ports are not provided, next available ports will be used. <br> Required for Connector type FC, SC and ST only. | [optional] | +|**connectorType** | [**ConnectorTypeEnum**](#ConnectorTypeEnum) | Type of Connector | [optional] | +|**cageUniqueSpaceId** | **String** | Unique identifier of the cage. | [optional] | +|**cabinetUniqueSpaceId** | **String** | Unique identifier of the cabinet. | [optional] | +|**location** | [**OpticalConnectLocation**](OpticalConnectLocation.md) | | [optional] | +|**loa** | [**OpticalConnectLOA**](OpticalConnectLOA.md) | | [optional] | + + + +## Enum: ConnectorTypeEnum + +| Name | Value | +|---- | -----| +| FC | "FC" | +| SC | "SC" | +| LC | "LC" | +| ST | "ST" | + + + diff --git a/services/fabricv4/docs/OpticalMetroConnectsApi.md b/services/fabricv4/docs/OpticalMetroConnectsApi.md new file mode 100644 index 00000000..ae8e4564 --- /dev/null +++ b/services/fabricv4/docs/OpticalMetroConnectsApi.md @@ -0,0 +1,297 @@ +# OpticalMetroConnectsApi + +All URIs are relative to *https://api.equinix.com* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**createBulkOpticalConnect**](OpticalMetroConnectsApi.md#createBulkOpticalConnect) | **POST** /fabric/v4/opticalConnects/bulk | Create Dual Diverse Optical Metro Connect Service | +| [**createOpticalConnect**](OpticalMetroConnectsApi.md#createOpticalConnect) | **POST** /fabric/v4/opticalConnects | Create Optical Metro Connect Service | +| [**getOpticalConnectByUuid**](OpticalMetroConnectsApi.md#getOpticalConnectByUuid) | **GET** /fabric/v4/opticalConnects/{opticalConnectId} | Get Optical Metro Connect Service | +| [**searchOpticalConnect**](OpticalMetroConnectsApi.md#searchOpticalConnect) | **POST** /fabric/v4/opticalConnects/search | Search Optical Metro Connect Services | + + + +# **createBulkOpticalConnect** +> OpticalConnectBulk createBulkOpticalConnect(bulkOpticalConnectRequest) + +Create Dual Diverse Optical Metro Connect Service + +Create a dual diverse pair of circuits on separate optical paths. + +### Example +```java +// Import classes: +import com.equinix.sdk.fabricv4.ApiClient; +import com.equinix.sdk.fabricv4.ApiException; +import com.equinix.sdk.fabricv4.Configuration; +import com.equinix.sdk.fabricv4.auth.*; +import com.equinix.sdk.fabricv4.models.*; +import com.equinix.sdk.fabricv4.api.OpticalMetroConnectsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.equinix.com"); + + // Configure HTTP bearer authorization: BearerAuth + HttpBearerAuth BearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("BearerAuth"); + BearerAuth.setBearerToken("BEARER TOKEN"); + + OpticalMetroConnectsApi apiInstance = new OpticalMetroConnectsApi(defaultClient); + BulkOpticalConnectRequest bulkOpticalConnectRequest = new BulkOpticalConnectRequest(); // BulkOpticalConnectRequest | + try { + OpticalConnectBulk result = apiInstance.createBulkOpticalConnect(bulkOpticalConnectRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling OpticalMetroConnectsApi#createBulkOpticalConnect"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **bulkOpticalConnectRequest** | [**BulkOpticalConnectRequest**](BulkOpticalConnectRequest.md)| | | + +### Return type + +[**OpticalConnectBulk**](OpticalConnectBulk.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **202** | Accepted Operation | - | +| **400** | Bad request | - | +| **403** | Forbidden | - | +| **404** | Not Found | - | +| **500** | Internal Server error | - | + + +# **createOpticalConnect** +> OpticalConnectResponse createOpticalConnect(opticalConnectPostRequest) + +Create Optical Metro Connect Service + +Create a single Optical Metro Connect circuit. + +### Example +```java +// Import classes: +import com.equinix.sdk.fabricv4.ApiClient; +import com.equinix.sdk.fabricv4.ApiException; +import com.equinix.sdk.fabricv4.Configuration; +import com.equinix.sdk.fabricv4.auth.*; +import com.equinix.sdk.fabricv4.models.*; +import com.equinix.sdk.fabricv4.api.OpticalMetroConnectsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.equinix.com"); + + // Configure HTTP bearer authorization: BearerAuth + HttpBearerAuth BearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("BearerAuth"); + BearerAuth.setBearerToken("BEARER TOKEN"); + + OpticalMetroConnectsApi apiInstance = new OpticalMetroConnectsApi(defaultClient); + OpticalConnectPostRequest opticalConnectPostRequest = new OpticalConnectPostRequest(); // OpticalConnectPostRequest | + try { + OpticalConnectResponse result = apiInstance.createOpticalConnect(opticalConnectPostRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling OpticalMetroConnectsApi#createOpticalConnect"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **opticalConnectPostRequest** | [**OpticalConnectPostRequest**](OpticalConnectPostRequest.md)| | | + +### Return type + +[**OpticalConnectResponse**](OpticalConnectResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **202** | Accepted Operation | - | +| **400** | Bad request | - | +| **403** | Forbidden | - | +| **404** | Not Found | - | +| **500** | Internal Server error | - | + + +# **getOpticalConnectByUuid** +> OpticalConnectResponse getOpticalConnectByUuid(opticalConnectId) + +Get Optical Metro Connect Service + +Get a single Optical Metro Connect by UUID. + +### Example +```java +// Import classes: +import com.equinix.sdk.fabricv4.ApiClient; +import com.equinix.sdk.fabricv4.ApiException; +import com.equinix.sdk.fabricv4.Configuration; +import com.equinix.sdk.fabricv4.auth.*; +import com.equinix.sdk.fabricv4.models.*; +import com.equinix.sdk.fabricv4.api.OpticalMetroConnectsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.equinix.com"); + + // Configure HTTP bearer authorization: BearerAuth + HttpBearerAuth BearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("BearerAuth"); + BearerAuth.setBearerToken("BEARER TOKEN"); + + OpticalMetroConnectsApi apiInstance = new OpticalMetroConnectsApi(defaultClient); + UUID opticalConnectId = UUID.randomUUID(); // UUID | Unique identifier of an Optical Connect. + try { + OpticalConnectResponse result = apiInstance.getOpticalConnectByUuid(opticalConnectId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling OpticalMetroConnectsApi#getOpticalConnectByUuid"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **opticalConnectId** | **UUID**| Unique identifier of an Optical Connect. | | + +### Return type + +[**OpticalConnectResponse**](OpticalConnectResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful Operation | - | +| **400** | Bad request | - | +| **403** | Forbidden | - | +| **404** | Not Found | - | +| **500** | Internal Server error | - | + + +# **searchOpticalConnect** +> OpticalConnectServiceSearchResponse searchOpticalConnect(opticalConnectSearchRequest) + +Search Optical Metro Connect Services + +Get Optical Metro Connects matching the supplied criteria, with optional filtering, pagination and sorting. + +### Example +```java +// Import classes: +import com.equinix.sdk.fabricv4.ApiClient; +import com.equinix.sdk.fabricv4.ApiException; +import com.equinix.sdk.fabricv4.Configuration; +import com.equinix.sdk.fabricv4.auth.*; +import com.equinix.sdk.fabricv4.models.*; +import com.equinix.sdk.fabricv4.api.OpticalMetroConnectsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.equinix.com"); + + // Configure HTTP bearer authorization: BearerAuth + HttpBearerAuth BearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("BearerAuth"); + BearerAuth.setBearerToken("BEARER TOKEN"); + + OpticalMetroConnectsApi apiInstance = new OpticalMetroConnectsApi(defaultClient); + OpticalConnectSearchRequest opticalConnectSearchRequest = new OpticalConnectSearchRequest(); // OpticalConnectSearchRequest | + try { + OpticalConnectServiceSearchResponse result = apiInstance.searchOpticalConnect(opticalConnectSearchRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling OpticalMetroConnectsApi#searchOpticalConnect"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **opticalConnectSearchRequest** | [**OpticalConnectSearchRequest**](OpticalConnectSearchRequest.md)| | | + +### Return type + +[**OpticalConnectServiceSearchResponse**](OpticalConnectServiceSearchResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful operation | - | +| **400** | Bad request | - | +| **401** | Unauthorized | - | +| **403** | Forbidden | - | +| **404** | Not Found | - | +| **500** | Internal Server error | - | + diff --git a/services/fabricv4/docs/PatchOperation.md b/services/fabricv4/docs/PatchOperation.md deleted file mode 100644 index 534094ea..00000000 --- a/services/fabricv4/docs/PatchOperation.md +++ /dev/null @@ -1,25 +0,0 @@ - - -# PatchOperation - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**op** | [**OpEnum**](#OpEnum) | The operation to perform | | -|**path** | **String** | JSON Pointer path to the field to modify (e.g., /name, /description, /summary, /webUrl, /notifications) | | -|**value** | **Object** | The value to update the field to | | - - - -## Enum: OpEnum - -| Name | Value | -|---- | -----| -| REPLACE | "replace" | -| ADD | "add" | -| REMOVE | "remove" | - - - diff --git a/services/fabricv4/docs/Phone.md b/services/fabricv4/docs/Phone.md new file mode 100644 index 00000000..437c8d8c --- /dev/null +++ b/services/fabricv4/docs/Phone.md @@ -0,0 +1,24 @@ + + +# Phone + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | [**TypeEnum**](#TypeEnum) | Notification Type | [optional] | +|**number** | **String** | Phone number | [optional] | +|**contactPreference** | [**ContactPreference**](ContactPreference.md) | | [optional] | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| MOBILE | "MOBILE" | +| OFFICE | "OFFICE" | + + + diff --git a/services/fabricv4/docs/PortExpression.md b/services/fabricv4/docs/PortExpression.md index 89372416..913e6fb7 100644 --- a/services/fabricv4/docs/PortExpression.md +++ b/services/fabricv4/docs/PortExpression.md @@ -21,6 +21,16 @@ Either use 'and' for AND operations, 'or' for OR operations, or specify 'proper | Name | Value | |---- | -----| | EQUAL | "=" | +| NOT_EQUAL | "!=" | +| GREATER_THAN | ">" | +| GREATER_THAN_OR_EQUAL_TO | ">=" | +| LESS_THAN | "<" | +| LESS_THAN_OR_EQUAL_TO | "<=" | +| LIKE | "LIKE" | +| ILIKE | "ILIKE" | +| IN | "IN" | +| NOT_IN | "NOT IN" | +| BETWEEN | "BETWEEN" | diff --git a/services/fabricv4/docs/PortOperation.md b/services/fabricv4/docs/PortOperation.md index ae98badc..f152d43a 100644 --- a/services/fabricv4/docs/PortOperation.md +++ b/services/fabricv4/docs/PortOperation.md @@ -14,6 +14,7 @@ Operational specifications for ports. |**fgVCCount** | **Long** | Total number of connections. | [optional] | |**accessVCCount** | **Long** | Total number of connections. | [optional] | |**opStatusChangedAt** | **OffsetDateTime** | Date and time at which port availability changed. | [optional] | +|**maintenanceStatus** | **MaintenanceState** | | [optional] | diff --git a/services/fabricv4/docs/PortSearchFieldName.md b/services/fabricv4/docs/PortSearchFieldName.md index 28dc9c86..d8b4d483 100644 --- a/services/fabricv4/docs/PortSearchFieldName.md +++ b/services/fabricv4/docs/PortSearchFieldName.md @@ -25,5 +25,9 @@ * `LOCATION_METROCODE` (value: `"/location/metroCode"`) +* `OPERATION_MAINTENANCESTATUS` (value: `"/operation/maintenanceStatus"`) + +* `OPERATION_LOCKENABLED` (value: `"/operation/lockEnabled"`) + diff --git a/services/fabricv4/docs/Price.md b/services/fabricv4/docs/Price.md index f5478550..d99b2d7c 100644 --- a/services/fabricv4/docs/Price.md +++ b/services/fabricv4/docs/Price.md @@ -22,6 +22,7 @@ |**router** | [**FabricCloudRouterPrice**](FabricCloudRouterPrice.md) | | [optional] | |**port** | [**VirtualPortPrice**](VirtualPortPrice.md) | | [optional] | |**timeService** | [**TimeServicePrice**](TimeServicePrice.md) | | [optional] | +|**opticalConnect** | [**OpticalConnectPrice**](OpticalConnectPrice.md) | | [optional] | diff --git a/services/fabricv4/docs/ProductOffering.md b/services/fabricv4/docs/ProductOffering.md new file mode 100644 index 00000000..c102d60e --- /dev/null +++ b/services/fabricv4/docs/ProductOffering.md @@ -0,0 +1,15 @@ + + +# ProductOffering + +Product offering for connection. Applicable to zSide only. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | Product offering identifier | [optional] | +|**name** | **String** | Product offering name | [optional] | + + + diff --git a/services/fabricv4/docs/ProductType.md b/services/fabricv4/docs/ProductType.md index c57062f6..cd772eef 100644 --- a/services/fabricv4/docs/ProductType.md +++ b/services/fabricv4/docs/ProductType.md @@ -15,7 +15,7 @@ * `PRECISION_TIME_PRODUCT` (value: `"PRECISION_TIME_PRODUCT"`) -* `METRO_CONNECT_PRODUCT` (value: `"METRO_CONNECT_PRODUCT"`) +* `OPTICAL_CONNECT_PRODUCT` (value: `"OPTICAL_CONNECT_PRODUCT"`) diff --git a/services/fabricv4/docs/ProviderEnvironment.md b/services/fabricv4/docs/ProviderEnvironment.md index 2e44ec70..3d45fd49 100644 --- a/services/fabricv4/docs/ProviderEnvironment.md +++ b/services/fabricv4/docs/ProviderEnvironment.md @@ -2,7 +2,7 @@ # ProviderEnvironment -Provider Environment associated with an IC_PROFILE service profile +Provider Environment associated with an IC_PROFILE service profile Beta ## Properties @@ -15,6 +15,8 @@ Provider Environment associated with an IC_PROFILE service profile |**description** | **String** | Provider environment description | [optional] | |**region** | **String** | Cloud provider region identifier | [optional] | |**supportedBandwidths** | **List<Integer>** | Supported bandwidths in Mbps | [optional] | +|**metros** | [**List<ServiceMetro>**](ServiceMetro.md) | Derived response attribute. | [optional] | +|**supportedFeatures** | **List<String>** | Supported Feature Types | [optional] | |**changeLog** | [**Changelog**](Changelog.md) | | [optional] | diff --git a/services/fabricv4/docs/ProviderEnvironments.md b/services/fabricv4/docs/ProviderEnvironments.md new file mode 100644 index 00000000..31ba0c34 --- /dev/null +++ b/services/fabricv4/docs/ProviderEnvironments.md @@ -0,0 +1,15 @@ + + +# ProviderEnvironments + +Service Profile Provider Environments + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**data** | [**List<ProviderEnvironment>**](ProviderEnvironment.md) | | [optional] | +|**pagination** | [**Pagination**](Pagination.md) | | [optional] | + + + diff --git a/services/fabricv4/docs/PublicPeeringConnectionResponse.md b/services/fabricv4/docs/PublicPeeringConnectionResponse.md new file mode 100644 index 00000000..42407999 --- /dev/null +++ b/services/fabricv4/docs/PublicPeeringConnectionResponse.md @@ -0,0 +1,15 @@ + + +# PublicPeeringConnectionResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | **String** | Connection type IX_VC | [optional] | +|**href** | **String** | URI | [optional] | +|**uuid** | **UUID** | uuid | [optional] | + + + diff --git a/services/fabricv4/docs/RemoveOperation.md b/services/fabricv4/docs/RemoveOperation.md index 78387188..59396b30 100644 --- a/services/fabricv4/docs/RemoveOperation.md +++ b/services/fabricv4/docs/RemoveOperation.md @@ -8,8 +8,16 @@ Remove sub-resource from an existing model | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**op** | **OpEnum** | | | +|**op** | [**OpEnum**](#OpEnum) | | | |**path** | **String** | A JSON Pointer path. | | +## Enum: OpEnum + +| Name | Value | +|---- | -----| +| REMOVE | "remove" | + + + diff --git a/services/fabricv4/docs/ReplaceOperation.md b/services/fabricv4/docs/ReplaceOperation.md index ced79eb8..da5f448c 100644 --- a/services/fabricv4/docs/ReplaceOperation.md +++ b/services/fabricv4/docs/ReplaceOperation.md @@ -8,9 +8,17 @@ Replace attribute value or sub-resource in the existing model | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**op** | **OpEnum** | | | +|**op** | [**OpEnum**](#OpEnum) | | | |**path** | **String** | A JSON Pointer path. | | |**value** | **Object** | value to replace with | | +## Enum: OpEnum + +| Name | Value | +|---- | -----| +| REPLACE | "replace" | + + + diff --git a/services/fabricv4/docs/RequestLoa.md b/services/fabricv4/docs/RequestLoa.md new file mode 100644 index 00000000..0c2c86ca --- /dev/null +++ b/services/fabricv4/docs/RequestLoa.md @@ -0,0 +1,19 @@ + + +# RequestLoa + +Request Loa + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | **LoaType** | | | +|**name** | **String** | A short, descriptive name for this LOA. | | +|**description** | **String** | Additional context about this LOA. | [optional] | +|**authorizedProductType** | **LoaProductType** | | | +|**issuer** | [**LoaIssuer**](LoaIssuer.md) | | [optional] | +|**location** | [**LoaLocation**](LoaLocation.md) | | | + + + diff --git a/services/fabricv4/docs/RouteCollector.md b/services/fabricv4/docs/RouteCollector.md new file mode 100644 index 00000000..38975c5c --- /dev/null +++ b/services/fabricv4/docs/RouteCollector.md @@ -0,0 +1,16 @@ + + +# RouteCollector + +Route Collector + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**asn** | **Long** | Route Collector ASN | [optional] | +|**ipV4** | **String** | Route Collector ipV4 address | [optional] | +|**ipV6** | **String** | Route Collector ipV6 address | [optional] | + + + diff --git a/services/fabricv4/docs/Router.md b/services/fabricv4/docs/Router.md new file mode 100644 index 00000000..1796b7c4 --- /dev/null +++ b/services/fabricv4/docs/Router.md @@ -0,0 +1,23 @@ + + +# Router + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**href** | **URI** | Fabric Cloud Router URI | [optional] [readonly] | +|**uuid** | **UUID** | Cloud Router UUID | [optional] | +|**type** | [**TypeEnum**](#TypeEnum) | | [optional] | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| XF_ROUTER | "XF_ROUTER" | + + + diff --git a/services/fabricv4/docs/RoutingProtocolResponse.md b/services/fabricv4/docs/RoutingProtocolResponse.md new file mode 100644 index 00000000..3d10c7c8 --- /dev/null +++ b/services/fabricv4/docs/RoutingProtocolResponse.md @@ -0,0 +1,19 @@ + + +# RoutingProtocolResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**customerAsn** | **String** | | [optional] | +|**macAddress** | **String** | | [optional] | +|**vlan** | **Long** | VLAN ID | [optional] | +|**routeServerAsn** | **Long** | Equinix Route Server ASN | [optional] | +|**bgpIpv4** | [**ExchangeServiceResponseBgp**](ExchangeServiceResponseBgp.md) | | [optional] | +|**bgpIpv6** | [**ExchangeServiceResponseBgp**](ExchangeServiceResponseBgp.md) | | [optional] | +|**routeCollector** | [**RouteCollector**](RouteCollector.md) | | [optional] | + + + diff --git a/services/fabricv4/docs/SearchFieldName.md b/services/fabricv4/docs/SearchFieldName.md index 6cbfeef0..84d8cbee 100644 --- a/services/fabricv4/docs/SearchFieldName.md +++ b/services/fabricv4/docs/SearchFieldName.md @@ -63,6 +63,10 @@ * `OPERATION_PROVIDERSTATUS` (value: `"/operation/providerStatus"`) +* `OPERATION_MAINTENANCESTATUS` (value: `"/operation/maintenanceStatus"`) + +* `OPERATION_LOCKENABLED` (value: `"/operation/lockEnabled"`) + * `PROJECT_PROJECTID` (value: `"/project/projectId"`) * `REDUNDANCY_GROUP` (value: `"/redundancy/group"`) diff --git a/services/fabricv4/docs/SearchOperationalEventResponse.md b/services/fabricv4/docs/SearchOperationalEventResponse.md new file mode 100644 index 00000000..9e05bb46 --- /dev/null +++ b/services/fabricv4/docs/SearchOperationalEventResponse.md @@ -0,0 +1,14 @@ + + +# SearchOperationalEventResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**pagination** | [**Pagination**](Pagination.md) | | [optional] | +|**data** | [**List<CloudEvent>**](CloudEvent.md) | Data returned from the API call. | [optional] | + + + diff --git a/services/fabricv4/docs/SearchResponse.md b/services/fabricv4/docs/SearchResponse.md index a43f47e6..afabc62f 100644 --- a/services/fabricv4/docs/SearchResponse.md +++ b/services/fabricv4/docs/SearchResponse.md @@ -8,7 +8,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**pagination** | [**Pagination**](Pagination.md) | | [optional] | -|**data** | [**List<CloudRouter>**](CloudRouter.md) | Data returned from the API call. | [optional] | +|**data** | [**List<CloudRouterReadResponse>**](CloudRouterReadResponse.md) | Data returned from the API call. | [optional] | diff --git a/services/fabricv4/docs/SearchStreamAssetResponse.md b/services/fabricv4/docs/SearchStreamAssetResponse.md new file mode 100644 index 00000000..169ce3b2 --- /dev/null +++ b/services/fabricv4/docs/SearchStreamAssetResponse.md @@ -0,0 +1,14 @@ + + +# SearchStreamAssetResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**pagination** | [**Pagination**](Pagination.md) | | [optional] | +|**data** | [**List<StreamSearchAsset>**](StreamSearchAsset.md) | Data returned from the API call. | [optional] | + + + diff --git a/services/fabricv4/docs/AgentGetAllResponse.md b/services/fabricv4/docs/SearchStreamResponse.md similarity index 72% rename from services/fabricv4/docs/AgentGetAllResponse.md rename to services/fabricv4/docs/SearchStreamResponse.md index 8dc1e6b1..986bde11 100644 --- a/services/fabricv4/docs/AgentGetAllResponse.md +++ b/services/fabricv4/docs/SearchStreamResponse.md @@ -1,6 +1,6 @@ -# AgentGetAllResponse +# SearchStreamResponse ## Properties @@ -8,7 +8,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**pagination** | [**Pagination**](Pagination.md) | | [optional] | -|**data** | [**List<Agents>**](Agents.md) | Data returned from the API call. | [optional] | +|**data** | [**List<Stream>**](Stream.md) | Data returned from the API call. | [optional] | diff --git a/services/fabricv4/docs/SearchStreamSubscriptionResponse.md b/services/fabricv4/docs/SearchStreamSubscriptionResponse.md new file mode 100644 index 00000000..6e9b2de5 --- /dev/null +++ b/services/fabricv4/docs/SearchStreamSubscriptionResponse.md @@ -0,0 +1,14 @@ + + +# SearchStreamSubscriptionResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**pagination** | [**Pagination**](Pagination.md) | | [optional] | +|**data** | [**List<StreamSubscription>**](StreamSubscription.md) | Data returned from the API call. | [optional] | + + + diff --git a/services/fabricv4/docs/ServiceProfile.md b/services/fabricv4/docs/ServiceProfile.md index 134af640..f9ca5c82 100644 --- a/services/fabricv4/docs/ServiceProfile.md +++ b/services/fabricv4/docs/ServiceProfile.md @@ -28,8 +28,8 @@ Service Profile is a software definition for a named provider service and it's n |**ports** | [**List<ServiceProfileAccessPointCOLO>**](ServiceProfileAccessPointCOLO.md) | | [optional] | |**virtualDevices** | [**List<ServiceProfileAccessPointVD>**](ServiceProfileAccessPointVD.md) | | [optional] | |**metros** | [**List<ServiceMetro>**](ServiceMetro.md) | Derived response attribute. | [optional] | -|**environments** | [**List<ProviderEnvironment>**](ProviderEnvironment.md) | Provider environments associated with this IC_PROFILE service profile. | [optional] | -|**selfProfile** | **Boolean** | response attribute indicates whether the profile belongs to the same organization as the api-invoker. | [optional] | +|**environments** | [**List<ProviderEnvironment>**](ProviderEnvironment.md) | Provider environments associated with this IC_PROFILE service profile. <font color=\"red\"> <sup color='red'>Beta</sup></font> | [optional] | +|**selfProfile** | **Boolean** | response attribute indicates whether the profile belongs to the same organization as the api-invoker. | [optional] [readonly] | |**projectId** | **String** | | [optional] | |**lastMileConfig** | [**ServiceProfileLastMileConfig**](ServiceProfileLastMileConfig.md) | | [optional] | diff --git a/services/fabricv4/docs/ServiceProfileAccessPointCOLO.md b/services/fabricv4/docs/ServiceProfileAccessPointCOLO.md index a45ebe95..d6d44d30 100644 --- a/services/fabricv4/docs/ServiceProfileAccessPointCOLO.md +++ b/services/fabricv4/docs/ServiceProfileAccessPointCOLO.md @@ -23,7 +23,6 @@ Colo Access Point |---- | -----| | XF_PORT | "XF_PORT" | | IX_PORT | "IX_PORT" | -| XF_INTERCONNECT_PORT | "XF_INTERCONNECT_PORT" | diff --git a/services/fabricv4/docs/ServiceProfileChange.md b/services/fabricv4/docs/ServiceProfileChange.md index 7bd0700d..ee17f7fd 100644 --- a/services/fabricv4/docs/ServiceProfileChange.md +++ b/services/fabricv4/docs/ServiceProfileChange.md @@ -14,7 +14,7 @@ Current state of latest service profile change |**createdDateTime** | **OffsetDateTime** | Set when change flow starts | | |**updatedDateTime** | **OffsetDateTime** | Set when change object is updated | [optional] | |**information** | **String** | Additional information | [optional] | -|**data** | [**List<JsonPatchOperation>**](JsonPatchOperation.md) | | [optional] | +|**data** | [**List<ServiceProfileUpdateOperation>**](ServiceProfileUpdateOperation.md) | | [optional] | diff --git a/services/fabricv4/docs/ServiceProfileLastMileAddress.md b/services/fabricv4/docs/ServiceProfileLastMileAddress.md deleted file mode 100644 index 27b75aa4..00000000 --- a/services/fabricv4/docs/ServiceProfileLastMileAddress.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# ServiceProfileLastMileAddress - -Last-mile provisioning address. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**require** | **Boolean** | Whether the address is required for provisioning and ordering. | [optional] | -|**dataType** | **String** | Expected format of the address. | [optional] | -|**description** | **String** | Additional information about the address requirement. | [optional] | - - - diff --git a/services/fabricv4/docs/ServiceProfileLastMileApiIntegration.md b/services/fabricv4/docs/ServiceProfileLastMileApiIntegration.md new file mode 100644 index 00000000..bf1b8479 --- /dev/null +++ b/services/fabricv4/docs/ServiceProfileLastMileApiIntegration.md @@ -0,0 +1,19 @@ + + +# ServiceProfileLastMileApiIntegration + +Last-mile API integration details. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**siteValidationEnabled** | **Boolean** | Whether site validation is enabled for the last-mile provider. | [optional] | +|**dataCenterLocationEnabled** | **Boolean** | Whether data center location is enabled for the last-mile provider. | [optional] | +|**productOfferingEnabled** | **Boolean** | Whether product offering is enabled for the last-mile provider. | [optional] | +|**poqEnabled** | **Boolean** | Whether product qualification is enabled for the last-mile provider. | [optional] | +|**quoteEnabled** | **Boolean** | Whether quote generation is enabled for the last-mile provider. | [optional] | +|**placeOrderEnabled** | **Boolean** | Whether place order is enabled for the last-mile provider. | [optional] | + + + diff --git a/services/fabricv4/docs/ServiceProfileLastMileConfig.md b/services/fabricv4/docs/ServiceProfileLastMileConfig.md index 872264e9..aedaeeff 100644 --- a/services/fabricv4/docs/ServiceProfileLastMileConfig.md +++ b/services/fabricv4/docs/ServiceProfileLastMileConfig.md @@ -8,9 +8,8 @@ Last-mile configuration for the service profile. | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**address** | [**ServiceProfileLastMileAddress**](ServiceProfileLastMileAddress.md) | | [optional] | +|**apiIntegration** | [**ServiceProfileLastMileApiIntegration**](ServiceProfileLastMileApiIntegration.md) | | [optional] | |**productCatalogs** | [**List<ServiceProfileLastMileProductCatalog>**](ServiceProfileLastMileProductCatalog.md) | Last-mile provider catalogs. | [optional] | -|**notifications** | [**List<ServiceProfileLastMileNotification>**](ServiceProfileLastMileNotification.md) | Contact details for notifications related to last-mile provisioning and ordering. | [optional] | diff --git a/services/fabricv4/docs/ServiceProfileLastMileNotification.md b/services/fabricv4/docs/ServiceProfileLastMileNotification.md deleted file mode 100644 index 8cd988cc..00000000 --- a/services/fabricv4/docs/ServiceProfileLastMileNotification.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# ServiceProfileLastMileNotification - -Last-mile notification contact details. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dataType** | **String** | Expected format of the contact information, such as email or phone number. | [optional] | -|**label** | **String** | Type of contact information, such as ordering or technical support. | [optional] | -|**required** | **Boolean** | Whether this contact information is required for provisioning and ordering. | [optional] | - - - diff --git a/services/fabricv4/docs/ServiceProfileLastMileProductCatalog.md b/services/fabricv4/docs/ServiceProfileLastMileProductCatalog.md index ff82222b..ce9b1cd2 100644 --- a/services/fabricv4/docs/ServiceProfileLastMileProductCatalog.md +++ b/services/fabricv4/docs/ServiceProfileLastMileProductCatalog.md @@ -9,6 +9,7 @@ Last-mile provider catalog details. | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**name** | **String** | Last-mile provider or catalog name. | [optional] | +|**id** | **String** | Last-mile provider or catalog identifier. | [optional] | |**webUrl** | **String** | Last-mile catalog or provider website URL. | [optional] | |**deliveryDate** | [**ServiceProfileLastMileDeliveryDateRange**](ServiceProfileLastMileDeliveryDateRange.md) | | [optional] | |**offerings** | [**List<ServiceProfileLastMileOffering>**](ServiceProfileLastMileOffering.md) | Available last-mile offerings. | [optional] | diff --git a/services/fabricv4/docs/ServiceProfileRequest.md b/services/fabricv4/docs/ServiceProfileRequest.md index 08f40d17..41dfb7a4 100644 --- a/services/fabricv4/docs/ServiceProfileRequest.md +++ b/services/fabricv4/docs/ServiceProfileRequest.md @@ -24,8 +24,8 @@ Service Profile is a software definition for a named provider service and it's n |**ports** | [**List<ServiceProfileAccessPointCOLO>**](ServiceProfileAccessPointCOLO.md) | | [optional] | |**virtualDevices** | [**List<ServiceProfileAccessPointVD>**](ServiceProfileAccessPointVD.md) | | [optional] | |**metros** | [**List<ServiceMetro>**](ServiceMetro.md) | Derived response attribute. | [optional] | -|**environments** | [**List<ProviderEnvironment>**](ProviderEnvironment.md) | Provider environments associated with this IC_PROFILE service profile. | [optional] | -|**selfProfile** | **Boolean** | response attribute indicates whether the profile belongs to the same organization as the api-invoker. | [optional] | +|**environments** | [**List<ProviderEnvironment>**](ProviderEnvironment.md) | Provider environments associated with this IC_PROFILE service profile. <font color=\"red\"> <sup color='red'>Beta</sup></font> | [optional] | +|**selfProfile** | **Boolean** | response attribute indicates whether the profile belongs to the same organization as the api-invoker. | [optional] [readonly] | |**projectId** | **String** | | [optional] | |**lastMileConfig** | [**ServiceProfileLastMileConfig**](ServiceProfileLastMileConfig.md) | | [optional] | diff --git a/services/fabricv4/docs/JsonPatchOperation.md b/services/fabricv4/docs/ServiceProfileUpdateOperation.md similarity index 61% rename from services/fabricv4/docs/JsonPatchOperation.md rename to services/fabricv4/docs/ServiceProfileUpdateOperation.md index 1e4c3632..c9ad7314 100644 --- a/services/fabricv4/docs/JsonPatchOperation.md +++ b/services/fabricv4/docs/ServiceProfileUpdateOperation.md @@ -1,6 +1,6 @@ -# JsonPatchOperation +# ServiceProfileUpdateOperation Service Profile Access Points @@ -8,9 +8,17 @@ Service Profile Access Points | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**op** | **OpEnum** | | | +|**op** | [**OpEnum**](#OpEnum) | | | |**path** | **String** | A JSON Pointer path. | | |**value** | **Object** | value to replace with | | +## Enum: OpEnum + +| Name | Value | +|---- | -----| +| REPLACE | "replace" | + + + diff --git a/services/fabricv4/docs/ServiceProfilesApi.md b/services/fabricv4/docs/ServiceProfilesApi.md index 0718a5cc..2031bc95 100644 --- a/services/fabricv4/docs/ServiceProfilesApi.md +++ b/services/fabricv4/docs/ServiceProfilesApi.md @@ -8,10 +8,12 @@ All URIs are relative to *https://api.equinix.com* | [**createServiceProfileAction**](ServiceProfilesApi.md#createServiceProfileAction) | **POST** /fabric/v4/serviceProfiles/{serviceProfileId}/actions | Profile Actions | | [**deleteServiceProfileByUuid**](ServiceProfilesApi.md#deleteServiceProfileByUuid) | **DELETE** /fabric/v4/serviceProfiles/{serviceProfileId} | Delete Profile | | [**getServiceProfileByUuid**](ServiceProfilesApi.md#getServiceProfileByUuid) | **GET** /fabric/v4/serviceProfiles/{serviceProfileId} | Get Profile | +| [**getServiceProfileEnvironmentsByUuid**](ServiceProfilesApi.md#getServiceProfileEnvironmentsByUuid) | **GET** /fabric/v4/serviceProfiles/{serviceProfileId}/environments | Get Profile Environments | | [**getServiceProfileMetrosByUuid**](ServiceProfilesApi.md#getServiceProfileMetrosByUuid) | **GET** /fabric/v4/serviceProfiles/{serviceProfileId}/metros | Get Profile Metros | | [**getServiceProfiles**](ServiceProfilesApi.md#getServiceProfiles) | **GET** /fabric/v4/serviceProfiles | Get all Profiles | | [**putServiceProfileByUuid**](ServiceProfilesApi.md#putServiceProfileByUuid) | **PUT** /fabric/v4/serviceProfiles/{serviceProfileId} | Replace Profile | | [**searchServiceProfiles**](ServiceProfilesApi.md#searchServiceProfiles) | **POST** /fabric/v4/serviceProfiles/search | Profile Search | +| [**serviceProfileEnvironmentAction**](ServiceProfilesApi.md#serviceProfileEnvironmentAction) | **POST** /fabric/v4/serviceProfiles/{serviceProfileId}/environments/{environmentId}/actions | Service Profile Environment Actions | | [**updateServiceProfileByUuid**](ServiceProfilesApi.md#updateServiceProfileByUuid) | **PATCH** /fabric/v4/serviceProfiles/{serviceProfileId} | Update Profile | @@ -305,6 +307,81 @@ public class Example { | **403** | Forbidden | - | | **500** | Internal Server Error | - | + +# **getServiceProfileEnvironmentsByUuid** +> ProviderEnvironments getServiceProfileEnvironmentsByUuid(serviceProfileId, offset, limit) + +Get Profile Environments + +Get service profile provider environments by UUID <sup color='red'>Beta</sup></font>. + +### Example +```java +// Import classes: +import com.equinix.sdk.fabricv4.ApiClient; +import com.equinix.sdk.fabricv4.ApiException; +import com.equinix.sdk.fabricv4.Configuration; +import com.equinix.sdk.fabricv4.auth.*; +import com.equinix.sdk.fabricv4.models.*; +import com.equinix.sdk.fabricv4.api.ServiceProfilesApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.equinix.com"); + + // Configure HTTP bearer authorization: BearerAuth + HttpBearerAuth BearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("BearerAuth"); + BearerAuth.setBearerToken("BEARER TOKEN"); + + ServiceProfilesApi apiInstance = new ServiceProfilesApi(defaultClient); + UUID serviceProfileId = UUID.randomUUID(); // UUID | Service Profile UUID + Integer offset = 1; // Integer | offset + Integer limit = 10; // Integer | number of records to fetch + try { + ProviderEnvironments result = apiInstance.getServiceProfileEnvironmentsByUuid(serviceProfileId, offset, limit); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ServiceProfilesApi#getServiceProfileEnvironmentsByUuid"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **serviceProfileId** | **UUID**| Service Profile UUID | | +| **offset** | **Integer**| offset | [optional] | +| **limit** | **Integer**| number of records to fetch | [optional] | + +### Return type + +[**ProviderEnvironments**](ProviderEnvironments.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json; charset=UTF-8, application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful operation | - | +| **400** | Bad request | - | +| **401** | Unauthorized | - | +| **403** | Forbidden | - | +| **500** | Internal Server Error | - | + # **getServiceProfileMetrosByUuid** > ServiceMetros getServiceProfileMetrosByUuid(serviceProfileId, offset, limit) @@ -603,9 +680,84 @@ public class Example { | **401** | Unauthorized | - | | **500** | Internal Server Error | - | + +# **serviceProfileEnvironmentAction** +> EnvironmentActionResponse serviceProfileEnvironmentAction(serviceProfileId, environmentId, environmentActionRequest) + +Service Profile Environment Actions + +This API provides capability to perform actions on a service profile environment, such as validating an activation key.<sup color='red'>Beta</sup></font> + +### Example +```java +// Import classes: +import com.equinix.sdk.fabricv4.ApiClient; +import com.equinix.sdk.fabricv4.ApiException; +import com.equinix.sdk.fabricv4.Configuration; +import com.equinix.sdk.fabricv4.auth.*; +import com.equinix.sdk.fabricv4.models.*; +import com.equinix.sdk.fabricv4.api.ServiceProfilesApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.equinix.com"); + + // Configure HTTP bearer authorization: BearerAuth + HttpBearerAuth BearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("BearerAuth"); + BearerAuth.setBearerToken("BEARER TOKEN"); + + ServiceProfilesApi apiInstance = new ServiceProfilesApi(defaultClient); + UUID serviceProfileId = UUID.randomUUID(); // UUID | Service Profile UUID + String environmentId = "environmentId_example"; // String | Provider Environment Reference + EnvironmentActionRequest environmentActionRequest = new EnvironmentActionRequest(); // EnvironmentActionRequest | + try { + EnvironmentActionResponse result = apiInstance.serviceProfileEnvironmentAction(serviceProfileId, environmentId, environmentActionRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ServiceProfilesApi#serviceProfileEnvironmentAction"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **serviceProfileId** | **UUID**| Service Profile UUID | | +| **environmentId** | **String**| Provider Environment Reference | | +| **environmentActionRequest** | [**EnvironmentActionRequest**](EnvironmentActionRequest.md)| | | + +### Return type + +[**EnvironmentActionResponse**](EnvironmentActionResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Successful service profile environment action operation | - | +| **400** | Bad request | - | +| **401** | Unauthorized | - | +| **403** | Forbidden | - | +| **500** | Internal Server Error | - | + # **updateServiceProfileByUuid** -> ServiceProfile updateServiceProfileByUuid(serviceProfileId, jsonPatchOperation) +> ServiceProfile updateServiceProfileByUuid(serviceProfileId, serviceProfileUpdateOperation) Update Profile @@ -632,9 +784,9 @@ public class Example { ServiceProfilesApi apiInstance = new ServiceProfilesApi(defaultClient); UUID serviceProfileId = UUID.randomUUID(); // UUID | Service Profile UUID - List jsonPatchOperation = Arrays.asList(); // List | + List serviceProfileUpdateOperation = Arrays.asList(); // List | try { - ServiceProfile result = apiInstance.updateServiceProfileByUuid(serviceProfileId, jsonPatchOperation); + ServiceProfile result = apiInstance.updateServiceProfileByUuid(serviceProfileId, serviceProfileUpdateOperation); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling ServiceProfilesApi#updateServiceProfileByUuid"); @@ -652,7 +804,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **serviceProfileId** | **UUID**| Service Profile UUID | | -| **jsonPatchOperation** | [**List<JsonPatchOperation>**](JsonPatchOperation.md)| | | +| **serviceProfileUpdateOperation** | [**List<ServiceProfileUpdateOperation>**](ServiceProfileUpdateOperation.md)| | | ### Return type diff --git a/services/fabricv4/docs/SimplifiedNotification.md b/services/fabricv4/docs/SimplifiedNotification.md index c516359a..13b9bfb5 100644 --- a/services/fabricv4/docs/SimplifiedNotification.md +++ b/services/fabricv4/docs/SimplifiedNotification.md @@ -11,6 +11,7 @@ |**sendInterval** | **String** | | [optional] | |**emails** | **List<String>** | Array of contact emails | | |**registeredUsers** | **List<String>** | Array of registered users | [optional] | +|**phone** | [**List<Phone>**](Phone.md) | Array of contact phone numbers | [optional] | @@ -26,6 +27,7 @@ | SALES_REP_NOTIFICATIONS | "SALES_REP_NOTIFICATIONS" | | TECHNICAL | "TECHNICAL" | | ORDERING | "ORDERING" | +| QUOTE_NOTIFICATIONS | "QUOTE_NOTIFICATIONS" | diff --git a/services/fabricv4/docs/SimplifiedServiceProfile.md b/services/fabricv4/docs/SimplifiedServiceProfile.md index b4c0d45e..dbf8d437 100644 --- a/services/fabricv4/docs/SimplifiedServiceProfile.md +++ b/services/fabricv4/docs/SimplifiedServiceProfile.md @@ -23,8 +23,8 @@ Service Profile is a software definition for a named provider service and it's n |**ports** | [**List<ServiceProfileAccessPointCOLO>**](ServiceProfileAccessPointCOLO.md) | | [optional] | |**virtualDevices** | [**List<ServiceProfileAccessPointVD>**](ServiceProfileAccessPointVD.md) | | [optional] | |**metros** | [**List<ServiceMetro>**](ServiceMetro.md) | Derived response attribute. | [optional] | -|**environments** | [**List<ProviderEnvironment>**](ProviderEnvironment.md) | Provider environments associated with this IC_PROFILE service profile. | [optional] | -|**selfProfile** | **Boolean** | response attribute indicates whether the profile belongs to the same organization as the api-invoker. | [optional] | +|**environments** | [**List<ProviderEnvironment>**](ProviderEnvironment.md) | Provider environments associated with this IC_PROFILE service profile. <font color=\"red\"> <sup color='red'>Beta</sup></font> | [optional] | +|**selfProfile** | **Boolean** | response attribute indicates whether the profile belongs to the same organization as the api-invoker. | [optional] [readonly] | |**projectId** | **String** | | [optional] | |**lastMileConfig** | [**ServiceProfileLastMileConfig**](ServiceProfileLastMileConfig.md) | | [optional] | diff --git a/services/fabricv4/docs/Sort.md b/services/fabricv4/docs/Sort.md index 0116d108..d43508ad 100644 --- a/services/fabricv4/docs/Sort.md +++ b/services/fabricv4/docs/Sort.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**property** | **String** | Property to sort by((currently supports tags with filter syntax) | [optional] | +|**property** | **String** | Property to sort by. Supported values: * `/name` - Company profile name * `/state` - Company profile state * `/changeLog/updatedDateTime` - Date and time the profile was last updated * `/changeLog/createdDateTime` - Date and time the profile was created | [optional] | |**direction** | **CompanyProfileSortDirection** | | [optional] | diff --git a/services/fabricv4/docs/StreamAsset.md b/services/fabricv4/docs/StreamAsset.md index e4bb1c4d..84a856fe 100644 --- a/services/fabricv4/docs/StreamAsset.md +++ b/services/fabricv4/docs/StreamAsset.md @@ -28,6 +28,11 @@ Stream object | XF_ROUTER | "XF_ROUTER" | | ORGANIZATION | "ORGANIZATION" | | PROJECT | "PROJECT" | +| DATA | "DATA" | +| MGMT | "MGMT" | +| SSH | "SSH" | +| FAB | "FAB" | +| CTRL | "CTRL" | diff --git a/services/fabricv4/docs/StreamAssetFilter.md b/services/fabricv4/docs/StreamAssetFilter.md index a5f6a73e..40830cca 100644 --- a/services/fabricv4/docs/StreamAssetFilter.md +++ b/services/fabricv4/docs/StreamAssetFilter.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**property** | **String** | Possible field names to use on filters: * `/uuid` - Asset uuid * `/streamUuid` - Stream uuid * `/projectId` - Asset projectId * `/_*` - all-category search | [optional] | -|**operator** | **String** | Possible operators to use on filters: * `=` - equal * `!=` - not equal * `>` - greater than * `>=` - greater than or equal to * `<` - less than * `<=` - less than or equal to * `[NOT] BETWEEN` - (not) between * `[NOT] LIKE` - (not) like * `[NOT] IN` - (not) in * `ILIKE` - case-insensitive like | [optional] | +|**property** | **String** | Possible field names to use on filters: * `/uuid` - Asset uuid (`=` and `IN` only) * `/streamUuid` - Stream uuid (`=` and `IN` only) * `/attachmentStatus` - Asset attachment status (`=`, `IN`, and `NOT IN`) | [optional] | +|**operator** | **String** | Possible operators to use on filters: * `=` - equal * `IN` - in * `NOT IN` - not in | [optional] | |**values** | **List<String>** | | [optional] | |**or** | [**List<StreamAssetSimpleExpression>**](StreamAssetSimpleExpression.md) | | [optional] | diff --git a/services/fabricv4/docs/StreamAssetSearchRequest.md b/services/fabricv4/docs/StreamAssetSearchRequest.md index 34d2143c..2fd113e7 100644 --- a/services/fabricv4/docs/StreamAssetSearchRequest.md +++ b/services/fabricv4/docs/StreamAssetSearchRequest.md @@ -8,7 +8,7 @@ Search requests containing criteria | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**filter** | [**StreamAssetFilters**](StreamAssetFilters.md) | | | +|**filter** | [**StreamAssetFilters**](StreamAssetFilters.md) | | [optional] | |**pagination** | [**PaginationRequest**](PaginationRequest.md) | | [optional] | |**sort** | [**List<StreamAssetSortCriteria>**](StreamAssetSortCriteria.md) | | [optional] | diff --git a/services/fabricv4/docs/StreamAssetSimpleExpression.md b/services/fabricv4/docs/StreamAssetSimpleExpression.md index 2b739a94..46a31d57 100644 --- a/services/fabricv4/docs/StreamAssetSimpleExpression.md +++ b/services/fabricv4/docs/StreamAssetSimpleExpression.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**property** | **String** | Possible field names to use on filters: * `/uuid` - Asset uuid * `/streamUuid` - Stream uuid * `/projectId` - Asset projectId * `/_*` - all-category search | [optional] | -|**operator** | **String** | Possible operators to use on filters: * `=` - equal * `!=` - not equal * `>` - greater than * `>=` - greater than or equal to * `<` - less than * `<=` - less than or equal to * `[NOT] BETWEEN` - (not) between * `[NOT] LIKE` - (not) like * `[NOT] IN` - (not) in * `ILIKE` - case-insensitive like | [optional] | +|**property** | **String** | Possible field names to use on filters: * `/uuid` - Asset uuid (`=` and `IN` only) * `/streamUuid` - Stream uuid (`=` and `IN` only) * `/attachmentStatus` - Asset attachment status (`=`, `IN`, and `NOT IN`) | [optional] | +|**operator** | **String** | Possible operators to use on filters: * `=` - equal * `IN` - in * `NOT IN` - not in | [optional] | |**values** | **List<String>** | | [optional] | diff --git a/services/fabricv4/docs/StreamAssetSortBy.md b/services/fabricv4/docs/StreamAssetSortBy.md index 24a2ee6b..474d2303 100644 --- a/services/fabricv4/docs/StreamAssetSortBy.md +++ b/services/fabricv4/docs/StreamAssetSortBy.md @@ -5,7 +5,9 @@ ## Enum -* `_UUID` (value: `"/uuid"`) +* `UUID` (value: `"/uuid"`) + +* `STREAMUUID` (value: `"/streamUuid"`) diff --git a/services/fabricv4/docs/StreamAssetSortCriteria.md b/services/fabricv4/docs/StreamAssetSortCriteria.md index b735d1c0..9547de29 100644 --- a/services/fabricv4/docs/StreamAssetSortCriteria.md +++ b/services/fabricv4/docs/StreamAssetSortCriteria.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**direction** | **StreamAssetSortDirection** | | [optional] | -|**property** | **StreamAssetSortBy** | | [optional] | +|**direction** | **StreamAssetSortDirection** | | | +|**property** | **StreamAssetSortBy** | | | diff --git a/services/fabricv4/docs/StreamSearchAsset.md b/services/fabricv4/docs/StreamSearchAsset.md new file mode 100644 index 00000000..9620ac70 --- /dev/null +++ b/services/fabricv4/docs/StreamSearchAsset.md @@ -0,0 +1,32 @@ + + +# StreamSearchAsset + +Stream object + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**href** | **URI** | Stream Asset URI | [optional] [readonly] | +|**uuid** | **UUID** | Equinix-assigned access point identifier | [optional] | +|**streamUuid** | **UUID** | Equinix-assigned access point identifier | [optional] | +|**type** | **String** | Asset type | [optional] | +|**metricsEnabled** | **Boolean** | enable metric | [optional] | +|**attachmentStatus** | [**AttachmentStatusEnum**](#AttachmentStatusEnum) | asset status | [optional] | +|**projectId** | **String** | project ic | [optional] | + + + +## Enum: AttachmentStatusEnum + +| Name | Value | +|---- | -----| +| ATTACHING | "ATTACHING" | +| ATTACHED | "ATTACHED" | +| DETACHED | "DETACHED" | +| DETACHING | "DETACHING" | +| FAILED | "FAILED" | + + + diff --git a/services/fabricv4/docs/StreamSearchFilter.md b/services/fabricv4/docs/StreamSearchFilter.md new file mode 100644 index 00000000..1d6f98f2 --- /dev/null +++ b/services/fabricv4/docs/StreamSearchFilter.md @@ -0,0 +1,16 @@ + + +# StreamSearchFilter + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**property** | **String** | Possible field names to use on filters: * `/uuid` - Stream uuid * `/name` - Stream name * `/state` - Stream state (`DEPROVISIONED` returned only when explicitly requested) * `/type` - Stream type * `/description` - Stream description * `/project/projectId` - Stream project id * `/changeLog/createdDateTime` - Stream created date time * `/changeLog/updatedDateTime` - Stream updated date time | [optional] | +|**operator** | **String** | Possible operators to use on filters: * `=` - equal * `!=` - not equal * `>` - greater than * `>=` - greater than or equal to * `<` - less than * `<=` - less than or equal to * `BETWEEN` - between * `NOT BETWEEN` - not between * `LIKE` - like * `ILIKE` - like case-insensitive * `IN` - in * `NOT IN` - not in | [optional] | +|**values** | **List<String>** | | [optional] | +|**or** | [**List<StreamSearchSimpleExpression>**](StreamSearchSimpleExpression.md) | | [optional] | + + + diff --git a/services/fabricv4/docs/Agent.md b/services/fabricv4/docs/StreamSearchFilters.md similarity index 54% rename from services/fabricv4/docs/Agent.md rename to services/fabricv4/docs/StreamSearchFilters.md index b33743be..a280dc04 100644 --- a/services/fabricv4/docs/Agent.md +++ b/services/fabricv4/docs/StreamSearchFilters.md @@ -1,14 +1,13 @@ -# Agent +# StreamSearchFilters ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**uuid** | **UUID** | Agent Uuid | [optional] | -|**type** | **String** | | [optional] | +|**and** | [**List<StreamSearchFilter>**](StreamSearchFilter.md) | | | diff --git a/services/fabricv4/docs/StreamSearchOrFilter.md b/services/fabricv4/docs/StreamSearchOrFilter.md new file mode 100644 index 00000000..abeb0447 --- /dev/null +++ b/services/fabricv4/docs/StreamSearchOrFilter.md @@ -0,0 +1,13 @@ + + +# StreamSearchOrFilter + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**or** | [**List<StreamSearchSimpleExpression>**](StreamSearchSimpleExpression.md) | | [optional] | + + + diff --git a/services/fabricv4/docs/StreamSearchRequest.md b/services/fabricv4/docs/StreamSearchRequest.md new file mode 100644 index 00000000..3c95648b --- /dev/null +++ b/services/fabricv4/docs/StreamSearchRequest.md @@ -0,0 +1,16 @@ + + +# StreamSearchRequest + +Search requests containing criteria + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**filter** | [**StreamSearchFilters**](StreamSearchFilters.md) | | [optional] | +|**pagination** | [**PaginationRequest**](PaginationRequest.md) | | [optional] | +|**sort** | [**List<StreamSearchSortCriteria>**](StreamSearchSortCriteria.md) | | [optional] | + + + diff --git a/services/fabricv4/docs/StreamSearchSimpleExpression.md b/services/fabricv4/docs/StreamSearchSimpleExpression.md new file mode 100644 index 00000000..8feed1b6 --- /dev/null +++ b/services/fabricv4/docs/StreamSearchSimpleExpression.md @@ -0,0 +1,15 @@ + + +# StreamSearchSimpleExpression + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**property** | **String** | Possible field names to use on filters: * `/uuid` - Stream uuid * `/name` - Stream name * `/state` - Stream state (`DEPROVISIONED` returned only when explicitly requested) * `/type` - Stream type * `/description` - Stream description * `/project/projectId` - Stream project id * `/changeLog/createdDateTime` - Stream created date time * `/changeLog/updatedDateTime` - Stream updated date time | [optional] | +|**operator** | **String** | Possible operators to use on filters: * `=` - equal * `!=` - not equal * `>` - greater than * `>=` - greater than or equal to * `<` - less than * `<=` - less than or equal to * `BETWEEN` - between * `NOT BETWEEN` - not between * `LIKE` - like * `ILIKE` - like case-insensitive * `IN` - in * `NOT IN` - not in | [optional] | +|**values** | **List<String>** | | [optional] | + + + diff --git a/services/fabricv4/docs/StreamSearchSortBy.md b/services/fabricv4/docs/StreamSearchSortBy.md new file mode 100644 index 00000000..90bea7b1 --- /dev/null +++ b/services/fabricv4/docs/StreamSearchSortBy.md @@ -0,0 +1,13 @@ + + +# StreamSearchSortBy + +## Enum + + +* `CREATEDDATETIME` (value: `"/changeLog/createdDateTime"`) + +* `UPDATEDDATETIME` (value: `"/changeLog/updatedDateTime"`) + + + diff --git a/services/fabricv4/docs/StreamSearchSortCriteria.md b/services/fabricv4/docs/StreamSearchSortCriteria.md new file mode 100644 index 00000000..95c674b8 --- /dev/null +++ b/services/fabricv4/docs/StreamSearchSortCriteria.md @@ -0,0 +1,14 @@ + + +# StreamSearchSortCriteria + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**direction** | **StreamSearchSortDirection** | | | +|**property** | **StreamSearchSortBy** | | | + + + diff --git a/services/fabricv4/docs/StreamSearchSortDirection.md b/services/fabricv4/docs/StreamSearchSortDirection.md new file mode 100644 index 00000000..53ca5399 --- /dev/null +++ b/services/fabricv4/docs/StreamSearchSortDirection.md @@ -0,0 +1,13 @@ + + +# StreamSearchSortDirection + +## Enum + + +* `DESC` (value: `"DESC"`) + +* `ASC` (value: `"ASC"`) + + + diff --git a/services/fabricv4/docs/StreamSubscriptionSearchFilter.md b/services/fabricv4/docs/StreamSubscriptionSearchFilter.md new file mode 100644 index 00000000..6baf4248 --- /dev/null +++ b/services/fabricv4/docs/StreamSubscriptionSearchFilter.md @@ -0,0 +1,16 @@ + + +# StreamSubscriptionSearchFilter + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**property** | **String** | Possible field names to use on filters: * `/uuid` - Subscription uuid * `/streamUuid` - Stream uuid the subscription belongs to * `/state` - Subscription state (`DEPROVISIONED` returned only when explicitly requested) * `/name` - Subscription name * `/project/projectId` - Subscription project id * `/description` - Subscription description * `/changeLog/createdDateTime` - Subscription created date time * `/changeLog/updatedDateTime` - Subscription updated date time | [optional] | +|**operator** | **String** | Possible operators to use on filters: * `=` - equal * `!=` - not equal * `>` - greater than * `>=` - greater than or equal to * `<` - less than * `<=` - less than or equal to * `BETWEEN` - between * `NOT BETWEEN` - not between * `LIKE` - like * `ILIKE` - like case-insensitive * `IN` - in * `NOT IN` - not in | [optional] | +|**values** | **List<String>** | | [optional] | +|**or** | [**List<StreamSubscriptionSearchSimpleExpression>**](StreamSubscriptionSearchSimpleExpression.md) | | [optional] | + + + diff --git a/services/fabricv4/docs/StreamSubscriptionSearchFilters.md b/services/fabricv4/docs/StreamSubscriptionSearchFilters.md new file mode 100644 index 00000000..215946de --- /dev/null +++ b/services/fabricv4/docs/StreamSubscriptionSearchFilters.md @@ -0,0 +1,13 @@ + + +# StreamSubscriptionSearchFilters + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**and** | [**List<StreamSubscriptionSearchFilter>**](StreamSubscriptionSearchFilter.md) | | | + + + diff --git a/services/fabricv4/docs/StreamSubscriptionSearchOrFilter.md b/services/fabricv4/docs/StreamSubscriptionSearchOrFilter.md new file mode 100644 index 00000000..6ba44c37 --- /dev/null +++ b/services/fabricv4/docs/StreamSubscriptionSearchOrFilter.md @@ -0,0 +1,13 @@ + + +# StreamSubscriptionSearchOrFilter + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**or** | [**List<StreamSubscriptionSearchSimpleExpression>**](StreamSubscriptionSearchSimpleExpression.md) | | [optional] | + + + diff --git a/services/fabricv4/docs/StreamSubscriptionSearchRequest.md b/services/fabricv4/docs/StreamSubscriptionSearchRequest.md new file mode 100644 index 00000000..c9ca2704 --- /dev/null +++ b/services/fabricv4/docs/StreamSubscriptionSearchRequest.md @@ -0,0 +1,16 @@ + + +# StreamSubscriptionSearchRequest + +Search requests containing criteria + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**filter** | [**StreamSubscriptionSearchFilters**](StreamSubscriptionSearchFilters.md) | | | +|**pagination** | [**PaginationRequest**](PaginationRequest.md) | | [optional] | +|**sort** | [**List<StreamSubscriptionSearchSortCriteria>**](StreamSubscriptionSearchSortCriteria.md) | | [optional] | + + + diff --git a/services/fabricv4/docs/StreamSubscriptionSearchSimpleExpression.md b/services/fabricv4/docs/StreamSubscriptionSearchSimpleExpression.md new file mode 100644 index 00000000..9b5063d2 --- /dev/null +++ b/services/fabricv4/docs/StreamSubscriptionSearchSimpleExpression.md @@ -0,0 +1,15 @@ + + +# StreamSubscriptionSearchSimpleExpression + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**property** | **String** | Possible field names to use on filters: * `/uuid` - Subscription uuid * `/streamUuid` - Stream uuid the subscription belongs to * `/state` - Subscription state (`DEPROVISIONED` returned only when explicitly requested) * `/name` - Subscription name * `/project/projectId` - Subscription project id * `/description` - Subscription description * `/changeLog/createdDateTime` - Subscription created date time * `/changeLog/updatedDateTime` - Subscription updated date time | [optional] | +|**operator** | **String** | Possible operators to use on filters: * `=` - equal * `!=` - not equal * `>` - greater than * `>=` - greater than or equal to * `<` - less than * `<=` - less than or equal to * `BETWEEN` - between * `NOT BETWEEN` - not between * `LIKE` - like * `ILIKE` - like case-insensitive * `IN` - in * `NOT IN` - not in | [optional] | +|**values** | **List<String>** | | [optional] | + + + diff --git a/services/fabricv4/docs/StreamSubscriptionSearchSortBy.md b/services/fabricv4/docs/StreamSubscriptionSearchSortBy.md new file mode 100644 index 00000000..178513bc --- /dev/null +++ b/services/fabricv4/docs/StreamSubscriptionSearchSortBy.md @@ -0,0 +1,13 @@ + + +# StreamSubscriptionSearchSortBy + +## Enum + + +* `CREATEDDATETIME` (value: `"/changeLog/createdDateTime"`) + +* `UPDATEDDATETIME` (value: `"/changeLog/updatedDateTime"`) + + + diff --git a/services/fabricv4/docs/StreamSubscriptionSearchSortCriteria.md b/services/fabricv4/docs/StreamSubscriptionSearchSortCriteria.md new file mode 100644 index 00000000..4d32311b --- /dev/null +++ b/services/fabricv4/docs/StreamSubscriptionSearchSortCriteria.md @@ -0,0 +1,14 @@ + + +# StreamSubscriptionSearchSortCriteria + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**direction** | **StreamSubscriptionSearchSortDirection** | | | +|**property** | **StreamSubscriptionSearchSortBy** | | | + + + diff --git a/services/fabricv4/docs/StreamSubscriptionSearchSortDirection.md b/services/fabricv4/docs/StreamSubscriptionSearchSortDirection.md new file mode 100644 index 00000000..bc2b3b2a --- /dev/null +++ b/services/fabricv4/docs/StreamSubscriptionSearchSortDirection.md @@ -0,0 +1,13 @@ + + +# StreamSubscriptionSearchSortDirection + +## Enum + + +* `DESC` (value: `"DESC"`) + +* `ASC` (value: `"ASC"`) + + + diff --git a/services/fabricv4/docs/StreamSubscriptionsApi.md b/services/fabricv4/docs/StreamSubscriptionsApi.md index 315882f5..64f5763c 100644 --- a/services/fabricv4/docs/StreamSubscriptionsApi.md +++ b/services/fabricv4/docs/StreamSubscriptionsApi.md @@ -8,6 +8,7 @@ All URIs are relative to *https://api.equinix.com* | [**deleteStreamSubscriptionByUuid**](StreamSubscriptionsApi.md#deleteStreamSubscriptionByUuid) | **DELETE** /fabric/v4/streams/{streamId}/subscriptions/{subscriptionId} | Delete Subscription | | [**getStreamSubscriptionByUuid**](StreamSubscriptionsApi.md#getStreamSubscriptionByUuid) | **GET** /fabric/v4/streams/{streamId}/subscriptions/{subscriptionId} | Get Subscription | | [**getStreamSubscriptions**](StreamSubscriptionsApi.md#getStreamSubscriptions) | **GET** /fabric/v4/streams/{streamId}/subscriptions | Get Subscriptions | +| [**searchStreamSubscriptions**](StreamSubscriptionsApi.md#searchStreamSubscriptions) | **POST** /fabric/v4/streamSubscriptions/search | Search Stream Subscriptions | | [**updateStreamSubscriptionByUuid**](StreamSubscriptionsApi.md#updateStreamSubscriptionByUuid) | **PUT** /fabric/v4/streams/{streamId}/subscriptions/{subscriptionId} | Update Subscription | @@ -308,6 +309,78 @@ public class Example { | **404** | Not Found | - | | **500** | Internal server error | - | + +# **searchStreamSubscriptions** +> SearchStreamSubscriptionResponse searchStreamSubscriptions(streamSubscriptionSearchRequest) + +Search Stream Subscriptions + +This API provides capability to search stream subscriptions + +### Example +```java +// Import classes: +import com.equinix.sdk.fabricv4.ApiClient; +import com.equinix.sdk.fabricv4.ApiException; +import com.equinix.sdk.fabricv4.Configuration; +import com.equinix.sdk.fabricv4.auth.*; +import com.equinix.sdk.fabricv4.models.*; +import com.equinix.sdk.fabricv4.api.StreamSubscriptionsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.equinix.com"); + + // Configure HTTP bearer authorization: BearerAuth + HttpBearerAuth BearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("BearerAuth"); + BearerAuth.setBearerToken("BEARER TOKEN"); + + StreamSubscriptionsApi apiInstance = new StreamSubscriptionsApi(defaultClient); + StreamSubscriptionSearchRequest streamSubscriptionSearchRequest = new StreamSubscriptionSearchRequest(); // StreamSubscriptionSearchRequest | + try { + SearchStreamSubscriptionResponse result = apiInstance.searchStreamSubscriptions(streamSubscriptionSearchRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling StreamSubscriptionsApi#searchStreamSubscriptions"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **streamSubscriptionSearchRequest** | [**StreamSubscriptionSearchRequest**](StreamSubscriptionSearchRequest.md)| | | + +### Return type + +[**SearchStreamSubscriptionResponse**](SearchStreamSubscriptionResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful operation | - | +| **400** | Bad request | - | +| **401** | Unauthorized | - | +| **403** | Forbidden | - | +| **404** | Not Found | - | +| **500** | Internal server error | - | + # **updateStreamSubscriptionByUuid** > StreamSubscription updateStreamSubscriptionByUuid(streamId, subscriptionId, streamSubscriptionPutRequest) diff --git a/services/fabricv4/docs/StreamsApi.md b/services/fabricv4/docs/StreamsApi.md index abf5bd73..52b7947f 100644 --- a/services/fabricv4/docs/StreamsApi.md +++ b/services/fabricv4/docs/StreamsApi.md @@ -10,7 +10,8 @@ All URIs are relative to *https://api.equinix.com* | [**getStreamAssetByUuid**](StreamsApi.md#getStreamAssetByUuid) | **GET** /fabric/v4/streams/{streamId}/{asset}/{assetId} | Get Asset | | [**getStreamByUuid**](StreamsApi.md#getStreamByUuid) | **GET** /fabric/v4/streams/{streamId} | Get Stream | | [**getStreams**](StreamsApi.md#getStreams) | **GET** /fabric/v4/streams | Get Streams | -| [**getStreamsAssets**](StreamsApi.md#getStreamsAssets) | **POST** /fabric/v4/streamAssets/search | Get Assets | +| [**searchStreamAssets**](StreamsApi.md#searchStreamAssets) | **POST** /fabric/v4/streamAssets/search | Search Stream Assets | +| [**searchStreams**](StreamsApi.md#searchStreams) | **POST** /fabric/v4/streams/search | Search Streams | | [**updateStreamAssetByUuid**](StreamsApi.md#updateStreamAssetByUuid) | **PUT** /fabric/v4/streams/{streamId}/{asset}/{assetId} | Attach Asset | | [**updateStreamByUuid**](StreamsApi.md#updateStreamByUuid) | **PUT** /fabric/v4/streams/{streamId} | Update Stream | @@ -456,13 +457,13 @@ public class Example { | **404** | Not Found | - | | **500** | Internal server error | - | - -# **getStreamsAssets** -> GetAllStreamAssetResponse getStreamsAssets(streamAssetSearchRequest, offset, limit) + +# **searchStreamAssets** +> SearchStreamAssetResponse searchStreamAssets(streamAssetSearchRequest) -Get Assets +Search Stream Assets -This API provides capability to retrieve stream assets +This API provides capability to search stream assets ### Example ```java @@ -485,13 +486,11 @@ public class Example { StreamsApi apiInstance = new StreamsApi(defaultClient); StreamAssetSearchRequest streamAssetSearchRequest = new StreamAssetSearchRequest(); // StreamAssetSearchRequest | - Integer offset = 1; // Integer | offset - Integer limit = 10; // Integer | number of records to fetch try { - GetAllStreamAssetResponse result = apiInstance.getStreamsAssets(streamAssetSearchRequest, offset, limit); + SearchStreamAssetResponse result = apiInstance.searchStreamAssets(streamAssetSearchRequest); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling StreamsApi#getStreamsAssets"); + System.err.println("Exception when calling StreamsApi#searchStreamAssets"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -506,12 +505,82 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **streamAssetSearchRequest** | [**StreamAssetSearchRequest**](StreamAssetSearchRequest.md)| | | -| **offset** | **Integer**| offset | [optional] | -| **limit** | **Integer**| number of records to fetch | [optional] | ### Return type -[**GetAllStreamAssetResponse**](GetAllStreamAssetResponse.md) +[**SearchStreamAssetResponse**](SearchStreamAssetResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful operation | - | +| **400** | Bad request | - | +| **401** | Unauthorized | - | +| **403** | Forbidden | - | +| **404** | Not Found | - | +| **500** | Internal server error | - | + + +# **searchStreams** +> SearchStreamResponse searchStreams(streamSearchRequest) + +Search Streams + +This API provides capability to search streams + +### Example +```java +// Import classes: +import com.equinix.sdk.fabricv4.ApiClient; +import com.equinix.sdk.fabricv4.ApiException; +import com.equinix.sdk.fabricv4.Configuration; +import com.equinix.sdk.fabricv4.auth.*; +import com.equinix.sdk.fabricv4.models.*; +import com.equinix.sdk.fabricv4.api.StreamsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.equinix.com"); + + // Configure HTTP bearer authorization: BearerAuth + HttpBearerAuth BearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("BearerAuth"); + BearerAuth.setBearerToken("BEARER TOKEN"); + + StreamsApi apiInstance = new StreamsApi(defaultClient); + StreamSearchRequest streamSearchRequest = new StreamSearchRequest(); // StreamSearchRequest | + try { + SearchStreamResponse result = apiInstance.searchStreams(streamSearchRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling StreamsApi#searchStreams"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **streamSearchRequest** | [**StreamSearchRequest**](StreamSearchRequest.md)| | [optional] | + +### Return type + +[**SearchStreamResponse**](SearchStreamResponse.md) ### Authorization diff --git a/services/fabricv4/docs/Style.md b/services/fabricv4/docs/Style.md new file mode 100644 index 00000000..e0e9ec5e --- /dev/null +++ b/services/fabricv4/docs/Style.md @@ -0,0 +1,15 @@ + + +# Style + +## Enum + + +* `MIN` (value: `"MIN"`) + +* `MEDIUM` (value: `"MEDIUM"`) + +* `FULL` (value: `"FULL"`) + + + diff --git a/services/fabricv4/docs/TagRequest.md b/services/fabricv4/docs/TagRequest.md index bf6cf053..4c1a2b65 100644 --- a/services/fabricv4/docs/TagRequest.md +++ b/services/fabricv4/docs/TagRequest.md @@ -9,8 +9,8 @@ Equinix Fabric Tag Request Object | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**type** | **String** | Type of tag | | -|**name** | **String** | Name of the Tag | | |**displayName** | **String** | Display name of the Tag | | +|**notifications** | [**List<SimplifiedNotification>**](SimplifiedNotification.md) | | [optional] | diff --git a/services/fabricv4/docs/TagResponse.md b/services/fabricv4/docs/TagResponse.md index de79b597..c64f561f 100644 --- a/services/fabricv4/docs/TagResponse.md +++ b/services/fabricv4/docs/TagResponse.md @@ -13,7 +13,19 @@ Equinix Fabric Tag Response Object |**type** | **String** | | [optional] | |**name** | **String** | | [optional] | |**displayName** | **String** | | [optional] | -|**weight** | **Integer** | | [optional] | +|**state** | [**StateEnum**](#StateEnum) | Status of the Tag request. Can be APPROVED, PENDING_APPROVAL, REJECT | [optional] | +|**notifications** | [**List<SimplifiedNotification>**](SimplifiedNotification.md) | | [optional] | +|**changeLog** | [**Changelog**](Changelog.md) | | [optional] | + + + +## Enum: StateEnum + +| Name | Value | +|---- | -----| +| APPROVED | "APPROVED" | +| PENDING_APPROVAL | "PENDING_APPROVAL" | +| REJECTED | "REJECTED" | diff --git a/services/fabricv4/docs/TagsApi.md b/services/fabricv4/docs/TagsApi.md index 4543c4f7..7bc2cb79 100644 --- a/services/fabricv4/docs/TagsApi.md +++ b/services/fabricv4/docs/TagsApi.md @@ -5,6 +5,7 @@ All URIs are relative to *https://api.equinix.com* | Method | HTTP request | Description | |------------- | ------------- | -------------| | [**createTag**](TagsApi.md#createTag) | **POST** /fabric/v4/tags | Create Tag | +| [**getTagByUuid**](TagsApi.md#getTagByUuid) | **GET** /fabric/v4/tags/{uuid} | Get Tag | | [**listTags**](TagsApi.md#listTags) | **GET** /fabric/v4/tags | List Tags | @@ -73,12 +74,84 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **201** | Successful Create operation | - | +| **202** | Successfully created tag and pending for approval | - | | **400** | Bad request | - | | **401** | Unauthorized | - | | **403** | Forbidden | - | | **500** | Internal Server Error | - | + +# **getTagByUuid** +> TagResponse getTagByUuid(uuid) + +Get Tag + +Get Tag by UUID + +### Example +```java +// Import classes: +import com.equinix.sdk.fabricv4.ApiClient; +import com.equinix.sdk.fabricv4.ApiException; +import com.equinix.sdk.fabricv4.Configuration; +import com.equinix.sdk.fabricv4.auth.*; +import com.equinix.sdk.fabricv4.models.*; +import com.equinix.sdk.fabricv4.api.TagsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.equinix.com"); + + // Configure HTTP bearer authorization: BearerAuth + HttpBearerAuth BearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("BearerAuth"); + BearerAuth.setBearerToken("BEARER TOKEN"); + + TagsApi apiInstance = new TagsApi(defaultClient); + UUID uuid = UUID.randomUUID(); // UUID | UUID of the Tag + try { + TagResponse result = apiInstance.getTagByUuid(uuid); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling TagsApi#getTagByUuid"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **uuid** | **UUID**| UUID of the Tag | | + +### Return type + +[**TagResponse**](TagResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful Get operation | - | +| **400** | Bad request | - | +| **401** | Unauthorized | - | +| **403** | Forbidden | - | +| **404** | Not Found | - | +| **500** | Internal Server Error | - | + # **listTags** > TagListResponse listTags(type, offset, limit) diff --git a/services/fabricv4/docs/ToolCallInformationInner.md b/services/fabricv4/docs/ToolCallInformationInner.md deleted file mode 100644 index 41e31cf3..00000000 --- a/services/fabricv4/docs/ToolCallInformationInner.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# ToolCallInformationInner - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**name** | **String** | Name of tools called | [optional] | -|**input** | **String** | Content of the tool request | [optional] | -|**response** | **String** | Content of the tool response | [optional] | - - - diff --git a/services/fabricv4/docs/VirtualConnectionPrice.md b/services/fabricv4/docs/VirtualConnectionPrice.md index c25a1ac8..0fca2842 100644 --- a/services/fabricv4/docs/VirtualConnectionPrice.md +++ b/services/fabricv4/docs/VirtualConnectionPrice.md @@ -13,6 +13,7 @@ Virtual Connection Product configuration |**bandwidth** | **Integer** | | [optional] | |**aSide** | [**VirtualConnectionPriceASide**](VirtualConnectionPriceASide.md) | | [optional] | |**zSide** | [**VirtualConnectionPriceZSide**](VirtualConnectionPriceZSide.md) | | [optional] | +|**geoScope** | **GeoScopeType** | | [optional] | diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/JSON.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/JSON.java index 2ba9bec6..cc6297d8 100644 --- a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/JSON.java +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/JSON.java @@ -167,27 +167,108 @@ public Enum deserialize(JsonElement json, java.lang.reflect.Type type, JsonDeser gsonBuilder.registerTypeAdapter(byte[].class, byteArrayAdapter); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.AccessPoint.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.AccessPointSelector.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.Account.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.ActivationKeyDetails.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.AddOperation.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.Agent.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.AgentActivities.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.AgentActivitiesMetadata.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.AgentDefinition.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.AgentGetActivities.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.AgentGetAllResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.AgentPatchRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.AgentPostRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.AgentTemplate.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.AgentTemplateGetAllResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.AgentTemplates.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.Agents.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.Address.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.AlertRulePostRequest.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.AlertRulePutRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.AllInterconnectPackagesResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.AllPhysicalPortsResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.AllPortPackagesResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.AllPortsResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.ApiConfig.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.ApiServices.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.AttachLogoResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.AppDomain.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.AppDomainAttachedAppLink.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.AppDomainAttachedAppLinks.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.AppDomainChange.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.AppDomainChangeOperation.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.AppDomainFilter.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.AppDomainFilters.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.AppDomainOrFilter.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.AppDomainPostRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.AppDomainSearchRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.AppDomainSearchResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.AppDomainSimpleExpression.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.AppDomainSortCriteria.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.AppLink.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.AppLinkAppDomainAttachment.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.AppLinkAppServiceAttachment.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.AppLinkAppServiceAttachmentChange.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.AppLinkAppServiceAttachmentChangeOperation.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.AppLinkAttachDomainFilter.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.AppLinkAttachDomainFilters.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.AppLinkAttachDomainOrFilter.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.AppLinkAttachDomainSearchRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.AppLinkAttachDomainSearchResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.AppLinkAttachDomainSimpleExpression.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.AppLinkAttachDomainSortCriteria.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.AppLinkAttachServiceFilter.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.AppLinkAttachServiceFilters.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.AppLinkAttachServiceOrFilter.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.AppLinkAttachServiceRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.AppLinkAttachServiceSearchRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.AppLinkAttachServiceSearchResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.AppLinkAttachServiceSimpleExpression.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.AppLinkAttachServiceSortCriteria.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.AppLinkAttachedAppDomain.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.AppLinkAttachedAppDomains.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.AppLinkAttachedAppService.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.AppLinkAttachedAppServices.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.AppLinkChange.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.AppLinkChangeOperation.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.AppLinkCloudRouter.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.AppLinkFilter.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.AppLinkFilters.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.AppLinkOrFilter.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.AppLinkPostRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.AppLinkPostRequestRouter.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.AppLinkSearchRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.AppLinkSearchResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.AppLinkSimpleExpression.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.AppLinkSortCriteria.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.AppService.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.AppServiceAttachedAppLink.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.AppServiceAttachedAppLinks.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.AppServiceAttachedAppSubscription.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.AppServiceAttachedAppSubscriptionFilter.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.AppServiceAttachedAppSubscriptionFilters.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.AppServiceAttachedAppSubscriptionOrFilter.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.AppServiceAttachedAppSubscriptionSearchRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.AppServiceAttachedAppSubscriptionSearchResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.AppServiceAttachedAppSubscriptionSimpleExpression.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.AppServiceAttachedAppSubscriptionSortCriteria.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.AppServiceAttachedAppSubscriptions.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.AppServiceChange.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.AppServiceChangeOperation.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.AppServiceFilter.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.AppServiceFilters.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.AppServiceOrFilter.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.AppServicePostRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.AppServiceSearchRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.AppServiceSearchResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.AppServiceSimpleExpression.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.AppServiceSortCriteria.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.AppSubscription.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.AppSubscriptionChange.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.AppSubscriptionChangeOperation.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.AppSubscriptionFilter.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.AppSubscriptionFilters.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.AppSubscriptionOrFilter.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.AppSubscriptionPostRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.AppSubscriptionSearchRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.AppSubscriptionSearchResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.AppSubscriptionSimpleExpression.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.AppSubscriptionSortCriteria.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.AppSubscriptionSource.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.AppSubscriptionSourceAppLink.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.AppSubscriptionSourceRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.AppSubscriptionSourceRequestAppLink.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.AppSubscriptionTarget.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.AppSubscriptionTargetAppService.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.AppSubscriptionTargetRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.AppSubscriptionTargetRequestAppService.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.AttachPrivateServiceResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.AttachServiceProfileResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.AttachTagResponse.CustomTypeAdapterFactory()); @@ -200,11 +281,10 @@ public Enum deserialize(JsonElement json, java.lang.reflect.Type type, JsonDeser gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.BGPConnectionIpv6.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.BGPConnectionOperation.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.BandwidthUtilization.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.BulkOpticalConnectRequest.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.BulkPhysicalPort.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.BulkPortRequest.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.Change.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.Changelog.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.ChatMessage.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.CloudEvent.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.CloudEventData.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.CloudEventFilters.CustomTypeAdapterFactory()); @@ -244,6 +324,7 @@ public Enum deserialize(JsonElement json, java.lang.reflect.Type type, JsonDeser gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.CloudRouterPostRequest.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.CloudRouterPostRequestBase.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.CloudRouterPostRequestPackage.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.CloudRouterReadResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.CloudRouterRouteAggregationAndExpression.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.CloudRouterRouteAggregationExpression.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.CloudRouterRouteAggregationOrExpression.CustomTypeAdapterFactory()); @@ -263,14 +344,18 @@ public Enum deserialize(JsonElement json, java.lang.reflect.Type type, JsonDeser gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.CloudRouterSortCriteria.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.CompanyLogo.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.CompanyMetro.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.CompanyProfileActionRequest.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.CompanyProfileChange.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.CompanyProfileContact.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.CompanyProfileContactContacts.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.CompanyProfileRequest.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.CompanyProfileResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.CompanyProfileResponseAccount.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.CompanyProfileSearchFilter.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.CompanyProfileSearchFilters.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.CompanyProfileSearchOrFilter.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.CompanyProfileSearchRequest.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.CompanyProfileSearchResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.CompanyProfileSearchSimpleExpression.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.CompanyServiceProfile.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.ConnectedMetro.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.Connection.CustomTypeAdapterFactory()); @@ -278,7 +363,6 @@ public Enum deserialize(JsonElement json, java.lang.reflect.Type type, JsonDeser gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.ConnectionAction.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.ConnectionActionRequest.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.ConnectionChangeOperation.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.ConnectionCompanyProfile.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.ConnectionInvitation.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.ConnectionLink.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.ConnectionOperation.CustomTypeAdapterFactory()); @@ -302,6 +386,9 @@ public Enum deserialize(JsonElement json, java.lang.reflect.Type type, JsonDeser gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.ConnectionSide.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.ConnectionSideAdditionalInfo.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.ConnectivitySource.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.ContactPreference.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.CreateLoa.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.CreateLoaNote.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.CustomField.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.DetectionMethod.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.DetectionMethodResponse.CustomTypeAdapterFactory()); @@ -309,20 +396,33 @@ public Enum deserialize(JsonElement json, java.lang.reflect.Type type, JsonDeser gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.DirectConnectionIpv6.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.Direction.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.EndCustomer.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.EnvironmentActionRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.EnvironmentActionResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.Error.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.ExchangeServiceAndExpression.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.ExchangeServiceNotification.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.ExchangeServiceOrExpression.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.ExchangeServicePropertyExpression.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.ExchangeServiceResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.ExchangeServiceResponseBgp.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.ExchangeServiceSearchExpression.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.ExchangeServiceSearchRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.ExchangeServiceSearchResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.ExchangeServiceSearchSortCriteria.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.Expression.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.FabricCloudRouterPackages.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.FabricCloudRouterPrice.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.FilterBody.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.GatewayAttachmentListResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.GatewayAttachmentResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.Gateway.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.GatewayChangeOperation.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.GatewayIpv4.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.GatewayPostRequest.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.GeoCoordinates.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.GeoZone.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.GetAllCloudRouterCommands.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.GetAllConnectionRouteAggregationsResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.GetAllConnectionRouteFiltersResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.GetAllStreamAlertRuleResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.GetAllStreamAssetResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.GetAllStreamResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.GetAllStreamSubscriptionResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.GetCloudEventsByAssetResponse.CustomTypeAdapterFactory()); @@ -336,6 +436,18 @@ public Enum deserialize(JsonElement json, java.lang.reflect.Type type, JsonDeser gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.HealthResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.Hop.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.HopProbes.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.Interconnect.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.InterconnectFilter.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.InterconnectLocation.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.InterconnectLocationRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.InterconnectNotification.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.InterconnectPackage.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.InterconnectPostRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.InterconnectRouter.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.InterconnectSearchRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.InterconnectSearchResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.InterconnectSortCriteria.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.InterconnectSortCriteriaResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.InternetAccess.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.InternetAccessAccount.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.InternetAccessBilling.CustomTypeAdapterFactory()); @@ -359,7 +471,9 @@ public Enum deserialize(JsonElement json, java.lang.reflect.Type type, JsonDeser gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.InternetAccessPostRequest.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.InternetAccessPostRequestBilling.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.InternetAccessRoutingProtocolBgp.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.InternetAccessRoutingProtocolBgpAsn.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.InternetAccessRoutingProtocolBgpRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.InternetAccessRoutingProtocolBgpRequestAsn.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.InternetAccessRoutingProtocolDirect.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.InternetAccessRoutingProtocolDirectRequest.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.InternetAccessRoutingProtocolStatic.CustomTypeAdapterFactory()); @@ -386,21 +500,47 @@ public Enum deserialize(JsonElement json, java.lang.reflect.Type type, JsonDeser gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.IpBlockSearchResponseBody.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.IpBlocksSearchRequestBody.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.Ipv4.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.JsonPatchOperation.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.LastMileConfig.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.LastMileNotificationInfo.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.IssueLoa.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.Link.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.LinkAggregationGroup.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.LinkProtocolConnection.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.LinkProtocolGetResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.LinkProtocolResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.LinkProtocolServiceToken.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.LogoRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.LoaActionData.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.LoaActionFilter.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.LoaActionOrFilter.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.LoaActionRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.LoaActionResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.LoaActionSearchFilters.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.LoaActionSearchRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.LoaActionSearchResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.LoaActionSearchSimpleExpressions.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.LoaActionSortCriteria.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.LoaChangelog.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.LoaConsumer.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.LoaConsumersResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.LoaDemarcationPoint.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.LoaFilter.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.LoaIssuer.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.LoaLocation.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.LoaNoteDetails.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.LoaNotesResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.LoaOrFilter.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.LoaReplaceOperation.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.LoaRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.LoaRequestor.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.LoaResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.LoaResponseOperation.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.LoaSearchFilters.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.LoaSearchRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.LoaSearchResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.LoaSimpleExpression.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.LoaSortCriteria.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.LogoResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.MarketingInfo.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.MarketplaceSubscription.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.Md5.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.MessagesInner.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.MetalInterconnection.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.Metric.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.MetricDatapoints.CustomTypeAdapterFactory()); @@ -414,7 +554,6 @@ public Enum deserialize(JsonElement json, java.lang.reflect.Type type, JsonDeser gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.Metro.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.MetroError.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.MetroResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.ModelConfiguration.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.ModelInterface.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.ModelPackage.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.Network.CustomTypeAdapterFactory()); @@ -430,7 +569,34 @@ public Enum deserialize(JsonElement json, java.lang.reflect.Type type, JsonDeser gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.NetworkSortCriteria.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.NetworkSortCriteriaResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.Operation.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.OperationalEventFilters.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.OperationalEventSearchRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.OperationalEventSimpleExpression.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.OperationalStatus.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.OpticalConnectASideRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.OpticalConnectASideResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.OpticalConnectBulk.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.OpticalConnectFilter.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.OpticalConnectFilters.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.OpticalConnectLOA.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.OpticalConnectLocation.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.OpticalConnectNotification.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.OpticalConnectOrFilter.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.OpticalConnectOrder.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.OpticalConnectPatchPanelFields.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.OpticalConnectPostRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.OpticalConnectPrice.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.OpticalConnectPriceASide.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.OpticalConnectPriceLocation.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.OpticalConnectPriceZSide.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.OpticalConnectRedundancy.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.OpticalConnectResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.OpticalConnectSearchRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.OpticalConnectServiceSearchResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.OpticalConnectSimpleExpression.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.OpticalConnectSortCriteria.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.OpticalConnectZSideRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.OpticalConnectZSideResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.Order.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.OutputStructuredPing.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.OutputStructuredPingResponseItem.CustomTypeAdapterFactory()); @@ -441,7 +607,7 @@ public Enum deserialize(JsonElement json, java.lang.reflect.Type type, JsonDeser gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.PaginationRequest.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.PatchIpBlockRequestBodyItem.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.PatchIpBlockRequestBodyItemValue.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.PatchOperation.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.Phone.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.PhysicalPort.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.PhysicalPortSettings.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.PlatformChangelog.CustomTypeAdapterFactory()); @@ -489,12 +655,16 @@ public Enum deserialize(JsonElement json, java.lang.reflect.Type type, JsonDeser gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.PrivateService.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.PrivateServiceListResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.ProcessStep.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.ProductOffering.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.Project.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.ProviderEnvironment.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.ProviderEnvironments.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.PtpAdvanceConfiguration.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.PublicPeeringConnectionResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.RaAttachmentSortItem.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.RemoveOperation.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.ReplaceOperation.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.RequestLoa.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.ResourceData.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.ResourceSelector.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.ResourceSelectorResponse.CustomTypeAdapterFactory()); @@ -530,6 +700,7 @@ public Enum deserialize(JsonElement json, java.lang.reflect.Type type, JsonDeser gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.RouteAggregationsPatchRequestItem.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.RouteAggregationsSearchRequest.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.RouteAggregationsSearchResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.RouteCollector.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.RouteFilterChangeData.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.RouteFilterChangeDataResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.RouteFilterConnectionsData.CustomTypeAdapterFactory()); @@ -567,6 +738,7 @@ public Enum deserialize(JsonElement json, java.lang.reflect.Type type, JsonDeser gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.RouteTableEntrySearchResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.RouteTableEntrySimpleExpression.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.RouteTableEntrySortCriteria.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.Router.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.RouterActionsConnection.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.RouterActionsRouter.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.RoutingProtocolBFD.CustomTypeAdapterFactory()); @@ -583,15 +755,20 @@ public Enum deserialize(JsonElement json, java.lang.reflect.Type type, JsonDeser gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.RoutingProtocolDirectType.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.RoutingProtocolOperation.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.RoutingProtocolProject.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.RoutingProtocolResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.SearchAndExpression.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.SearchExpression.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.SearchFilter.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.SearchFilterExpression.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.SearchOperationalEventResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.SearchOrExpression.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.SearchRequest.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.SearchResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.SearchSimpleExpression.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.SearchSortItem.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.SearchStreamAssetResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.SearchStreamResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.SearchStreamSubscriptionResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.ServiceMetro.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.ServiceMetros.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.ServiceProfile.CustomTypeAdapterFactory()); @@ -605,10 +782,9 @@ public Enum deserialize(JsonElement json, java.lang.reflect.Type type, JsonDeser gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.ServiceProfileAndFilter.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.ServiceProfileChange.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.ServiceProfileFilter.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.ServiceProfileLastMileAddress.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.ServiceProfileLastMileApiIntegration.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.ServiceProfileLastMileConfig.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.ServiceProfileLastMileDeliveryDateRange.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.ServiceProfileLastMileNotification.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.ServiceProfileLastMileOffering.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.ServiceProfileLastMilePriceRange.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.ServiceProfileLastMileProductCatalog.CustomTypeAdapterFactory()); @@ -619,6 +795,7 @@ public Enum deserialize(JsonElement json, java.lang.reflect.Type type, JsonDeser gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.ServiceProfileSearchRequest.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.ServiceProfileSimpleExpression.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.ServiceProfileSortCriteria.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.ServiceProfileUpdateOperation.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.ServiceProfiles.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.ServiceSearchResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.ServiceToken.CustomTypeAdapterFactory()); @@ -663,6 +840,13 @@ public Enum deserialize(JsonElement json, java.lang.reflect.Type type, JsonDeser gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.StreamFilterSimpleExpression.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.StreamPostRequest.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.StreamPutRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.StreamSearchAsset.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.StreamSearchFilter.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.StreamSearchFilters.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.StreamSearchOrFilter.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.StreamSearchRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.StreamSearchSimpleExpression.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.StreamSearchSortCriteria.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.StreamSubscription.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.StreamSubscriptionFilter.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.StreamSubscriptionOperation.CustomTypeAdapterFactory()); @@ -670,6 +854,12 @@ public Enum deserialize(JsonElement json, java.lang.reflect.Type type, JsonDeser gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.StreamSubscriptionOperationErrors.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.StreamSubscriptionPostRequest.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.StreamSubscriptionPutRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.StreamSubscriptionSearchFilter.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.StreamSubscriptionSearchFilters.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.StreamSubscriptionSearchOrFilter.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.StreamSubscriptionSearchRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.StreamSubscriptionSearchSimpleExpression.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.StreamSubscriptionSearchSortCriteria.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.StreamSubscriptionSelector.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.StreamSubscriptionSink.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.StreamSubscriptionSinkCredential.CustomTypeAdapterFactory()); @@ -696,7 +886,6 @@ public Enum deserialize(JsonElement json, java.lang.reflect.Type type, JsonDeser gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.TimeServiceSimpleExpression.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.TimeServiceSortCriteria.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.TimeServicesSearchRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.ToolCallInformationInner.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.ValidateConnectionResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.ValidateRequest.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.sdk.fabricv4.model.ValidateRequestFilter.CustomTypeAdapterFactory()); diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/api/AgentsApi.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/api/ApplicationDomainsApi.java similarity index 59% rename from services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/api/AgentsApi.java rename to services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/api/ApplicationDomainsApi.java index 271975f1..8f27fe15 100644 --- a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/api/AgentsApi.java +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/api/ApplicationDomainsApi.java @@ -25,12 +25,16 @@ import java.io.IOException; -import com.equinix.sdk.fabricv4.model.AgentGetActivities; -import com.equinix.sdk.fabricv4.model.AgentGetAllResponse; -import com.equinix.sdk.fabricv4.model.AgentPatchRequest; -import com.equinix.sdk.fabricv4.model.AgentPostRequest; -import com.equinix.sdk.fabricv4.model.Agents; +import com.equinix.sdk.fabricv4.model.AppDomain; +import com.equinix.sdk.fabricv4.model.AppDomainAttachedAppLinks; +import com.equinix.sdk.fabricv4.model.AppDomainChangeOperation; +import com.equinix.sdk.fabricv4.model.AppDomainPostRequest; +import com.equinix.sdk.fabricv4.model.AppDomainSearchRequest; +import com.equinix.sdk.fabricv4.model.AppDomainSearchResponse; +import com.equinix.sdk.fabricv4.model.AppLinkState; +import com.equinix.sdk.fabricv4.model.AttachedAppLinkOrder; import com.equinix.sdk.fabricv4.model.Error; +import com.equinix.sdk.fabricv4.model.Style; import java.util.UUID; import java.lang.reflect.Type; @@ -39,16 +43,16 @@ import java.util.List; import java.util.Map; -public class AgentsApi { +public class ApplicationDomainsApi { private ApiClient localVarApiClient; private int localHostIndex; private String localCustomBaseUrl; - public AgentsApi() { + public ApplicationDomainsApi() { this(Configuration.getDefaultApiClient()); } - public AgentsApi(ApiClient apiClient) { + public ApplicationDomainsApi(ApiClient apiClient) { this.localVarApiClient = apiClient; } @@ -77,8 +81,8 @@ public void setCustomBaseUrl(String customBaseUrl) { } /** - * Build call for createAgent - * @param agentPostRequest (required) + * Build call for createAppDomain + * @param appDomainPostRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -86,7 +90,7 @@ public void setCustomBaseUrl(String customBaseUrl) { - + @@ -94,7 +98,7 @@ public void setCustomBaseUrl(String customBaseUrl) {
Response Details
Status Code Description Response Headers
202 Agent object -
202 App Domain object -
400 Bad request -
401 Unauthorized -
403 Forbidden -
500 Internal server error -
*/ - public okhttp3.Call createAgentCall(@javax.annotation.Nonnull AgentPostRequest agentPostRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call createAppDomainCall(@javax.annotation.Nonnull AppDomainPostRequest appDomainPostRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -108,10 +112,10 @@ public okhttp3.Call createAgentCall(@javax.annotation.Nonnull AgentPostRequest a basePath = null; } - Object localVarPostBody = agentPostRequest; + Object localVarPostBody = appDomainPostRequest; // create path and map variables - String localVarPath = "/fabric/v4/agents"; + String localVarPath = "/fabric/v4/appDomains"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -140,27 +144,27 @@ public okhttp3.Call createAgentCall(@javax.annotation.Nonnull AgentPostRequest a } @SuppressWarnings("rawtypes") - private okhttp3.Call createAgentValidateBeforeCall(@javax.annotation.Nonnull AgentPostRequest agentPostRequest, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'agentPostRequest' is set - if (agentPostRequest == null) { - throw new ApiException("Missing the required parameter 'agentPostRequest' when calling createAgent(Async)"); + private okhttp3.Call createAppDomainValidateBeforeCall(@javax.annotation.Nonnull AppDomainPostRequest appDomainPostRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'appDomainPostRequest' is set + if (appDomainPostRequest == null) { + throw new ApiException("Missing the required parameter 'appDomainPostRequest' when calling createAppDomain(Async)"); } - return createAgentCall(agentPostRequest, _callback); + return createAppDomainCall(appDomainPostRequest, _callback); } /** - * Create Agent - * This API provides capability to create user's agent <font color=\"red\"> <sup color='red'>Beta</sup></font> - * @param agentPostRequest (required) - * @return Agents + * Create App Domain + * This API provides capability to create user's App Domain + * @param appDomainPostRequest (required) + * @return AppDomain * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - + @@ -168,22 +172,22 @@ private okhttp3.Call createAgentValidateBeforeCall(@javax.annotation.Nonnull Age
Response Details
Status Code Description Response Headers
202 Agent object -
202 App Domain object -
400 Bad request -
401 Unauthorized -
403 Forbidden -
500 Internal server error -
*/ - public Agents createAgent(@javax.annotation.Nonnull AgentPostRequest agentPostRequest) throws ApiException { - ApiResponse localVarResp = createAgentWithHttpInfo(agentPostRequest); + public AppDomain createAppDomain(@javax.annotation.Nonnull AppDomainPostRequest appDomainPostRequest) throws ApiException { + ApiResponse localVarResp = createAppDomainWithHttpInfo(appDomainPostRequest); return localVarResp.getData(); } /** - * Create Agent - * This API provides capability to create user's agent <font color=\"red\"> <sup color='red'>Beta</sup></font> - * @param agentPostRequest (required) - * @return ApiResponse<Agents> + * Create App Domain + * This API provides capability to create user's App Domain + * @param appDomainPostRequest (required) + * @return ApiResponse<AppDomain> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - + @@ -191,16 +195,16 @@ public Agents createAgent(@javax.annotation.Nonnull AgentPostRequest agentPostRe
Response Details
Status Code Description Response Headers
202 Agent object -
202 App Domain object -
400 Bad request -
401 Unauthorized -
403 Forbidden -
500 Internal server error -
*/ - public ApiResponse createAgentWithHttpInfo(@javax.annotation.Nonnull AgentPostRequest agentPostRequest) throws ApiException { - okhttp3.Call localVarCall = createAgentValidateBeforeCall(agentPostRequest, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse createAppDomainWithHttpInfo(@javax.annotation.Nonnull AppDomainPostRequest appDomainPostRequest) throws ApiException { + okhttp3.Call localVarCall = createAppDomainValidateBeforeCall(appDomainPostRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * Create Agent (asynchronously) - * This API provides capability to create user's agent <font color=\"red\"> <sup color='red'>Beta</sup></font> - * @param agentPostRequest (required) + * Create App Domain (asynchronously) + * This API provides capability to create user's App Domain + * @param appDomainPostRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -208,7 +212,7 @@ public ApiResponse createAgentWithHttpInfo(@javax.annotation.Nonnull Age - + @@ -216,18 +220,16 @@ public ApiResponse createAgentWithHttpInfo(@javax.annotation.Nonnull Age
Response Details
Status Code Description Response Headers
202 Agent object -
202 App Domain object -
400 Bad request -
401 Unauthorized -
403 Forbidden -
500 Internal server error -
*/ - public okhttp3.Call createAgentAsync(@javax.annotation.Nonnull AgentPostRequest agentPostRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call createAppDomainAsync(@javax.annotation.Nonnull AppDomainPostRequest appDomainPostRequest, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = createAgentValidateBeforeCall(agentPostRequest, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = createAppDomainValidateBeforeCall(appDomainPostRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for deleteAgentByUuid - * @param agentId Agent UUID (required) - * @param offset offset (optional) - * @param limit number of records to fetch (optional) + * Build call for deleteAppDomainByUuid + * @param appDomainId App Domain UUID (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -235,14 +237,15 @@ public okhttp3.Call createAgentAsync(@javax.annotation.Nonnull AgentPostRequest - + +
Response Details
Status Code Description Response Headers
202 Agent object -
202 App Domain object -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
*/ - public okhttp3.Call deleteAgentByUuidCall(@javax.annotation.Nonnull UUID agentId, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Integer limit, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteAppDomainByUuidCall(@javax.annotation.Nonnull UUID appDomainId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -259,8 +262,8 @@ public okhttp3.Call deleteAgentByUuidCall(@javax.annotation.Nonnull UUID agentId Object localVarPostBody = null; // create path and map variables - String localVarPath = "/fabric/v4/agents/{agentId}" - .replace("{" + "agentId" + "}", localVarApiClient.escapeString(agentId.toString())); + String localVarPath = "/fabric/v4/appDomains/{appDomainId}" + .replace("{" + "appDomainId" + "}", localVarApiClient.escapeString(appDomainId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -268,14 +271,6 @@ public okhttp3.Call deleteAgentByUuidCall(@javax.annotation.Nonnull UUID agentId Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - if (offset != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("offset", offset)); - } - - if (limit != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit)); - } - final String[] localVarAccepts = { "application/json" }; @@ -296,71 +291,67 @@ public okhttp3.Call deleteAgentByUuidCall(@javax.annotation.Nonnull UUID agentId } @SuppressWarnings("rawtypes") - private okhttp3.Call deleteAgentByUuidValidateBeforeCall(@javax.annotation.Nonnull UUID agentId, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Integer limit, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'agentId' is set - if (agentId == null) { - throw new ApiException("Missing the required parameter 'agentId' when calling deleteAgentByUuid(Async)"); + private okhttp3.Call deleteAppDomainByUuidValidateBeforeCall(@javax.annotation.Nonnull UUID appDomainId, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'appDomainId' is set + if (appDomainId == null) { + throw new ApiException("Missing the required parameter 'appDomainId' when calling deleteAppDomainByUuid(Async)"); } - return deleteAgentByUuidCall(agentId, offset, limit, _callback); + return deleteAppDomainByUuidCall(appDomainId, _callback); } /** - * Delete Agent by UUID - * This API provides capability to delete an agent by uuid <font color=\"red\"> <sup color='red'>Beta</sup></font> - * @param agentId Agent UUID (required) - * @param offset offset (optional) - * @param limit number of records to fetch (optional) - * @return Agents + * Delete App Domain + * This API provides capability to delete user's App Domain + * @param appDomainId App Domain UUID (required) + * @return AppDomain * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - + +
Response Details
Status Code Description Response Headers
202 Agent object -
202 App Domain object -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
*/ - public Agents deleteAgentByUuid(@javax.annotation.Nonnull UUID agentId, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Integer limit) throws ApiException { - ApiResponse localVarResp = deleteAgentByUuidWithHttpInfo(agentId, offset, limit); + public AppDomain deleteAppDomainByUuid(@javax.annotation.Nonnull UUID appDomainId) throws ApiException { + ApiResponse localVarResp = deleteAppDomainByUuidWithHttpInfo(appDomainId); return localVarResp.getData(); } /** - * Delete Agent by UUID - * This API provides capability to delete an agent by uuid <font color=\"red\"> <sup color='red'>Beta</sup></font> - * @param agentId Agent UUID (required) - * @param offset offset (optional) - * @param limit number of records to fetch (optional) - * @return ApiResponse<Agents> + * Delete App Domain + * This API provides capability to delete user's App Domain + * @param appDomainId App Domain UUID (required) + * @return ApiResponse<AppDomain> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - + +
Response Details
Status Code Description Response Headers
202 Agent object -
202 App Domain object -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
*/ - public ApiResponse deleteAgentByUuidWithHttpInfo(@javax.annotation.Nonnull UUID agentId, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Integer limit) throws ApiException { - okhttp3.Call localVarCall = deleteAgentByUuidValidateBeforeCall(agentId, offset, limit, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse deleteAppDomainByUuidWithHttpInfo(@javax.annotation.Nonnull UUID appDomainId) throws ApiException { + okhttp3.Call localVarCall = deleteAppDomainByUuidValidateBeforeCall(appDomainId, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * Delete Agent by UUID (asynchronously) - * This API provides capability to delete an agent by uuid <font color=\"red\"> <sup color='red'>Beta</sup></font> - * @param agentId Agent UUID (required) - * @param offset offset (optional) - * @param limit number of records to fetch (optional) + * Delete App Domain (asynchronously) + * This API provides capability to delete user's App Domain + * @param appDomainId App Domain UUID (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -368,25 +359,24 @@ public ApiResponse deleteAgentByUuidWithHttpInfo(@javax.annotation.Nonnu - + +
Response Details
Status Code Description Response Headers
202 Agent object -
202 App Domain object -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
*/ - public okhttp3.Call deleteAgentByUuidAsync(@javax.annotation.Nonnull UUID agentId, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Integer limit, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteAppDomainByUuidAsync(@javax.annotation.Nonnull UUID appDomainId, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = deleteAgentByUuidValidateBeforeCall(agentId, offset, limit, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = deleteAppDomainByUuidValidateBeforeCall(appDomainId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for getAgentActivities - * @param agentId Agent UUID (required) - * @param offset offset (optional) - * @param limit number of records to fetch (optional) + * Build call for getAppDomainByUuid + * @param appDomainId App Domain UUID (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -394,14 +384,14 @@ public okhttp3.Call deleteAgentByUuidAsync(@javax.annotation.Nonnull UUID agentI - +
Response Details
Status Code Description Response Headers
200 Successful operation -
200 App Domain object -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
*/ - public okhttp3.Call getAgentActivitiesCall(@javax.annotation.Nonnull UUID agentId, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Integer limit, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getAppDomainByUuidCall(@javax.annotation.Nonnull UUID appDomainId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -418,8 +408,8 @@ public okhttp3.Call getAgentActivitiesCall(@javax.annotation.Nonnull UUID agentI Object localVarPostBody = null; // create path and map variables - String localVarPath = "/fabric/v4/agents/{agentId}/activities" - .replace("{" + "agentId" + "}", localVarApiClient.escapeString(agentId.toString())); + String localVarPath = "/fabric/v4/appDomains/{appDomainId}" + .replace("{" + "appDomainId" + "}", localVarApiClient.escapeString(appDomainId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -427,14 +417,6 @@ public okhttp3.Call getAgentActivitiesCall(@javax.annotation.Nonnull UUID agentI Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - if (offset != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("offset", offset)); - } - - if (limit != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit)); - } - final String[] localVarAccepts = { "application/json" }; @@ -455,71 +437,65 @@ public okhttp3.Call getAgentActivitiesCall(@javax.annotation.Nonnull UUID agentI } @SuppressWarnings("rawtypes") - private okhttp3.Call getAgentActivitiesValidateBeforeCall(@javax.annotation.Nonnull UUID agentId, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Integer limit, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'agentId' is set - if (agentId == null) { - throw new ApiException("Missing the required parameter 'agentId' when calling getAgentActivities(Async)"); + private okhttp3.Call getAppDomainByUuidValidateBeforeCall(@javax.annotation.Nonnull UUID appDomainId, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'appDomainId' is set + if (appDomainId == null) { + throw new ApiException("Missing the required parameter 'appDomainId' when calling getAppDomainByUuid(Async)"); } - return getAgentActivitiesCall(agentId, offset, limit, _callback); + return getAppDomainByUuidCall(appDomainId, _callback); } /** - * Get Agent Activities - * This API provides capability to retrieve an agent activities <font color=\"red\"> <sup color='red'>Beta</sup></font> - * @param agentId Agent UUID (required) - * @param offset offset (optional) - * @param limit number of records to fetch (optional) - * @return AgentGetActivities + * Get App Domain + * This API provides capability to retrieve user's App Domain + * @param appDomainId App Domain UUID (required) + * @return AppDomain * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
Response Details
Status Code Description Response Headers
200 Successful operation -
200 App Domain object -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
*/ - public AgentGetActivities getAgentActivities(@javax.annotation.Nonnull UUID agentId, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Integer limit) throws ApiException { - ApiResponse localVarResp = getAgentActivitiesWithHttpInfo(agentId, offset, limit); + public AppDomain getAppDomainByUuid(@javax.annotation.Nonnull UUID appDomainId) throws ApiException { + ApiResponse localVarResp = getAppDomainByUuidWithHttpInfo(appDomainId); return localVarResp.getData(); } /** - * Get Agent Activities - * This API provides capability to retrieve an agent activities <font color=\"red\"> <sup color='red'>Beta</sup></font> - * @param agentId Agent UUID (required) - * @param offset offset (optional) - * @param limit number of records to fetch (optional) - * @return ApiResponse<AgentGetActivities> + * Get App Domain + * This API provides capability to retrieve user's App Domain + * @param appDomainId App Domain UUID (required) + * @return ApiResponse<AppDomain> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
Response Details
Status Code Description Response Headers
200 Successful operation -
200 App Domain object -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
*/ - public ApiResponse getAgentActivitiesWithHttpInfo(@javax.annotation.Nonnull UUID agentId, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Integer limit) throws ApiException { - okhttp3.Call localVarCall = getAgentActivitiesValidateBeforeCall(agentId, offset, limit, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse getAppDomainByUuidWithHttpInfo(@javax.annotation.Nonnull UUID appDomainId) throws ApiException { + okhttp3.Call localVarCall = getAppDomainByUuidValidateBeforeCall(appDomainId, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * Get Agent Activities (asynchronously) - * This API provides capability to retrieve an agent activities <font color=\"red\"> <sup color='red'>Beta</sup></font> - * @param agentId Agent UUID (required) - * @param offset offset (optional) - * @param limit number of records to fetch (optional) + * Get App Domain (asynchronously) + * This API provides capability to retrieve user's App Domain + * @param appDomainId App Domain UUID (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -527,25 +503,28 @@ public ApiResponse getAgentActivitiesWithHttpInfo(@javax.ann - +
Response Details
Status Code Description Response Headers
200 Successful operation -
200 App Domain object -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
*/ - public okhttp3.Call getAgentActivitiesAsync(@javax.annotation.Nonnull UUID agentId, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Integer limit, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getAppDomainByUuidAsync(@javax.annotation.Nonnull UUID appDomainId, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = getAgentActivitiesValidateBeforeCall(agentId, offset, limit, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = getAppDomainByUuidValidateBeforeCall(appDomainId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for getAgentByUuid - * @param agentId Agent UUID (required) + * Build call for getAttachedAppLinksByAppDomainId + * @param appDomainId App Domain UUID (required) * @param offset offset (optional) * @param limit number of records to fetch (optional) + * @param state Filter attached App Links by one or more lifecycle states. (optional) + * @param order Sort order for attached App Links. (optional, default to DESC) + * @param style Detail level of the response. (optional, default to MEDIUM) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -553,14 +532,15 @@ public okhttp3.Call getAgentActivitiesAsync(@javax.annotation.Nonnull UUID agent - + +
Response Details
Status Code Description Response Headers
200 Agent object -
200 Successful operation -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
*/ - public okhttp3.Call getAgentByUuidCall(@javax.annotation.Nonnull UUID agentId, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Integer limit, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getAttachedAppLinksByAppDomainIdCall(@javax.annotation.Nonnull UUID appDomainId, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Integer limit, @javax.annotation.Nullable List state, @javax.annotation.Nullable AttachedAppLinkOrder order, @javax.annotation.Nullable Style style, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -577,8 +557,8 @@ public okhttp3.Call getAgentByUuidCall(@javax.annotation.Nonnull UUID agentId, @ Object localVarPostBody = null; // create path and map variables - String localVarPath = "/fabric/v4/agents/{agentId}" - .replace("{" + "agentId" + "}", localVarApiClient.escapeString(agentId.toString())); + String localVarPath = "/fabric/v4/appDomains/{appDomainId}/appLinks" + .replace("{" + "appDomainId" + "}", localVarApiClient.escapeString(appDomainId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -594,6 +574,18 @@ public okhttp3.Call getAgentByUuidCall(@javax.annotation.Nonnull UUID agentId, @ localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit)); } + if (state != null) { + localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "state", state)); + } + + if (order != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("order", order)); + } + + if (style != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("style", style)); + } + final String[] localVarAccepts = { "application/json" }; @@ -614,71 +606,82 @@ public okhttp3.Call getAgentByUuidCall(@javax.annotation.Nonnull UUID agentId, @ } @SuppressWarnings("rawtypes") - private okhttp3.Call getAgentByUuidValidateBeforeCall(@javax.annotation.Nonnull UUID agentId, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Integer limit, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'agentId' is set - if (agentId == null) { - throw new ApiException("Missing the required parameter 'agentId' when calling getAgentByUuid(Async)"); + private okhttp3.Call getAttachedAppLinksByAppDomainIdValidateBeforeCall(@javax.annotation.Nonnull UUID appDomainId, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Integer limit, @javax.annotation.Nullable List state, @javax.annotation.Nullable AttachedAppLinkOrder order, @javax.annotation.Nullable Style style, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'appDomainId' is set + if (appDomainId == null) { + throw new ApiException("Missing the required parameter 'appDomainId' when calling getAttachedAppLinksByAppDomainId(Async)"); } - return getAgentByUuidCall(agentId, offset, limit, _callback); + return getAttachedAppLinksByAppDomainIdCall(appDomainId, offset, limit, state, order, style, _callback); } /** - * Get Agent by UUID - * This API provides capability to retrieve an agent by uuid <font color=\"red\"> <sup color='red'>Beta</sup></font> - * @param agentId Agent UUID (required) + * Get attached App Links for App Domain + * This API provides capability to retrieve App Links attached to an App Domain. + * @param appDomainId App Domain UUID (required) * @param offset offset (optional) * @param limit number of records to fetch (optional) - * @return Agents + * @param state Filter attached App Links by one or more lifecycle states. (optional) + * @param order Sort order for attached App Links. (optional, default to DESC) + * @param style Detail level of the response. (optional, default to MEDIUM) + * @return AppDomainAttachedAppLinks * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - + +
Response Details
Status Code Description Response Headers
200 Agent object -
200 Successful operation -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
*/ - public Agents getAgentByUuid(@javax.annotation.Nonnull UUID agentId, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Integer limit) throws ApiException { - ApiResponse localVarResp = getAgentByUuidWithHttpInfo(agentId, offset, limit); + public AppDomainAttachedAppLinks getAttachedAppLinksByAppDomainId(@javax.annotation.Nonnull UUID appDomainId, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Integer limit, @javax.annotation.Nullable List state, @javax.annotation.Nullable AttachedAppLinkOrder order, @javax.annotation.Nullable Style style) throws ApiException { + ApiResponse localVarResp = getAttachedAppLinksByAppDomainIdWithHttpInfo(appDomainId, offset, limit, state, order, style); return localVarResp.getData(); } /** - * Get Agent by UUID - * This API provides capability to retrieve an agent by uuid <font color=\"red\"> <sup color='red'>Beta</sup></font> - * @param agentId Agent UUID (required) + * Get attached App Links for App Domain + * This API provides capability to retrieve App Links attached to an App Domain. + * @param appDomainId App Domain UUID (required) * @param offset offset (optional) * @param limit number of records to fetch (optional) - * @return ApiResponse<Agents> + * @param state Filter attached App Links by one or more lifecycle states. (optional) + * @param order Sort order for attached App Links. (optional, default to DESC) + * @param style Detail level of the response. (optional, default to MEDIUM) + * @return ApiResponse<AppDomainAttachedAppLinks> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - + +
Response Details
Status Code Description Response Headers
200 Agent object -
200 Successful operation -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
*/ - public ApiResponse getAgentByUuidWithHttpInfo(@javax.annotation.Nonnull UUID agentId, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Integer limit) throws ApiException { - okhttp3.Call localVarCall = getAgentByUuidValidateBeforeCall(agentId, offset, limit, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse getAttachedAppLinksByAppDomainIdWithHttpInfo(@javax.annotation.Nonnull UUID appDomainId, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Integer limit, @javax.annotation.Nullable List state, @javax.annotation.Nullable AttachedAppLinkOrder order, @javax.annotation.Nullable Style style) throws ApiException { + okhttp3.Call localVarCall = getAttachedAppLinksByAppDomainIdValidateBeforeCall(appDomainId, offset, limit, state, order, style, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * Get Agent by UUID (asynchronously) - * This API provides capability to retrieve an agent by uuid <font color=\"red\"> <sup color='red'>Beta</sup></font> - * @param agentId Agent UUID (required) + * Get attached App Links for App Domain (asynchronously) + * This API provides capability to retrieve App Links attached to an App Domain. + * @param appDomainId App Domain UUID (required) * @param offset offset (optional) * @param limit number of records to fetch (optional) + * @param state Filter attached App Links by one or more lifecycle states. (optional) + * @param order Sort order for attached App Links. (optional, default to DESC) + * @param style Detail level of the response. (optional, default to MEDIUM) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -686,24 +689,24 @@ public ApiResponse getAgentByUuidWithHttpInfo(@javax.annotation.Nonnull - + +
Response Details
Status Code Description Response Headers
200 Agent object -
200 Successful operation -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
*/ - public okhttp3.Call getAgentByUuidAsync(@javax.annotation.Nonnull UUID agentId, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Integer limit, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getAttachedAppLinksByAppDomainIdAsync(@javax.annotation.Nonnull UUID appDomainId, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Integer limit, @javax.annotation.Nullable List state, @javax.annotation.Nullable AttachedAppLinkOrder order, @javax.annotation.Nullable Style style, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = getAgentByUuidValidateBeforeCall(agentId, offset, limit, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = getAttachedAppLinksByAppDomainIdValidateBeforeCall(appDomainId, offset, limit, state, order, style, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for getAgents - * @param offset offset (optional) - * @param limit number of records to fetch (optional) + * Build call for searchAppDomains + * @param appDomainSearchRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -712,13 +715,14 @@ public okhttp3.Call getAgentByUuidAsync(@javax.annotation.Nonnull UUID agentId, Response Details Status Code Description Response Headers 200 Successful operation - + 400 Bad request - 401 Unauthorized - 403 Forbidden - - 404 Not Found - + 415 Unsupported Media Type - 500 Internal server error - */ - public okhttp3.Call getAgentsCall(@javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Integer limit, final ApiCallback _callback) throws ApiException { + public okhttp3.Call searchAppDomainsCall(@javax.annotation.Nonnull AppDomainSearchRequest appDomainSearchRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -732,10 +736,10 @@ public okhttp3.Call getAgentsCall(@javax.annotation.Nullable Integer offset, @ja basePath = null; } - Object localVarPostBody = null; + Object localVarPostBody = appDomainSearchRequest; // create path and map variables - String localVarPath = "/fabric/v4/agents"; + String localVarPath = "/fabric/v4/appDomains/search"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -743,14 +747,6 @@ public okhttp3.Call getAgentsCall(@javax.annotation.Nullable Integer offset, @ja Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - if (offset != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("offset", offset)); - } - - if (limit != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit)); - } - final String[] localVarAccepts = { "application/json" }; @@ -760,6 +756,7 @@ public okhttp3.Call getAgentsCall(@javax.annotation.Nullable Integer offset, @ja } final String[] localVarContentTypes = { + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -767,67 +764,71 @@ public okhttp3.Call getAgentsCall(@javax.annotation.Nullable Integer offset, @ja } String[] localVarAuthNames = new String[] { "BearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call getAgentsValidateBeforeCall(@javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Integer limit, final ApiCallback _callback) throws ApiException { - return getAgentsCall(offset, limit, _callback); + private okhttp3.Call searchAppDomainsValidateBeforeCall(@javax.annotation.Nonnull AppDomainSearchRequest appDomainSearchRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'appDomainSearchRequest' is set + if (appDomainSearchRequest == null) { + throw new ApiException("Missing the required parameter 'appDomainSearchRequest' when calling searchAppDomains(Async)"); + } + + return searchAppDomainsCall(appDomainSearchRequest, _callback); } /** - * Get Agents - * This API provides capability to retrieve agents <font color=\"red\"> <sup color='red'>Beta</sup></font> - * @param offset offset (optional) - * @param limit number of records to fetch (optional) - * @return AgentGetAllResponse + * Search App Domains + * The API provides capability to get list of user's App Domains using search criteria, including optional filtering, pagination and sorting + * @param appDomainSearchRequest (required) + * @return AppDomainSearchResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details + - +
Response Details
Status Code Description Response Headers
200 Successful operation -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
415 Unsupported Media Type -
500 Internal server error -
*/ - public AgentGetAllResponse getAgents(@javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Integer limit) throws ApiException { - ApiResponse localVarResp = getAgentsWithHttpInfo(offset, limit); + public AppDomainSearchResponse searchAppDomains(@javax.annotation.Nonnull AppDomainSearchRequest appDomainSearchRequest) throws ApiException { + ApiResponse localVarResp = searchAppDomainsWithHttpInfo(appDomainSearchRequest); return localVarResp.getData(); } /** - * Get Agents - * This API provides capability to retrieve agents <font color=\"red\"> <sup color='red'>Beta</sup></font> - * @param offset offset (optional) - * @param limit number of records to fetch (optional) - * @return ApiResponse<AgentGetAllResponse> + * Search App Domains + * The API provides capability to get list of user's App Domains using search criteria, including optional filtering, pagination and sorting + * @param appDomainSearchRequest (required) + * @return ApiResponse<AppDomainSearchResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details + - +
Response Details
Status Code Description Response Headers
200 Successful operation -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
415 Unsupported Media Type -
500 Internal server error -
*/ - public ApiResponse getAgentsWithHttpInfo(@javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Integer limit) throws ApiException { - okhttp3.Call localVarCall = getAgentsValidateBeforeCall(offset, limit, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse searchAppDomainsWithHttpInfo(@javax.annotation.Nonnull AppDomainSearchRequest appDomainSearchRequest) throws ApiException { + okhttp3.Call localVarCall = searchAppDomainsValidateBeforeCall(appDomainSearchRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * Get Agents (asynchronously) - * This API provides capability to retrieve agents <font color=\"red\"> <sup color='red'>Beta</sup></font> - * @param offset offset (optional) - * @param limit number of records to fetch (optional) + * Search App Domains (asynchronously) + * The API provides capability to get list of user's App Domains using search criteria, including optional filtering, pagination and sorting + * @param appDomainSearchRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -836,23 +837,24 @@ public ApiResponse getAgentsWithHttpInfo(@javax.annotation. Response Details Status Code Description Response Headers 200 Successful operation - + 400 Bad request - 401 Unauthorized - 403 Forbidden - - 404 Not Found - + 415 Unsupported Media Type - 500 Internal server error - */ - public okhttp3.Call getAgentsAsync(@javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Integer limit, final ApiCallback _callback) throws ApiException { + public okhttp3.Call searchAppDomainsAsync(@javax.annotation.Nonnull AppDomainSearchRequest appDomainSearchRequest, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = getAgentsValidateBeforeCall(offset, limit, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = searchAppDomainsValidateBeforeCall(appDomainSearchRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for patchAgentByUuid - * @param agentId Agent UUID (required) - * @param agentPatchRequest (required) + * Build call for updateAppDomainByUuid + * @param appDomainId App Domain UUID (required) + * @param appDomainChangeOperation (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -860,14 +862,16 @@ public okhttp3.Call getAgentsAsync(@javax.annotation.Nullable Integer offset, @j - + + +
Response Details
Status Code Description Response Headers
202 Agent object -
202 App Domain object -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
415 Unsupported Media Type -
500 Internal server error -
*/ - public okhttp3.Call patchAgentByUuidCall(@javax.annotation.Nonnull UUID agentId, @javax.annotation.Nonnull AgentPatchRequest agentPatchRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call updateAppDomainByUuidCall(@javax.annotation.Nonnull UUID appDomainId, @javax.annotation.Nonnull List appDomainChangeOperation, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -881,11 +885,11 @@ public okhttp3.Call patchAgentByUuidCall(@javax.annotation.Nonnull UUID agentId, basePath = null; } - Object localVarPostBody = agentPatchRequest; + Object localVarPostBody = appDomainChangeOperation; // create path and map variables - String localVarPath = "/fabric/v4/agents/{agentId}" - .replace("{" + "agentId" + "}", localVarApiClient.escapeString(agentId.toString())); + String localVarPath = "/fabric/v4/appDomains/{appDomainId}" + .replace("{" + "appDomainId" + "}", localVarApiClient.escapeString(appDomainId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -902,7 +906,7 @@ public okhttp3.Call patchAgentByUuidCall(@javax.annotation.Nonnull UUID agentId, } final String[] localVarContentTypes = { - "application/json" + "application/json-patch+json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -914,73 +918,77 @@ public okhttp3.Call patchAgentByUuidCall(@javax.annotation.Nonnull UUID agentId, } @SuppressWarnings("rawtypes") - private okhttp3.Call patchAgentByUuidValidateBeforeCall(@javax.annotation.Nonnull UUID agentId, @javax.annotation.Nonnull AgentPatchRequest agentPatchRequest, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'agentId' is set - if (agentId == null) { - throw new ApiException("Missing the required parameter 'agentId' when calling patchAgentByUuid(Async)"); + private okhttp3.Call updateAppDomainByUuidValidateBeforeCall(@javax.annotation.Nonnull UUID appDomainId, @javax.annotation.Nonnull List appDomainChangeOperation, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'appDomainId' is set + if (appDomainId == null) { + throw new ApiException("Missing the required parameter 'appDomainId' when calling updateAppDomainByUuid(Async)"); } - // verify the required parameter 'agentPatchRequest' is set - if (agentPatchRequest == null) { - throw new ApiException("Missing the required parameter 'agentPatchRequest' when calling patchAgentByUuid(Async)"); + // verify the required parameter 'appDomainChangeOperation' is set + if (appDomainChangeOperation == null) { + throw new ApiException("Missing the required parameter 'appDomainChangeOperation' when calling updateAppDomainByUuid(Async)"); } - return patchAgentByUuidCall(agentId, agentPatchRequest, _callback); + return updateAppDomainByUuidCall(appDomainId, appDomainChangeOperation, _callback); } /** - * Update Agent by UUID - * This API provides capability to update an agent by uuid <font color=\"red\"> <sup color='red'>Beta</sup></font> - * @param agentId Agent UUID (required) - * @param agentPatchRequest (required) - * @return Agents + * Update App Domain + * This API provides capability to update user's App Domain + * @param appDomainId App Domain UUID (required) + * @param appDomainChangeOperation (required) + * @return AppDomain * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - + + +
Response Details
Status Code Description Response Headers
202 Agent object -
202 App Domain object -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
415 Unsupported Media Type -
500 Internal server error -
*/ - public Agents patchAgentByUuid(@javax.annotation.Nonnull UUID agentId, @javax.annotation.Nonnull AgentPatchRequest agentPatchRequest) throws ApiException { - ApiResponse localVarResp = patchAgentByUuidWithHttpInfo(agentId, agentPatchRequest); + public AppDomain updateAppDomainByUuid(@javax.annotation.Nonnull UUID appDomainId, @javax.annotation.Nonnull List appDomainChangeOperation) throws ApiException { + ApiResponse localVarResp = updateAppDomainByUuidWithHttpInfo(appDomainId, appDomainChangeOperation); return localVarResp.getData(); } /** - * Update Agent by UUID - * This API provides capability to update an agent by uuid <font color=\"red\"> <sup color='red'>Beta</sup></font> - * @param agentId Agent UUID (required) - * @param agentPatchRequest (required) - * @return ApiResponse<Agents> + * Update App Domain + * This API provides capability to update user's App Domain + * @param appDomainId App Domain UUID (required) + * @param appDomainChangeOperation (required) + * @return ApiResponse<AppDomain> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - + + +
Response Details
Status Code Description Response Headers
202 Agent object -
202 App Domain object -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
415 Unsupported Media Type -
500 Internal server error -
*/ - public ApiResponse patchAgentByUuidWithHttpInfo(@javax.annotation.Nonnull UUID agentId, @javax.annotation.Nonnull AgentPatchRequest agentPatchRequest) throws ApiException { - okhttp3.Call localVarCall = patchAgentByUuidValidateBeforeCall(agentId, agentPatchRequest, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse updateAppDomainByUuidWithHttpInfo(@javax.annotation.Nonnull UUID appDomainId, @javax.annotation.Nonnull List appDomainChangeOperation) throws ApiException { + okhttp3.Call localVarCall = updateAppDomainByUuidValidateBeforeCall(appDomainId, appDomainChangeOperation, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * Update Agent by UUID (asynchronously) - * This API provides capability to update an agent by uuid <font color=\"red\"> <sup color='red'>Beta</sup></font> - * @param agentId Agent UUID (required) - * @param agentPatchRequest (required) + * Update App Domain (asynchronously) + * This API provides capability to update user's App Domain + * @param appDomainId App Domain UUID (required) + * @param appDomainChangeOperation (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -988,17 +996,19 @@ public ApiResponse patchAgentByUuidWithHttpInfo(@javax.annotation.Nonnul - + + +
Response Details
Status Code Description Response Headers
202 Agent object -
202 App Domain object -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
415 Unsupported Media Type -
500 Internal server error -
*/ - public okhttp3.Call patchAgentByUuidAsync(@javax.annotation.Nonnull UUID agentId, @javax.annotation.Nonnull AgentPatchRequest agentPatchRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call updateAppDomainByUuidAsync(@javax.annotation.Nonnull UUID appDomainId, @javax.annotation.Nonnull List appDomainChangeOperation, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = patchAgentByUuidValidateBeforeCall(agentId, agentPatchRequest, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = updateAppDomainByUuidValidateBeforeCall(appDomainId, appDomainChangeOperation, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/api/ApplicationLinksApi.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/api/ApplicationLinksApi.java new file mode 100644 index 00000000..eb4c4e0e --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/api/ApplicationLinksApi.java @@ -0,0 +1,2637 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.api; + +import com.equinix.sdk.fabricv4.ApiCallback; +import com.equinix.sdk.fabricv4.ApiClient; +import com.equinix.sdk.fabricv4.ApiException; +import com.equinix.sdk.fabricv4.ApiResponse; +import com.equinix.sdk.fabricv4.Configuration; +import com.equinix.sdk.fabricv4.Pair; +import com.equinix.sdk.fabricv4.ProgressRequestBody; +import com.equinix.sdk.fabricv4.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + +import com.equinix.sdk.fabricv4.model.AppLink; +import com.equinix.sdk.fabricv4.model.AppLinkAppDomainAttachment; +import com.equinix.sdk.fabricv4.model.AppLinkAppServiceAttachment; +import com.equinix.sdk.fabricv4.model.AppLinkAppServiceAttachmentChangeOperation; +import com.equinix.sdk.fabricv4.model.AppLinkAttachDomainSearchRequest; +import com.equinix.sdk.fabricv4.model.AppLinkAttachDomainSearchResponse; +import com.equinix.sdk.fabricv4.model.AppLinkAttachServiceRequest; +import com.equinix.sdk.fabricv4.model.AppLinkAttachServiceSearchRequest; +import com.equinix.sdk.fabricv4.model.AppLinkAttachServiceSearchResponse; +import com.equinix.sdk.fabricv4.model.AppLinkAttachState; +import com.equinix.sdk.fabricv4.model.AppLinkAttachedAppDomains; +import com.equinix.sdk.fabricv4.model.AppLinkAttachedAppServices; +import com.equinix.sdk.fabricv4.model.AppLinkChangeOperation; +import com.equinix.sdk.fabricv4.model.AppLinkPostRequest; +import com.equinix.sdk.fabricv4.model.AppLinkSearchRequest; +import com.equinix.sdk.fabricv4.model.AppLinkSearchResponse; +import com.equinix.sdk.fabricv4.model.AttachedAppDomainOrder; +import com.equinix.sdk.fabricv4.model.AttachedAppServiceOrder; +import com.equinix.sdk.fabricv4.model.Error; +import com.equinix.sdk.fabricv4.model.Style; +import java.util.UUID; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class ApplicationLinksApi { + private ApiClient localVarApiClient; + private int localHostIndex; + private String localCustomBaseUrl; + + public ApplicationLinksApi() { + this(Configuration.getDefaultApiClient()); + } + + public ApplicationLinksApi(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + /** + * Build call for attachAppDomainToAppLink + * @param appLinkId App Link UUID (required) + * @param appDomainId App Domain UUID (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
202 Attach App Domain object -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
+ */ + public okhttp3.Call attachAppDomainToAppLinkCall(@javax.annotation.Nonnull UUID appLinkId, @javax.annotation.Nonnull UUID appDomainId, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/fabric/v4/appLinks/{appLinkId}/appDomains/{appDomainId}" + .replace("{" + "appLinkId" + "}", localVarApiClient.escapeString(appLinkId.toString())) + .replace("{" + "appDomainId" + "}", localVarApiClient.escapeString(appDomainId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "BearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call attachAppDomainToAppLinkValidateBeforeCall(@javax.annotation.Nonnull UUID appLinkId, @javax.annotation.Nonnull UUID appDomainId, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'appLinkId' is set + if (appLinkId == null) { + throw new ApiException("Missing the required parameter 'appLinkId' when calling attachAppDomainToAppLink(Async)"); + } + + // verify the required parameter 'appDomainId' is set + if (appDomainId == null) { + throw new ApiException("Missing the required parameter 'appDomainId' when calling attachAppDomainToAppLink(Async)"); + } + + return attachAppDomainToAppLinkCall(appLinkId, appDomainId, _callback); + + } + + /** + * Attach App Domain to App Link + * This API provides ability to attach the user's App Domain to App Link. + * @param appLinkId App Link UUID (required) + * @param appDomainId App Domain UUID (required) + * @return AppLinkAppDomainAttachment + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
202 Attach App Domain object -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
+ */ + public AppLinkAppDomainAttachment attachAppDomainToAppLink(@javax.annotation.Nonnull UUID appLinkId, @javax.annotation.Nonnull UUID appDomainId) throws ApiException { + ApiResponse localVarResp = attachAppDomainToAppLinkWithHttpInfo(appLinkId, appDomainId); + return localVarResp.getData(); + } + + /** + * Attach App Domain to App Link + * This API provides ability to attach the user's App Domain to App Link. + * @param appLinkId App Link UUID (required) + * @param appDomainId App Domain UUID (required) + * @return ApiResponse<AppLinkAppDomainAttachment> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
202 Attach App Domain object -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
+ */ + public ApiResponse attachAppDomainToAppLinkWithHttpInfo(@javax.annotation.Nonnull UUID appLinkId, @javax.annotation.Nonnull UUID appDomainId) throws ApiException { + okhttp3.Call localVarCall = attachAppDomainToAppLinkValidateBeforeCall(appLinkId, appDomainId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Attach App Domain to App Link (asynchronously) + * This API provides ability to attach the user's App Domain to App Link. + * @param appLinkId App Link UUID (required) + * @param appDomainId App Domain UUID (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
202 Attach App Domain object -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
+ */ + public okhttp3.Call attachAppDomainToAppLinkAsync(@javax.annotation.Nonnull UUID appLinkId, @javax.annotation.Nonnull UUID appDomainId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = attachAppDomainToAppLinkValidateBeforeCall(appLinkId, appDomainId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for attachAppServiceToAppLink + * @param appLinkId App Link UUID (required) + * @param appServiceId App Service UUID (required) + * @param appLinkAttachServiceRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
202 Attach App Service object -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
+ */ + public okhttp3.Call attachAppServiceToAppLinkCall(@javax.annotation.Nonnull UUID appLinkId, @javax.annotation.Nonnull UUID appServiceId, @javax.annotation.Nonnull AppLinkAttachServiceRequest appLinkAttachServiceRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = appLinkAttachServiceRequest; + + // create path and map variables + String localVarPath = "/fabric/v4/appLinks/{appLinkId}/appServices/{appServiceId}" + .replace("{" + "appLinkId" + "}", localVarApiClient.escapeString(appLinkId.toString())) + .replace("{" + "appServiceId" + "}", localVarApiClient.escapeString(appServiceId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "BearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call attachAppServiceToAppLinkValidateBeforeCall(@javax.annotation.Nonnull UUID appLinkId, @javax.annotation.Nonnull UUID appServiceId, @javax.annotation.Nonnull AppLinkAttachServiceRequest appLinkAttachServiceRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'appLinkId' is set + if (appLinkId == null) { + throw new ApiException("Missing the required parameter 'appLinkId' when calling attachAppServiceToAppLink(Async)"); + } + + // verify the required parameter 'appServiceId' is set + if (appServiceId == null) { + throw new ApiException("Missing the required parameter 'appServiceId' when calling attachAppServiceToAppLink(Async)"); + } + + // verify the required parameter 'appLinkAttachServiceRequest' is set + if (appLinkAttachServiceRequest == null) { + throw new ApiException("Missing the required parameter 'appLinkAttachServiceRequest' when calling attachAppServiceToAppLink(Async)"); + } + + return attachAppServiceToAppLinkCall(appLinkId, appServiceId, appLinkAttachServiceRequest, _callback); + + } + + /** + * Attach App Service to App Link + * This API provides ability to attach the user's App Service to App Link. + * @param appLinkId App Link UUID (required) + * @param appServiceId App Service UUID (required) + * @param appLinkAttachServiceRequest (required) + * @return AppLinkAppServiceAttachment + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
202 Attach App Service object -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
+ */ + public AppLinkAppServiceAttachment attachAppServiceToAppLink(@javax.annotation.Nonnull UUID appLinkId, @javax.annotation.Nonnull UUID appServiceId, @javax.annotation.Nonnull AppLinkAttachServiceRequest appLinkAttachServiceRequest) throws ApiException { + ApiResponse localVarResp = attachAppServiceToAppLinkWithHttpInfo(appLinkId, appServiceId, appLinkAttachServiceRequest); + return localVarResp.getData(); + } + + /** + * Attach App Service to App Link + * This API provides ability to attach the user's App Service to App Link. + * @param appLinkId App Link UUID (required) + * @param appServiceId App Service UUID (required) + * @param appLinkAttachServiceRequest (required) + * @return ApiResponse<AppLinkAppServiceAttachment> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
202 Attach App Service object -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
+ */ + public ApiResponse attachAppServiceToAppLinkWithHttpInfo(@javax.annotation.Nonnull UUID appLinkId, @javax.annotation.Nonnull UUID appServiceId, @javax.annotation.Nonnull AppLinkAttachServiceRequest appLinkAttachServiceRequest) throws ApiException { + okhttp3.Call localVarCall = attachAppServiceToAppLinkValidateBeforeCall(appLinkId, appServiceId, appLinkAttachServiceRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Attach App Service to App Link (asynchronously) + * This API provides ability to attach the user's App Service to App Link. + * @param appLinkId App Link UUID (required) + * @param appServiceId App Service UUID (required) + * @param appLinkAttachServiceRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
202 Attach App Service object -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
+ */ + public okhttp3.Call attachAppServiceToAppLinkAsync(@javax.annotation.Nonnull UUID appLinkId, @javax.annotation.Nonnull UUID appServiceId, @javax.annotation.Nonnull AppLinkAttachServiceRequest appLinkAttachServiceRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = attachAppServiceToAppLinkValidateBeforeCall(appLinkId, appServiceId, appLinkAttachServiceRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for createAppLink + * @param appLinkPostRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
202 App Link object -
400 Bad request -
401 Unauthorized -
403 Forbidden -
415 Unsupported Media Type -
500 Internal server error -
+ */ + public okhttp3.Call createAppLinkCall(@javax.annotation.Nonnull AppLinkPostRequest appLinkPostRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = appLinkPostRequest; + + // create path and map variables + String localVarPath = "/fabric/v4/appLinks"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "BearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call createAppLinkValidateBeforeCall(@javax.annotation.Nonnull AppLinkPostRequest appLinkPostRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'appLinkPostRequest' is set + if (appLinkPostRequest == null) { + throw new ApiException("Missing the required parameter 'appLinkPostRequest' when calling createAppLink(Async)"); + } + + return createAppLinkCall(appLinkPostRequest, _callback); + + } + + /** + * Create App Link + * This API provides capability to create user's App Link + * @param appLinkPostRequest (required) + * @return AppLink + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
202 App Link object -
400 Bad request -
401 Unauthorized -
403 Forbidden -
415 Unsupported Media Type -
500 Internal server error -
+ */ + public AppLink createAppLink(@javax.annotation.Nonnull AppLinkPostRequest appLinkPostRequest) throws ApiException { + ApiResponse localVarResp = createAppLinkWithHttpInfo(appLinkPostRequest); + return localVarResp.getData(); + } + + /** + * Create App Link + * This API provides capability to create user's App Link + * @param appLinkPostRequest (required) + * @return ApiResponse<AppLink> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
202 App Link object -
400 Bad request -
401 Unauthorized -
403 Forbidden -
415 Unsupported Media Type -
500 Internal server error -
+ */ + public ApiResponse createAppLinkWithHttpInfo(@javax.annotation.Nonnull AppLinkPostRequest appLinkPostRequest) throws ApiException { + okhttp3.Call localVarCall = createAppLinkValidateBeforeCall(appLinkPostRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Create App Link (asynchronously) + * This API provides capability to create user's App Link + * @param appLinkPostRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
202 App Link object -
400 Bad request -
401 Unauthorized -
403 Forbidden -
415 Unsupported Media Type -
500 Internal server error -
+ */ + public okhttp3.Call createAppLinkAsync(@javax.annotation.Nonnull AppLinkPostRequest appLinkPostRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = createAppLinkValidateBeforeCall(appLinkPostRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for deleteAppLinkByUuid + * @param appLinkId App Link UUID (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
202 App Link object -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
+ */ + public okhttp3.Call deleteAppLinkByUuidCall(@javax.annotation.Nonnull UUID appLinkId, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/fabric/v4/appLinks/{appLinkId}" + .replace("{" + "appLinkId" + "}", localVarApiClient.escapeString(appLinkId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "BearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call deleteAppLinkByUuidValidateBeforeCall(@javax.annotation.Nonnull UUID appLinkId, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'appLinkId' is set + if (appLinkId == null) { + throw new ApiException("Missing the required parameter 'appLinkId' when calling deleteAppLinkByUuid(Async)"); + } + + return deleteAppLinkByUuidCall(appLinkId, _callback); + + } + + /** + * Delete App Link + * This API provides capability to delete user's App Link + * @param appLinkId App Link UUID (required) + * @return AppLink + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
202 App Link object -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
+ */ + public AppLink deleteAppLinkByUuid(@javax.annotation.Nonnull UUID appLinkId) throws ApiException { + ApiResponse localVarResp = deleteAppLinkByUuidWithHttpInfo(appLinkId); + return localVarResp.getData(); + } + + /** + * Delete App Link + * This API provides capability to delete user's App Link + * @param appLinkId App Link UUID (required) + * @return ApiResponse<AppLink> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
202 App Link object -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
+ */ + public ApiResponse deleteAppLinkByUuidWithHttpInfo(@javax.annotation.Nonnull UUID appLinkId) throws ApiException { + okhttp3.Call localVarCall = deleteAppLinkByUuidValidateBeforeCall(appLinkId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Delete App Link (asynchronously) + * This API provides capability to delete user's App Link + * @param appLinkId App Link UUID (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
202 App Link object -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
+ */ + public okhttp3.Call deleteAppLinkByUuidAsync(@javax.annotation.Nonnull UUID appLinkId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = deleteAppLinkByUuidValidateBeforeCall(appLinkId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for detachAppDomainFromAppLink + * @param appLinkId App Link UUID (required) + * @param appDomainId App Domain UUID (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
202 Detach App Domain object -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
+ */ + public okhttp3.Call detachAppDomainFromAppLinkCall(@javax.annotation.Nonnull UUID appLinkId, @javax.annotation.Nonnull UUID appDomainId, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/fabric/v4/appLinks/{appLinkId}/appDomains/{appDomainId}" + .replace("{" + "appLinkId" + "}", localVarApiClient.escapeString(appLinkId.toString())) + .replace("{" + "appDomainId" + "}", localVarApiClient.escapeString(appDomainId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "BearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call detachAppDomainFromAppLinkValidateBeforeCall(@javax.annotation.Nonnull UUID appLinkId, @javax.annotation.Nonnull UUID appDomainId, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'appLinkId' is set + if (appLinkId == null) { + throw new ApiException("Missing the required parameter 'appLinkId' when calling detachAppDomainFromAppLink(Async)"); + } + + // verify the required parameter 'appDomainId' is set + if (appDomainId == null) { + throw new ApiException("Missing the required parameter 'appDomainId' when calling detachAppDomainFromAppLink(Async)"); + } + + return detachAppDomainFromAppLinkCall(appLinkId, appDomainId, _callback); + + } + + /** + * Detach App Domain from App Link + * This API provides ability to detach App Domain from App Link + * @param appLinkId App Link UUID (required) + * @param appDomainId App Domain UUID (required) + * @return AppLinkAppDomainAttachment + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
202 Detach App Domain object -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
+ */ + public AppLinkAppDomainAttachment detachAppDomainFromAppLink(@javax.annotation.Nonnull UUID appLinkId, @javax.annotation.Nonnull UUID appDomainId) throws ApiException { + ApiResponse localVarResp = detachAppDomainFromAppLinkWithHttpInfo(appLinkId, appDomainId); + return localVarResp.getData(); + } + + /** + * Detach App Domain from App Link + * This API provides ability to detach App Domain from App Link + * @param appLinkId App Link UUID (required) + * @param appDomainId App Domain UUID (required) + * @return ApiResponse<AppLinkAppDomainAttachment> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
202 Detach App Domain object -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
+ */ + public ApiResponse detachAppDomainFromAppLinkWithHttpInfo(@javax.annotation.Nonnull UUID appLinkId, @javax.annotation.Nonnull UUID appDomainId) throws ApiException { + okhttp3.Call localVarCall = detachAppDomainFromAppLinkValidateBeforeCall(appLinkId, appDomainId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Detach App Domain from App Link (asynchronously) + * This API provides ability to detach App Domain from App Link + * @param appLinkId App Link UUID (required) + * @param appDomainId App Domain UUID (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
202 Detach App Domain object -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
+ */ + public okhttp3.Call detachAppDomainFromAppLinkAsync(@javax.annotation.Nonnull UUID appLinkId, @javax.annotation.Nonnull UUID appDomainId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = detachAppDomainFromAppLinkValidateBeforeCall(appLinkId, appDomainId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for detachAppServiceFromAppLink + * @param appLinkId App Link UUID (required) + * @param appServiceId App Service UUID (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
202 Detach App Service object -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
+ */ + public okhttp3.Call detachAppServiceFromAppLinkCall(@javax.annotation.Nonnull UUID appLinkId, @javax.annotation.Nonnull UUID appServiceId, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/fabric/v4/appLinks/{appLinkId}/appServices/{appServiceId}" + .replace("{" + "appLinkId" + "}", localVarApiClient.escapeString(appLinkId.toString())) + .replace("{" + "appServiceId" + "}", localVarApiClient.escapeString(appServiceId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "BearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call detachAppServiceFromAppLinkValidateBeforeCall(@javax.annotation.Nonnull UUID appLinkId, @javax.annotation.Nonnull UUID appServiceId, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'appLinkId' is set + if (appLinkId == null) { + throw new ApiException("Missing the required parameter 'appLinkId' when calling detachAppServiceFromAppLink(Async)"); + } + + // verify the required parameter 'appServiceId' is set + if (appServiceId == null) { + throw new ApiException("Missing the required parameter 'appServiceId' when calling detachAppServiceFromAppLink(Async)"); + } + + return detachAppServiceFromAppLinkCall(appLinkId, appServiceId, _callback); + + } + + /** + * Detach App Service from App Link + * This API provides ability to detach App Service from App Link + * @param appLinkId App Link UUID (required) + * @param appServiceId App Service UUID (required) + * @return AppLinkAppServiceAttachment + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
202 Detach App Service object -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
+ */ + public AppLinkAppServiceAttachment detachAppServiceFromAppLink(@javax.annotation.Nonnull UUID appLinkId, @javax.annotation.Nonnull UUID appServiceId) throws ApiException { + ApiResponse localVarResp = detachAppServiceFromAppLinkWithHttpInfo(appLinkId, appServiceId); + return localVarResp.getData(); + } + + /** + * Detach App Service from App Link + * This API provides ability to detach App Service from App Link + * @param appLinkId App Link UUID (required) + * @param appServiceId App Service UUID (required) + * @return ApiResponse<AppLinkAppServiceAttachment> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
202 Detach App Service object -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
+ */ + public ApiResponse detachAppServiceFromAppLinkWithHttpInfo(@javax.annotation.Nonnull UUID appLinkId, @javax.annotation.Nonnull UUID appServiceId) throws ApiException { + okhttp3.Call localVarCall = detachAppServiceFromAppLinkValidateBeforeCall(appLinkId, appServiceId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Detach App Service from App Link (asynchronously) + * This API provides ability to detach App Service from App Link + * @param appLinkId App Link UUID (required) + * @param appServiceId App Service UUID (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
202 Detach App Service object -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
+ */ + public okhttp3.Call detachAppServiceFromAppLinkAsync(@javax.annotation.Nonnull UUID appLinkId, @javax.annotation.Nonnull UUID appServiceId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = detachAppServiceFromAppLinkValidateBeforeCall(appLinkId, appServiceId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getAppLinkByUuid + * @param appLinkId App Link UUID (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 App Link object -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
+ */ + public okhttp3.Call getAppLinkByUuidCall(@javax.annotation.Nonnull UUID appLinkId, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/fabric/v4/appLinks/{appLinkId}" + .replace("{" + "appLinkId" + "}", localVarApiClient.escapeString(appLinkId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "BearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getAppLinkByUuidValidateBeforeCall(@javax.annotation.Nonnull UUID appLinkId, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'appLinkId' is set + if (appLinkId == null) { + throw new ApiException("Missing the required parameter 'appLinkId' when calling getAppLinkByUuid(Async)"); + } + + return getAppLinkByUuidCall(appLinkId, _callback); + + } + + /** + * Get App Link + * This API provides capability to retrieve user's App Link + * @param appLinkId App Link UUID (required) + * @return AppLink + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 App Link object -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
+ */ + public AppLink getAppLinkByUuid(@javax.annotation.Nonnull UUID appLinkId) throws ApiException { + ApiResponse localVarResp = getAppLinkByUuidWithHttpInfo(appLinkId); + return localVarResp.getData(); + } + + /** + * Get App Link + * This API provides capability to retrieve user's App Link + * @param appLinkId App Link UUID (required) + * @return ApiResponse<AppLink> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 App Link object -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
+ */ + public ApiResponse getAppLinkByUuidWithHttpInfo(@javax.annotation.Nonnull UUID appLinkId) throws ApiException { + okhttp3.Call localVarCall = getAppLinkByUuidValidateBeforeCall(appLinkId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get App Link (asynchronously) + * This API provides capability to retrieve user's App Link + * @param appLinkId App Link UUID (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 App Link object -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
+ */ + public okhttp3.Call getAppLinkByUuidAsync(@javax.annotation.Nonnull UUID appLinkId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getAppLinkByUuidValidateBeforeCall(appLinkId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getAttachedAppDomainByUuid + * @param appLinkId App Link UUID (required) + * @param appDomainId App Domain UUID (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Attached App Domain object -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
+ */ + public okhttp3.Call getAttachedAppDomainByUuidCall(@javax.annotation.Nonnull UUID appLinkId, @javax.annotation.Nonnull UUID appDomainId, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/fabric/v4/appLinks/{appLinkId}/appDomains/{appDomainId}" + .replace("{" + "appLinkId" + "}", localVarApiClient.escapeString(appLinkId.toString())) + .replace("{" + "appDomainId" + "}", localVarApiClient.escapeString(appDomainId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "BearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getAttachedAppDomainByUuidValidateBeforeCall(@javax.annotation.Nonnull UUID appLinkId, @javax.annotation.Nonnull UUID appDomainId, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'appLinkId' is set + if (appLinkId == null) { + throw new ApiException("Missing the required parameter 'appLinkId' when calling getAttachedAppDomainByUuid(Async)"); + } + + // verify the required parameter 'appDomainId' is set + if (appDomainId == null) { + throw new ApiException("Missing the required parameter 'appDomainId' when calling getAttachedAppDomainByUuid(Async)"); + } + + return getAttachedAppDomainByUuidCall(appLinkId, appDomainId, _callback); + + } + + /** + * Get attached App Domain for App Link + * This API provides ability to retrieve an App Domain attached to an App Link. + * @param appLinkId App Link UUID (required) + * @param appDomainId App Domain UUID (required) + * @return AppLinkAppDomainAttachment + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Attached App Domain object -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
+ */ + public AppLinkAppDomainAttachment getAttachedAppDomainByUuid(@javax.annotation.Nonnull UUID appLinkId, @javax.annotation.Nonnull UUID appDomainId) throws ApiException { + ApiResponse localVarResp = getAttachedAppDomainByUuidWithHttpInfo(appLinkId, appDomainId); + return localVarResp.getData(); + } + + /** + * Get attached App Domain for App Link + * This API provides ability to retrieve an App Domain attached to an App Link. + * @param appLinkId App Link UUID (required) + * @param appDomainId App Domain UUID (required) + * @return ApiResponse<AppLinkAppDomainAttachment> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Attached App Domain object -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
+ */ + public ApiResponse getAttachedAppDomainByUuidWithHttpInfo(@javax.annotation.Nonnull UUID appLinkId, @javax.annotation.Nonnull UUID appDomainId) throws ApiException { + okhttp3.Call localVarCall = getAttachedAppDomainByUuidValidateBeforeCall(appLinkId, appDomainId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get attached App Domain for App Link (asynchronously) + * This API provides ability to retrieve an App Domain attached to an App Link. + * @param appLinkId App Link UUID (required) + * @param appDomainId App Domain UUID (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Attached App Domain object -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
+ */ + public okhttp3.Call getAttachedAppDomainByUuidAsync(@javax.annotation.Nonnull UUID appLinkId, @javax.annotation.Nonnull UUID appDomainId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getAttachedAppDomainByUuidValidateBeforeCall(appLinkId, appDomainId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getAttachedAppDomainsByAppLinkId + * @param appLinkId App Link UUID (required) + * @param offset offset (optional) + * @param limit number of records to fetch (optional) + * @param attachmentStatus Filter attached App Domains by one or more attachment lifecycle states. (optional) + * @param order Sort order for attached App Domains. (optional, default to DESC) + * @param style Detail level of the response. (optional, default to MEDIUM) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successful operation -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
+ */ + public okhttp3.Call getAttachedAppDomainsByAppLinkIdCall(@javax.annotation.Nonnull UUID appLinkId, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Integer limit, @javax.annotation.Nullable List attachmentStatus, @javax.annotation.Nullable AttachedAppDomainOrder order, @javax.annotation.Nullable Style style, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/fabric/v4/appLinks/{appLinkId}/appDomains" + .replace("{" + "appLinkId" + "}", localVarApiClient.escapeString(appLinkId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (offset != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("offset", offset)); + } + + if (limit != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit)); + } + + if (attachmentStatus != null) { + localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "attachmentStatus", attachmentStatus)); + } + + if (order != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("order", order)); + } + + if (style != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("style", style)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "BearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getAttachedAppDomainsByAppLinkIdValidateBeforeCall(@javax.annotation.Nonnull UUID appLinkId, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Integer limit, @javax.annotation.Nullable List attachmentStatus, @javax.annotation.Nullable AttachedAppDomainOrder order, @javax.annotation.Nullable Style style, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'appLinkId' is set + if (appLinkId == null) { + throw new ApiException("Missing the required parameter 'appLinkId' when calling getAttachedAppDomainsByAppLinkId(Async)"); + } + + return getAttachedAppDomainsByAppLinkIdCall(appLinkId, offset, limit, attachmentStatus, order, style, _callback); + + } + + /** + * Get attached App Domains for App Link + * This API provides capability to retrieve App Domains attached to an App Link. + * @param appLinkId App Link UUID (required) + * @param offset offset (optional) + * @param limit number of records to fetch (optional) + * @param attachmentStatus Filter attached App Domains by one or more attachment lifecycle states. (optional) + * @param order Sort order for attached App Domains. (optional, default to DESC) + * @param style Detail level of the response. (optional, default to MEDIUM) + * @return AppLinkAttachedAppDomains + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successful operation -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
+ */ + public AppLinkAttachedAppDomains getAttachedAppDomainsByAppLinkId(@javax.annotation.Nonnull UUID appLinkId, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Integer limit, @javax.annotation.Nullable List attachmentStatus, @javax.annotation.Nullable AttachedAppDomainOrder order, @javax.annotation.Nullable Style style) throws ApiException { + ApiResponse localVarResp = getAttachedAppDomainsByAppLinkIdWithHttpInfo(appLinkId, offset, limit, attachmentStatus, order, style); + return localVarResp.getData(); + } + + /** + * Get attached App Domains for App Link + * This API provides capability to retrieve App Domains attached to an App Link. + * @param appLinkId App Link UUID (required) + * @param offset offset (optional) + * @param limit number of records to fetch (optional) + * @param attachmentStatus Filter attached App Domains by one or more attachment lifecycle states. (optional) + * @param order Sort order for attached App Domains. (optional, default to DESC) + * @param style Detail level of the response. (optional, default to MEDIUM) + * @return ApiResponse<AppLinkAttachedAppDomains> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successful operation -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
+ */ + public ApiResponse getAttachedAppDomainsByAppLinkIdWithHttpInfo(@javax.annotation.Nonnull UUID appLinkId, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Integer limit, @javax.annotation.Nullable List attachmentStatus, @javax.annotation.Nullable AttachedAppDomainOrder order, @javax.annotation.Nullable Style style) throws ApiException { + okhttp3.Call localVarCall = getAttachedAppDomainsByAppLinkIdValidateBeforeCall(appLinkId, offset, limit, attachmentStatus, order, style, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get attached App Domains for App Link (asynchronously) + * This API provides capability to retrieve App Domains attached to an App Link. + * @param appLinkId App Link UUID (required) + * @param offset offset (optional) + * @param limit number of records to fetch (optional) + * @param attachmentStatus Filter attached App Domains by one or more attachment lifecycle states. (optional) + * @param order Sort order for attached App Domains. (optional, default to DESC) + * @param style Detail level of the response. (optional, default to MEDIUM) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successful operation -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
+ */ + public okhttp3.Call getAttachedAppDomainsByAppLinkIdAsync(@javax.annotation.Nonnull UUID appLinkId, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Integer limit, @javax.annotation.Nullable List attachmentStatus, @javax.annotation.Nullable AttachedAppDomainOrder order, @javax.annotation.Nullable Style style, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getAttachedAppDomainsByAppLinkIdValidateBeforeCall(appLinkId, offset, limit, attachmentStatus, order, style, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getAttachedAppServiceByUuid + * @param appLinkId App Link UUID (required) + * @param appServiceId App Service UUID (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Attached App Service object -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
+ */ + public okhttp3.Call getAttachedAppServiceByUuidCall(@javax.annotation.Nonnull UUID appLinkId, @javax.annotation.Nonnull UUID appServiceId, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/fabric/v4/appLinks/{appLinkId}/appServices/{appServiceId}" + .replace("{" + "appLinkId" + "}", localVarApiClient.escapeString(appLinkId.toString())) + .replace("{" + "appServiceId" + "}", localVarApiClient.escapeString(appServiceId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "BearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getAttachedAppServiceByUuidValidateBeforeCall(@javax.annotation.Nonnull UUID appLinkId, @javax.annotation.Nonnull UUID appServiceId, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'appLinkId' is set + if (appLinkId == null) { + throw new ApiException("Missing the required parameter 'appLinkId' when calling getAttachedAppServiceByUuid(Async)"); + } + + // verify the required parameter 'appServiceId' is set + if (appServiceId == null) { + throw new ApiException("Missing the required parameter 'appServiceId' when calling getAttachedAppServiceByUuid(Async)"); + } + + return getAttachedAppServiceByUuidCall(appLinkId, appServiceId, _callback); + + } + + /** + * Get attached App Service for App Link + * This API provides ability to retrieve an App Service attached to an App Link. + * @param appLinkId App Link UUID (required) + * @param appServiceId App Service UUID (required) + * @return AppLinkAppServiceAttachment + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Attached App Service object -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
+ */ + public AppLinkAppServiceAttachment getAttachedAppServiceByUuid(@javax.annotation.Nonnull UUID appLinkId, @javax.annotation.Nonnull UUID appServiceId) throws ApiException { + ApiResponse localVarResp = getAttachedAppServiceByUuidWithHttpInfo(appLinkId, appServiceId); + return localVarResp.getData(); + } + + /** + * Get attached App Service for App Link + * This API provides ability to retrieve an App Service attached to an App Link. + * @param appLinkId App Link UUID (required) + * @param appServiceId App Service UUID (required) + * @return ApiResponse<AppLinkAppServiceAttachment> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Attached App Service object -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
+ */ + public ApiResponse getAttachedAppServiceByUuidWithHttpInfo(@javax.annotation.Nonnull UUID appLinkId, @javax.annotation.Nonnull UUID appServiceId) throws ApiException { + okhttp3.Call localVarCall = getAttachedAppServiceByUuidValidateBeforeCall(appLinkId, appServiceId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get attached App Service for App Link (asynchronously) + * This API provides ability to retrieve an App Service attached to an App Link. + * @param appLinkId App Link UUID (required) + * @param appServiceId App Service UUID (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Attached App Service object -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
+ */ + public okhttp3.Call getAttachedAppServiceByUuidAsync(@javax.annotation.Nonnull UUID appLinkId, @javax.annotation.Nonnull UUID appServiceId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getAttachedAppServiceByUuidValidateBeforeCall(appLinkId, appServiceId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getAttachedAppServicesByAppLinkId + * @param appLinkId App Link UUID (required) + * @param offset offset (optional) + * @param limit number of records to fetch (optional) + * @param attachmentStatus Filter attached App Services by one or more attachment lifecycle states. (optional) + * @param order Sort order for attached App Services. (optional, default to DESC) + * @param style Detail level of the response. (optional, default to MEDIUM) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successful operation -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
+ */ + public okhttp3.Call getAttachedAppServicesByAppLinkIdCall(@javax.annotation.Nonnull UUID appLinkId, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Integer limit, @javax.annotation.Nullable List attachmentStatus, @javax.annotation.Nullable AttachedAppServiceOrder order, @javax.annotation.Nullable Style style, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/fabric/v4/appLinks/{appLinkId}/appServices" + .replace("{" + "appLinkId" + "}", localVarApiClient.escapeString(appLinkId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (offset != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("offset", offset)); + } + + if (limit != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit)); + } + + if (attachmentStatus != null) { + localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "attachmentStatus", attachmentStatus)); + } + + if (order != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("order", order)); + } + + if (style != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("style", style)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "BearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getAttachedAppServicesByAppLinkIdValidateBeforeCall(@javax.annotation.Nonnull UUID appLinkId, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Integer limit, @javax.annotation.Nullable List attachmentStatus, @javax.annotation.Nullable AttachedAppServiceOrder order, @javax.annotation.Nullable Style style, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'appLinkId' is set + if (appLinkId == null) { + throw new ApiException("Missing the required parameter 'appLinkId' when calling getAttachedAppServicesByAppLinkId(Async)"); + } + + return getAttachedAppServicesByAppLinkIdCall(appLinkId, offset, limit, attachmentStatus, order, style, _callback); + + } + + /** + * Get attached App Services for App Link + * This API provides capability to retrieve App Services attached to an App Link. + * @param appLinkId App Link UUID (required) + * @param offset offset (optional) + * @param limit number of records to fetch (optional) + * @param attachmentStatus Filter attached App Services by one or more attachment lifecycle states. (optional) + * @param order Sort order for attached App Services. (optional, default to DESC) + * @param style Detail level of the response. (optional, default to MEDIUM) + * @return AppLinkAttachedAppServices + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successful operation -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
+ */ + public AppLinkAttachedAppServices getAttachedAppServicesByAppLinkId(@javax.annotation.Nonnull UUID appLinkId, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Integer limit, @javax.annotation.Nullable List attachmentStatus, @javax.annotation.Nullable AttachedAppServiceOrder order, @javax.annotation.Nullable Style style) throws ApiException { + ApiResponse localVarResp = getAttachedAppServicesByAppLinkIdWithHttpInfo(appLinkId, offset, limit, attachmentStatus, order, style); + return localVarResp.getData(); + } + + /** + * Get attached App Services for App Link + * This API provides capability to retrieve App Services attached to an App Link. + * @param appLinkId App Link UUID (required) + * @param offset offset (optional) + * @param limit number of records to fetch (optional) + * @param attachmentStatus Filter attached App Services by one or more attachment lifecycle states. (optional) + * @param order Sort order for attached App Services. (optional, default to DESC) + * @param style Detail level of the response. (optional, default to MEDIUM) + * @return ApiResponse<AppLinkAttachedAppServices> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successful operation -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
+ */ + public ApiResponse getAttachedAppServicesByAppLinkIdWithHttpInfo(@javax.annotation.Nonnull UUID appLinkId, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Integer limit, @javax.annotation.Nullable List attachmentStatus, @javax.annotation.Nullable AttachedAppServiceOrder order, @javax.annotation.Nullable Style style) throws ApiException { + okhttp3.Call localVarCall = getAttachedAppServicesByAppLinkIdValidateBeforeCall(appLinkId, offset, limit, attachmentStatus, order, style, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get attached App Services for App Link (asynchronously) + * This API provides capability to retrieve App Services attached to an App Link. + * @param appLinkId App Link UUID (required) + * @param offset offset (optional) + * @param limit number of records to fetch (optional) + * @param attachmentStatus Filter attached App Services by one or more attachment lifecycle states. (optional) + * @param order Sort order for attached App Services. (optional, default to DESC) + * @param style Detail level of the response. (optional, default to MEDIUM) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successful operation -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
+ */ + public okhttp3.Call getAttachedAppServicesByAppLinkIdAsync(@javax.annotation.Nonnull UUID appLinkId, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Integer limit, @javax.annotation.Nullable List attachmentStatus, @javax.annotation.Nullable AttachedAppServiceOrder order, @javax.annotation.Nullable Style style, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getAttachedAppServicesByAppLinkIdValidateBeforeCall(appLinkId, offset, limit, attachmentStatus, order, style, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for searchAppLinks + * @param appLinkSearchRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successful operation -
400 Bad request -
401 Unauthorized -
403 Forbidden -
415 Unsupported Media Type -
500 Internal server error -
+ */ + public okhttp3.Call searchAppLinksCall(@javax.annotation.Nonnull AppLinkSearchRequest appLinkSearchRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = appLinkSearchRequest; + + // create path and map variables + String localVarPath = "/fabric/v4/appLinks/search"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "BearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call searchAppLinksValidateBeforeCall(@javax.annotation.Nonnull AppLinkSearchRequest appLinkSearchRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'appLinkSearchRequest' is set + if (appLinkSearchRequest == null) { + throw new ApiException("Missing the required parameter 'appLinkSearchRequest' when calling searchAppLinks(Async)"); + } + + return searchAppLinksCall(appLinkSearchRequest, _callback); + + } + + /** + * Search App Links + * The API provides capability to get list of user's App Links using search criteria, including optional filtering, pagination and sorting + * @param appLinkSearchRequest (required) + * @return AppLinkSearchResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successful operation -
400 Bad request -
401 Unauthorized -
403 Forbidden -
415 Unsupported Media Type -
500 Internal server error -
+ */ + public AppLinkSearchResponse searchAppLinks(@javax.annotation.Nonnull AppLinkSearchRequest appLinkSearchRequest) throws ApiException { + ApiResponse localVarResp = searchAppLinksWithHttpInfo(appLinkSearchRequest); + return localVarResp.getData(); + } + + /** + * Search App Links + * The API provides capability to get list of user's App Links using search criteria, including optional filtering, pagination and sorting + * @param appLinkSearchRequest (required) + * @return ApiResponse<AppLinkSearchResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successful operation -
400 Bad request -
401 Unauthorized -
403 Forbidden -
415 Unsupported Media Type -
500 Internal server error -
+ */ + public ApiResponse searchAppLinksWithHttpInfo(@javax.annotation.Nonnull AppLinkSearchRequest appLinkSearchRequest) throws ApiException { + okhttp3.Call localVarCall = searchAppLinksValidateBeforeCall(appLinkSearchRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Search App Links (asynchronously) + * The API provides capability to get list of user's App Links using search criteria, including optional filtering, pagination and sorting + * @param appLinkSearchRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successful operation -
400 Bad request -
401 Unauthorized -
403 Forbidden -
415 Unsupported Media Type -
500 Internal server error -
+ */ + public okhttp3.Call searchAppLinksAsync(@javax.annotation.Nonnull AppLinkSearchRequest appLinkSearchRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = searchAppLinksValidateBeforeCall(appLinkSearchRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for searchAttachedAppDomains + * @param appLinkId App Link UUID (required) + * @param appLinkAttachDomainSearchRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successful operation -
400 Bad request -
401 Unauthorized -
403 Forbidden -
415 Unsupported Media Type -
500 Internal server error -
+ */ + public okhttp3.Call searchAttachedAppDomainsCall(@javax.annotation.Nonnull UUID appLinkId, @javax.annotation.Nonnull AppLinkAttachDomainSearchRequest appLinkAttachDomainSearchRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = appLinkAttachDomainSearchRequest; + + // create path and map variables + String localVarPath = "/fabric/v4/appLinks/{appLinkId}/appDomains/search" + .replace("{" + "appLinkId" + "}", localVarApiClient.escapeString(appLinkId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "BearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call searchAttachedAppDomainsValidateBeforeCall(@javax.annotation.Nonnull UUID appLinkId, @javax.annotation.Nonnull AppLinkAttachDomainSearchRequest appLinkAttachDomainSearchRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'appLinkId' is set + if (appLinkId == null) { + throw new ApiException("Missing the required parameter 'appLinkId' when calling searchAttachedAppDomains(Async)"); + } + + // verify the required parameter 'appLinkAttachDomainSearchRequest' is set + if (appLinkAttachDomainSearchRequest == null) { + throw new ApiException("Missing the required parameter 'appLinkAttachDomainSearchRequest' when calling searchAttachedAppDomains(Async)"); + } + + return searchAttachedAppDomainsCall(appLinkId, appLinkAttachDomainSearchRequest, _callback); + + } + + /** + * Search attached App Domain to App Link + * The API provides capability to get list of user's attached App Domains using search criteria, including optional filtering, pagination and sorting + * @param appLinkId App Link UUID (required) + * @param appLinkAttachDomainSearchRequest (required) + * @return AppLinkAttachDomainSearchResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successful operation -
400 Bad request -
401 Unauthorized -
403 Forbidden -
415 Unsupported Media Type -
500 Internal server error -
+ */ + public AppLinkAttachDomainSearchResponse searchAttachedAppDomains(@javax.annotation.Nonnull UUID appLinkId, @javax.annotation.Nonnull AppLinkAttachDomainSearchRequest appLinkAttachDomainSearchRequest) throws ApiException { + ApiResponse localVarResp = searchAttachedAppDomainsWithHttpInfo(appLinkId, appLinkAttachDomainSearchRequest); + return localVarResp.getData(); + } + + /** + * Search attached App Domain to App Link + * The API provides capability to get list of user's attached App Domains using search criteria, including optional filtering, pagination and sorting + * @param appLinkId App Link UUID (required) + * @param appLinkAttachDomainSearchRequest (required) + * @return ApiResponse<AppLinkAttachDomainSearchResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successful operation -
400 Bad request -
401 Unauthorized -
403 Forbidden -
415 Unsupported Media Type -
500 Internal server error -
+ */ + public ApiResponse searchAttachedAppDomainsWithHttpInfo(@javax.annotation.Nonnull UUID appLinkId, @javax.annotation.Nonnull AppLinkAttachDomainSearchRequest appLinkAttachDomainSearchRequest) throws ApiException { + okhttp3.Call localVarCall = searchAttachedAppDomainsValidateBeforeCall(appLinkId, appLinkAttachDomainSearchRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Search attached App Domain to App Link (asynchronously) + * The API provides capability to get list of user's attached App Domains using search criteria, including optional filtering, pagination and sorting + * @param appLinkId App Link UUID (required) + * @param appLinkAttachDomainSearchRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successful operation -
400 Bad request -
401 Unauthorized -
403 Forbidden -
415 Unsupported Media Type -
500 Internal server error -
+ */ + public okhttp3.Call searchAttachedAppDomainsAsync(@javax.annotation.Nonnull UUID appLinkId, @javax.annotation.Nonnull AppLinkAttachDomainSearchRequest appLinkAttachDomainSearchRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = searchAttachedAppDomainsValidateBeforeCall(appLinkId, appLinkAttachDomainSearchRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for searchAttachedAppServices + * @param appLinkId App Link UUID (required) + * @param appLinkAttachServiceSearchRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successful operation -
400 Bad request -
401 Unauthorized -
403 Forbidden -
415 Unsupported Media Type -
500 Internal server error -
+ */ + public okhttp3.Call searchAttachedAppServicesCall(@javax.annotation.Nonnull UUID appLinkId, @javax.annotation.Nonnull AppLinkAttachServiceSearchRequest appLinkAttachServiceSearchRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = appLinkAttachServiceSearchRequest; + + // create path and map variables + String localVarPath = "/fabric/v4/appLinks/{appLinkId}/appServices/search" + .replace("{" + "appLinkId" + "}", localVarApiClient.escapeString(appLinkId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "BearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call searchAttachedAppServicesValidateBeforeCall(@javax.annotation.Nonnull UUID appLinkId, @javax.annotation.Nonnull AppLinkAttachServiceSearchRequest appLinkAttachServiceSearchRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'appLinkId' is set + if (appLinkId == null) { + throw new ApiException("Missing the required parameter 'appLinkId' when calling searchAttachedAppServices(Async)"); + } + + // verify the required parameter 'appLinkAttachServiceSearchRequest' is set + if (appLinkAttachServiceSearchRequest == null) { + throw new ApiException("Missing the required parameter 'appLinkAttachServiceSearchRequest' when calling searchAttachedAppServices(Async)"); + } + + return searchAttachedAppServicesCall(appLinkId, appLinkAttachServiceSearchRequest, _callback); + + } + + /** + * Search attached App Service to App Link + * The API provides capability to get list of user's attached App Services using search criteria, including optional filtering, pagination and sorting + * @param appLinkId App Link UUID (required) + * @param appLinkAttachServiceSearchRequest (required) + * @return AppLinkAttachServiceSearchResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successful operation -
400 Bad request -
401 Unauthorized -
403 Forbidden -
415 Unsupported Media Type -
500 Internal server error -
+ */ + public AppLinkAttachServiceSearchResponse searchAttachedAppServices(@javax.annotation.Nonnull UUID appLinkId, @javax.annotation.Nonnull AppLinkAttachServiceSearchRequest appLinkAttachServiceSearchRequest) throws ApiException { + ApiResponse localVarResp = searchAttachedAppServicesWithHttpInfo(appLinkId, appLinkAttachServiceSearchRequest); + return localVarResp.getData(); + } + + /** + * Search attached App Service to App Link + * The API provides capability to get list of user's attached App Services using search criteria, including optional filtering, pagination and sorting + * @param appLinkId App Link UUID (required) + * @param appLinkAttachServiceSearchRequest (required) + * @return ApiResponse<AppLinkAttachServiceSearchResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successful operation -
400 Bad request -
401 Unauthorized -
403 Forbidden -
415 Unsupported Media Type -
500 Internal server error -
+ */ + public ApiResponse searchAttachedAppServicesWithHttpInfo(@javax.annotation.Nonnull UUID appLinkId, @javax.annotation.Nonnull AppLinkAttachServiceSearchRequest appLinkAttachServiceSearchRequest) throws ApiException { + okhttp3.Call localVarCall = searchAttachedAppServicesValidateBeforeCall(appLinkId, appLinkAttachServiceSearchRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Search attached App Service to App Link (asynchronously) + * The API provides capability to get list of user's attached App Services using search criteria, including optional filtering, pagination and sorting + * @param appLinkId App Link UUID (required) + * @param appLinkAttachServiceSearchRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successful operation -
400 Bad request -
401 Unauthorized -
403 Forbidden -
415 Unsupported Media Type -
500 Internal server error -
+ */ + public okhttp3.Call searchAttachedAppServicesAsync(@javax.annotation.Nonnull UUID appLinkId, @javax.annotation.Nonnull AppLinkAttachServiceSearchRequest appLinkAttachServiceSearchRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = searchAttachedAppServicesValidateBeforeCall(appLinkId, appLinkAttachServiceSearchRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for updateAppLinkByUuid + * @param appLinkId App Link UUID (required) + * @param appLinkChangeOperation (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + + + + +
Response Details
Status Code Description Response Headers
202 App Link object -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
415 Unsupported Media Type -
500 Internal server error -
+ */ + public okhttp3.Call updateAppLinkByUuidCall(@javax.annotation.Nonnull UUID appLinkId, @javax.annotation.Nonnull List appLinkChangeOperation, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = appLinkChangeOperation; + + // create path and map variables + String localVarPath = "/fabric/v4/appLinks/{appLinkId}" + .replace("{" + "appLinkId" + "}", localVarApiClient.escapeString(appLinkId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json-patch+json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "BearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call updateAppLinkByUuidValidateBeforeCall(@javax.annotation.Nonnull UUID appLinkId, @javax.annotation.Nonnull List appLinkChangeOperation, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'appLinkId' is set + if (appLinkId == null) { + throw new ApiException("Missing the required parameter 'appLinkId' when calling updateAppLinkByUuid(Async)"); + } + + // verify the required parameter 'appLinkChangeOperation' is set + if (appLinkChangeOperation == null) { + throw new ApiException("Missing the required parameter 'appLinkChangeOperation' when calling updateAppLinkByUuid(Async)"); + } + + return updateAppLinkByUuidCall(appLinkId, appLinkChangeOperation, _callback); + + } + + /** + * Update App Link + * This API provides capability to update user's App Link + * @param appLinkId App Link UUID (required) + * @param appLinkChangeOperation (required) + * @return AppLink + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + + + +
Response Details
Status Code Description Response Headers
202 App Link object -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
415 Unsupported Media Type -
500 Internal server error -
+ */ + public AppLink updateAppLinkByUuid(@javax.annotation.Nonnull UUID appLinkId, @javax.annotation.Nonnull List appLinkChangeOperation) throws ApiException { + ApiResponse localVarResp = updateAppLinkByUuidWithHttpInfo(appLinkId, appLinkChangeOperation); + return localVarResp.getData(); + } + + /** + * Update App Link + * This API provides capability to update user's App Link + * @param appLinkId App Link UUID (required) + * @param appLinkChangeOperation (required) + * @return ApiResponse<AppLink> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + + + +
Response Details
Status Code Description Response Headers
202 App Link object -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
415 Unsupported Media Type -
500 Internal server error -
+ */ + public ApiResponse updateAppLinkByUuidWithHttpInfo(@javax.annotation.Nonnull UUID appLinkId, @javax.annotation.Nonnull List appLinkChangeOperation) throws ApiException { + okhttp3.Call localVarCall = updateAppLinkByUuidValidateBeforeCall(appLinkId, appLinkChangeOperation, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Update App Link (asynchronously) + * This API provides capability to update user's App Link + * @param appLinkId App Link UUID (required) + * @param appLinkChangeOperation (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + + + +
Response Details
Status Code Description Response Headers
202 App Link object -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
415 Unsupported Media Type -
500 Internal server error -
+ */ + public okhttp3.Call updateAppLinkByUuidAsync(@javax.annotation.Nonnull UUID appLinkId, @javax.annotation.Nonnull List appLinkChangeOperation, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = updateAppLinkByUuidValidateBeforeCall(appLinkId, appLinkChangeOperation, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for updateAppServiceAttachmentToAppLink + * @param appLinkId App Link UUID (required) + * @param appServiceId App Service UUID (required) + * @param appLinkAppServiceAttachmentChangeOperation (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + + + + +
Response Details
Status Code Description Response Headers
202 Update App Service attachment object -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
415 Unsupported Media Type -
500 Internal server error -
+ */ + public okhttp3.Call updateAppServiceAttachmentToAppLinkCall(@javax.annotation.Nonnull UUID appLinkId, @javax.annotation.Nonnull UUID appServiceId, @javax.annotation.Nonnull List appLinkAppServiceAttachmentChangeOperation, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = appLinkAppServiceAttachmentChangeOperation; + + // create path and map variables + String localVarPath = "/fabric/v4/appLinks/{appLinkId}/appServices/{appServiceId}" + .replace("{" + "appLinkId" + "}", localVarApiClient.escapeString(appLinkId.toString())) + .replace("{" + "appServiceId" + "}", localVarApiClient.escapeString(appServiceId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json-patch+json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "BearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call updateAppServiceAttachmentToAppLinkValidateBeforeCall(@javax.annotation.Nonnull UUID appLinkId, @javax.annotation.Nonnull UUID appServiceId, @javax.annotation.Nonnull List appLinkAppServiceAttachmentChangeOperation, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'appLinkId' is set + if (appLinkId == null) { + throw new ApiException("Missing the required parameter 'appLinkId' when calling updateAppServiceAttachmentToAppLink(Async)"); + } + + // verify the required parameter 'appServiceId' is set + if (appServiceId == null) { + throw new ApiException("Missing the required parameter 'appServiceId' when calling updateAppServiceAttachmentToAppLink(Async)"); + } + + // verify the required parameter 'appLinkAppServiceAttachmentChangeOperation' is set + if (appLinkAppServiceAttachmentChangeOperation == null) { + throw new ApiException("Missing the required parameter 'appLinkAppServiceAttachmentChangeOperation' when calling updateAppServiceAttachmentToAppLink(Async)"); + } + + return updateAppServiceAttachmentToAppLinkCall(appLinkId, appServiceId, appLinkAppServiceAttachmentChangeOperation, _callback); + + } + + /** + * Update App Service attachment to App Link + * This API provides ability to update the App Service attachment to App Link. + * @param appLinkId App Link UUID (required) + * @param appServiceId App Service UUID (required) + * @param appLinkAppServiceAttachmentChangeOperation (required) + * @return AppLinkAppServiceAttachment + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + + + +
Response Details
Status Code Description Response Headers
202 Update App Service attachment object -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
415 Unsupported Media Type -
500 Internal server error -
+ */ + public AppLinkAppServiceAttachment updateAppServiceAttachmentToAppLink(@javax.annotation.Nonnull UUID appLinkId, @javax.annotation.Nonnull UUID appServiceId, @javax.annotation.Nonnull List appLinkAppServiceAttachmentChangeOperation) throws ApiException { + ApiResponse localVarResp = updateAppServiceAttachmentToAppLinkWithHttpInfo(appLinkId, appServiceId, appLinkAppServiceAttachmentChangeOperation); + return localVarResp.getData(); + } + + /** + * Update App Service attachment to App Link + * This API provides ability to update the App Service attachment to App Link. + * @param appLinkId App Link UUID (required) + * @param appServiceId App Service UUID (required) + * @param appLinkAppServiceAttachmentChangeOperation (required) + * @return ApiResponse<AppLinkAppServiceAttachment> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + + + +
Response Details
Status Code Description Response Headers
202 Update App Service attachment object -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
415 Unsupported Media Type -
500 Internal server error -
+ */ + public ApiResponse updateAppServiceAttachmentToAppLinkWithHttpInfo(@javax.annotation.Nonnull UUID appLinkId, @javax.annotation.Nonnull UUID appServiceId, @javax.annotation.Nonnull List appLinkAppServiceAttachmentChangeOperation) throws ApiException { + okhttp3.Call localVarCall = updateAppServiceAttachmentToAppLinkValidateBeforeCall(appLinkId, appServiceId, appLinkAppServiceAttachmentChangeOperation, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Update App Service attachment to App Link (asynchronously) + * This API provides ability to update the App Service attachment to App Link. + * @param appLinkId App Link UUID (required) + * @param appServiceId App Service UUID (required) + * @param appLinkAppServiceAttachmentChangeOperation (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + + + +
Response Details
Status Code Description Response Headers
202 Update App Service attachment object -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
415 Unsupported Media Type -
500 Internal server error -
+ */ + public okhttp3.Call updateAppServiceAttachmentToAppLinkAsync(@javax.annotation.Nonnull UUID appLinkId, @javax.annotation.Nonnull UUID appServiceId, @javax.annotation.Nonnull List appLinkAppServiceAttachmentChangeOperation, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = updateAppServiceAttachmentToAppLinkValidateBeforeCall(appLinkId, appServiceId, appLinkAppServiceAttachmentChangeOperation, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } +} diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/api/ApplicationServicesApi.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/api/ApplicationServicesApi.java new file mode 100644 index 00000000..5d4fde6e --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/api/ApplicationServicesApi.java @@ -0,0 +1,1364 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.api; + +import com.equinix.sdk.fabricv4.ApiCallback; +import com.equinix.sdk.fabricv4.ApiClient; +import com.equinix.sdk.fabricv4.ApiException; +import com.equinix.sdk.fabricv4.ApiResponse; +import com.equinix.sdk.fabricv4.Configuration; +import com.equinix.sdk.fabricv4.Pair; +import com.equinix.sdk.fabricv4.ProgressRequestBody; +import com.equinix.sdk.fabricv4.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + +import com.equinix.sdk.fabricv4.model.AppLinkState; +import com.equinix.sdk.fabricv4.model.AppService; +import com.equinix.sdk.fabricv4.model.AppServiceAttachedAppLinks; +import com.equinix.sdk.fabricv4.model.AppServiceAttachedAppSubscriptionSearchRequest; +import com.equinix.sdk.fabricv4.model.AppServiceAttachedAppSubscriptionSearchResponse; +import com.equinix.sdk.fabricv4.model.AppServiceAttachedAppSubscriptions; +import com.equinix.sdk.fabricv4.model.AppServiceChangeOperation; +import com.equinix.sdk.fabricv4.model.AppServicePostRequest; +import com.equinix.sdk.fabricv4.model.AppServiceSearchRequest; +import com.equinix.sdk.fabricv4.model.AppServiceSearchResponse; +import com.equinix.sdk.fabricv4.model.AppSubscriptionState; +import com.equinix.sdk.fabricv4.model.AttachedAppLinkOrder; +import com.equinix.sdk.fabricv4.model.AttachedAppSubscriptionOrder; +import com.equinix.sdk.fabricv4.model.Error; +import com.equinix.sdk.fabricv4.model.Style; +import java.util.UUID; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class ApplicationServicesApi { + private ApiClient localVarApiClient; + private int localHostIndex; + private String localCustomBaseUrl; + + public ApplicationServicesApi() { + this(Configuration.getDefaultApiClient()); + } + + public ApplicationServicesApi(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + /** + * Build call for createAppService + * @param appServicePostRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
202 App Service object -
400 Bad request -
401 Unauthorized -
403 Forbidden -
415 Unsupported Media Type -
500 Internal server error -
+ */ + public okhttp3.Call createAppServiceCall(@javax.annotation.Nonnull AppServicePostRequest appServicePostRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = appServicePostRequest; + + // create path and map variables + String localVarPath = "/fabric/v4/appServices"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "BearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call createAppServiceValidateBeforeCall(@javax.annotation.Nonnull AppServicePostRequest appServicePostRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'appServicePostRequest' is set + if (appServicePostRequest == null) { + throw new ApiException("Missing the required parameter 'appServicePostRequest' when calling createAppService(Async)"); + } + + return createAppServiceCall(appServicePostRequest, _callback); + + } + + /** + * Create App Service + * This API provides capability to create user's App Service + * @param appServicePostRequest (required) + * @return AppService + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
202 App Service object -
400 Bad request -
401 Unauthorized -
403 Forbidden -
415 Unsupported Media Type -
500 Internal server error -
+ */ + public AppService createAppService(@javax.annotation.Nonnull AppServicePostRequest appServicePostRequest) throws ApiException { + ApiResponse localVarResp = createAppServiceWithHttpInfo(appServicePostRequest); + return localVarResp.getData(); + } + + /** + * Create App Service + * This API provides capability to create user's App Service + * @param appServicePostRequest (required) + * @return ApiResponse<AppService> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
202 App Service object -
400 Bad request -
401 Unauthorized -
403 Forbidden -
415 Unsupported Media Type -
500 Internal server error -
+ */ + public ApiResponse createAppServiceWithHttpInfo(@javax.annotation.Nonnull AppServicePostRequest appServicePostRequest) throws ApiException { + okhttp3.Call localVarCall = createAppServiceValidateBeforeCall(appServicePostRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Create App Service (asynchronously) + * This API provides capability to create user's App Service + * @param appServicePostRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
202 App Service object -
400 Bad request -
401 Unauthorized -
403 Forbidden -
415 Unsupported Media Type -
500 Internal server error -
+ */ + public okhttp3.Call createAppServiceAsync(@javax.annotation.Nonnull AppServicePostRequest appServicePostRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = createAppServiceValidateBeforeCall(appServicePostRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for deleteAppServiceByUuid + * @param appServiceId App Service UUID (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
202 App Service object -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
+ */ + public okhttp3.Call deleteAppServiceByUuidCall(@javax.annotation.Nonnull UUID appServiceId, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/fabric/v4/appServices/{appServiceId}" + .replace("{" + "appServiceId" + "}", localVarApiClient.escapeString(appServiceId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "BearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call deleteAppServiceByUuidValidateBeforeCall(@javax.annotation.Nonnull UUID appServiceId, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'appServiceId' is set + if (appServiceId == null) { + throw new ApiException("Missing the required parameter 'appServiceId' when calling deleteAppServiceByUuid(Async)"); + } + + return deleteAppServiceByUuidCall(appServiceId, _callback); + + } + + /** + * Delete App Service + * This API provides capability to delete user's App Service + * @param appServiceId App Service UUID (required) + * @return AppService + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
202 App Service object -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
+ */ + public AppService deleteAppServiceByUuid(@javax.annotation.Nonnull UUID appServiceId) throws ApiException { + ApiResponse localVarResp = deleteAppServiceByUuidWithHttpInfo(appServiceId); + return localVarResp.getData(); + } + + /** + * Delete App Service + * This API provides capability to delete user's App Service + * @param appServiceId App Service UUID (required) + * @return ApiResponse<AppService> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
202 App Service object -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
+ */ + public ApiResponse deleteAppServiceByUuidWithHttpInfo(@javax.annotation.Nonnull UUID appServiceId) throws ApiException { + okhttp3.Call localVarCall = deleteAppServiceByUuidValidateBeforeCall(appServiceId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Delete App Service (asynchronously) + * This API provides capability to delete user's App Service + * @param appServiceId App Service UUID (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
202 App Service object -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
+ */ + public okhttp3.Call deleteAppServiceByUuidAsync(@javax.annotation.Nonnull UUID appServiceId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = deleteAppServiceByUuidValidateBeforeCall(appServiceId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getAppServiceByUuid + * @param appServiceId App Service UUID (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 App Service object -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
+ */ + public okhttp3.Call getAppServiceByUuidCall(@javax.annotation.Nonnull UUID appServiceId, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/fabric/v4/appServices/{appServiceId}" + .replace("{" + "appServiceId" + "}", localVarApiClient.escapeString(appServiceId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "BearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getAppServiceByUuidValidateBeforeCall(@javax.annotation.Nonnull UUID appServiceId, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'appServiceId' is set + if (appServiceId == null) { + throw new ApiException("Missing the required parameter 'appServiceId' when calling getAppServiceByUuid(Async)"); + } + + return getAppServiceByUuidCall(appServiceId, _callback); + + } + + /** + * Get App Service + * This API provides capability to retrieve user's App Service + * @param appServiceId App Service UUID (required) + * @return AppService + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 App Service object -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
+ */ + public AppService getAppServiceByUuid(@javax.annotation.Nonnull UUID appServiceId) throws ApiException { + ApiResponse localVarResp = getAppServiceByUuidWithHttpInfo(appServiceId); + return localVarResp.getData(); + } + + /** + * Get App Service + * This API provides capability to retrieve user's App Service + * @param appServiceId App Service UUID (required) + * @return ApiResponse<AppService> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 App Service object -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
+ */ + public ApiResponse getAppServiceByUuidWithHttpInfo(@javax.annotation.Nonnull UUID appServiceId) throws ApiException { + okhttp3.Call localVarCall = getAppServiceByUuidValidateBeforeCall(appServiceId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get App Service (asynchronously) + * This API provides capability to retrieve user's App Service + * @param appServiceId App Service UUID (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 App Service object -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
+ */ + public okhttp3.Call getAppServiceByUuidAsync(@javax.annotation.Nonnull UUID appServiceId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getAppServiceByUuidValidateBeforeCall(appServiceId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getAttachedAppLinksByAppServiceId + * @param appServiceId App Service UUID (required) + * @param offset offset (optional) + * @param limit number of records to fetch (optional) + * @param state Filter attached App Links by one or more lifecycle states. (optional) + * @param order Sort order for attached App Links. (optional, default to DESC) + * @param style Detail level of the response. (optional, default to MEDIUM) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successful operation -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
+ */ + public okhttp3.Call getAttachedAppLinksByAppServiceIdCall(@javax.annotation.Nonnull UUID appServiceId, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Integer limit, @javax.annotation.Nullable List state, @javax.annotation.Nullable AttachedAppLinkOrder order, @javax.annotation.Nullable Style style, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/fabric/v4/appServices/{appServiceId}/appLinks" + .replace("{" + "appServiceId" + "}", localVarApiClient.escapeString(appServiceId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (offset != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("offset", offset)); + } + + if (limit != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit)); + } + + if (state != null) { + localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "state", state)); + } + + if (order != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("order", order)); + } + + if (style != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("style", style)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "BearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getAttachedAppLinksByAppServiceIdValidateBeforeCall(@javax.annotation.Nonnull UUID appServiceId, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Integer limit, @javax.annotation.Nullable List state, @javax.annotation.Nullable AttachedAppLinkOrder order, @javax.annotation.Nullable Style style, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'appServiceId' is set + if (appServiceId == null) { + throw new ApiException("Missing the required parameter 'appServiceId' when calling getAttachedAppLinksByAppServiceId(Async)"); + } + + return getAttachedAppLinksByAppServiceIdCall(appServiceId, offset, limit, state, order, style, _callback); + + } + + /** + * Get attached App Links for App Service + * This API provides capability to retrieve App Links attached to an App Service. + * @param appServiceId App Service UUID (required) + * @param offset offset (optional) + * @param limit number of records to fetch (optional) + * @param state Filter attached App Links by one or more lifecycle states. (optional) + * @param order Sort order for attached App Links. (optional, default to DESC) + * @param style Detail level of the response. (optional, default to MEDIUM) + * @return AppServiceAttachedAppLinks + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successful operation -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
+ */ + public AppServiceAttachedAppLinks getAttachedAppLinksByAppServiceId(@javax.annotation.Nonnull UUID appServiceId, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Integer limit, @javax.annotation.Nullable List state, @javax.annotation.Nullable AttachedAppLinkOrder order, @javax.annotation.Nullable Style style) throws ApiException { + ApiResponse localVarResp = getAttachedAppLinksByAppServiceIdWithHttpInfo(appServiceId, offset, limit, state, order, style); + return localVarResp.getData(); + } + + /** + * Get attached App Links for App Service + * This API provides capability to retrieve App Links attached to an App Service. + * @param appServiceId App Service UUID (required) + * @param offset offset (optional) + * @param limit number of records to fetch (optional) + * @param state Filter attached App Links by one or more lifecycle states. (optional) + * @param order Sort order for attached App Links. (optional, default to DESC) + * @param style Detail level of the response. (optional, default to MEDIUM) + * @return ApiResponse<AppServiceAttachedAppLinks> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successful operation -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
+ */ + public ApiResponse getAttachedAppLinksByAppServiceIdWithHttpInfo(@javax.annotation.Nonnull UUID appServiceId, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Integer limit, @javax.annotation.Nullable List state, @javax.annotation.Nullable AttachedAppLinkOrder order, @javax.annotation.Nullable Style style) throws ApiException { + okhttp3.Call localVarCall = getAttachedAppLinksByAppServiceIdValidateBeforeCall(appServiceId, offset, limit, state, order, style, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get attached App Links for App Service (asynchronously) + * This API provides capability to retrieve App Links attached to an App Service. + * @param appServiceId App Service UUID (required) + * @param offset offset (optional) + * @param limit number of records to fetch (optional) + * @param state Filter attached App Links by one or more lifecycle states. (optional) + * @param order Sort order for attached App Links. (optional, default to DESC) + * @param style Detail level of the response. (optional, default to MEDIUM) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successful operation -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
+ */ + public okhttp3.Call getAttachedAppLinksByAppServiceIdAsync(@javax.annotation.Nonnull UUID appServiceId, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Integer limit, @javax.annotation.Nullable List state, @javax.annotation.Nullable AttachedAppLinkOrder order, @javax.annotation.Nullable Style style, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getAttachedAppLinksByAppServiceIdValidateBeforeCall(appServiceId, offset, limit, state, order, style, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getAttachedAppSubscriptionsByAppServiceId + * @param appServiceId App Service UUID (required) + * @param offset offset (optional) + * @param limit number of records to fetch (optional) + * @param state Filter attached App Subscriptions by one or more lifecycle states. (optional) + * @param order Sort order for attached App Subscriptions. (optional, default to DESC) + * @param style Detail level of the response. (optional, default to MEDIUM) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successful operation -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
+ */ + public okhttp3.Call getAttachedAppSubscriptionsByAppServiceIdCall(@javax.annotation.Nonnull UUID appServiceId, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Integer limit, @javax.annotation.Nullable List state, @javax.annotation.Nullable AttachedAppSubscriptionOrder order, @javax.annotation.Nullable Style style, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/fabric/v4/appServices/{appServiceId}/appSubscriptions" + .replace("{" + "appServiceId" + "}", localVarApiClient.escapeString(appServiceId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (offset != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("offset", offset)); + } + + if (limit != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit)); + } + + if (state != null) { + localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "state", state)); + } + + if (order != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("order", order)); + } + + if (style != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("style", style)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "BearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getAttachedAppSubscriptionsByAppServiceIdValidateBeforeCall(@javax.annotation.Nonnull UUID appServiceId, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Integer limit, @javax.annotation.Nullable List state, @javax.annotation.Nullable AttachedAppSubscriptionOrder order, @javax.annotation.Nullable Style style, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'appServiceId' is set + if (appServiceId == null) { + throw new ApiException("Missing the required parameter 'appServiceId' when calling getAttachedAppSubscriptionsByAppServiceId(Async)"); + } + + return getAttachedAppSubscriptionsByAppServiceIdCall(appServiceId, offset, limit, state, order, style, _callback); + + } + + /** + * Get attached App Subscriptions for App Service + * This API provides capability to retrieve App Subscriptions attached to an App Service. + * @param appServiceId App Service UUID (required) + * @param offset offset (optional) + * @param limit number of records to fetch (optional) + * @param state Filter attached App Subscriptions by one or more lifecycle states. (optional) + * @param order Sort order for attached App Subscriptions. (optional, default to DESC) + * @param style Detail level of the response. (optional, default to MEDIUM) + * @return AppServiceAttachedAppSubscriptions + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successful operation -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
+ */ + public AppServiceAttachedAppSubscriptions getAttachedAppSubscriptionsByAppServiceId(@javax.annotation.Nonnull UUID appServiceId, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Integer limit, @javax.annotation.Nullable List state, @javax.annotation.Nullable AttachedAppSubscriptionOrder order, @javax.annotation.Nullable Style style) throws ApiException { + ApiResponse localVarResp = getAttachedAppSubscriptionsByAppServiceIdWithHttpInfo(appServiceId, offset, limit, state, order, style); + return localVarResp.getData(); + } + + /** + * Get attached App Subscriptions for App Service + * This API provides capability to retrieve App Subscriptions attached to an App Service. + * @param appServiceId App Service UUID (required) + * @param offset offset (optional) + * @param limit number of records to fetch (optional) + * @param state Filter attached App Subscriptions by one or more lifecycle states. (optional) + * @param order Sort order for attached App Subscriptions. (optional, default to DESC) + * @param style Detail level of the response. (optional, default to MEDIUM) + * @return ApiResponse<AppServiceAttachedAppSubscriptions> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successful operation -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
+ */ + public ApiResponse getAttachedAppSubscriptionsByAppServiceIdWithHttpInfo(@javax.annotation.Nonnull UUID appServiceId, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Integer limit, @javax.annotation.Nullable List state, @javax.annotation.Nullable AttachedAppSubscriptionOrder order, @javax.annotation.Nullable Style style) throws ApiException { + okhttp3.Call localVarCall = getAttachedAppSubscriptionsByAppServiceIdValidateBeforeCall(appServiceId, offset, limit, state, order, style, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get attached App Subscriptions for App Service (asynchronously) + * This API provides capability to retrieve App Subscriptions attached to an App Service. + * @param appServiceId App Service UUID (required) + * @param offset offset (optional) + * @param limit number of records to fetch (optional) + * @param state Filter attached App Subscriptions by one or more lifecycle states. (optional) + * @param order Sort order for attached App Subscriptions. (optional, default to DESC) + * @param style Detail level of the response. (optional, default to MEDIUM) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successful operation -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
+ */ + public okhttp3.Call getAttachedAppSubscriptionsByAppServiceIdAsync(@javax.annotation.Nonnull UUID appServiceId, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Integer limit, @javax.annotation.Nullable List state, @javax.annotation.Nullable AttachedAppSubscriptionOrder order, @javax.annotation.Nullable Style style, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getAttachedAppSubscriptionsByAppServiceIdValidateBeforeCall(appServiceId, offset, limit, state, order, style, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for searchAppServices + * @param appServiceSearchRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successful operation -
400 Bad request -
401 Unauthorized -
403 Forbidden -
415 Unsupported Media Type -
500 Internal server error -
+ */ + public okhttp3.Call searchAppServicesCall(@javax.annotation.Nonnull AppServiceSearchRequest appServiceSearchRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = appServiceSearchRequest; + + // create path and map variables + String localVarPath = "/fabric/v4/appServices/search"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "BearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call searchAppServicesValidateBeforeCall(@javax.annotation.Nonnull AppServiceSearchRequest appServiceSearchRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'appServiceSearchRequest' is set + if (appServiceSearchRequest == null) { + throw new ApiException("Missing the required parameter 'appServiceSearchRequest' when calling searchAppServices(Async)"); + } + + return searchAppServicesCall(appServiceSearchRequest, _callback); + + } + + /** + * Search App Services + * The API provides capability to get list of user's App Services using search criteria, including optional filtering, pagination and sorting + * @param appServiceSearchRequest (required) + * @return AppServiceSearchResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successful operation -
400 Bad request -
401 Unauthorized -
403 Forbidden -
415 Unsupported Media Type -
500 Internal server error -
+ */ + public AppServiceSearchResponse searchAppServices(@javax.annotation.Nonnull AppServiceSearchRequest appServiceSearchRequest) throws ApiException { + ApiResponse localVarResp = searchAppServicesWithHttpInfo(appServiceSearchRequest); + return localVarResp.getData(); + } + + /** + * Search App Services + * The API provides capability to get list of user's App Services using search criteria, including optional filtering, pagination and sorting + * @param appServiceSearchRequest (required) + * @return ApiResponse<AppServiceSearchResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successful operation -
400 Bad request -
401 Unauthorized -
403 Forbidden -
415 Unsupported Media Type -
500 Internal server error -
+ */ + public ApiResponse searchAppServicesWithHttpInfo(@javax.annotation.Nonnull AppServiceSearchRequest appServiceSearchRequest) throws ApiException { + okhttp3.Call localVarCall = searchAppServicesValidateBeforeCall(appServiceSearchRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Search App Services (asynchronously) + * The API provides capability to get list of user's App Services using search criteria, including optional filtering, pagination and sorting + * @param appServiceSearchRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successful operation -
400 Bad request -
401 Unauthorized -
403 Forbidden -
415 Unsupported Media Type -
500 Internal server error -
+ */ + public okhttp3.Call searchAppServicesAsync(@javax.annotation.Nonnull AppServiceSearchRequest appServiceSearchRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = searchAppServicesValidateBeforeCall(appServiceSearchRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for searchAttachedAppSubscriptionsByAppServiceId + * @param appServiceId App Service UUID (required) + * @param appServiceAttachedAppSubscriptionSearchRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successful operation -
400 Bad request -
401 Unauthorized -
403 Forbidden -
415 Unsupported Media Type -
500 Internal server error -
+ */ + public okhttp3.Call searchAttachedAppSubscriptionsByAppServiceIdCall(@javax.annotation.Nonnull UUID appServiceId, @javax.annotation.Nonnull AppServiceAttachedAppSubscriptionSearchRequest appServiceAttachedAppSubscriptionSearchRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = appServiceAttachedAppSubscriptionSearchRequest; + + // create path and map variables + String localVarPath = "/fabric/v4/appServices/{appServiceId}/appSubscriptions/search" + .replace("{" + "appServiceId" + "}", localVarApiClient.escapeString(appServiceId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "BearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call searchAttachedAppSubscriptionsByAppServiceIdValidateBeforeCall(@javax.annotation.Nonnull UUID appServiceId, @javax.annotation.Nonnull AppServiceAttachedAppSubscriptionSearchRequest appServiceAttachedAppSubscriptionSearchRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'appServiceId' is set + if (appServiceId == null) { + throw new ApiException("Missing the required parameter 'appServiceId' when calling searchAttachedAppSubscriptionsByAppServiceId(Async)"); + } + + // verify the required parameter 'appServiceAttachedAppSubscriptionSearchRequest' is set + if (appServiceAttachedAppSubscriptionSearchRequest == null) { + throw new ApiException("Missing the required parameter 'appServiceAttachedAppSubscriptionSearchRequest' when calling searchAttachedAppSubscriptionsByAppServiceId(Async)"); + } + + return searchAttachedAppSubscriptionsByAppServiceIdCall(appServiceId, appServiceAttachedAppSubscriptionSearchRequest, _callback); + + } + + /** + * Search attached App Subscriptions + * The API provides capability to get list of App Subscriptions attached to an App Service using search criteria. + * @param appServiceId App Service UUID (required) + * @param appServiceAttachedAppSubscriptionSearchRequest (required) + * @return AppServiceAttachedAppSubscriptionSearchResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successful operation -
400 Bad request -
401 Unauthorized -
403 Forbidden -
415 Unsupported Media Type -
500 Internal server error -
+ */ + public AppServiceAttachedAppSubscriptionSearchResponse searchAttachedAppSubscriptionsByAppServiceId(@javax.annotation.Nonnull UUID appServiceId, @javax.annotation.Nonnull AppServiceAttachedAppSubscriptionSearchRequest appServiceAttachedAppSubscriptionSearchRequest) throws ApiException { + ApiResponse localVarResp = searchAttachedAppSubscriptionsByAppServiceIdWithHttpInfo(appServiceId, appServiceAttachedAppSubscriptionSearchRequest); + return localVarResp.getData(); + } + + /** + * Search attached App Subscriptions + * The API provides capability to get list of App Subscriptions attached to an App Service using search criteria. + * @param appServiceId App Service UUID (required) + * @param appServiceAttachedAppSubscriptionSearchRequest (required) + * @return ApiResponse<AppServiceAttachedAppSubscriptionSearchResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successful operation -
400 Bad request -
401 Unauthorized -
403 Forbidden -
415 Unsupported Media Type -
500 Internal server error -
+ */ + public ApiResponse searchAttachedAppSubscriptionsByAppServiceIdWithHttpInfo(@javax.annotation.Nonnull UUID appServiceId, @javax.annotation.Nonnull AppServiceAttachedAppSubscriptionSearchRequest appServiceAttachedAppSubscriptionSearchRequest) throws ApiException { + okhttp3.Call localVarCall = searchAttachedAppSubscriptionsByAppServiceIdValidateBeforeCall(appServiceId, appServiceAttachedAppSubscriptionSearchRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Search attached App Subscriptions (asynchronously) + * The API provides capability to get list of App Subscriptions attached to an App Service using search criteria. + * @param appServiceId App Service UUID (required) + * @param appServiceAttachedAppSubscriptionSearchRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successful operation -
400 Bad request -
401 Unauthorized -
403 Forbidden -
415 Unsupported Media Type -
500 Internal server error -
+ */ + public okhttp3.Call searchAttachedAppSubscriptionsByAppServiceIdAsync(@javax.annotation.Nonnull UUID appServiceId, @javax.annotation.Nonnull AppServiceAttachedAppSubscriptionSearchRequest appServiceAttachedAppSubscriptionSearchRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = searchAttachedAppSubscriptionsByAppServiceIdValidateBeforeCall(appServiceId, appServiceAttachedAppSubscriptionSearchRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for updateAppServiceByUuid + * @param appServiceId App Service UUID (required) + * @param appServiceChangeOperation (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + + + + +
Response Details
Status Code Description Response Headers
202 App Service object -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
415 Unsupported Media Type -
500 Internal server error -
+ */ + public okhttp3.Call updateAppServiceByUuidCall(@javax.annotation.Nonnull UUID appServiceId, @javax.annotation.Nonnull List appServiceChangeOperation, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = appServiceChangeOperation; + + // create path and map variables + String localVarPath = "/fabric/v4/appServices/{appServiceId}" + .replace("{" + "appServiceId" + "}", localVarApiClient.escapeString(appServiceId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json-patch+json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "BearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call updateAppServiceByUuidValidateBeforeCall(@javax.annotation.Nonnull UUID appServiceId, @javax.annotation.Nonnull List appServiceChangeOperation, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'appServiceId' is set + if (appServiceId == null) { + throw new ApiException("Missing the required parameter 'appServiceId' when calling updateAppServiceByUuid(Async)"); + } + + // verify the required parameter 'appServiceChangeOperation' is set + if (appServiceChangeOperation == null) { + throw new ApiException("Missing the required parameter 'appServiceChangeOperation' when calling updateAppServiceByUuid(Async)"); + } + + return updateAppServiceByUuidCall(appServiceId, appServiceChangeOperation, _callback); + + } + + /** + * Update App Service + * This API provides capability to update user's App Service + * @param appServiceId App Service UUID (required) + * @param appServiceChangeOperation (required) + * @return AppService + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + + + +
Response Details
Status Code Description Response Headers
202 App Service object -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
415 Unsupported Media Type -
500 Internal server error -
+ */ + public AppService updateAppServiceByUuid(@javax.annotation.Nonnull UUID appServiceId, @javax.annotation.Nonnull List appServiceChangeOperation) throws ApiException { + ApiResponse localVarResp = updateAppServiceByUuidWithHttpInfo(appServiceId, appServiceChangeOperation); + return localVarResp.getData(); + } + + /** + * Update App Service + * This API provides capability to update user's App Service + * @param appServiceId App Service UUID (required) + * @param appServiceChangeOperation (required) + * @return ApiResponse<AppService> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + + + +
Response Details
Status Code Description Response Headers
202 App Service object -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
415 Unsupported Media Type -
500 Internal server error -
+ */ + public ApiResponse updateAppServiceByUuidWithHttpInfo(@javax.annotation.Nonnull UUID appServiceId, @javax.annotation.Nonnull List appServiceChangeOperation) throws ApiException { + okhttp3.Call localVarCall = updateAppServiceByUuidValidateBeforeCall(appServiceId, appServiceChangeOperation, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Update App Service (asynchronously) + * This API provides capability to update user's App Service + * @param appServiceId App Service UUID (required) + * @param appServiceChangeOperation (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + + + +
Response Details
Status Code Description Response Headers
202 App Service object -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
415 Unsupported Media Type -
500 Internal server error -
+ */ + public okhttp3.Call updateAppServiceByUuidAsync(@javax.annotation.Nonnull UUID appServiceId, @javax.annotation.Nonnull List appServiceChangeOperation, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = updateAppServiceByUuidValidateBeforeCall(appServiceId, appServiceChangeOperation, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } +} diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/api/ApplicationSubscriptionsApi.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/api/ApplicationSubscriptionsApi.java new file mode 100644 index 00000000..b7f8443f --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/api/ApplicationSubscriptionsApi.java @@ -0,0 +1,820 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.api; + +import com.equinix.sdk.fabricv4.ApiCallback; +import com.equinix.sdk.fabricv4.ApiClient; +import com.equinix.sdk.fabricv4.ApiException; +import com.equinix.sdk.fabricv4.ApiResponse; +import com.equinix.sdk.fabricv4.Configuration; +import com.equinix.sdk.fabricv4.Pair; +import com.equinix.sdk.fabricv4.ProgressRequestBody; +import com.equinix.sdk.fabricv4.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + +import com.equinix.sdk.fabricv4.model.AppSubscription; +import com.equinix.sdk.fabricv4.model.AppSubscriptionChangeOperation; +import com.equinix.sdk.fabricv4.model.AppSubscriptionPostRequest; +import com.equinix.sdk.fabricv4.model.AppSubscriptionSearchRequest; +import com.equinix.sdk.fabricv4.model.AppSubscriptionSearchResponse; +import com.equinix.sdk.fabricv4.model.Error; +import java.util.UUID; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class ApplicationSubscriptionsApi { + private ApiClient localVarApiClient; + private int localHostIndex; + private String localCustomBaseUrl; + + public ApplicationSubscriptionsApi() { + this(Configuration.getDefaultApiClient()); + } + + public ApplicationSubscriptionsApi(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + /** + * Build call for createAppSubscription + * @param appSubscriptionPostRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
202 App Subscription object -
401 Unauthorized -
403 Forbidden -
415 Unsupported Media Type -
500 Internal server error -
+ */ + public okhttp3.Call createAppSubscriptionCall(@javax.annotation.Nonnull AppSubscriptionPostRequest appSubscriptionPostRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = appSubscriptionPostRequest; + + // create path and map variables + String localVarPath = "/fabric/v4/appSubscriptions"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "BearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call createAppSubscriptionValidateBeforeCall(@javax.annotation.Nonnull AppSubscriptionPostRequest appSubscriptionPostRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'appSubscriptionPostRequest' is set + if (appSubscriptionPostRequest == null) { + throw new ApiException("Missing the required parameter 'appSubscriptionPostRequest' when calling createAppSubscription(Async)"); + } + + return createAppSubscriptionCall(appSubscriptionPostRequest, _callback); + + } + + /** + * Create App Subscription + * This API provides capability to create user's App Subscription + * @param appSubscriptionPostRequest (required) + * @return AppSubscription + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
202 App Subscription object -
401 Unauthorized -
403 Forbidden -
415 Unsupported Media Type -
500 Internal server error -
+ */ + public AppSubscription createAppSubscription(@javax.annotation.Nonnull AppSubscriptionPostRequest appSubscriptionPostRequest) throws ApiException { + ApiResponse localVarResp = createAppSubscriptionWithHttpInfo(appSubscriptionPostRequest); + return localVarResp.getData(); + } + + /** + * Create App Subscription + * This API provides capability to create user's App Subscription + * @param appSubscriptionPostRequest (required) + * @return ApiResponse<AppSubscription> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
202 App Subscription object -
401 Unauthorized -
403 Forbidden -
415 Unsupported Media Type -
500 Internal server error -
+ */ + public ApiResponse createAppSubscriptionWithHttpInfo(@javax.annotation.Nonnull AppSubscriptionPostRequest appSubscriptionPostRequest) throws ApiException { + okhttp3.Call localVarCall = createAppSubscriptionValidateBeforeCall(appSubscriptionPostRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Create App Subscription (asynchronously) + * This API provides capability to create user's App Subscription + * @param appSubscriptionPostRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
202 App Subscription object -
401 Unauthorized -
403 Forbidden -
415 Unsupported Media Type -
500 Internal server error -
+ */ + public okhttp3.Call createAppSubscriptionAsync(@javax.annotation.Nonnull AppSubscriptionPostRequest appSubscriptionPostRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = createAppSubscriptionValidateBeforeCall(appSubscriptionPostRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for deleteAppSubscriptionByUuid + * @param appSubscriptionId App Subscription UUID (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
202 App Subscription object -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
+ */ + public okhttp3.Call deleteAppSubscriptionByUuidCall(@javax.annotation.Nonnull UUID appSubscriptionId, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/fabric/v4/appSubscriptions/{appSubscriptionId}" + .replace("{" + "appSubscriptionId" + "}", localVarApiClient.escapeString(appSubscriptionId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "BearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call deleteAppSubscriptionByUuidValidateBeforeCall(@javax.annotation.Nonnull UUID appSubscriptionId, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'appSubscriptionId' is set + if (appSubscriptionId == null) { + throw new ApiException("Missing the required parameter 'appSubscriptionId' when calling deleteAppSubscriptionByUuid(Async)"); + } + + return deleteAppSubscriptionByUuidCall(appSubscriptionId, _callback); + + } + + /** + * Delete App Subscription + * This API provides capability to delete user's App Subscription + * @param appSubscriptionId App Subscription UUID (required) + * @return AppSubscription + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
202 App Subscription object -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
+ */ + public AppSubscription deleteAppSubscriptionByUuid(@javax.annotation.Nonnull UUID appSubscriptionId) throws ApiException { + ApiResponse localVarResp = deleteAppSubscriptionByUuidWithHttpInfo(appSubscriptionId); + return localVarResp.getData(); + } + + /** + * Delete App Subscription + * This API provides capability to delete user's App Subscription + * @param appSubscriptionId App Subscription UUID (required) + * @return ApiResponse<AppSubscription> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
202 App Subscription object -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
+ */ + public ApiResponse deleteAppSubscriptionByUuidWithHttpInfo(@javax.annotation.Nonnull UUID appSubscriptionId) throws ApiException { + okhttp3.Call localVarCall = deleteAppSubscriptionByUuidValidateBeforeCall(appSubscriptionId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Delete App Subscription (asynchronously) + * This API provides capability to delete user's App Subscription + * @param appSubscriptionId App Subscription UUID (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
202 App Subscription object -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
+ */ + public okhttp3.Call deleteAppSubscriptionByUuidAsync(@javax.annotation.Nonnull UUID appSubscriptionId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = deleteAppSubscriptionByUuidValidateBeforeCall(appSubscriptionId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getAppSubscriptionByUuid + * @param appSubscriptionId App Subscription UUID (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 App Subscription object -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
+ */ + public okhttp3.Call getAppSubscriptionByUuidCall(@javax.annotation.Nonnull UUID appSubscriptionId, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/fabric/v4/appSubscriptions/{appSubscriptionId}" + .replace("{" + "appSubscriptionId" + "}", localVarApiClient.escapeString(appSubscriptionId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "BearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getAppSubscriptionByUuidValidateBeforeCall(@javax.annotation.Nonnull UUID appSubscriptionId, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'appSubscriptionId' is set + if (appSubscriptionId == null) { + throw new ApiException("Missing the required parameter 'appSubscriptionId' when calling getAppSubscriptionByUuid(Async)"); + } + + return getAppSubscriptionByUuidCall(appSubscriptionId, _callback); + + } + + /** + * Get App Subscription + * This API provides capability to retrieve user's App Subscription + * @param appSubscriptionId App Subscription UUID (required) + * @return AppSubscription + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 App Subscription object -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
+ */ + public AppSubscription getAppSubscriptionByUuid(@javax.annotation.Nonnull UUID appSubscriptionId) throws ApiException { + ApiResponse localVarResp = getAppSubscriptionByUuidWithHttpInfo(appSubscriptionId); + return localVarResp.getData(); + } + + /** + * Get App Subscription + * This API provides capability to retrieve user's App Subscription + * @param appSubscriptionId App Subscription UUID (required) + * @return ApiResponse<AppSubscription> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 App Subscription object -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
+ */ + public ApiResponse getAppSubscriptionByUuidWithHttpInfo(@javax.annotation.Nonnull UUID appSubscriptionId) throws ApiException { + okhttp3.Call localVarCall = getAppSubscriptionByUuidValidateBeforeCall(appSubscriptionId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get App Subscription (asynchronously) + * This API provides capability to retrieve user's App Subscription + * @param appSubscriptionId App Subscription UUID (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 App Subscription object -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
+ */ + public okhttp3.Call getAppSubscriptionByUuidAsync(@javax.annotation.Nonnull UUID appSubscriptionId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getAppSubscriptionByUuidValidateBeforeCall(appSubscriptionId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for searchAppSubscriptions + * @param appSubscriptionSearchRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successful operation -
400 Bad request -
401 Unauthorized -
403 Forbidden -
415 Unsupported Media Type -
500 Internal server error -
+ */ + public okhttp3.Call searchAppSubscriptionsCall(@javax.annotation.Nonnull AppSubscriptionSearchRequest appSubscriptionSearchRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = appSubscriptionSearchRequest; + + // create path and map variables + String localVarPath = "/fabric/v4/appSubscriptions/search"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "BearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call searchAppSubscriptionsValidateBeforeCall(@javax.annotation.Nonnull AppSubscriptionSearchRequest appSubscriptionSearchRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'appSubscriptionSearchRequest' is set + if (appSubscriptionSearchRequest == null) { + throw new ApiException("Missing the required parameter 'appSubscriptionSearchRequest' when calling searchAppSubscriptions(Async)"); + } + + return searchAppSubscriptionsCall(appSubscriptionSearchRequest, _callback); + + } + + /** + * Search App Subscriptions + * The API provides capability to get list of user's App Subscriptions using search criteria, including optional filtering, pagination and sorting + * @param appSubscriptionSearchRequest (required) + * @return AppSubscriptionSearchResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successful operation -
400 Bad request -
401 Unauthorized -
403 Forbidden -
415 Unsupported Media Type -
500 Internal server error -
+ */ + public AppSubscriptionSearchResponse searchAppSubscriptions(@javax.annotation.Nonnull AppSubscriptionSearchRequest appSubscriptionSearchRequest) throws ApiException { + ApiResponse localVarResp = searchAppSubscriptionsWithHttpInfo(appSubscriptionSearchRequest); + return localVarResp.getData(); + } + + /** + * Search App Subscriptions + * The API provides capability to get list of user's App Subscriptions using search criteria, including optional filtering, pagination and sorting + * @param appSubscriptionSearchRequest (required) + * @return ApiResponse<AppSubscriptionSearchResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successful operation -
400 Bad request -
401 Unauthorized -
403 Forbidden -
415 Unsupported Media Type -
500 Internal server error -
+ */ + public ApiResponse searchAppSubscriptionsWithHttpInfo(@javax.annotation.Nonnull AppSubscriptionSearchRequest appSubscriptionSearchRequest) throws ApiException { + okhttp3.Call localVarCall = searchAppSubscriptionsValidateBeforeCall(appSubscriptionSearchRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Search App Subscriptions (asynchronously) + * The API provides capability to get list of user's App Subscriptions using search criteria, including optional filtering, pagination and sorting + * @param appSubscriptionSearchRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successful operation -
400 Bad request -
401 Unauthorized -
403 Forbidden -
415 Unsupported Media Type -
500 Internal server error -
+ */ + public okhttp3.Call searchAppSubscriptionsAsync(@javax.annotation.Nonnull AppSubscriptionSearchRequest appSubscriptionSearchRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = searchAppSubscriptionsValidateBeforeCall(appSubscriptionSearchRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for updateAppSubscriptionByUuid + * @param appSubscriptionId App Subscription UUID (required) + * @param appSubscriptionChangeOperation (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + + + + +
Response Details
Status Code Description Response Headers
202 App Subscription object -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
415 Unsupported Media Type -
500 Internal server error -
+ */ + public okhttp3.Call updateAppSubscriptionByUuidCall(@javax.annotation.Nonnull UUID appSubscriptionId, @javax.annotation.Nonnull List appSubscriptionChangeOperation, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = appSubscriptionChangeOperation; + + // create path and map variables + String localVarPath = "/fabric/v4/appSubscriptions/{appSubscriptionId}" + .replace("{" + "appSubscriptionId" + "}", localVarApiClient.escapeString(appSubscriptionId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json-patch+json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "BearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call updateAppSubscriptionByUuidValidateBeforeCall(@javax.annotation.Nonnull UUID appSubscriptionId, @javax.annotation.Nonnull List appSubscriptionChangeOperation, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'appSubscriptionId' is set + if (appSubscriptionId == null) { + throw new ApiException("Missing the required parameter 'appSubscriptionId' when calling updateAppSubscriptionByUuid(Async)"); + } + + // verify the required parameter 'appSubscriptionChangeOperation' is set + if (appSubscriptionChangeOperation == null) { + throw new ApiException("Missing the required parameter 'appSubscriptionChangeOperation' when calling updateAppSubscriptionByUuid(Async)"); + } + + return updateAppSubscriptionByUuidCall(appSubscriptionId, appSubscriptionChangeOperation, _callback); + + } + + /** + * Update App Subscription + * This API provides capability to update user's App Subscription + * @param appSubscriptionId App Subscription UUID (required) + * @param appSubscriptionChangeOperation (required) + * @return AppSubscription + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + + + +
Response Details
Status Code Description Response Headers
202 App Subscription object -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
415 Unsupported Media Type -
500 Internal server error -
+ */ + public AppSubscription updateAppSubscriptionByUuid(@javax.annotation.Nonnull UUID appSubscriptionId, @javax.annotation.Nonnull List appSubscriptionChangeOperation) throws ApiException { + ApiResponse localVarResp = updateAppSubscriptionByUuidWithHttpInfo(appSubscriptionId, appSubscriptionChangeOperation); + return localVarResp.getData(); + } + + /** + * Update App Subscription + * This API provides capability to update user's App Subscription + * @param appSubscriptionId App Subscription UUID (required) + * @param appSubscriptionChangeOperation (required) + * @return ApiResponse<AppSubscription> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + + + +
Response Details
Status Code Description Response Headers
202 App Subscription object -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
415 Unsupported Media Type -
500 Internal server error -
+ */ + public ApiResponse updateAppSubscriptionByUuidWithHttpInfo(@javax.annotation.Nonnull UUID appSubscriptionId, @javax.annotation.Nonnull List appSubscriptionChangeOperation) throws ApiException { + okhttp3.Call localVarCall = updateAppSubscriptionByUuidValidateBeforeCall(appSubscriptionId, appSubscriptionChangeOperation, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Update App Subscription (asynchronously) + * This API provides capability to update user's App Subscription + * @param appSubscriptionId App Subscription UUID (required) + * @param appSubscriptionChangeOperation (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + + + +
Response Details
Status Code Description Response Headers
202 App Subscription object -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
415 Unsupported Media Type -
500 Internal server error -
+ */ + public okhttp3.Call updateAppSubscriptionByUuidAsync(@javax.annotation.Nonnull UUID appSubscriptionId, @javax.annotation.Nonnull List appSubscriptionChangeOperation, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = updateAppSubscriptionByUuidValidateBeforeCall(appSubscriptionId, appSubscriptionChangeOperation, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } +} diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/api/CloudEventsApi.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/api/CloudEventsApi.java index 03c29ef9..25e39ac4 100644 --- a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/api/CloudEventsApi.java +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/api/CloudEventsApi.java @@ -31,6 +31,8 @@ import com.equinix.sdk.fabricv4.model.Error; import com.equinix.sdk.fabricv4.model.GetCloudEventsByAssetResponse; import java.time.OffsetDateTime; +import com.equinix.sdk.fabricv4.model.OperationalEventSearchRequest; +import com.equinix.sdk.fabricv4.model.SearchOperationalEventResponse; import java.util.UUID; import java.lang.reflect.Type; @@ -547,4 +549,147 @@ public okhttp3.Call searchCloudEventsAsync(@javax.annotation.Nonnull CloudEventS localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } + /** + * Build call for searchLastOpEvents + * @param operationalEventSearchRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successful operation -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
+ */ + public okhttp3.Call searchLastOpEventsCall(@javax.annotation.Nonnull OperationalEventSearchRequest operationalEventSearchRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = operationalEventSearchRequest; + + // create path and map variables + String localVarPath = "/fabric/v4/latestOperationalEvents/search"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "BearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call searchLastOpEventsValidateBeforeCall(@javax.annotation.Nonnull OperationalEventSearchRequest operationalEventSearchRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'operationalEventSearchRequest' is set + if (operationalEventSearchRequest == null) { + throw new ApiException("Missing the required parameter 'operationalEventSearchRequest' when calling searchLastOpEvents(Async)"); + } + + return searchLastOpEventsCall(operationalEventSearchRequest, _callback); + + } + + /** + * Search Last Operational Cloud Events + * This API provides capability to search last operational cloud events from a filtered query + * @param operationalEventSearchRequest (required) + * @return SearchOperationalEventResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successful operation -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
+ */ + public SearchOperationalEventResponse searchLastOpEvents(@javax.annotation.Nonnull OperationalEventSearchRequest operationalEventSearchRequest) throws ApiException { + ApiResponse localVarResp = searchLastOpEventsWithHttpInfo(operationalEventSearchRequest); + return localVarResp.getData(); + } + + /** + * Search Last Operational Cloud Events + * This API provides capability to search last operational cloud events from a filtered query + * @param operationalEventSearchRequest (required) + * @return ApiResponse<SearchOperationalEventResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successful operation -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
+ */ + public ApiResponse searchLastOpEventsWithHttpInfo(@javax.annotation.Nonnull OperationalEventSearchRequest operationalEventSearchRequest) throws ApiException { + okhttp3.Call localVarCall = searchLastOpEventsValidateBeforeCall(operationalEventSearchRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Search Last Operational Cloud Events (asynchronously) + * This API provides capability to search last operational cloud events from a filtered query + * @param operationalEventSearchRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successful operation -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
+ */ + public okhttp3.Call searchLastOpEventsAsync(@javax.annotation.Nonnull OperationalEventSearchRequest operationalEventSearchRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = searchLastOpEventsValidateBeforeCall(operationalEventSearchRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } } diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/api/CloudRoutersApi.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/api/CloudRoutersApi.java index 5d3957e3..dd37b026 100644 --- a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/api/CloudRoutersApi.java +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/api/CloudRoutersApi.java @@ -38,6 +38,7 @@ import com.equinix.sdk.fabricv4.model.CloudRouterCommandSearchResponse; import com.equinix.sdk.fabricv4.model.CloudRouterPackage; import com.equinix.sdk.fabricv4.model.CloudRouterPostRequest; +import com.equinix.sdk.fabricv4.model.CloudRouterReadResponse; import com.equinix.sdk.fabricv4.model.CloudRouterSearchRequest; import com.equinix.sdk.fabricv4.model.ConnectionRouteSearchRequest; import com.equinix.sdk.fabricv4.model.ConnectionRouteTableEntrySearchResponse; @@ -1422,7 +1423,7 @@ private okhttp3.Call getCloudRouterByUuidValidateBeforeCall(@javax.annotation.No * Get Routers * This API provides capability to retrieve user's Cloud Routers * @param routerId Cloud Router UUID (required) - * @return CloudRouter + * @return CloudRouterReadResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -1435,8 +1436,8 @@ private okhttp3.Call getCloudRouterByUuidValidateBeforeCall(@javax.annotation.No
500 Internal server error -
*/ - public CloudRouter getCloudRouterByUuid(@javax.annotation.Nonnull UUID routerId) throws ApiException { - ApiResponse localVarResp = getCloudRouterByUuidWithHttpInfo(routerId); + public CloudRouterReadResponse getCloudRouterByUuid(@javax.annotation.Nonnull UUID routerId) throws ApiException { + ApiResponse localVarResp = getCloudRouterByUuidWithHttpInfo(routerId); return localVarResp.getData(); } @@ -1444,7 +1445,7 @@ public CloudRouter getCloudRouterByUuid(@javax.annotation.Nonnull UUID routerId) * Get Routers * This API provides capability to retrieve user's Cloud Routers * @param routerId Cloud Router UUID (required) - * @return ApiResponse<CloudRouter> + * @return ApiResponse<CloudRouterReadResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -1457,9 +1458,9 @@ public CloudRouter getCloudRouterByUuid(@javax.annotation.Nonnull UUID routerId)
500 Internal server error -
*/ - public ApiResponse getCloudRouterByUuidWithHttpInfo(@javax.annotation.Nonnull UUID routerId) throws ApiException { + public ApiResponse getCloudRouterByUuidWithHttpInfo(@javax.annotation.Nonnull UUID routerId) throws ApiException { okhttp3.Call localVarCall = getCloudRouterByUuidValidateBeforeCall(routerId, null); - Type localVarReturnType = new TypeToken(){}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -1481,10 +1482,10 @@ public ApiResponse getCloudRouterByUuidWithHttpInfo(@javax.annotati 500 Internal server error - */ - public okhttp3.Call getCloudRouterByUuidAsync(@javax.annotation.Nonnull UUID routerId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getCloudRouterByUuidAsync(@javax.annotation.Nonnull UUID routerId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getCloudRouterByUuidValidateBeforeCall(routerId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/api/CompanyProfilesApi.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/api/CompanyProfilesApi.java index adec5764..a285d6d0 100644 --- a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/api/CompanyProfilesApi.java +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/api/CompanyProfilesApi.java @@ -537,7 +537,7 @@ public okhttp3.Call attachTagToProfileAsync(@javax.annotation.Nonnull String com - + @@ -609,7 +609,7 @@ private okhttp3.Call createCompanyProfileValidateBeforeCall(@javax.annotation.No
Response Details
Status Code Description Response Headers
201 Company profile created successfully -
202 Company profile created and pending for approval -
400 Bad request -
401 Unauthorized -
403 Forbidden -
- + @@ -630,7 +630,7 @@ public CompanyProfileResponse createCompanyProfile(@javax.annotation.Nonnull Com
Response Details
Status Code Description Response Headers
201 Company profile created successfully -
202 Company profile created and pending for approval -
400 Bad request -
401 Unauthorized -
403 Forbidden -
- + @@ -653,7 +653,7 @@ public ApiResponse createCompanyProfileWithHttpInfo(@jav
Response Details
Status Code Description Response Headers
201 Company profile created successfully -
202 Company profile created and pending for approval -
400 Bad request -
401 Unauthorized -
403 Forbidden -
- + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/api/FabricOneApi.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/api/FabricOneApi.java new file mode 100644 index 00000000..7e4662c4 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/api/FabricOneApi.java @@ -0,0 +1,808 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.api; + +import com.equinix.sdk.fabricv4.ApiCallback; +import com.equinix.sdk.fabricv4.ApiClient; +import com.equinix.sdk.fabricv4.ApiException; +import com.equinix.sdk.fabricv4.ApiResponse; +import com.equinix.sdk.fabricv4.Configuration; +import com.equinix.sdk.fabricv4.Pair; +import com.equinix.sdk.fabricv4.ProgressRequestBody; +import com.equinix.sdk.fabricv4.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + +import com.equinix.sdk.fabricv4.model.AllInterconnectPackagesResponse; +import com.equinix.sdk.fabricv4.model.Error; +import com.equinix.sdk.fabricv4.model.Interconnect; +import com.equinix.sdk.fabricv4.model.InterconnectPostRequest; +import com.equinix.sdk.fabricv4.model.InterconnectSearchRequest; +import com.equinix.sdk.fabricv4.model.InterconnectSearchResponse; +import java.util.UUID; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class FabricOneApi { + private ApiClient localVarApiClient; + private int localHostIndex; + private String localCustomBaseUrl; + + public FabricOneApi() { + this(Configuration.getDefaultApiClient()); + } + + public FabricOneApi(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + /** + * Build call for createInterconnect + * @param interconnectPostRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details +
Response Details
Status Code Description Response Headers
201 Company profile created successfully -
202 Company profile created and pending for approval -
400 Bad request -
401 Unauthorized -
403 Forbidden -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
201 Interconnect created successfully -
400 Bad request -
401 Unauthorized -
403 Forbidden -
415 Unsupported Media Type -
500 Internal server error -
+ */ + public okhttp3.Call createInterconnectCall(@javax.annotation.Nonnull InterconnectPostRequest interconnectPostRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = interconnectPostRequest; + + // create path and map variables + String localVarPath = "/fabric/v4/interconnects"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "BearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call createInterconnectValidateBeforeCall(@javax.annotation.Nonnull InterconnectPostRequest interconnectPostRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'interconnectPostRequest' is set + if (interconnectPostRequest == null) { + throw new ApiException("Missing the required parameter 'interconnectPostRequest' when calling createInterconnect(Async)"); + } + + return createInterconnectCall(interconnectPostRequest, _callback); + + } + + /** + * Create Interconnect + * This API provides capability to create user's Interconnect <font color=\"red\"> <sup color='red'>Beta</sup></font> + * @param interconnectPostRequest (required) + * @return Interconnect + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
201 Interconnect created successfully -
400 Bad request -
401 Unauthorized -
403 Forbidden -
415 Unsupported Media Type -
500 Internal server error -
+ */ + public Interconnect createInterconnect(@javax.annotation.Nonnull InterconnectPostRequest interconnectPostRequest) throws ApiException { + ApiResponse localVarResp = createInterconnectWithHttpInfo(interconnectPostRequest); + return localVarResp.getData(); + } + + /** + * Create Interconnect + * This API provides capability to create user's Interconnect <font color=\"red\"> <sup color='red'>Beta</sup></font> + * @param interconnectPostRequest (required) + * @return ApiResponse<Interconnect> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
201 Interconnect created successfully -
400 Bad request -
401 Unauthorized -
403 Forbidden -
415 Unsupported Media Type -
500 Internal server error -
+ */ + public ApiResponse createInterconnectWithHttpInfo(@javax.annotation.Nonnull InterconnectPostRequest interconnectPostRequest) throws ApiException { + okhttp3.Call localVarCall = createInterconnectValidateBeforeCall(interconnectPostRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Create Interconnect (asynchronously) + * This API provides capability to create user's Interconnect <font color=\"red\"> <sup color='red'>Beta</sup></font> + * @param interconnectPostRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
201 Interconnect created successfully -
400 Bad request -
401 Unauthorized -
403 Forbidden -
415 Unsupported Media Type -
500 Internal server error -
+ */ + public okhttp3.Call createInterconnectAsync(@javax.annotation.Nonnull InterconnectPostRequest interconnectPostRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = createInterconnectValidateBeforeCall(interconnectPostRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for deleteInterconnectByUuid + * @param interconnectId Interconnect UUID (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
202 Fabric Interconnect object -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
+ */ + public okhttp3.Call deleteInterconnectByUuidCall(@javax.annotation.Nonnull UUID interconnectId, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/fabric/v4/interconnects/{interconnectId}" + .replace("{" + "interconnectId" + "}", localVarApiClient.escapeString(interconnectId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "BearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call deleteInterconnectByUuidValidateBeforeCall(@javax.annotation.Nonnull UUID interconnectId, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'interconnectId' is set + if (interconnectId == null) { + throw new ApiException("Missing the required parameter 'interconnectId' when calling deleteInterconnectByUuid(Async)"); + } + + return deleteInterconnectByUuidCall(interconnectId, _callback); + + } + + /** + * Delete Interconnect By ID + * This API provides capability to delete user's Interconnect <font color=\"red\"> <sup color='red'>Beta</sup></font> + * @param interconnectId Interconnect UUID (required) + * @return Interconnect + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
202 Fabric Interconnect object -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
+ */ + public Interconnect deleteInterconnectByUuid(@javax.annotation.Nonnull UUID interconnectId) throws ApiException { + ApiResponse localVarResp = deleteInterconnectByUuidWithHttpInfo(interconnectId); + return localVarResp.getData(); + } + + /** + * Delete Interconnect By ID + * This API provides capability to delete user's Interconnect <font color=\"red\"> <sup color='red'>Beta</sup></font> + * @param interconnectId Interconnect UUID (required) + * @return ApiResponse<Interconnect> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
202 Fabric Interconnect object -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
+ */ + public ApiResponse deleteInterconnectByUuidWithHttpInfo(@javax.annotation.Nonnull UUID interconnectId) throws ApiException { + okhttp3.Call localVarCall = deleteInterconnectByUuidValidateBeforeCall(interconnectId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Delete Interconnect By ID (asynchronously) + * This API provides capability to delete user's Interconnect <font color=\"red\"> <sup color='red'>Beta</sup></font> + * @param interconnectId Interconnect UUID (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
202 Fabric Interconnect object -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
+ */ + public okhttp3.Call deleteInterconnectByUuidAsync(@javax.annotation.Nonnull UUID interconnectId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = deleteInterconnectByUuidValidateBeforeCall(interconnectId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getInterconnectByUuid + * @param interconnectId Interconnect UUID (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + +
Response Details
Status Code Description Response Headers
200 Interconnect object -
401 Unauthorized -
403 Forbidden -
404 Not Found -
+ */ + public okhttp3.Call getInterconnectByUuidCall(@javax.annotation.Nonnull UUID interconnectId, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/fabric/v4/interconnects/{interconnectId}" + .replace("{" + "interconnectId" + "}", localVarApiClient.escapeString(interconnectId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "BearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getInterconnectByUuidValidateBeforeCall(@javax.annotation.Nonnull UUID interconnectId, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'interconnectId' is set + if (interconnectId == null) { + throw new ApiException("Missing the required parameter 'interconnectId' when calling getInterconnectByUuid(Async)"); + } + + return getInterconnectByUuidCall(interconnectId, _callback); + + } + + /** + * Get Interconnect By ID + * This API provides capability to retrieve user's Interconnect <font color=\"red\"> <sup color='red'>Beta</sup></font> + * @param interconnectId Interconnect UUID (required) + * @return Interconnect + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + +
Response Details
Status Code Description Response Headers
200 Interconnect object -
401 Unauthorized -
403 Forbidden -
404 Not Found -
+ */ + public Interconnect getInterconnectByUuid(@javax.annotation.Nonnull UUID interconnectId) throws ApiException { + ApiResponse localVarResp = getInterconnectByUuidWithHttpInfo(interconnectId); + return localVarResp.getData(); + } + + /** + * Get Interconnect By ID + * This API provides capability to retrieve user's Interconnect <font color=\"red\"> <sup color='red'>Beta</sup></font> + * @param interconnectId Interconnect UUID (required) + * @return ApiResponse<Interconnect> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + +
Response Details
Status Code Description Response Headers
200 Interconnect object -
401 Unauthorized -
403 Forbidden -
404 Not Found -
+ */ + public ApiResponse getInterconnectByUuidWithHttpInfo(@javax.annotation.Nonnull UUID interconnectId) throws ApiException { + okhttp3.Call localVarCall = getInterconnectByUuidValidateBeforeCall(interconnectId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get Interconnect By ID (asynchronously) + * This API provides capability to retrieve user's Interconnect <font color=\"red\"> <sup color='red'>Beta</sup></font> + * @param interconnectId Interconnect UUID (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + +
Response Details
Status Code Description Response Headers
200 Interconnect object -
401 Unauthorized -
403 Forbidden -
404 Not Found -
+ */ + public okhttp3.Call getInterconnectByUuidAsync(@javax.annotation.Nonnull UUID interconnectId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getInterconnectByUuidValidateBeforeCall(interconnectId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getInterconnectPackages + * @param offset offset (optional) + * @param limit number of records to fetch (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successful operation -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
415 Unsupported Media Type -
+ */ + public okhttp3.Call getInterconnectPackagesCall(@javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Integer limit, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/fabric/v4/interconnectPackages"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (offset != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("offset", offset)); + } + + if (limit != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "BearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getInterconnectPackagesValidateBeforeCall(@javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Integer limit, final ApiCallback _callback) throws ApiException { + return getInterconnectPackagesCall(offset, limit, _callback); + + } + + /** + * Get All Interconnect Packages + * Get All Interconnect Packages returns details of all available interconnect packages for the specified user credentials. <font color=\"red\"> <sup color='red'>Beta</sup></font> + * @param offset offset (optional) + * @param limit number of records to fetch (optional) + * @return AllInterconnectPackagesResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successful operation -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
415 Unsupported Media Type -
+ */ + public AllInterconnectPackagesResponse getInterconnectPackages(@javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Integer limit) throws ApiException { + ApiResponse localVarResp = getInterconnectPackagesWithHttpInfo(offset, limit); + return localVarResp.getData(); + } + + /** + * Get All Interconnect Packages + * Get All Interconnect Packages returns details of all available interconnect packages for the specified user credentials. <font color=\"red\"> <sup color='red'>Beta</sup></font> + * @param offset offset (optional) + * @param limit number of records to fetch (optional) + * @return ApiResponse<AllInterconnectPackagesResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successful operation -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
415 Unsupported Media Type -
+ */ + public ApiResponse getInterconnectPackagesWithHttpInfo(@javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Integer limit) throws ApiException { + okhttp3.Call localVarCall = getInterconnectPackagesValidateBeforeCall(offset, limit, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get All Interconnect Packages (asynchronously) + * Get All Interconnect Packages returns details of all available interconnect packages for the specified user credentials. <font color=\"red\"> <sup color='red'>Beta</sup></font> + * @param offset offset (optional) + * @param limit number of records to fetch (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successful operation -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
415 Unsupported Media Type -
+ */ + public okhttp3.Call getInterconnectPackagesAsync(@javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Integer limit, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getInterconnectPackagesValidateBeforeCall(offset, limit, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for searchInterconnects + * @param interconnectSearchRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Fabric Interconnect Search Response -
400 Bad request -
401 Unauthorized -
403 Forbidden -
415 Unsupported Media Type -
500 Internal server error -
+ */ + public okhttp3.Call searchInterconnectsCall(@javax.annotation.Nonnull InterconnectSearchRequest interconnectSearchRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = interconnectSearchRequest; + + // create path and map variables + String localVarPath = "/fabric/v4/interconnects/search"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "BearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call searchInterconnectsValidateBeforeCall(@javax.annotation.Nonnull InterconnectSearchRequest interconnectSearchRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'interconnectSearchRequest' is set + if (interconnectSearchRequest == null) { + throw new ApiException("Missing the required parameter 'interconnectSearchRequest' when calling searchInterconnects(Async)"); + } + + return searchInterconnectsCall(interconnectSearchRequest, _callback); + + } + + /** + * Search Interconnects + * The API provides capability to get list of user's Interconnects using search criteria, including optional filtering, pagination and sorting <font color=\"red\"> <sup color='red'>Beta</sup></font> + * @param interconnectSearchRequest (required) + * @return InterconnectSearchResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Fabric Interconnect Search Response -
400 Bad request -
401 Unauthorized -
403 Forbidden -
415 Unsupported Media Type -
500 Internal server error -
+ */ + public InterconnectSearchResponse searchInterconnects(@javax.annotation.Nonnull InterconnectSearchRequest interconnectSearchRequest) throws ApiException { + ApiResponse localVarResp = searchInterconnectsWithHttpInfo(interconnectSearchRequest); + return localVarResp.getData(); + } + + /** + * Search Interconnects + * The API provides capability to get list of user's Interconnects using search criteria, including optional filtering, pagination and sorting <font color=\"red\"> <sup color='red'>Beta</sup></font> + * @param interconnectSearchRequest (required) + * @return ApiResponse<InterconnectSearchResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Fabric Interconnect Search Response -
400 Bad request -
401 Unauthorized -
403 Forbidden -
415 Unsupported Media Type -
500 Internal server error -
+ */ + public ApiResponse searchInterconnectsWithHttpInfo(@javax.annotation.Nonnull InterconnectSearchRequest interconnectSearchRequest) throws ApiException { + okhttp3.Call localVarCall = searchInterconnectsValidateBeforeCall(interconnectSearchRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Search Interconnects (asynchronously) + * The API provides capability to get list of user's Interconnects using search criteria, including optional filtering, pagination and sorting <font color=\"red\"> <sup color='red'>Beta</sup></font> + * @param interconnectSearchRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Fabric Interconnect Search Response -
400 Bad request -
401 Unauthorized -
403 Forbidden -
415 Unsupported Media Type -
500 Internal server error -
+ */ + public okhttp3.Call searchInterconnectsAsync(@javax.annotation.Nonnull InterconnectSearchRequest interconnectSearchRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = searchInterconnectsValidateBeforeCall(interconnectSearchRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } +} diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/api/GatewaysApi.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/api/GatewaysApi.java new file mode 100644 index 00000000..8bf3eedf --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/api/GatewaysApi.java @@ -0,0 +1,667 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.api; + +import com.equinix.sdk.fabricv4.ApiCallback; +import com.equinix.sdk.fabricv4.ApiClient; +import com.equinix.sdk.fabricv4.ApiException; +import com.equinix.sdk.fabricv4.ApiResponse; +import com.equinix.sdk.fabricv4.Configuration; +import com.equinix.sdk.fabricv4.Pair; +import com.equinix.sdk.fabricv4.ProgressRequestBody; +import com.equinix.sdk.fabricv4.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + +import com.equinix.sdk.fabricv4.model.Error; +import com.equinix.sdk.fabricv4.model.Gateway; +import com.equinix.sdk.fabricv4.model.GatewayChangeOperation; +import com.equinix.sdk.fabricv4.model.GatewayPostRequest; +import java.util.UUID; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class GatewaysApi { + private ApiClient localVarApiClient; + private int localHostIndex; + private String localCustomBaseUrl; + + public GatewaysApi() { + this(Configuration.getDefaultApiClient()); + } + + public GatewaysApi(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + /** + * Build call for createGateway + * @param gatewayPostRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
202 Gateway object -
400 Bad request -
401 Unauthorized -
403 Forbidden -
415 Unsupported Media Type -
500 Internal server error -
+ */ + public okhttp3.Call createGatewayCall(@javax.annotation.Nonnull GatewayPostRequest gatewayPostRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = gatewayPostRequest; + + // create path and map variables + String localVarPath = "/fabric/v4/gateways"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "BearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call createGatewayValidateBeforeCall(@javax.annotation.Nonnull GatewayPostRequest gatewayPostRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'gatewayPostRequest' is set + if (gatewayPostRequest == null) { + throw new ApiException("Missing the required parameter 'gatewayPostRequest' when calling createGateway(Async)"); + } + + return createGatewayCall(gatewayPostRequest, _callback); + + } + + /** + * Create Gateway + * This API provides capability to create user's Gateways + * @param gatewayPostRequest (required) + * @return Gateway + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
202 Gateway object -
400 Bad request -
401 Unauthorized -
403 Forbidden -
415 Unsupported Media Type -
500 Internal server error -
+ */ + public Gateway createGateway(@javax.annotation.Nonnull GatewayPostRequest gatewayPostRequest) throws ApiException { + ApiResponse localVarResp = createGatewayWithHttpInfo(gatewayPostRequest); + return localVarResp.getData(); + } + + /** + * Create Gateway + * This API provides capability to create user's Gateways + * @param gatewayPostRequest (required) + * @return ApiResponse<Gateway> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
202 Gateway object -
400 Bad request -
401 Unauthorized -
403 Forbidden -
415 Unsupported Media Type -
500 Internal server error -
+ */ + public ApiResponse createGatewayWithHttpInfo(@javax.annotation.Nonnull GatewayPostRequest gatewayPostRequest) throws ApiException { + okhttp3.Call localVarCall = createGatewayValidateBeforeCall(gatewayPostRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Create Gateway (asynchronously) + * This API provides capability to create user's Gateways + * @param gatewayPostRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
202 Gateway object -
400 Bad request -
401 Unauthorized -
403 Forbidden -
415 Unsupported Media Type -
500 Internal server error -
+ */ + public okhttp3.Call createGatewayAsync(@javax.annotation.Nonnull GatewayPostRequest gatewayPostRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = createGatewayValidateBeforeCall(gatewayPostRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for deleteGatewayByUuid + * @param gatewayId Gateway UUID (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
202 Gateway object -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
+ */ + public okhttp3.Call deleteGatewayByUuidCall(@javax.annotation.Nonnull UUID gatewayId, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/fabric/v4/gateways/{gatewayId}" + .replace("{" + "gatewayId" + "}", localVarApiClient.escapeString(gatewayId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "BearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call deleteGatewayByUuidValidateBeforeCall(@javax.annotation.Nonnull UUID gatewayId, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'gatewayId' is set + if (gatewayId == null) { + throw new ApiException("Missing the required parameter 'gatewayId' when calling deleteGatewayByUuid(Async)"); + } + + return deleteGatewayByUuidCall(gatewayId, _callback); + + } + + /** + * Delete Gateway + * This API provides capability to delete user's Gateways + * @param gatewayId Gateway UUID (required) + * @return Gateway + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
202 Gateway object -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
+ */ + public Gateway deleteGatewayByUuid(@javax.annotation.Nonnull UUID gatewayId) throws ApiException { + ApiResponse localVarResp = deleteGatewayByUuidWithHttpInfo(gatewayId); + return localVarResp.getData(); + } + + /** + * Delete Gateway + * This API provides capability to delete user's Gateways + * @param gatewayId Gateway UUID (required) + * @return ApiResponse<Gateway> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
202 Gateway object -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
+ */ + public ApiResponse deleteGatewayByUuidWithHttpInfo(@javax.annotation.Nonnull UUID gatewayId) throws ApiException { + okhttp3.Call localVarCall = deleteGatewayByUuidValidateBeforeCall(gatewayId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Delete Gateway (asynchronously) + * This API provides capability to delete user's Gateways + * @param gatewayId Gateway UUID (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
202 Gateway object -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
+ */ + public okhttp3.Call deleteGatewayByUuidAsync(@javax.annotation.Nonnull UUID gatewayId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = deleteGatewayByUuidValidateBeforeCall(gatewayId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getGatewayByUuid + * @param gatewayId Gateway UUID (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Gateway object -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
+ */ + public okhttp3.Call getGatewayByUuidCall(@javax.annotation.Nonnull UUID gatewayId, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/fabric/v4/gateways/{gatewayId}" + .replace("{" + "gatewayId" + "}", localVarApiClient.escapeString(gatewayId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "BearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getGatewayByUuidValidateBeforeCall(@javax.annotation.Nonnull UUID gatewayId, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'gatewayId' is set + if (gatewayId == null) { + throw new ApiException("Missing the required parameter 'gatewayId' when calling getGatewayByUuid(Async)"); + } + + return getGatewayByUuidCall(gatewayId, _callback); + + } + + /** + * Get Gateway + * This API provides capability to retrieve user's Gateways + * @param gatewayId Gateway UUID (required) + * @return Gateway + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Gateway object -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
+ */ + public Gateway getGatewayByUuid(@javax.annotation.Nonnull UUID gatewayId) throws ApiException { + ApiResponse localVarResp = getGatewayByUuidWithHttpInfo(gatewayId); + return localVarResp.getData(); + } + + /** + * Get Gateway + * This API provides capability to retrieve user's Gateways + * @param gatewayId Gateway UUID (required) + * @return ApiResponse<Gateway> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Gateway object -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
+ */ + public ApiResponse getGatewayByUuidWithHttpInfo(@javax.annotation.Nonnull UUID gatewayId) throws ApiException { + okhttp3.Call localVarCall = getGatewayByUuidValidateBeforeCall(gatewayId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get Gateway (asynchronously) + * This API provides capability to retrieve user's Gateways + * @param gatewayId Gateway UUID (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Gateway object -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
+ */ + public okhttp3.Call getGatewayByUuidAsync(@javax.annotation.Nonnull UUID gatewayId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getGatewayByUuidValidateBeforeCall(gatewayId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for updateGatewayByUuid + * @param gatewayId Gateway UUID (required) + * @param gatewayChangeOperation (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
202 Gateway object -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
+ */ + public okhttp3.Call updateGatewayByUuidCall(@javax.annotation.Nonnull UUID gatewayId, @javax.annotation.Nonnull List gatewayChangeOperation, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = gatewayChangeOperation; + + // create path and map variables + String localVarPath = "/fabric/v4/gateways/{gatewayId}" + .replace("{" + "gatewayId" + "}", localVarApiClient.escapeString(gatewayId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json-patch+json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "BearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call updateGatewayByUuidValidateBeforeCall(@javax.annotation.Nonnull UUID gatewayId, @javax.annotation.Nonnull List gatewayChangeOperation, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'gatewayId' is set + if (gatewayId == null) { + throw new ApiException("Missing the required parameter 'gatewayId' when calling updateGatewayByUuid(Async)"); + } + + // verify the required parameter 'gatewayChangeOperation' is set + if (gatewayChangeOperation == null) { + throw new ApiException("Missing the required parameter 'gatewayChangeOperation' when calling updateGatewayByUuid(Async)"); + } + + return updateGatewayByUuidCall(gatewayId, gatewayChangeOperation, _callback); + + } + + /** + * Update Gateway by ID + * Update Gateway by Uuid + * @param gatewayId Gateway UUID (required) + * @param gatewayChangeOperation (required) + * @return Gateway + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
202 Gateway object -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
+ */ + public Gateway updateGatewayByUuid(@javax.annotation.Nonnull UUID gatewayId, @javax.annotation.Nonnull List gatewayChangeOperation) throws ApiException { + ApiResponse localVarResp = updateGatewayByUuidWithHttpInfo(gatewayId, gatewayChangeOperation); + return localVarResp.getData(); + } + + /** + * Update Gateway by ID + * Update Gateway by Uuid + * @param gatewayId Gateway UUID (required) + * @param gatewayChangeOperation (required) + * @return ApiResponse<Gateway> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
202 Gateway object -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
+ */ + public ApiResponse updateGatewayByUuidWithHttpInfo(@javax.annotation.Nonnull UUID gatewayId, @javax.annotation.Nonnull List gatewayChangeOperation) throws ApiException { + okhttp3.Call localVarCall = updateGatewayByUuidValidateBeforeCall(gatewayId, gatewayChangeOperation, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Update Gateway by ID (asynchronously) + * Update Gateway by Uuid + * @param gatewayId Gateway UUID (required) + * @param gatewayChangeOperation (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
202 Gateway object -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
+ */ + public okhttp3.Call updateGatewayByUuidAsync(@javax.annotation.Nonnull UUID gatewayId, @javax.annotation.Nonnull List gatewayChangeOperation, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = updateGatewayByUuidValidateBeforeCall(gatewayId, gatewayChangeOperation, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } +} diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/api/AgentTemplatesApi.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/api/InternetExchangeServicesApi.java similarity index 55% rename from services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/api/AgentTemplatesApi.java rename to services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/api/InternetExchangeServicesApi.java index cad7be23..b5e7966b 100644 --- a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/api/AgentTemplatesApi.java +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/api/InternetExchangeServicesApi.java @@ -25,9 +25,10 @@ import java.io.IOException; -import com.equinix.sdk.fabricv4.model.AgentTemplateGetAllResponse; -import com.equinix.sdk.fabricv4.model.AgentTemplates; import com.equinix.sdk.fabricv4.model.Error; +import com.equinix.sdk.fabricv4.model.ExchangeServiceResponse; +import com.equinix.sdk.fabricv4.model.ExchangeServiceSearchRequest; +import com.equinix.sdk.fabricv4.model.ExchangeServiceSearchResponse; import java.util.UUID; import java.lang.reflect.Type; @@ -36,16 +37,16 @@ import java.util.List; import java.util.Map; -public class AgentTemplatesApi { +public class InternetExchangeServicesApi { private ApiClient localVarApiClient; private int localHostIndex; private String localCustomBaseUrl; - public AgentTemplatesApi() { + public InternetExchangeServicesApi() { this(Configuration.getDefaultApiClient()); } - public AgentTemplatesApi(ApiClient apiClient) { + public InternetExchangeServicesApi(ApiClient apiClient) { this.localVarApiClient = apiClient; } @@ -74,10 +75,8 @@ public void setCustomBaseUrl(String customBaseUrl) { } /** - * Build call for getAgentTemplateByUuid - * @param agentTemplateId Agent Template UUID (required) - * @param offset offset (optional) - * @param limit number of records to fetch (optional) + * Build call for getExchangeServiceById + * @param exchangeServiceId Internet Exchange Service Id (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -85,14 +84,15 @@ public void setCustomBaseUrl(String customBaseUrl) { - + + - +
Response Details
Status Code Description Response Headers
200 Agent object -
200 Successful Operation -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
500 Internal Server error -
*/ - public okhttp3.Call getAgentTemplateByUuidCall(@javax.annotation.Nonnull UUID agentTemplateId, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Integer limit, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getExchangeServiceByIdCall(@javax.annotation.Nonnull UUID exchangeServiceId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -109,8 +109,8 @@ public okhttp3.Call getAgentTemplateByUuidCall(@javax.annotation.Nonnull UUID ag Object localVarPostBody = null; // create path and map variables - String localVarPath = "/fabric/v4/agentTemplates/{agentTemplateId}" - .replace("{" + "agentTemplateId" + "}", localVarApiClient.escapeString(agentTemplateId.toString())); + String localVarPath = "/fabric/v4/exchangeServices/{exchangeServiceId}" + .replace("{" + "exchangeServiceId" + "}", localVarApiClient.escapeString(exchangeServiceId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -118,14 +118,6 @@ public okhttp3.Call getAgentTemplateByUuidCall(@javax.annotation.Nonnull UUID ag Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - if (offset != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("offset", offset)); - } - - if (limit != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit)); - } - final String[] localVarAccepts = { "application/json" }; @@ -146,71 +138,67 @@ public okhttp3.Call getAgentTemplateByUuidCall(@javax.annotation.Nonnull UUID ag } @SuppressWarnings("rawtypes") - private okhttp3.Call getAgentTemplateByUuidValidateBeforeCall(@javax.annotation.Nonnull UUID agentTemplateId, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Integer limit, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'agentTemplateId' is set - if (agentTemplateId == null) { - throw new ApiException("Missing the required parameter 'agentTemplateId' when calling getAgentTemplateByUuid(Async)"); + private okhttp3.Call getExchangeServiceByIdValidateBeforeCall(@javax.annotation.Nonnull UUID exchangeServiceId, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'exchangeServiceId' is set + if (exchangeServiceId == null) { + throw new ApiException("Missing the required parameter 'exchangeServiceId' when calling getExchangeServiceById(Async)"); } - return getAgentTemplateByUuidCall(agentTemplateId, offset, limit, _callback); + return getExchangeServiceByIdCall(exchangeServiceId, _callback); } /** - * Get Agent Template by UUID - * This API provides capability to retrieve an agent template by uuid <font color=\"red\"> <sup color='red'>Beta</sup></font> - * @param agentTemplateId Agent Template UUID (required) - * @param offset offset (optional) - * @param limit number of records to fetch (optional) - * @return AgentTemplates + * Get Internet Exchange Service + * The API provides capability to get Internet Exchange Service + * @param exchangeServiceId Internet Exchange Service Id (required) + * @return ExchangeServiceResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - + + - +
Response Details
Status Code Description Response Headers
200 Agent object -
200 Successful Operation -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
500 Internal Server error -
*/ - public AgentTemplates getAgentTemplateByUuid(@javax.annotation.Nonnull UUID agentTemplateId, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Integer limit) throws ApiException { - ApiResponse localVarResp = getAgentTemplateByUuidWithHttpInfo(agentTemplateId, offset, limit); + public ExchangeServiceResponse getExchangeServiceById(@javax.annotation.Nonnull UUID exchangeServiceId) throws ApiException { + ApiResponse localVarResp = getExchangeServiceByIdWithHttpInfo(exchangeServiceId); return localVarResp.getData(); } /** - * Get Agent Template by UUID - * This API provides capability to retrieve an agent template by uuid <font color=\"red\"> <sup color='red'>Beta</sup></font> - * @param agentTemplateId Agent Template UUID (required) - * @param offset offset (optional) - * @param limit number of records to fetch (optional) - * @return ApiResponse<AgentTemplates> + * Get Internet Exchange Service + * The API provides capability to get Internet Exchange Service + * @param exchangeServiceId Internet Exchange Service Id (required) + * @return ApiResponse<ExchangeServiceResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - + + - +
Response Details
Status Code Description Response Headers
200 Agent object -
200 Successful Operation -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
500 Internal Server error -
*/ - public ApiResponse getAgentTemplateByUuidWithHttpInfo(@javax.annotation.Nonnull UUID agentTemplateId, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Integer limit) throws ApiException { - okhttp3.Call localVarCall = getAgentTemplateByUuidValidateBeforeCall(agentTemplateId, offset, limit, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse getExchangeServiceByIdWithHttpInfo(@javax.annotation.Nonnull UUID exchangeServiceId) throws ApiException { + okhttp3.Call localVarCall = getExchangeServiceByIdValidateBeforeCall(exchangeServiceId, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * Get Agent Template by UUID (asynchronously) - * This API provides capability to retrieve an agent template by uuid <font color=\"red\"> <sup color='red'>Beta</sup></font> - * @param agentTemplateId Agent Template UUID (required) - * @param offset offset (optional) - * @param limit number of records to fetch (optional) + * Get Internet Exchange Service (asynchronously) + * The API provides capability to get Internet Exchange Service + * @param exchangeServiceId Internet Exchange Service Id (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -218,24 +206,24 @@ public ApiResponse getAgentTemplateByUuidWithHttpInfo(@javax.ann - + + - +
Response Details
Status Code Description Response Headers
200 Agent object -
200 Successful Operation -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
500 Internal Server error -
*/ - public okhttp3.Call getAgentTemplateByUuidAsync(@javax.annotation.Nonnull UUID agentTemplateId, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Integer limit, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getExchangeServiceByIdAsync(@javax.annotation.Nonnull UUID exchangeServiceId, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = getAgentTemplateByUuidValidateBeforeCall(agentTemplateId, offset, limit, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = getExchangeServiceByIdValidateBeforeCall(exchangeServiceId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for getAgentTemplates - * @param offset offset (optional) - * @param limit number of records to fetch (optional) + * Build call for searchExchangeService + * @param exchangeServiceSearchRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -244,13 +232,13 @@ public okhttp3.Call getAgentTemplateByUuidAsync(@javax.annotation.Nonnull UUID a Response Details Status Code Description Response Headers 200 Successful operation - + 400 Bad request - 401 Unauthorized - 403 Forbidden - - 404 Not Found - - 500 Internal server error - + 500 Internal Server error - */ - public okhttp3.Call getAgentTemplatesCall(@javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Integer limit, final ApiCallback _callback) throws ApiException { + public okhttp3.Call searchExchangeServiceCall(@javax.annotation.Nonnull ExchangeServiceSearchRequest exchangeServiceSearchRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -264,10 +252,10 @@ public okhttp3.Call getAgentTemplatesCall(@javax.annotation.Nullable Integer off basePath = null; } - Object localVarPostBody = null; + Object localVarPostBody = exchangeServiceSearchRequest; // create path and map variables - String localVarPath = "/fabric/v4/agentTemplates"; + String localVarPath = "/fabric/v4/exchangeServices/search"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -275,14 +263,6 @@ public okhttp3.Call getAgentTemplatesCall(@javax.annotation.Nullable Integer off Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - if (offset != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("offset", offset)); - } - - if (limit != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit)); - } - final String[] localVarAccepts = { "application/json" }; @@ -292,6 +272,7 @@ public okhttp3.Call getAgentTemplatesCall(@javax.annotation.Nullable Integer off } final String[] localVarContentTypes = { + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -299,67 +280,69 @@ public okhttp3.Call getAgentTemplatesCall(@javax.annotation.Nullable Integer off } String[] localVarAuthNames = new String[] { "BearerAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call getAgentTemplatesValidateBeforeCall(@javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Integer limit, final ApiCallback _callback) throws ApiException { - return getAgentTemplatesCall(offset, limit, _callback); + private okhttp3.Call searchExchangeServiceValidateBeforeCall(@javax.annotation.Nonnull ExchangeServiceSearchRequest exchangeServiceSearchRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'exchangeServiceSearchRequest' is set + if (exchangeServiceSearchRequest == null) { + throw new ApiException("Missing the required parameter 'exchangeServiceSearchRequest' when calling searchExchangeService(Async)"); + } + + return searchExchangeServiceCall(exchangeServiceSearchRequest, _callback); } /** - * Get Agent Templates - * This API provides capability to retrieve agent templates <font color=\"red\"> <sup color='red'>Beta</sup></font> - * @param offset offset (optional) - * @param limit number of records to fetch (optional) - * @return AgentTemplateGetAllResponse + * Search Internet Exchange Service + * The API provides capability to get list of user's Internet Exchange Service using search criteria, including optional filtering, pagination and sorting. + * @param exchangeServiceSearchRequest (required) + * @return ExchangeServiceSearchResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details + - - +
Response Details
Status Code Description Response Headers
200 Successful operation -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
500 Internal Server error -
*/ - public AgentTemplateGetAllResponse getAgentTemplates(@javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Integer limit) throws ApiException { - ApiResponse localVarResp = getAgentTemplatesWithHttpInfo(offset, limit); + public ExchangeServiceSearchResponse searchExchangeService(@javax.annotation.Nonnull ExchangeServiceSearchRequest exchangeServiceSearchRequest) throws ApiException { + ApiResponse localVarResp = searchExchangeServiceWithHttpInfo(exchangeServiceSearchRequest); return localVarResp.getData(); } /** - * Get Agent Templates - * This API provides capability to retrieve agent templates <font color=\"red\"> <sup color='red'>Beta</sup></font> - * @param offset offset (optional) - * @param limit number of records to fetch (optional) - * @return ApiResponse<AgentTemplateGetAllResponse> + * Search Internet Exchange Service + * The API provides capability to get list of user's Internet Exchange Service using search criteria, including optional filtering, pagination and sorting. + * @param exchangeServiceSearchRequest (required) + * @return ApiResponse<ExchangeServiceSearchResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details + - - +
Response Details
Status Code Description Response Headers
200 Successful operation -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
500 Internal Server error -
*/ - public ApiResponse getAgentTemplatesWithHttpInfo(@javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Integer limit) throws ApiException { - okhttp3.Call localVarCall = getAgentTemplatesValidateBeforeCall(offset, limit, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse searchExchangeServiceWithHttpInfo(@javax.annotation.Nonnull ExchangeServiceSearchRequest exchangeServiceSearchRequest) throws ApiException { + okhttp3.Call localVarCall = searchExchangeServiceValidateBeforeCall(exchangeServiceSearchRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * Get Agent Templates (asynchronously) - * This API provides capability to retrieve agent templates <font color=\"red\"> <sup color='red'>Beta</sup></font> - * @param offset offset (optional) - * @param limit number of records to fetch (optional) + * Search Internet Exchange Service (asynchronously) + * The API provides capability to get list of user's Internet Exchange Service using search criteria, including optional filtering, pagination and sorting. + * @param exchangeServiceSearchRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -368,16 +351,16 @@ public ApiResponse getAgentTemplatesWithHttpInfo(@j Response Details Status Code Description Response Headers 200 Successful operation - + 400 Bad request - 401 Unauthorized - 403 Forbidden - - 404 Not Found - - 500 Internal server error - + 500 Internal Server error - */ - public okhttp3.Call getAgentTemplatesAsync(@javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Integer limit, final ApiCallback _callback) throws ApiException { + public okhttp3.Call searchExchangeServiceAsync(@javax.annotation.Nonnull ExchangeServiceSearchRequest exchangeServiceSearchRequest, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = getAgentTemplatesValidateBeforeCall(offset, limit, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = searchExchangeServiceValidateBeforeCall(exchangeServiceSearchRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/api/IpBlocksApi.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/api/IpBlocksApi.java index 068ad02d..a7456166 100644 --- a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/api/IpBlocksApi.java +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/api/IpBlocksApi.java @@ -78,7 +78,7 @@ public void setCustomBaseUrl(String customBaseUrl) { /** * Build call for deleteIpBlockById - * @param uuid UUID of the Ip Block (required) + * @param uuid UUID of the IP Block (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -86,11 +86,11 @@ public void setCustomBaseUrl(String customBaseUrl) { - + - - + +
Response Details
Status Code Description Response Headers
202 Ip Block submitted, patched, or deletion accepted -
202 IP Block submitted, patched, or deletion accepted -
400 Invalid input parameter -
403 Forbidden -
404 Ip Block not found -
409 Ip Block cannot be deleted due to active products -
404 IP Block not found -
409 IP Block cannot be deleted due to active products -
500 Internal server error -
*/ @@ -151,20 +151,20 @@ private okhttp3.Call deleteIpBlockByIdValidateBeforeCall(@javax.annotation.Nonnu } /** - * Delete Ip Block by UUID - * Delete Ip Block by UUID - * @param uuid UUID of the Ip Block (required) + * Delete IP Block by UUID + * Delete IP Block by UUID + * @param uuid UUID of the IP Block (required) * @return IpBlock * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - + - - + +
Response Details
Status Code Description Response Headers
202 Ip Block submitted, patched, or deletion accepted -
202 IP Block submitted, patched, or deletion accepted -
400 Invalid input parameter -
403 Forbidden -
404 Ip Block not found -
409 Ip Block cannot be deleted due to active products -
404 IP Block not found -
409 IP Block cannot be deleted due to active products -
500 Internal server error -
*/ @@ -174,20 +174,20 @@ public IpBlock deleteIpBlockById(@javax.annotation.Nonnull UUID uuid) throws Api } /** - * Delete Ip Block by UUID - * Delete Ip Block by UUID - * @param uuid UUID of the Ip Block (required) + * Delete IP Block by UUID + * Delete IP Block by UUID + * @param uuid UUID of the IP Block (required) * @return ApiResponse<IpBlock> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - + - - + +
Response Details
Status Code Description Response Headers
202 Ip Block submitted, patched, or deletion accepted -
202 IP Block submitted, patched, or deletion accepted -
400 Invalid input parameter -
403 Forbidden -
404 Ip Block not found -
409 Ip Block cannot be deleted due to active products -
404 IP Block not found -
409 IP Block cannot be deleted due to active products -
500 Internal server error -
*/ @@ -198,9 +198,9 @@ public ApiResponse deleteIpBlockByIdWithHttpInfo(@javax.annotation.Nonn } /** - * Delete Ip Block by UUID (asynchronously) - * Delete Ip Block by UUID - * @param uuid UUID of the Ip Block (required) + * Delete IP Block by UUID (asynchronously) + * Delete IP Block by UUID + * @param uuid UUID of the IP Block (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -208,11 +208,11 @@ public ApiResponse deleteIpBlockByIdWithHttpInfo(@javax.annotation.Nonn - + - - + +
Response Details
Status Code Description Response Headers
202 Ip Block submitted, patched, or deletion accepted -
202 IP Block submitted, patched, or deletion accepted -
400 Invalid input parameter -
403 Forbidden -
404 Ip Block not found -
409 Ip Block cannot be deleted due to active products -
404 IP Block not found -
409 IP Block cannot be deleted due to active products -
500 Internal server error -
*/ @@ -225,7 +225,7 @@ public okhttp3.Call deleteIpBlockByIdAsync(@javax.annotation.Nonnull UUID uuid, } /** * Build call for getIpBlock - * @param uuid UUID of the Ip Block (required) + * @param uuid UUID of the IP Block (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -233,9 +233,9 @@ public okhttp3.Call deleteIpBlockByIdAsync(@javax.annotation.Nonnull UUID uuid, - + - +
Response Details
Status Code Description Response Headers
200 Ip Block retrieved successfully -
200 IP Block retrieved successfully -
403 Forbidden -
404 Ip Block not found -
404 IP Block not found -
500 Internal server error -
*/ @@ -296,18 +296,18 @@ private okhttp3.Call getIpBlockValidateBeforeCall(@javax.annotation.Nonnull UUID } /** - * Retrieve Ip Block by UUID - * Retrieve Ip Block by UUID - * @param uuid UUID of the Ip Block (required) + * Retrieve IP Block by UUID + * Retrieve IP Block by UUID + * @param uuid UUID of the IP Block (required) * @return IpBlock * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - + - +
Response Details
Status Code Description Response Headers
200 Ip Block retrieved successfully -
200 IP Block retrieved successfully -
403 Forbidden -
404 Ip Block not found -
404 IP Block not found -
500 Internal server error -
*/ @@ -317,18 +317,18 @@ public IpBlock getIpBlock(@javax.annotation.Nonnull UUID uuid) throws ApiExcepti } /** - * Retrieve Ip Block by UUID - * Retrieve Ip Block by UUID - * @param uuid UUID of the Ip Block (required) + * Retrieve IP Block by UUID + * Retrieve IP Block by UUID + * @param uuid UUID of the IP Block (required) * @return ApiResponse<IpBlock> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - + - +
Response Details
Status Code Description Response Headers
200 Ip Block retrieved successfully -
200 IP Block retrieved successfully -
403 Forbidden -
404 Ip Block not found -
404 IP Block not found -
500 Internal server error -
*/ @@ -339,9 +339,9 @@ public ApiResponse getIpBlockWithHttpInfo(@javax.annotation.Nonnull UUI } /** - * Retrieve Ip Block by UUID (asynchronously) - * Retrieve Ip Block by UUID - * @param uuid UUID of the Ip Block (required) + * Retrieve IP Block by UUID (asynchronously) + * Retrieve IP Block by UUID + * @param uuid UUID of the IP Block (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -349,9 +349,9 @@ public ApiResponse getIpBlockWithHttpInfo(@javax.annotation.Nonnull UUI - + - +
Response Details
Status Code Description Response Headers
200 Ip Block retrieved successfully -
200 IP Block retrieved successfully -
403 Forbidden -
404 Ip Block not found -
404 IP Block not found -
500 Internal server error -
*/ @@ -364,7 +364,7 @@ public okhttp3.Call getIpBlockAsync(@javax.annotation.Nonnull UUID uuid, final A } /** * Build call for patchIpBlockById - * @param uuid UUID of the Ip Block (required) + * @param uuid UUID of the IP Block (required) * @param patchIpBlockRequestBodyItem (required) * @param _callback Callback for upload/download progress * @return Call to execute @@ -373,8 +373,8 @@ public okhttp3.Call getIpBlockAsync(@javax.annotation.Nonnull UUID uuid, final A - - + +
Response Details
Status Code Description Response Headers
202 Ip Block submitted, patched, or deletion accepted -
404 Ip Block not found -
202 IP Block submitted, patched, or deletion accepted -
404 IP Block not found -
500 Internal server error -
*/ @@ -441,9 +441,9 @@ private okhttp3.Call patchIpBlockByIdValidateBeforeCall(@javax.annotation.Nonnul } /** - * patch Ip Block by UUID - * patch Ip Block by UUID - * @param uuid UUID of the Ip Block (required) + * patch IP Block by UUID + * patch IP Block by UUID + * @param uuid UUID of the IP Block (required) * @param patchIpBlockRequestBodyItem (required) * @return IpBlock * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -451,8 +451,8 @@ private okhttp3.Call patchIpBlockByIdValidateBeforeCall(@javax.annotation.Nonnul - - + +
Response Details
Status Code Description Response Headers
202 Ip Block submitted, patched, or deletion accepted -
404 Ip Block not found -
202 IP Block submitted, patched, or deletion accepted -
404 IP Block not found -
500 Internal server error -
*/ @@ -462,9 +462,9 @@ public IpBlock patchIpBlockById(@javax.annotation.Nonnull UUID uuid, @javax.anno } /** - * patch Ip Block by UUID - * patch Ip Block by UUID - * @param uuid UUID of the Ip Block (required) + * patch IP Block by UUID + * patch IP Block by UUID + * @param uuid UUID of the IP Block (required) * @param patchIpBlockRequestBodyItem (required) * @return ApiResponse<IpBlock> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -472,8 +472,8 @@ public IpBlock patchIpBlockById(@javax.annotation.Nonnull UUID uuid, @javax.anno - - + +
Response Details
Status Code Description Response Headers
202 Ip Block submitted, patched, or deletion accepted -
404 Ip Block not found -
202 IP Block submitted, patched, or deletion accepted -
404 IP Block not found -
500 Internal server error -
*/ @@ -484,9 +484,9 @@ public ApiResponse patchIpBlockByIdWithHttpInfo(@javax.annotation.Nonnu } /** - * patch Ip Block by UUID (asynchronously) - * patch Ip Block by UUID - * @param uuid UUID of the Ip Block (required) + * patch IP Block by UUID (asynchronously) + * patch IP Block by UUID + * @param uuid UUID of the IP Block (required) * @param patchIpBlockRequestBodyItem (required) * @param _callback The callback to be executed when the API call finishes * @return The request call @@ -495,8 +495,8 @@ public ApiResponse patchIpBlockByIdWithHttpInfo(@javax.annotation.Nonnu - - + +
Response Details
Status Code Description Response Headers
202 Ip Block submitted, patched, or deletion accepted -
404 Ip Block not found -
202 IP Block submitted, patched, or deletion accepted -
404 IP Block not found -
500 Internal server error -
*/ @@ -517,7 +517,7 @@ public okhttp3.Call patchIpBlockByIdAsync(@javax.annotation.Nonnull UUID uuid, @ - +
Response Details
Status Code Description Response Headers
200 Ip Blocks found successfully -
200 IP Blocks found successfully -
400 Invalid input parameter -
500 Internal server error -
@@ -579,8 +579,8 @@ private okhttp3.Call searchIpBlocksValidateBeforeCall(@javax.annotation.Nonnull } /** - * Search for Ip Blocks - * Search for Ip Blocks based on criteria + * Search for IP Blocks + * Search for IP Blocks based on criteria * @param ipBlocksSearchRequestBody (required) * @return IpBlockSearchResponseBody * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -588,7 +588,7 @@ private okhttp3.Call searchIpBlocksValidateBeforeCall(@javax.annotation.Nonnull - +
Response Details
Status Code Description Response Headers
200 Ip Blocks found successfully -
200 IP Blocks found successfully -
400 Invalid input parameter -
500 Internal server error -
@@ -599,8 +599,8 @@ public IpBlockSearchResponseBody searchIpBlocks(@javax.annotation.Nonnull IpBloc } /** - * Search for Ip Blocks - * Search for Ip Blocks based on criteria + * Search for IP Blocks + * Search for IP Blocks based on criteria * @param ipBlocksSearchRequestBody (required) * @return ApiResponse<IpBlockSearchResponseBody> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -608,7 +608,7 @@ public IpBlockSearchResponseBody searchIpBlocks(@javax.annotation.Nonnull IpBloc - +
Response Details
Status Code Description Response Headers
200 Ip Blocks found successfully -
200 IP Blocks found successfully -
400 Invalid input parameter -
500 Internal server error -
@@ -620,8 +620,8 @@ public ApiResponse searchIpBlocksWithHttpInfo(@javax. } /** - * Search for Ip Blocks (asynchronously) - * Search for Ip Blocks based on criteria + * Search for IP Blocks (asynchronously) + * Search for IP Blocks based on criteria * @param ipBlocksSearchRequestBody (required) * @param _callback The callback to be executed when the API call finishes * @return The request call @@ -630,7 +630,7 @@ public ApiResponse searchIpBlocksWithHttpInfo(@javax. - +
Response Details
Status Code Description Response Headers
200 Ip Blocks found successfully -
200 IP Blocks found successfully -
400 Invalid input parameter -
500 Internal server error -
@@ -652,7 +652,7 @@ public okhttp3.Call searchIpBlocksAsync(@javax.annotation.Nonnull IpBlocksSearch - + @@ -715,8 +715,8 @@ private okhttp3.Call submitIpBlockValidateBeforeCall(@javax.annotation.Nonnull S } /** - * Submits new Equinix owned or customer owned Ip Block request - * Submits new Equinix owned or customer owned Ip Block request + * Submits new Equinix owned or customer owned IP Block request + * Submits new Equinix owned or customer owned IP Block request * @param submitIpBlockRequestBody (required) * @return IpBlock * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -724,7 +724,7 @@ private okhttp3.Call submitIpBlockValidateBeforeCall(@javax.annotation.Nonnull S
Response Details
Status Code Description Response Headers
202 Ip Block submitted, patched, or deletion accepted -
202 IP Block submitted, patched, or deletion accepted -
400 Invalid input parameter -
403 Forbidden -
500 Internal server error -
- + @@ -736,8 +736,8 @@ public IpBlock submitIpBlock(@javax.annotation.Nonnull SubmitIpBlockRequestBody } /** - * Submits new Equinix owned or customer owned Ip Block request - * Submits new Equinix owned or customer owned Ip Block request + * Submits new Equinix owned or customer owned IP Block request + * Submits new Equinix owned or customer owned IP Block request * @param submitIpBlockRequestBody (required) * @return ApiResponse<IpBlock> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -745,7 +745,7 @@ public IpBlock submitIpBlock(@javax.annotation.Nonnull SubmitIpBlockRequestBody
Response Details
Status Code Description Response Headers
202 Ip Block submitted, patched, or deletion accepted -
202 IP Block submitted, patched, or deletion accepted -
400 Invalid input parameter -
403 Forbidden -
500 Internal server error -
- + @@ -758,8 +758,8 @@ public ApiResponse submitIpBlockWithHttpInfo(@javax.annotation.Nonnull } /** - * Submits new Equinix owned or customer owned Ip Block request (asynchronously) - * Submits new Equinix owned or customer owned Ip Block request + * Submits new Equinix owned or customer owned IP Block request (asynchronously) + * Submits new Equinix owned or customer owned IP Block request * @param submitIpBlockRequestBody (required) * @param _callback The callback to be executed when the API call finishes * @return The request call @@ -768,7 +768,7 @@ public ApiResponse submitIpBlockWithHttpInfo(@javax.annotation.Nonnull
Response Details
Status Code Description Response Headers
202 Ip Block submitted, patched, or deletion accepted -
202 IP Block submitted, patched, or deletion accepted -
400 Invalid input parameter -
403 Forbidden -
500 Internal server error -
- + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/api/LoasApi.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/api/LoasApi.java new file mode 100644 index 00000000..827b37d8 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/api/LoasApi.java @@ -0,0 +1,1607 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.api; + +import com.equinix.sdk.fabricv4.ApiCallback; +import com.equinix.sdk.fabricv4.ApiClient; +import com.equinix.sdk.fabricv4.ApiException; +import com.equinix.sdk.fabricv4.ApiResponse; +import com.equinix.sdk.fabricv4.Configuration; +import com.equinix.sdk.fabricv4.Pair; +import com.equinix.sdk.fabricv4.ProgressRequestBody; +import com.equinix.sdk.fabricv4.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + +import com.equinix.sdk.fabricv4.model.CreateLoa; +import com.equinix.sdk.fabricv4.model.CreateLoaNote; +import com.equinix.sdk.fabricv4.model.Error; +import com.equinix.sdk.fabricv4.model.LoaActionRequest; +import com.equinix.sdk.fabricv4.model.LoaActionResponse; +import com.equinix.sdk.fabricv4.model.LoaActionSearchRequest; +import com.equinix.sdk.fabricv4.model.LoaActionSearchResponse; +import com.equinix.sdk.fabricv4.model.LoaConsumersResponse; +import com.equinix.sdk.fabricv4.model.LoaNoteDetails; +import com.equinix.sdk.fabricv4.model.LoaNotesResponse; +import com.equinix.sdk.fabricv4.model.LoaReplaceOperation; +import com.equinix.sdk.fabricv4.model.LoaResponse; +import com.equinix.sdk.fabricv4.model.LoaSearchRequest; +import com.equinix.sdk.fabricv4.model.LoaSearchResponse; +import java.util.UUID; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class LoasApi { + private ApiClient localVarApiClient; + private int localHostIndex; + private String localCustomBaseUrl; + + public LoasApi() { + this(Configuration.getDefaultApiClient()); + } + + public LoasApi(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + /** + * Build call for createLoa + * @param createLoa (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details +
Response Details
Status Code Description Response Headers
202 Ip Block submitted, patched, or deletion accepted -
202 IP Block submitted, patched, or deletion accepted -
400 Invalid input parameter -
403 Forbidden -
500 Internal server error -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
202 Accepted -
400 Bad request -
401 Unauthorized request -
403 Operation not allowed -
404 Not found -
500 Internal Server error -
+ */ + public okhttp3.Call createLoaCall(@javax.annotation.Nonnull CreateLoa createLoa, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = createLoa; + + // create path and map variables + String localVarPath = "/fabric/v4/loas"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "BearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call createLoaValidateBeforeCall(@javax.annotation.Nonnull CreateLoa createLoa, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'createLoa' is set + if (createLoa == null) { + throw new ApiException("Missing the required parameter 'createLoa' when calling createLoa(Async)"); + } + + return createLoaCall(createLoa, _callback); + + } + + /** + * Create Loa + * The API provides capability to create a new Loa + * @param createLoa (required) + * @return LoaResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
202 Accepted -
400 Bad request -
401 Unauthorized request -
403 Operation not allowed -
404 Not found -
500 Internal Server error -
+ */ + public LoaResponse createLoa(@javax.annotation.Nonnull CreateLoa createLoa) throws ApiException { + ApiResponse localVarResp = createLoaWithHttpInfo(createLoa); + return localVarResp.getData(); + } + + /** + * Create Loa + * The API provides capability to create a new Loa + * @param createLoa (required) + * @return ApiResponse<LoaResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
202 Accepted -
400 Bad request -
401 Unauthorized request -
403 Operation not allowed -
404 Not found -
500 Internal Server error -
+ */ + public ApiResponse createLoaWithHttpInfo(@javax.annotation.Nonnull CreateLoa createLoa) throws ApiException { + okhttp3.Call localVarCall = createLoaValidateBeforeCall(createLoa, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Create Loa (asynchronously) + * The API provides capability to create a new Loa + * @param createLoa (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
202 Accepted -
400 Bad request -
401 Unauthorized request -
403 Operation not allowed -
404 Not found -
500 Internal Server error -
+ */ + public okhttp3.Call createLoaAsync(@javax.annotation.Nonnull CreateLoa createLoa, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = createLoaValidateBeforeCall(createLoa, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for createLoaNoteByLoaId + * @param loaId Loa UUID (required) + * @param createLoaNote (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
201 Created -
400 Bad request -
401 Unauthorized request -
403 Operation not allowed -
404 Not found -
500 Internal Server error -
+ */ + public okhttp3.Call createLoaNoteByLoaIdCall(@javax.annotation.Nonnull UUID loaId, @javax.annotation.Nonnull CreateLoaNote createLoaNote, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = createLoaNote; + + // create path and map variables + String localVarPath = "/fabric/v4/loas/{loaId}/notes" + .replace("{" + "loaId" + "}", localVarApiClient.escapeString(loaId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "BearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call createLoaNoteByLoaIdValidateBeforeCall(@javax.annotation.Nonnull UUID loaId, @javax.annotation.Nonnull CreateLoaNote createLoaNote, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'loaId' is set + if (loaId == null) { + throw new ApiException("Missing the required parameter 'loaId' when calling createLoaNoteByLoaId(Async)"); + } + + // verify the required parameter 'createLoaNote' is set + if (createLoaNote == null) { + throw new ApiException("Missing the required parameter 'createLoaNote' when calling createLoaNoteByLoaId(Async)"); + } + + return createLoaNoteByLoaIdCall(loaId, createLoaNote, _callback); + + } + + /** + * Create Loa Note + * The API provides capability to create Loa note by Loa ID + * @param loaId Loa UUID (required) + * @param createLoaNote (required) + * @return LoaNoteDetails + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
201 Created -
400 Bad request -
401 Unauthorized request -
403 Operation not allowed -
404 Not found -
500 Internal Server error -
+ */ + public LoaNoteDetails createLoaNoteByLoaId(@javax.annotation.Nonnull UUID loaId, @javax.annotation.Nonnull CreateLoaNote createLoaNote) throws ApiException { + ApiResponse localVarResp = createLoaNoteByLoaIdWithHttpInfo(loaId, createLoaNote); + return localVarResp.getData(); + } + + /** + * Create Loa Note + * The API provides capability to create Loa note by Loa ID + * @param loaId Loa UUID (required) + * @param createLoaNote (required) + * @return ApiResponse<LoaNoteDetails> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
201 Created -
400 Bad request -
401 Unauthorized request -
403 Operation not allowed -
404 Not found -
500 Internal Server error -
+ */ + public ApiResponse createLoaNoteByLoaIdWithHttpInfo(@javax.annotation.Nonnull UUID loaId, @javax.annotation.Nonnull CreateLoaNote createLoaNote) throws ApiException { + okhttp3.Call localVarCall = createLoaNoteByLoaIdValidateBeforeCall(loaId, createLoaNote, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Create Loa Note (asynchronously) + * The API provides capability to create Loa note by Loa ID + * @param loaId Loa UUID (required) + * @param createLoaNote (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
201 Created -
400 Bad request -
401 Unauthorized request -
403 Operation not allowed -
404 Not found -
500 Internal Server error -
+ */ + public okhttp3.Call createLoaNoteByLoaIdAsync(@javax.annotation.Nonnull UUID loaId, @javax.annotation.Nonnull CreateLoaNote createLoaNote, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = createLoaNoteByLoaIdValidateBeforeCall(loaId, createLoaNote, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getLoaActionsByUuid + * @param loaId Loa UUID (required) + * @param actionId Action UUID (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successful Operation -
400 Bad request -
401 Unauthorized request -
403 Operation not allowed -
404 Not found -
500 Internal Server error -
+ */ + public okhttp3.Call getLoaActionsByUuidCall(@javax.annotation.Nonnull UUID loaId, @javax.annotation.Nonnull UUID actionId, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/fabric/v4/loas/{loaId}/actions/{actionId}" + .replace("{" + "loaId" + "}", localVarApiClient.escapeString(loaId.toString())) + .replace("{" + "actionId" + "}", localVarApiClient.escapeString(actionId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "BearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getLoaActionsByUuidValidateBeforeCall(@javax.annotation.Nonnull UUID loaId, @javax.annotation.Nonnull UUID actionId, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'loaId' is set + if (loaId == null) { + throw new ApiException("Missing the required parameter 'loaId' when calling getLoaActionsByUuid(Async)"); + } + + // verify the required parameter 'actionId' is set + if (actionId == null) { + throw new ApiException("Missing the required parameter 'actionId' when calling getLoaActionsByUuid(Async)"); + } + + return getLoaActionsByUuidCall(loaId, actionId, _callback); + + } + + /** + * Get Loa Action by Action ID + * This API provides capability to fetch action details + * @param loaId Loa UUID (required) + * @param actionId Action UUID (required) + * @return LoaActionResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successful Operation -
400 Bad request -
401 Unauthorized request -
403 Operation not allowed -
404 Not found -
500 Internal Server error -
+ */ + public LoaActionResponse getLoaActionsByUuid(@javax.annotation.Nonnull UUID loaId, @javax.annotation.Nonnull UUID actionId) throws ApiException { + ApiResponse localVarResp = getLoaActionsByUuidWithHttpInfo(loaId, actionId); + return localVarResp.getData(); + } + + /** + * Get Loa Action by Action ID + * This API provides capability to fetch action details + * @param loaId Loa UUID (required) + * @param actionId Action UUID (required) + * @return ApiResponse<LoaActionResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successful Operation -
400 Bad request -
401 Unauthorized request -
403 Operation not allowed -
404 Not found -
500 Internal Server error -
+ */ + public ApiResponse getLoaActionsByUuidWithHttpInfo(@javax.annotation.Nonnull UUID loaId, @javax.annotation.Nonnull UUID actionId) throws ApiException { + okhttp3.Call localVarCall = getLoaActionsByUuidValidateBeforeCall(loaId, actionId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get Loa Action by Action ID (asynchronously) + * This API provides capability to fetch action details + * @param loaId Loa UUID (required) + * @param actionId Action UUID (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successful Operation -
400 Bad request -
401 Unauthorized request -
403 Operation not allowed -
404 Not found -
500 Internal Server error -
+ */ + public okhttp3.Call getLoaActionsByUuidAsync(@javax.annotation.Nonnull UUID loaId, @javax.annotation.Nonnull UUID actionId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getLoaActionsByUuidValidateBeforeCall(loaId, actionId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getLoaByUuid + * @param loaId Loa UUID (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successful Operation -
400 Bad request -
401 Unauthorized request -
403 Operation not allowed -
404 Not found -
500 Internal Server error -
+ */ + public okhttp3.Call getLoaByUuidCall(@javax.annotation.Nonnull UUID loaId, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/fabric/v4/loas/{loaId}" + .replace("{" + "loaId" + "}", localVarApiClient.escapeString(loaId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "BearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getLoaByUuidValidateBeforeCall(@javax.annotation.Nonnull UUID loaId, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'loaId' is set + if (loaId == null) { + throw new ApiException("Missing the required parameter 'loaId' when calling getLoaByUuid(Async)"); + } + + return getLoaByUuidCall(loaId, _callback); + + } + + /** + * Get Loa + * The API provides capability to get Loa details by Loa ID + * @param loaId Loa UUID (required) + * @return LoaResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successful Operation -
400 Bad request -
401 Unauthorized request -
403 Operation not allowed -
404 Not found -
500 Internal Server error -
+ */ + public LoaResponse getLoaByUuid(@javax.annotation.Nonnull UUID loaId) throws ApiException { + ApiResponse localVarResp = getLoaByUuidWithHttpInfo(loaId); + return localVarResp.getData(); + } + + /** + * Get Loa + * The API provides capability to get Loa details by Loa ID + * @param loaId Loa UUID (required) + * @return ApiResponse<LoaResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successful Operation -
400 Bad request -
401 Unauthorized request -
403 Operation not allowed -
404 Not found -
500 Internal Server error -
+ */ + public ApiResponse getLoaByUuidWithHttpInfo(@javax.annotation.Nonnull UUID loaId) throws ApiException { + okhttp3.Call localVarCall = getLoaByUuidValidateBeforeCall(loaId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get Loa (asynchronously) + * The API provides capability to get Loa details by Loa ID + * @param loaId Loa UUID (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successful Operation -
400 Bad request -
401 Unauthorized request -
403 Operation not allowed -
404 Not found -
500 Internal Server error -
+ */ + public okhttp3.Call getLoaByUuidAsync(@javax.annotation.Nonnull UUID loaId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getLoaByUuidValidateBeforeCall(loaId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getLoaConsumersByLoaId + * @param loaId Loa UUID (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successful Operation -
400 Bad request -
401 Unauthorized request -
403 Operation not allowed -
404 Not found -
500 Internal Server error -
+ */ + public okhttp3.Call getLoaConsumersByLoaIdCall(@javax.annotation.Nonnull UUID loaId, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/fabric/v4/loas/{loaId}/consumers" + .replace("{" + "loaId" + "}", localVarApiClient.escapeString(loaId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "BearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getLoaConsumersByLoaIdValidateBeforeCall(@javax.annotation.Nonnull UUID loaId, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'loaId' is set + if (loaId == null) { + throw new ApiException("Missing the required parameter 'loaId' when calling getLoaConsumersByLoaId(Async)"); + } + + return getLoaConsumersByLoaIdCall(loaId, _callback); + + } + + /** + * Get Loa Consumers + * The API provides capability to get Loa consumers by Loa ID + * @param loaId Loa UUID (required) + * @return LoaConsumersResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successful Operation -
400 Bad request -
401 Unauthorized request -
403 Operation not allowed -
404 Not found -
500 Internal Server error -
+ */ + public LoaConsumersResponse getLoaConsumersByLoaId(@javax.annotation.Nonnull UUID loaId) throws ApiException { + ApiResponse localVarResp = getLoaConsumersByLoaIdWithHttpInfo(loaId); + return localVarResp.getData(); + } + + /** + * Get Loa Consumers + * The API provides capability to get Loa consumers by Loa ID + * @param loaId Loa UUID (required) + * @return ApiResponse<LoaConsumersResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successful Operation -
400 Bad request -
401 Unauthorized request -
403 Operation not allowed -
404 Not found -
500 Internal Server error -
+ */ + public ApiResponse getLoaConsumersByLoaIdWithHttpInfo(@javax.annotation.Nonnull UUID loaId) throws ApiException { + okhttp3.Call localVarCall = getLoaConsumersByLoaIdValidateBeforeCall(loaId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get Loa Consumers (asynchronously) + * The API provides capability to get Loa consumers by Loa ID + * @param loaId Loa UUID (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successful Operation -
400 Bad request -
401 Unauthorized request -
403 Operation not allowed -
404 Not found -
500 Internal Server error -
+ */ + public okhttp3.Call getLoaConsumersByLoaIdAsync(@javax.annotation.Nonnull UUID loaId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getLoaConsumersByLoaIdValidateBeforeCall(loaId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getLoaNotesByUuid + * @param loaId Loa UUID (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successful Operation -
400 Bad request -
401 Unauthorized request -
403 Operation not allowed -
404 Not found -
500 Internal Server error -
+ */ + public okhttp3.Call getLoaNotesByUuidCall(@javax.annotation.Nonnull UUID loaId, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/fabric/v4/loas/{loaId}/notes" + .replace("{" + "loaId" + "}", localVarApiClient.escapeString(loaId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "BearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getLoaNotesByUuidValidateBeforeCall(@javax.annotation.Nonnull UUID loaId, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'loaId' is set + if (loaId == null) { + throw new ApiException("Missing the required parameter 'loaId' when calling getLoaNotesByUuid(Async)"); + } + + return getLoaNotesByUuidCall(loaId, _callback); + + } + + /** + * Get Loa Notes + * The API provides capability to get Loa notes by Loa ID + * @param loaId Loa UUID (required) + * @return LoaNotesResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successful Operation -
400 Bad request -
401 Unauthorized request -
403 Operation not allowed -
404 Not found -
500 Internal Server error -
+ */ + public LoaNotesResponse getLoaNotesByUuid(@javax.annotation.Nonnull UUID loaId) throws ApiException { + ApiResponse localVarResp = getLoaNotesByUuidWithHttpInfo(loaId); + return localVarResp.getData(); + } + + /** + * Get Loa Notes + * The API provides capability to get Loa notes by Loa ID + * @param loaId Loa UUID (required) + * @return ApiResponse<LoaNotesResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successful Operation -
400 Bad request -
401 Unauthorized request -
403 Operation not allowed -
404 Not found -
500 Internal Server error -
+ */ + public ApiResponse getLoaNotesByUuidWithHttpInfo(@javax.annotation.Nonnull UUID loaId) throws ApiException { + okhttp3.Call localVarCall = getLoaNotesByUuidValidateBeforeCall(loaId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get Loa Notes (asynchronously) + * The API provides capability to get Loa notes by Loa ID + * @param loaId Loa UUID (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successful Operation -
400 Bad request -
401 Unauthorized request -
403 Operation not allowed -
404 Not found -
500 Internal Server error -
+ */ + public okhttp3.Call getLoaNotesByUuidAsync(@javax.annotation.Nonnull UUID loaId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getLoaNotesByUuidValidateBeforeCall(loaId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for performLoaAction + * @param loaId Loa UUID (required) + * @param loaActionRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
202 Accepted -
400 Bad request -
401 Unauthorized request -
403 Operation not allowed -
404 Not found -
500 Internal Server error -
+ */ + public okhttp3.Call performLoaActionCall(@javax.annotation.Nonnull UUID loaId, @javax.annotation.Nonnull LoaActionRequest loaActionRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = loaActionRequest; + + // create path and map variables + String localVarPath = "/fabric/v4/loas/{loaId}/actions" + .replace("{" + "loaId" + "}", localVarApiClient.escapeString(loaId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "BearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call performLoaActionValidateBeforeCall(@javax.annotation.Nonnull UUID loaId, @javax.annotation.Nonnull LoaActionRequest loaActionRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'loaId' is set + if (loaId == null) { + throw new ApiException("Missing the required parameter 'loaId' when calling performLoaAction(Async)"); + } + + // verify the required parameter 'loaActionRequest' is set + if (loaActionRequest == null) { + throw new ApiException("Missing the required parameter 'loaActionRequest' when calling performLoaAction(Async)"); + } + + return performLoaActionCall(loaId, loaActionRequest, _callback); + + } + + /** + * Loa Actions + * The API provides capability to perform actions on Loa + * @param loaId Loa UUID (required) + * @param loaActionRequest (required) + * @return LoaActionResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
202 Accepted -
400 Bad request -
401 Unauthorized request -
403 Operation not allowed -
404 Not found -
500 Internal Server error -
+ */ + public LoaActionResponse performLoaAction(@javax.annotation.Nonnull UUID loaId, @javax.annotation.Nonnull LoaActionRequest loaActionRequest) throws ApiException { + ApiResponse localVarResp = performLoaActionWithHttpInfo(loaId, loaActionRequest); + return localVarResp.getData(); + } + + /** + * Loa Actions + * The API provides capability to perform actions on Loa + * @param loaId Loa UUID (required) + * @param loaActionRequest (required) + * @return ApiResponse<LoaActionResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
202 Accepted -
400 Bad request -
401 Unauthorized request -
403 Operation not allowed -
404 Not found -
500 Internal Server error -
+ */ + public ApiResponse performLoaActionWithHttpInfo(@javax.annotation.Nonnull UUID loaId, @javax.annotation.Nonnull LoaActionRequest loaActionRequest) throws ApiException { + okhttp3.Call localVarCall = performLoaActionValidateBeforeCall(loaId, loaActionRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Loa Actions (asynchronously) + * The API provides capability to perform actions on Loa + * @param loaId Loa UUID (required) + * @param loaActionRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
202 Accepted -
400 Bad request -
401 Unauthorized request -
403 Operation not allowed -
404 Not found -
500 Internal Server error -
+ */ + public okhttp3.Call performLoaActionAsync(@javax.annotation.Nonnull UUID loaId, @javax.annotation.Nonnull LoaActionRequest loaActionRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = performLoaActionValidateBeforeCall(loaId, loaActionRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for searchLoa + * @param loaSearchRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successful operation -
400 Bad request -
401 Unauthorized request -
403 Operation not allowed -
404 Not found -
500 Internal Server error -
+ */ + public okhttp3.Call searchLoaCall(@javax.annotation.Nonnull LoaSearchRequest loaSearchRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = loaSearchRequest; + + // create path and map variables + String localVarPath = "/fabric/v4/loas/search"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "BearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call searchLoaValidateBeforeCall(@javax.annotation.Nonnull LoaSearchRequest loaSearchRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'loaSearchRequest' is set + if (loaSearchRequest == null) { + throw new ApiException("Missing the required parameter 'loaSearchRequest' when calling searchLoa(Async)"); + } + + return searchLoaCall(loaSearchRequest, _callback); + + } + + /** + * Search Loas + * The API provides capability to get list of user's Loa using search criteria, including optional filtering, pagination and sorting + * @param loaSearchRequest (required) + * @return LoaSearchResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successful operation -
400 Bad request -
401 Unauthorized request -
403 Operation not allowed -
404 Not found -
500 Internal Server error -
+ */ + public LoaSearchResponse searchLoa(@javax.annotation.Nonnull LoaSearchRequest loaSearchRequest) throws ApiException { + ApiResponse localVarResp = searchLoaWithHttpInfo(loaSearchRequest); + return localVarResp.getData(); + } + + /** + * Search Loas + * The API provides capability to get list of user's Loa using search criteria, including optional filtering, pagination and sorting + * @param loaSearchRequest (required) + * @return ApiResponse<LoaSearchResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successful operation -
400 Bad request -
401 Unauthorized request -
403 Operation not allowed -
404 Not found -
500 Internal Server error -
+ */ + public ApiResponse searchLoaWithHttpInfo(@javax.annotation.Nonnull LoaSearchRequest loaSearchRequest) throws ApiException { + okhttp3.Call localVarCall = searchLoaValidateBeforeCall(loaSearchRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Search Loas (asynchronously) + * The API provides capability to get list of user's Loa using search criteria, including optional filtering, pagination and sorting + * @param loaSearchRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successful operation -
400 Bad request -
401 Unauthorized request -
403 Operation not allowed -
404 Not found -
500 Internal Server error -
+ */ + public okhttp3.Call searchLoaAsync(@javax.annotation.Nonnull LoaSearchRequest loaSearchRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = searchLoaValidateBeforeCall(loaSearchRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for searchLoaAction + * @param loaId Loa UUID (required) + * @param loaActionSearchRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successful Operation -
400 Bad request -
401 Unauthorized request -
403 Operation not allowed -
404 Not found -
500 Internal Server error -
+ */ + public okhttp3.Call searchLoaActionCall(@javax.annotation.Nonnull UUID loaId, @javax.annotation.Nonnull LoaActionSearchRequest loaActionSearchRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = loaActionSearchRequest; + + // create path and map variables + String localVarPath = "/fabric/v4/loas/{loaId}/actions/search" + .replace("{" + "loaId" + "}", localVarApiClient.escapeString(loaId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "BearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call searchLoaActionValidateBeforeCall(@javax.annotation.Nonnull UUID loaId, @javax.annotation.Nonnull LoaActionSearchRequest loaActionSearchRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'loaId' is set + if (loaId == null) { + throw new ApiException("Missing the required parameter 'loaId' when calling searchLoaAction(Async)"); + } + + // verify the required parameter 'loaActionSearchRequest' is set + if (loaActionSearchRequest == null) { + throw new ApiException("Missing the required parameter 'loaActionSearchRequest' when calling searchLoaAction(Async)"); + } + + return searchLoaActionCall(loaId, loaActionSearchRequest, _callback); + + } + + /** + * Search Loa Actions + * The API provides capability to get list of user's Loa Actions using search criteria, including optional filtering, pagination and sorting + * @param loaId Loa UUID (required) + * @param loaActionSearchRequest (required) + * @return LoaActionSearchResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successful Operation -
400 Bad request -
401 Unauthorized request -
403 Operation not allowed -
404 Not found -
500 Internal Server error -
+ */ + public LoaActionSearchResponse searchLoaAction(@javax.annotation.Nonnull UUID loaId, @javax.annotation.Nonnull LoaActionSearchRequest loaActionSearchRequest) throws ApiException { + ApiResponse localVarResp = searchLoaActionWithHttpInfo(loaId, loaActionSearchRequest); + return localVarResp.getData(); + } + + /** + * Search Loa Actions + * The API provides capability to get list of user's Loa Actions using search criteria, including optional filtering, pagination and sorting + * @param loaId Loa UUID (required) + * @param loaActionSearchRequest (required) + * @return ApiResponse<LoaActionSearchResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successful Operation -
400 Bad request -
401 Unauthorized request -
403 Operation not allowed -
404 Not found -
500 Internal Server error -
+ */ + public ApiResponse searchLoaActionWithHttpInfo(@javax.annotation.Nonnull UUID loaId, @javax.annotation.Nonnull LoaActionSearchRequest loaActionSearchRequest) throws ApiException { + okhttp3.Call localVarCall = searchLoaActionValidateBeforeCall(loaId, loaActionSearchRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Search Loa Actions (asynchronously) + * The API provides capability to get list of user's Loa Actions using search criteria, including optional filtering, pagination and sorting + * @param loaId Loa UUID (required) + * @param loaActionSearchRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successful Operation -
400 Bad request -
401 Unauthorized request -
403 Operation not allowed -
404 Not found -
500 Internal Server error -
+ */ + public okhttp3.Call searchLoaActionAsync(@javax.annotation.Nonnull UUID loaId, @javax.annotation.Nonnull LoaActionSearchRequest loaActionSearchRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = searchLoaActionValidateBeforeCall(loaId, loaActionSearchRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for updateLoaByUuid + * @param loaId Loa UUID (required) + * @param loaReplaceOperation (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successful operation -
400 Bad request -
401 Unauthorized request -
403 Operation not allowed -
404 Not found -
500 Internal Server error -
+ */ + public okhttp3.Call updateLoaByUuidCall(@javax.annotation.Nonnull UUID loaId, @javax.annotation.Nonnull List loaReplaceOperation, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = loaReplaceOperation; + + // create path and map variables + String localVarPath = "/fabric/v4/loas/{loaId}" + .replace("{" + "loaId" + "}", localVarApiClient.escapeString(loaId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "BearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call updateLoaByUuidValidateBeforeCall(@javax.annotation.Nonnull UUID loaId, @javax.annotation.Nonnull List loaReplaceOperation, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'loaId' is set + if (loaId == null) { + throw new ApiException("Missing the required parameter 'loaId' when calling updateLoaByUuid(Async)"); + } + + // verify the required parameter 'loaReplaceOperation' is set + if (loaReplaceOperation == null) { + throw new ApiException("Missing the required parameter 'loaReplaceOperation' when calling updateLoaByUuid(Async)"); + } + + return updateLoaByUuidCall(loaId, loaReplaceOperation, _callback); + + } + + /** + * Update Loa + * The API provides capability to update Loa details by Loa ID + * @param loaId Loa UUID (required) + * @param loaReplaceOperation (required) + * @return LoaResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successful operation -
400 Bad request -
401 Unauthorized request -
403 Operation not allowed -
404 Not found -
500 Internal Server error -
+ */ + public LoaResponse updateLoaByUuid(@javax.annotation.Nonnull UUID loaId, @javax.annotation.Nonnull List loaReplaceOperation) throws ApiException { + ApiResponse localVarResp = updateLoaByUuidWithHttpInfo(loaId, loaReplaceOperation); + return localVarResp.getData(); + } + + /** + * Update Loa + * The API provides capability to update Loa details by Loa ID + * @param loaId Loa UUID (required) + * @param loaReplaceOperation (required) + * @return ApiResponse<LoaResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successful operation -
400 Bad request -
401 Unauthorized request -
403 Operation not allowed -
404 Not found -
500 Internal Server error -
+ */ + public ApiResponse updateLoaByUuidWithHttpInfo(@javax.annotation.Nonnull UUID loaId, @javax.annotation.Nonnull List loaReplaceOperation) throws ApiException { + okhttp3.Call localVarCall = updateLoaByUuidValidateBeforeCall(loaId, loaReplaceOperation, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Update Loa (asynchronously) + * The API provides capability to update Loa details by Loa ID + * @param loaId Loa UUID (required) + * @param loaReplaceOperation (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successful operation -
400 Bad request -
401 Unauthorized request -
403 Operation not allowed -
404 Not found -
500 Internal Server error -
+ */ + public okhttp3.Call updateLoaByUuidAsync(@javax.annotation.Nonnull UUID loaId, @javax.annotation.Nonnull List loaReplaceOperation, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = updateLoaByUuidValidateBeforeCall(loaId, loaReplaceOperation, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } +} diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/api/LogosApi.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/api/LogosApi.java index 25d0c362..65625e74 100644 --- a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/api/LogosApi.java +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/api/LogosApi.java @@ -73,6 +73,192 @@ public void setCustomBaseUrl(String customBaseUrl) { this.localCustomBaseUrl = customBaseUrl; } + /** + * Build call for createLogo + * @param logo Logo image file (required) + * @param name Name of the Logo (required) + * @param description Description of the logo (required) + * @param type Type of logo (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
201 Successful Create operation -
400 Bad request -
401 Unauthorized -
403 Forbidden -
500 Internal Server Error -
+ */ + public okhttp3.Call createLogoCall(@javax.annotation.Nonnull File logo, @javax.annotation.Nonnull String name, @javax.annotation.Nonnull String description, @javax.annotation.Nonnull String type, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/fabric/v4/logos"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (logo != null) { + localVarFormParams.put("logo", logo); + } + + if (name != null) { + localVarFormParams.put("name", name); + } + + if (description != null) { + localVarFormParams.put("description", description); + } + + if (type != null) { + localVarFormParams.put("type", type); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "multipart/form-data" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "BearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call createLogoValidateBeforeCall(@javax.annotation.Nonnull File logo, @javax.annotation.Nonnull String name, @javax.annotation.Nonnull String description, @javax.annotation.Nonnull String type, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'logo' is set + if (logo == null) { + throw new ApiException("Missing the required parameter 'logo' when calling createLogo(Async)"); + } + + // verify the required parameter 'name' is set + if (name == null) { + throw new ApiException("Missing the required parameter 'name' when calling createLogo(Async)"); + } + + // verify the required parameter 'description' is set + if (description == null) { + throw new ApiException("Missing the required parameter 'description' when calling createLogo(Async)"); + } + + // verify the required parameter 'type' is set + if (type == null) { + throw new ApiException("Missing the required parameter 'type' when calling createLogo(Async)"); + } + + return createLogoCall(logo, name, description, type, _callback); + + } + + /** + * Create Logo + * Create Logo for Equinix Fabricâ„¢ Company Profile. + * @param logo Logo image file (required) + * @param name Name of the Logo (required) + * @param description Description of the logo (required) + * @param type Type of logo (required) + * @return LogoResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
201 Successful Create operation -
400 Bad request -
401 Unauthorized -
403 Forbidden -
500 Internal Server Error -
+ */ + public LogoResponse createLogo(@javax.annotation.Nonnull File logo, @javax.annotation.Nonnull String name, @javax.annotation.Nonnull String description, @javax.annotation.Nonnull String type) throws ApiException { + ApiResponse localVarResp = createLogoWithHttpInfo(logo, name, description, type); + return localVarResp.getData(); + } + + /** + * Create Logo + * Create Logo for Equinix Fabricâ„¢ Company Profile. + * @param logo Logo image file (required) + * @param name Name of the Logo (required) + * @param description Description of the logo (required) + * @param type Type of logo (required) + * @return ApiResponse<LogoResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
201 Successful Create operation -
400 Bad request -
401 Unauthorized -
403 Forbidden -
500 Internal Server Error -
+ */ + public ApiResponse createLogoWithHttpInfo(@javax.annotation.Nonnull File logo, @javax.annotation.Nonnull String name, @javax.annotation.Nonnull String description, @javax.annotation.Nonnull String type) throws ApiException { + okhttp3.Call localVarCall = createLogoValidateBeforeCall(logo, name, description, type, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Create Logo (asynchronously) + * Create Logo for Equinix Fabricâ„¢ Company Profile. + * @param logo Logo image file (required) + * @param name Name of the Logo (required) + * @param description Description of the logo (required) + * @param type Type of logo (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
201 Successful Create operation -
400 Bad request -
401 Unauthorized -
403 Forbidden -
500 Internal Server Error -
+ */ + public okhttp3.Call createLogoAsync(@javax.annotation.Nonnull File logo, @javax.annotation.Nonnull String name, @javax.annotation.Nonnull String description, @javax.annotation.Nonnull String type, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = createLogoValidateBeforeCall(logo, name, description, type, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } /** * Build call for deleteLogoByUuid * @param uuid UUID of the Logo (required) diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/api/OpticalMetroConnectsApi.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/api/OpticalMetroConnectsApi.java new file mode 100644 index 00000000..f692f4a7 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/api/OpticalMetroConnectsApi.java @@ -0,0 +1,656 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.api; + +import com.equinix.sdk.fabricv4.ApiCallback; +import com.equinix.sdk.fabricv4.ApiClient; +import com.equinix.sdk.fabricv4.ApiException; +import com.equinix.sdk.fabricv4.ApiResponse; +import com.equinix.sdk.fabricv4.Configuration; +import com.equinix.sdk.fabricv4.Pair; +import com.equinix.sdk.fabricv4.ProgressRequestBody; +import com.equinix.sdk.fabricv4.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + +import com.equinix.sdk.fabricv4.model.BulkOpticalConnectRequest; +import com.equinix.sdk.fabricv4.model.Error; +import com.equinix.sdk.fabricv4.model.OpticalConnectBulk; +import com.equinix.sdk.fabricv4.model.OpticalConnectPostRequest; +import com.equinix.sdk.fabricv4.model.OpticalConnectResponse; +import com.equinix.sdk.fabricv4.model.OpticalConnectSearchRequest; +import com.equinix.sdk.fabricv4.model.OpticalConnectServiceSearchResponse; +import java.util.UUID; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class OpticalMetroConnectsApi { + private ApiClient localVarApiClient; + private int localHostIndex; + private String localCustomBaseUrl; + + public OpticalMetroConnectsApi() { + this(Configuration.getDefaultApiClient()); + } + + public OpticalMetroConnectsApi(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + /** + * Build call for createBulkOpticalConnect + * @param bulkOpticalConnectRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
202 Accepted Operation -
400 Bad request -
403 Forbidden -
404 Not Found -
500 Internal Server error -
+ */ + public okhttp3.Call createBulkOpticalConnectCall(@javax.annotation.Nonnull BulkOpticalConnectRequest bulkOpticalConnectRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = bulkOpticalConnectRequest; + + // create path and map variables + String localVarPath = "/fabric/v4/opticalConnects/bulk"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "BearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call createBulkOpticalConnectValidateBeforeCall(@javax.annotation.Nonnull BulkOpticalConnectRequest bulkOpticalConnectRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'bulkOpticalConnectRequest' is set + if (bulkOpticalConnectRequest == null) { + throw new ApiException("Missing the required parameter 'bulkOpticalConnectRequest' when calling createBulkOpticalConnect(Async)"); + } + + return createBulkOpticalConnectCall(bulkOpticalConnectRequest, _callback); + + } + + /** + * Create Dual Diverse Optical Metro Connect Service + * Create a dual diverse pair of circuits on separate optical paths. + * @param bulkOpticalConnectRequest (required) + * @return OpticalConnectBulk + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
202 Accepted Operation -
400 Bad request -
403 Forbidden -
404 Not Found -
500 Internal Server error -
+ */ + public OpticalConnectBulk createBulkOpticalConnect(@javax.annotation.Nonnull BulkOpticalConnectRequest bulkOpticalConnectRequest) throws ApiException { + ApiResponse localVarResp = createBulkOpticalConnectWithHttpInfo(bulkOpticalConnectRequest); + return localVarResp.getData(); + } + + /** + * Create Dual Diverse Optical Metro Connect Service + * Create a dual diverse pair of circuits on separate optical paths. + * @param bulkOpticalConnectRequest (required) + * @return ApiResponse<OpticalConnectBulk> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
202 Accepted Operation -
400 Bad request -
403 Forbidden -
404 Not Found -
500 Internal Server error -
+ */ + public ApiResponse createBulkOpticalConnectWithHttpInfo(@javax.annotation.Nonnull BulkOpticalConnectRequest bulkOpticalConnectRequest) throws ApiException { + okhttp3.Call localVarCall = createBulkOpticalConnectValidateBeforeCall(bulkOpticalConnectRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Create Dual Diverse Optical Metro Connect Service (asynchronously) + * Create a dual diverse pair of circuits on separate optical paths. + * @param bulkOpticalConnectRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
202 Accepted Operation -
400 Bad request -
403 Forbidden -
404 Not Found -
500 Internal Server error -
+ */ + public okhttp3.Call createBulkOpticalConnectAsync(@javax.annotation.Nonnull BulkOpticalConnectRequest bulkOpticalConnectRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = createBulkOpticalConnectValidateBeforeCall(bulkOpticalConnectRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for createOpticalConnect + * @param opticalConnectPostRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
202 Accepted Operation -
400 Bad request -
403 Forbidden -
404 Not Found -
500 Internal Server error -
+ */ + public okhttp3.Call createOpticalConnectCall(@javax.annotation.Nonnull OpticalConnectPostRequest opticalConnectPostRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = opticalConnectPostRequest; + + // create path and map variables + String localVarPath = "/fabric/v4/opticalConnects"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "BearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call createOpticalConnectValidateBeforeCall(@javax.annotation.Nonnull OpticalConnectPostRequest opticalConnectPostRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'opticalConnectPostRequest' is set + if (opticalConnectPostRequest == null) { + throw new ApiException("Missing the required parameter 'opticalConnectPostRequest' when calling createOpticalConnect(Async)"); + } + + return createOpticalConnectCall(opticalConnectPostRequest, _callback); + + } + + /** + * Create Optical Metro Connect Service + * Create a single Optical Metro Connect circuit. + * @param opticalConnectPostRequest (required) + * @return OpticalConnectResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
202 Accepted Operation -
400 Bad request -
403 Forbidden -
404 Not Found -
500 Internal Server error -
+ */ + public OpticalConnectResponse createOpticalConnect(@javax.annotation.Nonnull OpticalConnectPostRequest opticalConnectPostRequest) throws ApiException { + ApiResponse localVarResp = createOpticalConnectWithHttpInfo(opticalConnectPostRequest); + return localVarResp.getData(); + } + + /** + * Create Optical Metro Connect Service + * Create a single Optical Metro Connect circuit. + * @param opticalConnectPostRequest (required) + * @return ApiResponse<OpticalConnectResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
202 Accepted Operation -
400 Bad request -
403 Forbidden -
404 Not Found -
500 Internal Server error -
+ */ + public ApiResponse createOpticalConnectWithHttpInfo(@javax.annotation.Nonnull OpticalConnectPostRequest opticalConnectPostRequest) throws ApiException { + okhttp3.Call localVarCall = createOpticalConnectValidateBeforeCall(opticalConnectPostRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Create Optical Metro Connect Service (asynchronously) + * Create a single Optical Metro Connect circuit. + * @param opticalConnectPostRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
202 Accepted Operation -
400 Bad request -
403 Forbidden -
404 Not Found -
500 Internal Server error -
+ */ + public okhttp3.Call createOpticalConnectAsync(@javax.annotation.Nonnull OpticalConnectPostRequest opticalConnectPostRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = createOpticalConnectValidateBeforeCall(opticalConnectPostRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getOpticalConnectByUuid + * @param opticalConnectId Unique identifier of an Optical Connect. (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successful Operation -
400 Bad request -
403 Forbidden -
404 Not Found -
500 Internal Server error -
+ */ + public okhttp3.Call getOpticalConnectByUuidCall(@javax.annotation.Nonnull UUID opticalConnectId, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/fabric/v4/opticalConnects/{opticalConnectId}" + .replace("{" + "opticalConnectId" + "}", localVarApiClient.escapeString(opticalConnectId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "BearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getOpticalConnectByUuidValidateBeforeCall(@javax.annotation.Nonnull UUID opticalConnectId, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'opticalConnectId' is set + if (opticalConnectId == null) { + throw new ApiException("Missing the required parameter 'opticalConnectId' when calling getOpticalConnectByUuid(Async)"); + } + + return getOpticalConnectByUuidCall(opticalConnectId, _callback); + + } + + /** + * Get Optical Metro Connect Service + * Get a single Optical Metro Connect by UUID. + * @param opticalConnectId Unique identifier of an Optical Connect. (required) + * @return OpticalConnectResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successful Operation -
400 Bad request -
403 Forbidden -
404 Not Found -
500 Internal Server error -
+ */ + public OpticalConnectResponse getOpticalConnectByUuid(@javax.annotation.Nonnull UUID opticalConnectId) throws ApiException { + ApiResponse localVarResp = getOpticalConnectByUuidWithHttpInfo(opticalConnectId); + return localVarResp.getData(); + } + + /** + * Get Optical Metro Connect Service + * Get a single Optical Metro Connect by UUID. + * @param opticalConnectId Unique identifier of an Optical Connect. (required) + * @return ApiResponse<OpticalConnectResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successful Operation -
400 Bad request -
403 Forbidden -
404 Not Found -
500 Internal Server error -
+ */ + public ApiResponse getOpticalConnectByUuidWithHttpInfo(@javax.annotation.Nonnull UUID opticalConnectId) throws ApiException { + okhttp3.Call localVarCall = getOpticalConnectByUuidValidateBeforeCall(opticalConnectId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get Optical Metro Connect Service (asynchronously) + * Get a single Optical Metro Connect by UUID. + * @param opticalConnectId Unique identifier of an Optical Connect. (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successful Operation -
400 Bad request -
403 Forbidden -
404 Not Found -
500 Internal Server error -
+ */ + public okhttp3.Call getOpticalConnectByUuidAsync(@javax.annotation.Nonnull UUID opticalConnectId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getOpticalConnectByUuidValidateBeforeCall(opticalConnectId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for searchOpticalConnect + * @param opticalConnectSearchRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successful operation -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal Server error -
+ */ + public okhttp3.Call searchOpticalConnectCall(@javax.annotation.Nonnull OpticalConnectSearchRequest opticalConnectSearchRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = opticalConnectSearchRequest; + + // create path and map variables + String localVarPath = "/fabric/v4/opticalConnects/search"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "BearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call searchOpticalConnectValidateBeforeCall(@javax.annotation.Nonnull OpticalConnectSearchRequest opticalConnectSearchRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'opticalConnectSearchRequest' is set + if (opticalConnectSearchRequest == null) { + throw new ApiException("Missing the required parameter 'opticalConnectSearchRequest' when calling searchOpticalConnect(Async)"); + } + + return searchOpticalConnectCall(opticalConnectSearchRequest, _callback); + + } + + /** + * Search Optical Metro Connect Services + * Get Optical Metro Connects matching the supplied criteria, with optional filtering, pagination and sorting. + * @param opticalConnectSearchRequest (required) + * @return OpticalConnectServiceSearchResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successful operation -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal Server error -
+ */ + public OpticalConnectServiceSearchResponse searchOpticalConnect(@javax.annotation.Nonnull OpticalConnectSearchRequest opticalConnectSearchRequest) throws ApiException { + ApiResponse localVarResp = searchOpticalConnectWithHttpInfo(opticalConnectSearchRequest); + return localVarResp.getData(); + } + + /** + * Search Optical Metro Connect Services + * Get Optical Metro Connects matching the supplied criteria, with optional filtering, pagination and sorting. + * @param opticalConnectSearchRequest (required) + * @return ApiResponse<OpticalConnectServiceSearchResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successful operation -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal Server error -
+ */ + public ApiResponse searchOpticalConnectWithHttpInfo(@javax.annotation.Nonnull OpticalConnectSearchRequest opticalConnectSearchRequest) throws ApiException { + okhttp3.Call localVarCall = searchOpticalConnectValidateBeforeCall(opticalConnectSearchRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Search Optical Metro Connect Services (asynchronously) + * Get Optical Metro Connects matching the supplied criteria, with optional filtering, pagination and sorting. + * @param opticalConnectSearchRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successful operation -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal Server error -
+ */ + public okhttp3.Call searchOpticalConnectAsync(@javax.annotation.Nonnull OpticalConnectSearchRequest opticalConnectSearchRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = searchOpticalConnectValidateBeforeCall(opticalConnectSearchRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } +} diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/api/ServiceProfilesApi.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/api/ServiceProfilesApi.java index eba8c414..22886006 100644 --- a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/api/ServiceProfilesApi.java +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/api/ServiceProfilesApi.java @@ -25,14 +25,17 @@ import java.io.IOException; +import com.equinix.sdk.fabricv4.model.EnvironmentActionRequest; +import com.equinix.sdk.fabricv4.model.EnvironmentActionResponse; import com.equinix.sdk.fabricv4.model.Error; -import com.equinix.sdk.fabricv4.model.JsonPatchOperation; +import com.equinix.sdk.fabricv4.model.ProviderEnvironments; import com.equinix.sdk.fabricv4.model.ServiceMetros; import com.equinix.sdk.fabricv4.model.ServiceProfile; import com.equinix.sdk.fabricv4.model.ServiceProfileActionRequest; import com.equinix.sdk.fabricv4.model.ServiceProfileActionResponse; import com.equinix.sdk.fabricv4.model.ServiceProfileRequest; import com.equinix.sdk.fabricv4.model.ServiceProfileSearchRequest; +import com.equinix.sdk.fabricv4.model.ServiceProfileUpdateOperation; import com.equinix.sdk.fabricv4.model.ServiceProfiles; import java.util.UUID; @@ -681,6 +684,166 @@ public okhttp3.Call getServiceProfileByUuidAsync(@javax.annotation.Nonnull UUID localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } + /** + * Build call for getServiceProfileEnvironmentsByUuid + * @param serviceProfileId Service Profile UUID (required) + * @param offset offset (optional) + * @param limit number of records to fetch (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successful operation -
400 Bad request -
401 Unauthorized -
403 Forbidden -
500 Internal Server Error -
+ */ + public okhttp3.Call getServiceProfileEnvironmentsByUuidCall(@javax.annotation.Nonnull UUID serviceProfileId, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Integer limit, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/fabric/v4/serviceProfiles/{serviceProfileId}/environments" + .replace("{" + "serviceProfileId" + "}", localVarApiClient.escapeString(serviceProfileId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (offset != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("offset", offset)); + } + + if (limit != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit)); + } + + final String[] localVarAccepts = { + "application/json; charset=UTF-8", + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "BearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getServiceProfileEnvironmentsByUuidValidateBeforeCall(@javax.annotation.Nonnull UUID serviceProfileId, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Integer limit, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'serviceProfileId' is set + if (serviceProfileId == null) { + throw new ApiException("Missing the required parameter 'serviceProfileId' when calling getServiceProfileEnvironmentsByUuid(Async)"); + } + + return getServiceProfileEnvironmentsByUuidCall(serviceProfileId, offset, limit, _callback); + + } + + /** + * Get Profile Environments + * Get service profile provider environments by UUID <sup color='red'>Beta</sup></font>. + * @param serviceProfileId Service Profile UUID (required) + * @param offset offset (optional) + * @param limit number of records to fetch (optional) + * @return ProviderEnvironments + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successful operation -
400 Bad request -
401 Unauthorized -
403 Forbidden -
500 Internal Server Error -
+ */ + public ProviderEnvironments getServiceProfileEnvironmentsByUuid(@javax.annotation.Nonnull UUID serviceProfileId, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Integer limit) throws ApiException { + ApiResponse localVarResp = getServiceProfileEnvironmentsByUuidWithHttpInfo(serviceProfileId, offset, limit); + return localVarResp.getData(); + } + + /** + * Get Profile Environments + * Get service profile provider environments by UUID <sup color='red'>Beta</sup></font>. + * @param serviceProfileId Service Profile UUID (required) + * @param offset offset (optional) + * @param limit number of records to fetch (optional) + * @return ApiResponse<ProviderEnvironments> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successful operation -
400 Bad request -
401 Unauthorized -
403 Forbidden -
500 Internal Server Error -
+ */ + public ApiResponse getServiceProfileEnvironmentsByUuidWithHttpInfo(@javax.annotation.Nonnull UUID serviceProfileId, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Integer limit) throws ApiException { + okhttp3.Call localVarCall = getServiceProfileEnvironmentsByUuidValidateBeforeCall(serviceProfileId, offset, limit, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get Profile Environments (asynchronously) + * Get service profile provider environments by UUID <sup color='red'>Beta</sup></font>. + * @param serviceProfileId Service Profile UUID (required) + * @param offset offset (optional) + * @param limit number of records to fetch (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successful operation -
400 Bad request -
401 Unauthorized -
403 Forbidden -
500 Internal Server Error -
+ */ + public okhttp3.Call getServiceProfileEnvironmentsByUuidAsync(@javax.annotation.Nonnull UUID serviceProfileId, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Integer limit, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getServiceProfileEnvironmentsByUuidValidateBeforeCall(serviceProfileId, offset, limit, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } /** * Build call for getServiceProfileMetrosByUuid * @param serviceProfileId Service Profile UUID (required) @@ -1319,10 +1482,173 @@ public okhttp3.Call searchServiceProfilesAsync(@javax.annotation.Nonnull Service localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } + /** + * Build call for serviceProfileEnvironmentAction + * @param serviceProfileId Service Profile UUID (required) + * @param environmentId Provider Environment Reference (required) + * @param environmentActionRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
201 Successful service profile environment action operation -
400 Bad request -
401 Unauthorized -
403 Forbidden -
500 Internal Server Error -
+ */ + public okhttp3.Call serviceProfileEnvironmentActionCall(@javax.annotation.Nonnull UUID serviceProfileId, @javax.annotation.Nonnull String environmentId, @javax.annotation.Nonnull EnvironmentActionRequest environmentActionRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = environmentActionRequest; + + // create path and map variables + String localVarPath = "/fabric/v4/serviceProfiles/{serviceProfileId}/environments/{environmentId}/actions" + .replace("{" + "serviceProfileId" + "}", localVarApiClient.escapeString(serviceProfileId.toString())) + .replace("{" + "environmentId" + "}", localVarApiClient.escapeString(environmentId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "BearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call serviceProfileEnvironmentActionValidateBeforeCall(@javax.annotation.Nonnull UUID serviceProfileId, @javax.annotation.Nonnull String environmentId, @javax.annotation.Nonnull EnvironmentActionRequest environmentActionRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'serviceProfileId' is set + if (serviceProfileId == null) { + throw new ApiException("Missing the required parameter 'serviceProfileId' when calling serviceProfileEnvironmentAction(Async)"); + } + + // verify the required parameter 'environmentId' is set + if (environmentId == null) { + throw new ApiException("Missing the required parameter 'environmentId' when calling serviceProfileEnvironmentAction(Async)"); + } + + // verify the required parameter 'environmentActionRequest' is set + if (environmentActionRequest == null) { + throw new ApiException("Missing the required parameter 'environmentActionRequest' when calling serviceProfileEnvironmentAction(Async)"); + } + + return serviceProfileEnvironmentActionCall(serviceProfileId, environmentId, environmentActionRequest, _callback); + + } + + /** + * Service Profile Environment Actions + * This API provides capability to perform actions on a service profile environment, such as validating an activation key.<sup color='red'>Beta</sup></font> + * @param serviceProfileId Service Profile UUID (required) + * @param environmentId Provider Environment Reference (required) + * @param environmentActionRequest (required) + * @return EnvironmentActionResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
201 Successful service profile environment action operation -
400 Bad request -
401 Unauthorized -
403 Forbidden -
500 Internal Server Error -
+ */ + public EnvironmentActionResponse serviceProfileEnvironmentAction(@javax.annotation.Nonnull UUID serviceProfileId, @javax.annotation.Nonnull String environmentId, @javax.annotation.Nonnull EnvironmentActionRequest environmentActionRequest) throws ApiException { + ApiResponse localVarResp = serviceProfileEnvironmentActionWithHttpInfo(serviceProfileId, environmentId, environmentActionRequest); + return localVarResp.getData(); + } + + /** + * Service Profile Environment Actions + * This API provides capability to perform actions on a service profile environment, such as validating an activation key.<sup color='red'>Beta</sup></font> + * @param serviceProfileId Service Profile UUID (required) + * @param environmentId Provider Environment Reference (required) + * @param environmentActionRequest (required) + * @return ApiResponse<EnvironmentActionResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
201 Successful service profile environment action operation -
400 Bad request -
401 Unauthorized -
403 Forbidden -
500 Internal Server Error -
+ */ + public ApiResponse serviceProfileEnvironmentActionWithHttpInfo(@javax.annotation.Nonnull UUID serviceProfileId, @javax.annotation.Nonnull String environmentId, @javax.annotation.Nonnull EnvironmentActionRequest environmentActionRequest) throws ApiException { + okhttp3.Call localVarCall = serviceProfileEnvironmentActionValidateBeforeCall(serviceProfileId, environmentId, environmentActionRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Service Profile Environment Actions (asynchronously) + * This API provides capability to perform actions on a service profile environment, such as validating an activation key.<sup color='red'>Beta</sup></font> + * @param serviceProfileId Service Profile UUID (required) + * @param environmentId Provider Environment Reference (required) + * @param environmentActionRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
201 Successful service profile environment action operation -
400 Bad request -
401 Unauthorized -
403 Forbidden -
500 Internal Server Error -
+ */ + public okhttp3.Call serviceProfileEnvironmentActionAsync(@javax.annotation.Nonnull UUID serviceProfileId, @javax.annotation.Nonnull String environmentId, @javax.annotation.Nonnull EnvironmentActionRequest environmentActionRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = serviceProfileEnvironmentActionValidateBeforeCall(serviceProfileId, environmentId, environmentActionRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } /** * Build call for updateServiceProfileByUuid * @param serviceProfileId Service Profile UUID (required) - * @param jsonPatchOperation (required) + * @param serviceProfileUpdateOperation (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -1338,7 +1664,7 @@ public okhttp3.Call searchServiceProfilesAsync(@javax.annotation.Nonnull Service 500 Internal Server Error - */ - public okhttp3.Call updateServiceProfileByUuidCall(@javax.annotation.Nonnull UUID serviceProfileId, @javax.annotation.Nonnull List jsonPatchOperation, final ApiCallback _callback) throws ApiException { + public okhttp3.Call updateServiceProfileByUuidCall(@javax.annotation.Nonnull UUID serviceProfileId, @javax.annotation.Nonnull List serviceProfileUpdateOperation, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -1352,7 +1678,7 @@ public okhttp3.Call updateServiceProfileByUuidCall(@javax.annotation.Nonnull UUI basePath = null; } - Object localVarPostBody = jsonPatchOperation; + Object localVarPostBody = serviceProfileUpdateOperation; // create path and map variables String localVarPath = "/fabric/v4/serviceProfiles/{serviceProfileId}" @@ -1386,18 +1712,18 @@ public okhttp3.Call updateServiceProfileByUuidCall(@javax.annotation.Nonnull UUI } @SuppressWarnings("rawtypes") - private okhttp3.Call updateServiceProfileByUuidValidateBeforeCall(@javax.annotation.Nonnull UUID serviceProfileId, @javax.annotation.Nonnull List jsonPatchOperation, final ApiCallback _callback) throws ApiException { + private okhttp3.Call updateServiceProfileByUuidValidateBeforeCall(@javax.annotation.Nonnull UUID serviceProfileId, @javax.annotation.Nonnull List serviceProfileUpdateOperation, final ApiCallback _callback) throws ApiException { // verify the required parameter 'serviceProfileId' is set if (serviceProfileId == null) { throw new ApiException("Missing the required parameter 'serviceProfileId' when calling updateServiceProfileByUuid(Async)"); } - // verify the required parameter 'jsonPatchOperation' is set - if (jsonPatchOperation == null) { - throw new ApiException("Missing the required parameter 'jsonPatchOperation' when calling updateServiceProfileByUuid(Async)"); + // verify the required parameter 'serviceProfileUpdateOperation' is set + if (serviceProfileUpdateOperation == null) { + throw new ApiException("Missing the required parameter 'serviceProfileUpdateOperation' when calling updateServiceProfileByUuid(Async)"); } - return updateServiceProfileByUuidCall(serviceProfileId, jsonPatchOperation, _callback); + return updateServiceProfileByUuidCall(serviceProfileId, serviceProfileUpdateOperation, _callback); } @@ -1405,7 +1731,7 @@ private okhttp3.Call updateServiceProfileByUuidValidateBeforeCall(@javax.annotat * Update Profile * Update Service Profile by UUID * @param serviceProfileId Service Profile UUID (required) - * @param jsonPatchOperation (required) + * @param serviceProfileUpdateOperation (required) * @return ServiceProfile * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -1420,8 +1746,8 @@ private okhttp3.Call updateServiceProfileByUuidValidateBeforeCall(@javax.annotat 500 Internal Server Error - */ - public ServiceProfile updateServiceProfileByUuid(@javax.annotation.Nonnull UUID serviceProfileId, @javax.annotation.Nonnull List jsonPatchOperation) throws ApiException { - ApiResponse localVarResp = updateServiceProfileByUuidWithHttpInfo(serviceProfileId, jsonPatchOperation); + public ServiceProfile updateServiceProfileByUuid(@javax.annotation.Nonnull UUID serviceProfileId, @javax.annotation.Nonnull List serviceProfileUpdateOperation) throws ApiException { + ApiResponse localVarResp = updateServiceProfileByUuidWithHttpInfo(serviceProfileId, serviceProfileUpdateOperation); return localVarResp.getData(); } @@ -1429,7 +1755,7 @@ public ServiceProfile updateServiceProfileByUuid(@javax.annotation.Nonnull UUID * Update Profile * Update Service Profile by UUID * @param serviceProfileId Service Profile UUID (required) - * @param jsonPatchOperation (required) + * @param serviceProfileUpdateOperation (required) * @return ApiResponse<ServiceProfile> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -1444,8 +1770,8 @@ public ServiceProfile updateServiceProfileByUuid(@javax.annotation.Nonnull UUID 500 Internal Server Error - */ - public ApiResponse updateServiceProfileByUuidWithHttpInfo(@javax.annotation.Nonnull UUID serviceProfileId, @javax.annotation.Nonnull List jsonPatchOperation) throws ApiException { - okhttp3.Call localVarCall = updateServiceProfileByUuidValidateBeforeCall(serviceProfileId, jsonPatchOperation, null); + public ApiResponse updateServiceProfileByUuidWithHttpInfo(@javax.annotation.Nonnull UUID serviceProfileId, @javax.annotation.Nonnull List serviceProfileUpdateOperation) throws ApiException { + okhttp3.Call localVarCall = updateServiceProfileByUuidValidateBeforeCall(serviceProfileId, serviceProfileUpdateOperation, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -1454,7 +1780,7 @@ public ApiResponse updateServiceProfileByUuidWithHttpInfo(@javax * Update Profile (asynchronously) * Update Service Profile by UUID * @param serviceProfileId Service Profile UUID (required) - * @param jsonPatchOperation (required) + * @param serviceProfileUpdateOperation (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -1470,9 +1796,9 @@ public ApiResponse updateServiceProfileByUuidWithHttpInfo(@javax 500 Internal Server Error - */ - public okhttp3.Call updateServiceProfileByUuidAsync(@javax.annotation.Nonnull UUID serviceProfileId, @javax.annotation.Nonnull List jsonPatchOperation, final ApiCallback _callback) throws ApiException { + public okhttp3.Call updateServiceProfileByUuidAsync(@javax.annotation.Nonnull UUID serviceProfileId, @javax.annotation.Nonnull List serviceProfileUpdateOperation, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = updateServiceProfileByUuidValidateBeforeCall(serviceProfileId, jsonPatchOperation, _callback); + okhttp3.Call localVarCall = updateServiceProfileByUuidValidateBeforeCall(serviceProfileId, serviceProfileUpdateOperation, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/api/StreamSubscriptionsApi.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/api/StreamSubscriptionsApi.java index 2587b2f0..793b28ef 100644 --- a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/api/StreamSubscriptionsApi.java +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/api/StreamSubscriptionsApi.java @@ -27,9 +27,11 @@ import com.equinix.sdk.fabricv4.model.Error; import com.equinix.sdk.fabricv4.model.GetAllStreamSubscriptionResponse; +import com.equinix.sdk.fabricv4.model.SearchStreamSubscriptionResponse; import com.equinix.sdk.fabricv4.model.StreamSubscription; import com.equinix.sdk.fabricv4.model.StreamSubscriptionPostRequest; import com.equinix.sdk.fabricv4.model.StreamSubscriptionPutRequest; +import com.equinix.sdk.fabricv4.model.StreamSubscriptionSearchRequest; import java.util.UUID; import java.lang.reflect.Type; @@ -705,6 +707,153 @@ public okhttp3.Call getStreamSubscriptionsAsync(@javax.annotation.Nonnull UUID s localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } + /** + * Build call for searchStreamSubscriptions + * @param streamSubscriptionSearchRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successful operation -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
+ */ + public okhttp3.Call searchStreamSubscriptionsCall(@javax.annotation.Nonnull StreamSubscriptionSearchRequest streamSubscriptionSearchRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = streamSubscriptionSearchRequest; + + // create path and map variables + String localVarPath = "/fabric/v4/streamSubscriptions/search"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "BearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call searchStreamSubscriptionsValidateBeforeCall(@javax.annotation.Nonnull StreamSubscriptionSearchRequest streamSubscriptionSearchRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'streamSubscriptionSearchRequest' is set + if (streamSubscriptionSearchRequest == null) { + throw new ApiException("Missing the required parameter 'streamSubscriptionSearchRequest' when calling searchStreamSubscriptions(Async)"); + } + + return searchStreamSubscriptionsCall(streamSubscriptionSearchRequest, _callback); + + } + + /** + * Search Stream Subscriptions + * This API provides capability to search stream subscriptions + * @param streamSubscriptionSearchRequest (required) + * @return SearchStreamSubscriptionResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successful operation -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
+ */ + public SearchStreamSubscriptionResponse searchStreamSubscriptions(@javax.annotation.Nonnull StreamSubscriptionSearchRequest streamSubscriptionSearchRequest) throws ApiException { + ApiResponse localVarResp = searchStreamSubscriptionsWithHttpInfo(streamSubscriptionSearchRequest); + return localVarResp.getData(); + } + + /** + * Search Stream Subscriptions + * This API provides capability to search stream subscriptions + * @param streamSubscriptionSearchRequest (required) + * @return ApiResponse<SearchStreamSubscriptionResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successful operation -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
+ */ + public ApiResponse searchStreamSubscriptionsWithHttpInfo(@javax.annotation.Nonnull StreamSubscriptionSearchRequest streamSubscriptionSearchRequest) throws ApiException { + okhttp3.Call localVarCall = searchStreamSubscriptionsValidateBeforeCall(streamSubscriptionSearchRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Search Stream Subscriptions (asynchronously) + * This API provides capability to search stream subscriptions + * @param streamSubscriptionSearchRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successful operation -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
+ */ + public okhttp3.Call searchStreamSubscriptionsAsync(@javax.annotation.Nonnull StreamSubscriptionSearchRequest streamSubscriptionSearchRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = searchStreamSubscriptionsValidateBeforeCall(streamSubscriptionSearchRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } /** * Build call for updateStreamSubscriptionByUuid * @param streamId Stream UUID (required) diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/api/StreamsApi.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/api/StreamsApi.java index fb7fc65d..3543a67b 100644 --- a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/api/StreamsApi.java +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/api/StreamsApi.java @@ -27,14 +27,16 @@ import com.equinix.sdk.fabricv4.model.Asset; import com.equinix.sdk.fabricv4.model.Error; -import com.equinix.sdk.fabricv4.model.GetAllStreamAssetResponse; import com.equinix.sdk.fabricv4.model.GetAllStreamResponse; +import com.equinix.sdk.fabricv4.model.SearchStreamAssetResponse; +import com.equinix.sdk.fabricv4.model.SearchStreamResponse; import com.equinix.sdk.fabricv4.model.Stream; import com.equinix.sdk.fabricv4.model.StreamAsset; import com.equinix.sdk.fabricv4.model.StreamAssetPutRequest; import com.equinix.sdk.fabricv4.model.StreamAssetSearchRequest; import com.equinix.sdk.fabricv4.model.StreamPostRequest; import com.equinix.sdk.fabricv4.model.StreamPutRequest; +import com.equinix.sdk.fabricv4.model.StreamSearchRequest; import java.util.UUID; import java.lang.reflect.Type; @@ -1005,10 +1007,8 @@ public okhttp3.Call getStreamsAsync(@javax.annotation.Nullable Integer offset, @ return localVarCall; } /** - * Build call for getStreamsAssets + * Build call for searchStreamAssets * @param streamAssetSearchRequest (required) - * @param offset offset (optional) - * @param limit number of records to fetch (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -1017,13 +1017,14 @@ public okhttp3.Call getStreamsAsync(@javax.annotation.Nullable Integer offset, @ Response Details Status Code Description Response Headers 200 Successful operation - + 400 Bad request - 401 Unauthorized - 403 Forbidden - 404 Not Found - 500 Internal server error - */ - public okhttp3.Call getStreamsAssetsCall(@javax.annotation.Nonnull StreamAssetSearchRequest streamAssetSearchRequest, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Integer limit, final ApiCallback _callback) throws ApiException { + public okhttp3.Call searchStreamAssetsCall(@javax.annotation.Nonnull StreamAssetSearchRequest streamAssetSearchRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -1048,14 +1049,6 @@ public okhttp3.Call getStreamsAssetsCall(@javax.annotation.Nonnull StreamAssetSe Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - if (offset != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("offset", offset)); - } - - if (limit != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit)); - } - final String[] localVarAccepts = { "application/json" }; @@ -1077,71 +1070,206 @@ public okhttp3.Call getStreamsAssetsCall(@javax.annotation.Nonnull StreamAssetSe } @SuppressWarnings("rawtypes") - private okhttp3.Call getStreamsAssetsValidateBeforeCall(@javax.annotation.Nonnull StreamAssetSearchRequest streamAssetSearchRequest, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Integer limit, final ApiCallback _callback) throws ApiException { + private okhttp3.Call searchStreamAssetsValidateBeforeCall(@javax.annotation.Nonnull StreamAssetSearchRequest streamAssetSearchRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'streamAssetSearchRequest' is set if (streamAssetSearchRequest == null) { - throw new ApiException("Missing the required parameter 'streamAssetSearchRequest' when calling getStreamsAssets(Async)"); + throw new ApiException("Missing the required parameter 'streamAssetSearchRequest' when calling searchStreamAssets(Async)"); } - return getStreamsAssetsCall(streamAssetSearchRequest, offset, limit, _callback); + return searchStreamAssetsCall(streamAssetSearchRequest, _callback); } /** - * Get Assets - * This API provides capability to retrieve stream assets + * Search Stream Assets + * This API provides capability to search stream assets * @param streamAssetSearchRequest (required) - * @param offset offset (optional) - * @param limit number of records to fetch (optional) - * @return GetAllStreamAssetResponse + * @return SearchStreamAssetResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details +
Response Details
Status Code Description Response Headers
200 Successful operation -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
*/ - public GetAllStreamAssetResponse getStreamsAssets(@javax.annotation.Nonnull StreamAssetSearchRequest streamAssetSearchRequest, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Integer limit) throws ApiException { - ApiResponse localVarResp = getStreamsAssetsWithHttpInfo(streamAssetSearchRequest, offset, limit); + public SearchStreamAssetResponse searchStreamAssets(@javax.annotation.Nonnull StreamAssetSearchRequest streamAssetSearchRequest) throws ApiException { + ApiResponse localVarResp = searchStreamAssetsWithHttpInfo(streamAssetSearchRequest); return localVarResp.getData(); } /** - * Get Assets - * This API provides capability to retrieve stream assets + * Search Stream Assets + * This API provides capability to search stream assets * @param streamAssetSearchRequest (required) - * @param offset offset (optional) - * @param limit number of records to fetch (optional) - * @return ApiResponse<GetAllStreamAssetResponse> + * @return ApiResponse<SearchStreamAssetResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details +
Response Details
Status Code Description Response Headers
200 Successful operation -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
*/ - public ApiResponse getStreamsAssetsWithHttpInfo(@javax.annotation.Nonnull StreamAssetSearchRequest streamAssetSearchRequest, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Integer limit) throws ApiException { - okhttp3.Call localVarCall = getStreamsAssetsValidateBeforeCall(streamAssetSearchRequest, offset, limit, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse searchStreamAssetsWithHttpInfo(@javax.annotation.Nonnull StreamAssetSearchRequest streamAssetSearchRequest) throws ApiException { + okhttp3.Call localVarCall = searchStreamAssetsValidateBeforeCall(streamAssetSearchRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * Get Assets (asynchronously) - * This API provides capability to retrieve stream assets + * Search Stream Assets (asynchronously) + * This API provides capability to search stream assets * @param streamAssetSearchRequest (required) - * @param offset offset (optional) - * @param limit number of records to fetch (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successful operation -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
+ */ + public okhttp3.Call searchStreamAssetsAsync(@javax.annotation.Nonnull StreamAssetSearchRequest streamAssetSearchRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = searchStreamAssetsValidateBeforeCall(streamAssetSearchRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for searchStreams + * @param streamSearchRequest (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successful operation -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
+ */ + public okhttp3.Call searchStreamsCall(@javax.annotation.Nullable StreamSearchRequest streamSearchRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = streamSearchRequest; + + // create path and map variables + String localVarPath = "/fabric/v4/streams/search"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "BearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call searchStreamsValidateBeforeCall(@javax.annotation.Nullable StreamSearchRequest streamSearchRequest, final ApiCallback _callback) throws ApiException { + return searchStreamsCall(streamSearchRequest, _callback); + + } + + /** + * Search Streams + * This API provides capability to search streams + * @param streamSearchRequest (optional) + * @return SearchStreamResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successful operation -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
+ */ + public SearchStreamResponse searchStreams(@javax.annotation.Nullable StreamSearchRequest streamSearchRequest) throws ApiException { + ApiResponse localVarResp = searchStreamsWithHttpInfo(streamSearchRequest); + return localVarResp.getData(); + } + + /** + * Search Streams + * This API provides capability to search streams + * @param streamSearchRequest (optional) + * @return ApiResponse<SearchStreamResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successful operation -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
+ */ + public ApiResponse searchStreamsWithHttpInfo(@javax.annotation.Nullable StreamSearchRequest streamSearchRequest) throws ApiException { + okhttp3.Call localVarCall = searchStreamsValidateBeforeCall(streamSearchRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Search Streams (asynchronously) + * This API provides capability to search streams + * @param streamSearchRequest (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -1156,10 +1284,10 @@ public ApiResponse getStreamsAssetsWithHttpInfo(@java 500 Internal server error - */ - public okhttp3.Call getStreamsAssetsAsync(@javax.annotation.Nonnull StreamAssetSearchRequest streamAssetSearchRequest, @javax.annotation.Nullable Integer offset, @javax.annotation.Nullable Integer limit, final ApiCallback _callback) throws ApiException { + public okhttp3.Call searchStreamsAsync(@javax.annotation.Nullable StreamSearchRequest streamSearchRequest, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = getStreamsAssetsValidateBeforeCall(streamAssetSearchRequest, offset, limit, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = searchStreamsValidateBeforeCall(streamSearchRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/api/TagsApi.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/api/TagsApi.java index 07c0da95..5c2ccc71 100644 --- a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/api/TagsApi.java +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/api/TagsApi.java @@ -29,6 +29,7 @@ import com.equinix.sdk.fabricv4.model.TagListResponse; import com.equinix.sdk.fabricv4.model.TagRequest; import com.equinix.sdk.fabricv4.model.TagResponse; +import java.util.UUID; import java.lang.reflect.Type; import java.util.ArrayList; @@ -83,7 +84,7 @@ public void setCustomBaseUrl(String customBaseUrl) { - + @@ -156,7 +157,7 @@ private okhttp3.Call createTagValidateBeforeCall(@javax.annotation.Nonnull TagRe
Response Details
Status Code Description Response Headers
201 Successful Create operation -
202 Successfully created tag and pending for approval -
400 Bad request -
401 Unauthorized -
403 Forbidden -
- + @@ -178,7 +179,7 @@ public TagResponse createTag(@javax.annotation.Nonnull TagRequest tagRequest) th
Response Details
Status Code Description Response Headers
201 Successful Create operation -
202 Successfully created tag and pending for approval -
400 Bad request -
401 Unauthorized -
403 Forbidden -
- + @@ -202,7 +203,7 @@ public ApiResponse createTagWithHttpInfo(@javax.annotation.Nonnull
Response Details
Status Code Description Response Headers
201 Successful Create operation -
202 Successfully created tag and pending for approval -
400 Bad request -
401 Unauthorized -
403 Forbidden -
- + @@ -216,6 +217,153 @@ public okhttp3.Call createTagAsync(@javax.annotation.Nonnull TagRequest tagReque localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } + /** + * Build call for getTagByUuid + * @param uuid UUID of the Tag (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details +
Response Details
Status Code Description Response Headers
201 Successful Create operation -
202 Successfully created tag and pending for approval -
400 Bad request -
401 Unauthorized -
403 Forbidden -
+ + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successful Get operation -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal Server Error -
+ */ + public okhttp3.Call getTagByUuidCall(@javax.annotation.Nonnull UUID uuid, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/fabric/v4/tags/{uuid}" + .replace("{" + "uuid" + "}", localVarApiClient.escapeString(uuid.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "BearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getTagByUuidValidateBeforeCall(@javax.annotation.Nonnull UUID uuid, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'uuid' is set + if (uuid == null) { + throw new ApiException("Missing the required parameter 'uuid' when calling getTagByUuid(Async)"); + } + + return getTagByUuidCall(uuid, _callback); + + } + + /** + * Get Tag + * Get Tag by UUID + * @param uuid UUID of the Tag (required) + * @return TagResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successful Get operation -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal Server Error -
+ */ + public TagResponse getTagByUuid(@javax.annotation.Nonnull UUID uuid) throws ApiException { + ApiResponse localVarResp = getTagByUuidWithHttpInfo(uuid); + return localVarResp.getData(); + } + + /** + * Get Tag + * Get Tag by UUID + * @param uuid UUID of the Tag (required) + * @return ApiResponse<TagResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successful Get operation -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal Server Error -
+ */ + public ApiResponse getTagByUuidWithHttpInfo(@javax.annotation.Nonnull UUID uuid) throws ApiException { + okhttp3.Call localVarCall = getTagByUuidValidateBeforeCall(uuid, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get Tag (asynchronously) + * Get Tag by UUID + * @param uuid UUID of the Tag (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 Successful Get operation -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal Server Error -
+ */ + public okhttp3.Call getTagByUuidAsync(@javax.annotation.Nonnull UUID uuid, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getTagByUuidValidateBeforeCall(uuid, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } /** * Build call for listTags * @param type Filter by tag type (optional) diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AccessPoint.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AccessPoint.java index 15676594..668f5cf9 100644 --- a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AccessPoint.java +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AccessPoint.java @@ -14,10 +14,13 @@ import java.util.Objects; import java.util.Locale; import com.equinix.sdk.fabricv4.model.AccessPointType; +import com.equinix.sdk.fabricv4.model.Address; import com.equinix.sdk.fabricv4.model.CloudRouter; +import com.equinix.sdk.fabricv4.model.Interconnect; import com.equinix.sdk.fabricv4.model.MetalInterconnection; import com.equinix.sdk.fabricv4.model.ModelInterface; import com.equinix.sdk.fabricv4.model.PeeringType; +import com.equinix.sdk.fabricv4.model.ProductOffering; import com.equinix.sdk.fabricv4.model.ProviderEnvironment; import com.equinix.sdk.fabricv4.model.SimplifiedAccount; import com.equinix.sdk.fabricv4.model.SimplifiedLinkProtocol; @@ -114,6 +117,11 @@ public class AccessPoint { @javax.annotation.Nullable private SimplifiedNetwork network; + public static final String SERIALIZED_NAME_INTERCONNECT = "interconnect"; + @SerializedName(SERIALIZED_NAME_INTERCONNECT) + @javax.annotation.Nullable + private Interconnect interconnect; + public static final String SERIALIZED_NAME_ENVIRONMENT = "environment"; @SerializedName(SERIALIZED_NAME_ENVIRONMENT) @javax.annotation.Nullable @@ -211,6 +219,26 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @javax.annotation.Nullable private RoleEnum role; + public static final String SERIALIZED_NAME_PRODUCT_OFFERING = "productOffering"; + @SerializedName(SERIALIZED_NAME_PRODUCT_OFFERING) + @javax.annotation.Nullable + private ProductOffering productOffering; + + public static final String SERIALIZED_NAME_BANDWIDTH_COMMIT = "bandwidthCommit"; + @SerializedName(SERIALIZED_NAME_BANDWIDTH_COMMIT) + @javax.annotation.Nullable + private Integer bandwidthCommit; + + public static final String SERIALIZED_NAME_PROVIDER_IDENTIFIER = "providerIdentifier"; + @SerializedName(SERIALIZED_NAME_PROVIDER_IDENTIFIER) + @javax.annotation.Nullable + private String providerIdentifier; + + public static final String SERIALIZED_NAME_ADDRESS = "address"; + @SerializedName(SERIALIZED_NAME_ADDRESS) + @javax.annotation.Nullable + private Address address; + public AccessPoint() { } @@ -404,6 +432,25 @@ public void setNetwork(@javax.annotation.Nullable SimplifiedNetwork network) { } + public AccessPoint interconnect(@javax.annotation.Nullable Interconnect interconnect) { + this.interconnect = interconnect; + return this; + } + + /** + * Get interconnect + * @return interconnect + */ + @javax.annotation.Nullable + public Interconnect getInterconnect() { + return interconnect; + } + + public void setInterconnect(@javax.annotation.Nullable Interconnect interconnect) { + this.interconnect = interconnect; + } + + public AccessPoint environment(@javax.annotation.Nullable ProviderEnvironment environment) { this.environment = environment; return this; @@ -574,6 +621,84 @@ public void setRole(@javax.annotation.Nullable RoleEnum role) { this.role = role; } + + public AccessPoint productOffering(@javax.annotation.Nullable ProductOffering productOffering) { + this.productOffering = productOffering; + return this; + } + + /** + * Get productOffering + * @return productOffering + */ + @javax.annotation.Nullable + public ProductOffering getProductOffering() { + return productOffering; + } + + public void setProductOffering(@javax.annotation.Nullable ProductOffering productOffering) { + this.productOffering = productOffering; + } + + + public AccessPoint bandwidthCommit(@javax.annotation.Nullable Integer bandwidthCommit) { + this.bandwidthCommit = bandwidthCommit; + return this; + } + + /** + * Bandwidth commit in Mbps + * minimum: 0 + * maximum: 100000 + * @return bandwidthCommit + */ + @javax.annotation.Nullable + public Integer getBandwidthCommit() { + return bandwidthCommit; + } + + public void setBandwidthCommit(@javax.annotation.Nullable Integer bandwidthCommit) { + this.bandwidthCommit = bandwidthCommit; + } + + + public AccessPoint providerIdentifier(@javax.annotation.Nullable String providerIdentifier) { + this.providerIdentifier = providerIdentifier; + return this; + } + + /** + * Provider identifier + * @return providerIdentifier + */ + @javax.annotation.Nullable + public String getProviderIdentifier() { + return providerIdentifier; + } + + public void setProviderIdentifier(@javax.annotation.Nullable String providerIdentifier) { + this.providerIdentifier = providerIdentifier; + } + + + public AccessPoint address(@javax.annotation.Nullable Address address) { + this.address = address; + return this; + } + + /** + * Get address + * @return address + */ + @javax.annotation.Nullable + public Address getAddress() { + return address; + } + + public void setAddress(@javax.annotation.Nullable Address address) { + this.address = address; + } + /** * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with @@ -639,6 +764,7 @@ public boolean equals(Object o) { Objects.equals(this.virtualDevice, accessPoint.virtualDevice) && Objects.equals(this._interface, accessPoint._interface) && Objects.equals(this.network, accessPoint.network) && + Objects.equals(this.interconnect, accessPoint.interconnect) && Objects.equals(this.environment, accessPoint.environment) && Objects.equals(this.sellerRegion, accessPoint.sellerRegion) && Objects.equals(this.peeringType, accessPoint.peeringType) && @@ -647,13 +773,17 @@ public boolean equals(Object o) { Objects.equals(this.providerConnectionId, accessPoint.providerConnectionId) && Objects.equals(this.virtualNetwork, accessPoint.virtualNetwork) && Objects.equals(this.interconnection, accessPoint.interconnection) && - Objects.equals(this.role, accessPoint.role)&& + Objects.equals(this.role, accessPoint.role) && + Objects.equals(this.productOffering, accessPoint.productOffering) && + Objects.equals(this.bandwidthCommit, accessPoint.bandwidthCommit) && + Objects.equals(this.providerIdentifier, accessPoint.providerIdentifier) && + Objects.equals(this.address, accessPoint.address)&& Objects.equals(this.additionalProperties, accessPoint.additionalProperties); } @Override public int hashCode() { - return Objects.hash(type, account, location, port, profile, router, linkProtocol, virtualDevice, _interface, network, environment, sellerRegion, peeringType, authenticationKey, activationKey, providerConnectionId, virtualNetwork, interconnection, role, additionalProperties); + return Objects.hash(type, account, location, port, profile, router, linkProtocol, virtualDevice, _interface, network, interconnect, environment, sellerRegion, peeringType, authenticationKey, activationKey, providerConnectionId, virtualNetwork, interconnection, role, productOffering, bandwidthCommit, providerIdentifier, address, additionalProperties); } @Override @@ -670,6 +800,7 @@ public String toString() { sb.append(" virtualDevice: ").append(toIndentedString(virtualDevice)).append("\n"); sb.append(" _interface: ").append(toIndentedString(_interface)).append("\n"); sb.append(" network: ").append(toIndentedString(network)).append("\n"); + sb.append(" interconnect: ").append(toIndentedString(interconnect)).append("\n"); sb.append(" environment: ").append(toIndentedString(environment)).append("\n"); sb.append(" sellerRegion: ").append(toIndentedString(sellerRegion)).append("\n"); sb.append(" peeringType: ").append(toIndentedString(peeringType)).append("\n"); @@ -679,6 +810,10 @@ public String toString() { sb.append(" virtualNetwork: ").append(toIndentedString(virtualNetwork)).append("\n"); sb.append(" interconnection: ").append(toIndentedString(interconnection)).append("\n"); sb.append(" role: ").append(toIndentedString(role)).append("\n"); + sb.append(" productOffering: ").append(toIndentedString(productOffering)).append("\n"); + sb.append(" bandwidthCommit: ").append(toIndentedString(bandwidthCommit)).append("\n"); + sb.append(" providerIdentifier: ").append(toIndentedString(providerIdentifier)).append("\n"); + sb.append(" address: ").append(toIndentedString(address)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); @@ -701,7 +836,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("type", "account", "location", "port", "profile", "router", "linkProtocol", "virtualDevice", "interface", "network", "environment", "sellerRegion", "peeringType", "authenticationKey", "activationKey", "providerConnectionId", "virtualNetwork", "interconnection", "role")); + openapiFields = new HashSet(Arrays.asList("type", "account", "location", "port", "profile", "router", "linkProtocol", "virtualDevice", "interface", "network", "interconnect", "environment", "sellerRegion", "peeringType", "authenticationKey", "activationKey", "providerConnectionId", "virtualNetwork", "interconnection", "role", "productOffering", "bandwidthCommit", "providerIdentifier", "address")); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(0); @@ -760,6 +895,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("network") != null && !jsonObj.get("network").isJsonNull()) { SimplifiedNetwork.validateJsonElement(jsonObj.get("network")); } + // validate the optional field `interconnect` + if (jsonObj.get("interconnect") != null && !jsonObj.get("interconnect").isJsonNull()) { + Interconnect.validateJsonElement(jsonObj.get("interconnect")); + } // validate the optional field `environment` if (jsonObj.get("environment") != null && !jsonObj.get("environment").isJsonNull()) { ProviderEnvironment.validateJsonElement(jsonObj.get("environment")); @@ -795,6 +934,17 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("role") != null && !jsonObj.get("role").isJsonNull()) { RoleEnum.validateJsonElement(jsonObj.get("role")); } + // validate the optional field `productOffering` + if (jsonObj.get("productOffering") != null && !jsonObj.get("productOffering").isJsonNull()) { + ProductOffering.validateJsonElement(jsonObj.get("productOffering")); + } + if ((jsonObj.get("providerIdentifier") != null && !jsonObj.get("providerIdentifier").isJsonNull()) && !jsonObj.get("providerIdentifier").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `providerIdentifier` to be a primitive type in the JSON string but got `%s`", jsonObj.get("providerIdentifier").toString())); + } + // validate the optional field `address` + if (jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) { + Address.validateJsonElement(jsonObj.get("address")); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AccessPointType.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AccessPointType.java index d1b05510..d9304f7a 100644 --- a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AccessPointType.java +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AccessPointType.java @@ -49,7 +49,9 @@ public enum AccessPointType { VPIC_INTERFACE("VPIC_INTERFACE"), - APP_LINK("APP_LINK"); + APP_LINK("APP_LINK"), + + XF_IC("XF_IC"); private String value; diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/Account.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/Account.java new file mode 100644 index 00000000..565ce5ad --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/Account.java @@ -0,0 +1,675 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * Account + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class Account { + public static final String SERIALIZED_NAME_ACCOUNT_ID = "accountId"; + @SerializedName(SERIALIZED_NAME_ACCOUNT_ID) + @javax.annotation.Nullable + private Integer accountId; + + public static final String SERIALIZED_NAME_ACCOUNT_NUMBER = "accountNumber"; + @SerializedName(SERIALIZED_NAME_ACCOUNT_NUMBER) + @javax.annotation.Nullable + private Integer accountNumber; + + public static final String SERIALIZED_NAME_ACCOUNT_NAME = "accountName"; + @SerializedName(SERIALIZED_NAME_ACCOUNT_NAME) + @javax.annotation.Nullable + private String accountName; + + public static final String SERIALIZED_NAME_UCM_ID = "ucmId"; + @SerializedName(SERIALIZED_NAME_UCM_ID) + @javax.annotation.Nullable + private String ucmId; + + public static final String SERIALIZED_NAME_GLOBAL_CUST_ID = "globalCustId"; + @SerializedName(SERIALIZED_NAME_GLOBAL_CUST_ID) + @javax.annotation.Nullable + private String globalCustId; + + public static final String SERIALIZED_NAME_ORG_ID = "orgId"; + @SerializedName(SERIALIZED_NAME_ORG_ID) + @javax.annotation.Nullable + private Integer orgId; + + public static final String SERIALIZED_NAME_ORGANIZATION_NAME = "organizationName"; + @SerializedName(SERIALIZED_NAME_ORGANIZATION_NAME) + @javax.annotation.Nullable + private String organizationName; + + public static final String SERIALIZED_NAME_SUB_CUSTOMES = "subCustomes"; + @SerializedName(SERIALIZED_NAME_SUB_CUSTOMES) + @javax.annotation.Nullable + private List subCustomes = new ArrayList<>(); + + public static final String SERIALIZED_NAME_COUNTRY_CODE = "countryCode"; + @SerializedName(SERIALIZED_NAME_COUNTRY_CODE) + @javax.annotation.Nullable + private String countryCode; + + public static final String SERIALIZED_NAME_OPERATIONAL_UNIT = "operationalUnit"; + @SerializedName(SERIALIZED_NAME_OPERATIONAL_UNIT) + @javax.annotation.Nullable + private String operationalUnit; + + public static final String SERIALIZED_NAME_OPERATIONAL_UNIT_METROS = "operationalUnitMetros"; + @SerializedName(SERIALIZED_NAME_OPERATIONAL_UNIT_METROS) + @javax.annotation.Nullable + private List operationalUnitMetros = new ArrayList<>(); + + public static final String SERIALIZED_NAME_SIGNATURE_REQUIRED = "signatureRequired"; + @SerializedName(SERIALIZED_NAME_SIGNATURE_REQUIRED) + @javax.annotation.Nullable + private Boolean signatureRequired; + + public static final String SERIALIZED_NAME_PO_BEARING = "poBearing"; + @SerializedName(SERIALIZED_NAME_PO_BEARING) + @javax.annotation.Nullable + private Boolean poBearing; + + public static final String SERIALIZED_NAME_DEFAULT = "default"; + @SerializedName(SERIALIZED_NAME_DEFAULT) + @javax.annotation.Nullable + private Boolean _default; + + public Account() { + } + + public Account accountId(@javax.annotation.Nullable Integer accountId) { + this.accountId = accountId; + return this; + } + + /** + * Account identifier + * @return accountId + */ + @javax.annotation.Nullable + public Integer getAccountId() { + return accountId; + } + + public void setAccountId(@javax.annotation.Nullable Integer accountId) { + this.accountId = accountId; + } + + + public Account accountNumber(@javax.annotation.Nullable Integer accountNumber) { + this.accountNumber = accountNumber; + return this; + } + + /** + * Account number + * @return accountNumber + */ + @javax.annotation.Nullable + public Integer getAccountNumber() { + return accountNumber; + } + + public void setAccountNumber(@javax.annotation.Nullable Integer accountNumber) { + this.accountNumber = accountNumber; + } + + + public Account accountName(@javax.annotation.Nullable String accountName) { + this.accountName = accountName; + return this; + } + + /** + * Account name + * @return accountName + */ + @javax.annotation.Nullable + public String getAccountName() { + return accountName; + } + + public void setAccountName(@javax.annotation.Nullable String accountName) { + this.accountName = accountName; + } + + + public Account ucmId(@javax.annotation.Nullable String ucmId) { + this.ucmId = ucmId; + return this; + } + + /** + * Account ucm id + * @return ucmId + */ + @javax.annotation.Nullable + public String getUcmId() { + return ucmId; + } + + public void setUcmId(@javax.annotation.Nullable String ucmId) { + this.ucmId = ucmId; + } + + + public Account globalCustId(@javax.annotation.Nullable String globalCustId) { + this.globalCustId = globalCustId; + return this; + } + + /** + * Global customer organization id + * @return globalCustId + */ + @javax.annotation.Nullable + public String getGlobalCustId() { + return globalCustId; + } + + public void setGlobalCustId(@javax.annotation.Nullable String globalCustId) { + this.globalCustId = globalCustId; + } + + + public Account orgId(@javax.annotation.Nullable Integer orgId) { + this.orgId = orgId; + return this; + } + + /** + * Customer organization id + * @return orgId + */ + @javax.annotation.Nullable + public Integer getOrgId() { + return orgId; + } + + public void setOrgId(@javax.annotation.Nullable Integer orgId) { + this.orgId = orgId; + } + + + public Account organizationName(@javax.annotation.Nullable String organizationName) { + this.organizationName = organizationName; + return this; + } + + /** + * Customer organization name + * @return organizationName + */ + @javax.annotation.Nullable + public String getOrganizationName() { + return organizationName; + } + + public void setOrganizationName(@javax.annotation.Nullable String organizationName) { + this.organizationName = organizationName; + } + + + public Account subCustomes(@javax.annotation.Nullable List subCustomes) { + this.subCustomes = subCustomes; + return this; + } + + public Account addSubCustomesItem(Account subCustomesItem) { + if (this.subCustomes == null) { + this.subCustomes = new ArrayList<>(); + } + this.subCustomes.add(subCustomesItem); + return this; + } + + /** + * All sub customer accounts + * @return subCustomes + */ + @javax.annotation.Nullable + public List getSubCustomes() { + return subCustomes; + } + + public void setSubCustomes(@javax.annotation.Nullable List subCustomes) { + this.subCustomes = subCustomes; + } + + + public Account countryCode(@javax.annotation.Nullable String countryCode) { + this.countryCode = countryCode; + return this; + } + + /** + * Account country code + * @return countryCode + */ + @javax.annotation.Nullable + public String getCountryCode() { + return countryCode; + } + + public void setCountryCode(@javax.annotation.Nullable String countryCode) { + this.countryCode = countryCode; + } + + + public Account operationalUnit(@javax.annotation.Nullable String operationalUnit) { + this.operationalUnit = operationalUnit; + return this; + } + + /** + * Account operational unit + * @return operationalUnit + */ + @javax.annotation.Nullable + public String getOperationalUnit() { + return operationalUnit; + } + + public void setOperationalUnit(@javax.annotation.Nullable String operationalUnit) { + this.operationalUnit = operationalUnit; + } + + + public Account operationalUnitMetros(@javax.annotation.Nullable List operationalUnitMetros) { + this.operationalUnitMetros = operationalUnitMetros; + return this; + } + + public Account addOperationalUnitMetrosItem(String operationalUnitMetrosItem) { + if (this.operationalUnitMetros == null) { + this.operationalUnitMetros = new ArrayList<>(); + } + this.operationalUnitMetros.add(operationalUnitMetrosItem); + return this; + } + + /** + * Account operational unit metros + * @return operationalUnitMetros + */ + @javax.annotation.Nullable + public List getOperationalUnitMetros() { + return operationalUnitMetros; + } + + public void setOperationalUnitMetros(@javax.annotation.Nullable List operationalUnitMetros) { + this.operationalUnitMetros = operationalUnitMetros; + } + + + public Account signatureRequired(@javax.annotation.Nullable Boolean signatureRequired) { + this.signatureRequired = signatureRequired; + return this; + } + + /** + * Is signature required + * @return signatureRequired + */ + @javax.annotation.Nullable + public Boolean getSignatureRequired() { + return signatureRequired; + } + + public void setSignatureRequired(@javax.annotation.Nullable Boolean signatureRequired) { + this.signatureRequired = signatureRequired; + } + + + public Account poBearing(@javax.annotation.Nullable Boolean poBearing) { + this.poBearing = poBearing; + return this; + } + + /** + * Purchase order bearing + * @return poBearing + */ + @javax.annotation.Nullable + public Boolean getPoBearing() { + return poBearing; + } + + public void setPoBearing(@javax.annotation.Nullable Boolean poBearing) { + this.poBearing = poBearing; + } + + + public Account _default(@javax.annotation.Nullable Boolean _default) { + this._default = _default; + return this; + } + + /** + * Default account or not + * @return _default + */ + @javax.annotation.Nullable + public Boolean getDefault() { + return _default; + } + + public void setDefault(@javax.annotation.Nullable Boolean _default) { + this._default = _default; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the Account instance itself + */ + public Account putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Account account = (Account) o; + return Objects.equals(this.accountId, account.accountId) && + Objects.equals(this.accountNumber, account.accountNumber) && + Objects.equals(this.accountName, account.accountName) && + Objects.equals(this.ucmId, account.ucmId) && + Objects.equals(this.globalCustId, account.globalCustId) && + Objects.equals(this.orgId, account.orgId) && + Objects.equals(this.organizationName, account.organizationName) && + Objects.equals(this.subCustomes, account.subCustomes) && + Objects.equals(this.countryCode, account.countryCode) && + Objects.equals(this.operationalUnit, account.operationalUnit) && + Objects.equals(this.operationalUnitMetros, account.operationalUnitMetros) && + Objects.equals(this.signatureRequired, account.signatureRequired) && + Objects.equals(this.poBearing, account.poBearing) && + Objects.equals(this._default, account._default)&& + Objects.equals(this.additionalProperties, account.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(accountId, accountNumber, accountName, ucmId, globalCustId, orgId, organizationName, subCustomes, countryCode, operationalUnit, operationalUnitMetros, signatureRequired, poBearing, _default, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Account {\n"); + sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); + sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); + sb.append(" accountName: ").append(toIndentedString(accountName)).append("\n"); + sb.append(" ucmId: ").append(toIndentedString(ucmId)).append("\n"); + sb.append(" globalCustId: ").append(toIndentedString(globalCustId)).append("\n"); + sb.append(" orgId: ").append(toIndentedString(orgId)).append("\n"); + sb.append(" organizationName: ").append(toIndentedString(organizationName)).append("\n"); + sb.append(" subCustomes: ").append(toIndentedString(subCustomes)).append("\n"); + sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); + sb.append(" operationalUnit: ").append(toIndentedString(operationalUnit)).append("\n"); + sb.append(" operationalUnitMetros: ").append(toIndentedString(operationalUnitMetros)).append("\n"); + sb.append(" signatureRequired: ").append(toIndentedString(signatureRequired)).append("\n"); + sb.append(" poBearing: ").append(toIndentedString(poBearing)).append("\n"); + sb.append(" _default: ").append(toIndentedString(_default)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("accountId", "accountNumber", "accountName", "ucmId", "globalCustId", "orgId", "organizationName", "subCustomes", "countryCode", "operationalUnit", "operationalUnitMetros", "signatureRequired", "poBearing", "default")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to Account + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Account.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in Account is not found in the empty JSON string", Account.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("accountName") != null && !jsonObj.get("accountName").isJsonNull()) && !jsonObj.get("accountName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `accountName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountName").toString())); + } + if ((jsonObj.get("ucmId") != null && !jsonObj.get("ucmId").isJsonNull()) && !jsonObj.get("ucmId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `ucmId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ucmId").toString())); + } + if ((jsonObj.get("globalCustId") != null && !jsonObj.get("globalCustId").isJsonNull()) && !jsonObj.get("globalCustId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `globalCustId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("globalCustId").toString())); + } + if ((jsonObj.get("organizationName") != null && !jsonObj.get("organizationName").isJsonNull()) && !jsonObj.get("organizationName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `organizationName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("organizationName").toString())); + } + if (jsonObj.get("subCustomes") != null && !jsonObj.get("subCustomes").isJsonNull()) { + JsonArray jsonArraysubCustomes = jsonObj.getAsJsonArray("subCustomes"); + if (jsonArraysubCustomes != null) { + // ensure the json data is an array + if (!jsonObj.get("subCustomes").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `subCustomes` to be an array in the JSON string but got `%s`", jsonObj.get("subCustomes").toString())); + } + + // validate the optional field `subCustomes` (array) + for (int i = 0; i < jsonArraysubCustomes.size(); i++) { + Account.validateJsonElement(jsonArraysubCustomes.get(i)); + }; + } + } + if ((jsonObj.get("countryCode") != null && !jsonObj.get("countryCode").isJsonNull()) && !jsonObj.get("countryCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `countryCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("countryCode").toString())); + } + if ((jsonObj.get("operationalUnit") != null && !jsonObj.get("operationalUnit").isJsonNull()) && !jsonObj.get("operationalUnit").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `operationalUnit` to be a primitive type in the JSON string but got `%s`", jsonObj.get("operationalUnit").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("operationalUnitMetros") != null && !jsonObj.get("operationalUnitMetros").isJsonNull() && !jsonObj.get("operationalUnitMetros").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `operationalUnitMetros` to be an array in the JSON string but got `%s`", jsonObj.get("operationalUnitMetros").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!Account.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Account' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Account.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, Account value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public Account read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + Account instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of Account given an JSON string + * + * @param jsonString JSON string + * @return An instance of Account + * @throws IOException if the JSON string is invalid with respect to Account + */ + public static Account fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, Account.class); + } + + /** + * Convert an instance of Account to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LastMileConfig.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ActivationKeyDetails.java similarity index 60% rename from services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LastMileConfig.java rename to services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ActivationKeyDetails.java index fc44f8fb..4feb2eca 100644 --- a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LastMileConfig.java +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ActivationKeyDetails.java @@ -13,16 +13,13 @@ import java.util.Objects; import java.util.Locale; -import com.equinix.sdk.fabricv4.model.LastMileNotificationInfo; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.util.ArrayList; import java.util.Arrays; -import java.util.List; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -49,116 +46,130 @@ import com.equinix.sdk.fabricv4.JSON; /** - * Last mile configuration for the connection. Applicable to zSide only. + * Activation Key Details <sup color='red'>Beta</sup></font> */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") -public class LastMileConfig { - public static final String SERIALIZED_NAME_SERVICE_TYPE = "serviceType"; - @SerializedName(SERIALIZED_NAME_SERVICE_TYPE) +public class ActivationKeyDetails { + public static final String SERIALIZED_NAME_VALUE = "value"; + @SerializedName(SERIALIZED_NAME_VALUE) + @javax.annotation.Nullable + private String value; + + public static final String SERIALIZED_NAME_PROVIDER_ID = "providerId"; + @SerializedName(SERIALIZED_NAME_PROVIDER_ID) + @javax.annotation.Nullable + private String providerId; + + public static final String SERIALIZED_NAME_ACCOUNT_ID = "accountId"; + @SerializedName(SERIALIZED_NAME_ACCOUNT_ID) @javax.annotation.Nullable - private String serviceType; + private String accountId; public static final String SERIALIZED_NAME_BANDWIDTH = "bandwidth"; @SerializedName(SERIALIZED_NAME_BANDWIDTH) @javax.annotation.Nullable private Integer bandwidth; - public static final String SERIALIZED_NAME_ADDRESS = "address"; - @SerializedName(SERIALIZED_NAME_ADDRESS) - @javax.annotation.Nullable - private String address; - - public static final String SERIALIZED_NAME_NOTIFICATIONS = "notifications"; - @SerializedName(SERIALIZED_NAME_NOTIFICATIONS) + public static final String SERIALIZED_NAME_REGION = "region"; + @SerializedName(SERIALIZED_NAME_REGION) @javax.annotation.Nullable - private List notifications = new ArrayList<>(); + private String region; - public LastMileConfig() { + public ActivationKeyDetails() { } - public LastMileConfig serviceType(@javax.annotation.Nullable String serviceType) { - this.serviceType = serviceType; + public ActivationKeyDetails value(@javax.annotation.Nullable String value) { + this.value = value; return this; } /** - * Last mile service type - * @return serviceType + * Provider Encoded activation key + * @return value */ @javax.annotation.Nullable - public String getServiceType() { - return serviceType; + public String getValue() { + return value; } - public void setServiceType(@javax.annotation.Nullable String serviceType) { - this.serviceType = serviceType; + public void setValue(@javax.annotation.Nullable String value) { + this.value = value; } - public LastMileConfig bandwidth(@javax.annotation.Nullable Integer bandwidth) { - this.bandwidth = bandwidth; + public ActivationKeyDetails providerId(@javax.annotation.Nullable String providerId) { + this.providerId = providerId; return this; } /** - * Last mile bandwidth in Mbps - * minimum: 0 - * maximum: 100000 - * @return bandwidth + * AWS Connection identifier + * @return providerId */ @javax.annotation.Nullable - public Integer getBandwidth() { - return bandwidth; + public String getProviderId() { + return providerId; } - public void setBandwidth(@javax.annotation.Nullable Integer bandwidth) { - this.bandwidth = bandwidth; + public void setProviderId(@javax.annotation.Nullable String providerId) { + this.providerId = providerId; } - public LastMileConfig address(@javax.annotation.Nullable String address) { - this.address = address; + public ActivationKeyDetails accountId(@javax.annotation.Nullable String accountId) { + this.accountId = accountId; return this; } /** - * Last mile address - * @return address + * Account identifier + * @return accountId */ @javax.annotation.Nullable - public String getAddress() { - return address; + public String getAccountId() { + return accountId; } - public void setAddress(@javax.annotation.Nullable String address) { - this.address = address; + public void setAccountId(@javax.annotation.Nullable String accountId) { + this.accountId = accountId; } - public LastMileConfig notifications(@javax.annotation.Nullable List notifications) { - this.notifications = notifications; + public ActivationKeyDetails bandwidth(@javax.annotation.Nullable Integer bandwidth) { + this.bandwidth = bandwidth; return this; } - public LastMileConfig addNotificationsItem(LastMileNotificationInfo notificationsItem) { - if (this.notifications == null) { - this.notifications = new ArrayList<>(); - } - this.notifications.add(notificationsItem); + /** + * Bandwidth in Mbps + * @return bandwidth + */ + @javax.annotation.Nullable + public Integer getBandwidth() { + return bandwidth; + } + + public void setBandwidth(@javax.annotation.Nullable Integer bandwidth) { + this.bandwidth = bandwidth; + } + + + public ActivationKeyDetails region(@javax.annotation.Nullable String region) { + this.region = region; return this; } /** - * Last mile notification contacts - * @return notifications + * Cloud provider region identifier + * @return region */ @javax.annotation.Nullable - public List getNotifications() { - return notifications; + public String getRegion() { + return region; } - public void setNotifications(@javax.annotation.Nullable List notifications) { - this.notifications = notifications; + public void setRegion(@javax.annotation.Nullable String region) { + this.region = region; } /** @@ -174,9 +185,9 @@ public void setNotifications(@javax.annotation.Nullable List(); } @@ -215,27 +226,29 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - LastMileConfig lastMileConfig = (LastMileConfig) o; - return Objects.equals(this.serviceType, lastMileConfig.serviceType) && - Objects.equals(this.bandwidth, lastMileConfig.bandwidth) && - Objects.equals(this.address, lastMileConfig.address) && - Objects.equals(this.notifications, lastMileConfig.notifications)&& - Objects.equals(this.additionalProperties, lastMileConfig.additionalProperties); + ActivationKeyDetails activationKeyDetails = (ActivationKeyDetails) o; + return Objects.equals(this.value, activationKeyDetails.value) && + Objects.equals(this.providerId, activationKeyDetails.providerId) && + Objects.equals(this.accountId, activationKeyDetails.accountId) && + Objects.equals(this.bandwidth, activationKeyDetails.bandwidth) && + Objects.equals(this.region, activationKeyDetails.region)&& + Objects.equals(this.additionalProperties, activationKeyDetails.additionalProperties); } @Override public int hashCode() { - return Objects.hash(serviceType, bandwidth, address, notifications, additionalProperties); + return Objects.hash(value, providerId, accountId, bandwidth, region, additionalProperties); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class LastMileConfig {\n"); - sb.append(" serviceType: ").append(toIndentedString(serviceType)).append("\n"); + sb.append("class ActivationKeyDetails {\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append(" providerId: ").append(toIndentedString(providerId)).append("\n"); + sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); sb.append(" bandwidth: ").append(toIndentedString(bandwidth)).append("\n"); - sb.append(" address: ").append(toIndentedString(address)).append("\n"); - sb.append(" notifications: ").append(toIndentedString(notifications)).append("\n"); + sb.append(" region: ").append(toIndentedString(region)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); @@ -258,7 +271,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("serviceType", "bandwidth", "address", "notifications")); + openapiFields = new HashSet(Arrays.asList("value", "providerId", "accountId", "bandwidth", "region")); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(0); @@ -268,34 +281,26 @@ private String toIndentedString(Object o) { * Validates the JSON Element and throws an exception if issues found * * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to LastMileConfig + * @throws IOException if the JSON Element is invalid with respect to ActivationKeyDetails */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { - if (!LastMileConfig.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in LastMileConfig is not found in the empty JSON string", LastMileConfig.openapiRequiredFields.toString())); + if (!ActivationKeyDetails.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in ActivationKeyDetails is not found in the empty JSON string", ActivationKeyDetails.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("serviceType") != null && !jsonObj.get("serviceType").isJsonNull()) && !jsonObj.get("serviceType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `serviceType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("serviceType").toString())); + if ((jsonObj.get("value") != null && !jsonObj.get("value").isJsonNull()) && !jsonObj.get("value").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `value` to be a primitive type in the JSON string but got `%s`", jsonObj.get("value").toString())); } - if ((jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); + if ((jsonObj.get("providerId") != null && !jsonObj.get("providerId").isJsonNull()) && !jsonObj.get("providerId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `providerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("providerId").toString())); } - if (jsonObj.get("notifications") != null && !jsonObj.get("notifications").isJsonNull()) { - JsonArray jsonArraynotifications = jsonObj.getAsJsonArray("notifications"); - if (jsonArraynotifications != null) { - // ensure the json data is an array - if (!jsonObj.get("notifications").isJsonArray()) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `notifications` to be an array in the JSON string but got `%s`", jsonObj.get("notifications").toString())); - } - - // validate the optional field `notifications` (array) - for (int i = 0; i < jsonArraynotifications.size(); i++) { - LastMileNotificationInfo.validateJsonElement(jsonArraynotifications.get(i)); - }; - } + if ((jsonObj.get("accountId") != null && !jsonObj.get("accountId").isJsonNull()) && !jsonObj.get("accountId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); + } + if ((jsonObj.get("region") != null && !jsonObj.get("region").isJsonNull()) && !jsonObj.get("region").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `region` to be a primitive type in the JSON string but got `%s`", jsonObj.get("region").toString())); } } @@ -303,16 +308,16 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!LastMileConfig.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'LastMileConfig' and its subtypes + if (!ActivationKeyDetails.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ActivationKeyDetails' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(LastMileConfig.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ActivationKeyDetails.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, LastMileConfig value) throws IOException { + public void write(JsonWriter out, ActivationKeyDetails value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); // serialize additional properties @@ -340,12 +345,12 @@ else if (entry.getValue() instanceof Character) } @Override - public LastMileConfig read(JsonReader in) throws IOException { + public ActivationKeyDetails read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); JsonObject jsonObj = jsonElement.getAsJsonObject(); // store additional fields in the deserialized instance - LastMileConfig instance = thisAdapter.fromJsonTree(jsonObj); + ActivationKeyDetails instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { if (!openapiFields.contains(entry.getKey())) { if (entry.getValue().isJsonPrimitive()) { // primitive type @@ -372,18 +377,18 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } /** - * Create an instance of LastMileConfig given an JSON string + * Create an instance of ActivationKeyDetails given an JSON string * * @param jsonString JSON string - * @return An instance of LastMileConfig - * @throws IOException if the JSON string is invalid with respect to LastMileConfig + * @return An instance of ActivationKeyDetails + * @throws IOException if the JSON string is invalid with respect to ActivationKeyDetails */ - public static LastMileConfig fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, LastMileConfig.class); + public static ActivationKeyDetails fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ActivationKeyDetails.class); } /** - * Convert an instance of LastMileConfig to an JSON string + * Convert an instance of ActivationKeyDetails to an JSON string * * @return JSON string */ diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AddOperation.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AddOperation.java index d0ad5665..ceb0495a 100644 --- a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AddOperation.java +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AddOperation.java @@ -13,7 +13,6 @@ import java.util.Objects; import java.util.Locale; -import com.equinix.sdk.fabricv4.model.OpEnum; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -51,6 +50,56 @@ */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class AddOperation { + /** + * Gets or Sets op + */ + @JsonAdapter(OpEnum.Adapter.class) + public enum OpEnum { + ADD("add"); + + private String value; + + OpEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static OpEnum fromValue(String value) { + for (OpEnum b : OpEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final OpEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public OpEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return OpEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + OpEnum.fromValue(value); + } + } + public static final String SERIALIZED_NAME_OP = "op"; @SerializedName(SERIALIZED_NAME_OP) @javax.annotation.Nonnull @@ -246,6 +295,9 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("op").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `op` to be a primitive type in the JSON string but got `%s`", jsonObj.get("op").toString())); + } // validate the required field `op` OpEnum.validateJsonElement(jsonObj.get("op")); // check op value matches "add" for AddOperation diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/Address.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/Address.java new file mode 100644 index 00000000..cf6e7a50 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/Address.java @@ -0,0 +1,460 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * Address. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class Address { + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nullable + private String id; + + public static final String SERIALIZED_NAME_STREET_NR = "streetNr"; + @SerializedName(SERIALIZED_NAME_STREET_NR) + @javax.annotation.Nullable + private String streetNr; + + public static final String SERIALIZED_NAME_STREET_NAME = "streetName"; + @SerializedName(SERIALIZED_NAME_STREET_NAME) + @javax.annotation.Nullable + private String streetName; + + public static final String SERIALIZED_NAME_CITY = "city"; + @SerializedName(SERIALIZED_NAME_CITY) + @javax.annotation.Nullable + private String city; + + public static final String SERIALIZED_NAME_STATE_OR_PROVINCE = "stateOrProvince"; + @SerializedName(SERIALIZED_NAME_STATE_OR_PROVINCE) + @javax.annotation.Nullable + private String stateOrProvince; + + public static final String SERIALIZED_NAME_POST_CODE = "postCode"; + @SerializedName(SERIALIZED_NAME_POST_CODE) + @javax.annotation.Nullable + private String postCode; + + public static final String SERIALIZED_NAME_COUNTRY = "country"; + @SerializedName(SERIALIZED_NAME_COUNTRY) + @javax.annotation.Nullable + private String country; + + public Address() { + } + + public Address id(@javax.annotation.Nullable String id) { + this.id = id; + return this; + } + + /** + * Address identifier + * @return id + */ + @javax.annotation.Nullable + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nullable String id) { + this.id = id; + } + + + public Address streetNr(@javax.annotation.Nullable String streetNr) { + this.streetNr = streetNr; + return this; + } + + /** + * Street number of address + * @return streetNr + */ + @javax.annotation.Nullable + public String getStreetNr() { + return streetNr; + } + + public void setStreetNr(@javax.annotation.Nullable String streetNr) { + this.streetNr = streetNr; + } + + + public Address streetName(@javax.annotation.Nullable String streetName) { + this.streetName = streetName; + return this; + } + + /** + * Street name of address + * @return streetName + */ + @javax.annotation.Nullable + public String getStreetName() { + return streetName; + } + + public void setStreetName(@javax.annotation.Nullable String streetName) { + this.streetName = streetName; + } + + + public Address city(@javax.annotation.Nullable String city) { + this.city = city; + return this; + } + + /** + * City of address + * @return city + */ + @javax.annotation.Nullable + public String getCity() { + return city; + } + + public void setCity(@javax.annotation.Nullable String city) { + this.city = city; + } + + + public Address stateOrProvince(@javax.annotation.Nullable String stateOrProvince) { + this.stateOrProvince = stateOrProvince; + return this; + } + + /** + * State of address + * @return stateOrProvince + */ + @javax.annotation.Nullable + public String getStateOrProvince() { + return stateOrProvince; + } + + public void setStateOrProvince(@javax.annotation.Nullable String stateOrProvince) { + this.stateOrProvince = stateOrProvince; + } + + + public Address postCode(@javax.annotation.Nullable String postCode) { + this.postCode = postCode; + return this; + } + + /** + * Postal code of address + * @return postCode + */ + @javax.annotation.Nullable + public String getPostCode() { + return postCode; + } + + public void setPostCode(@javax.annotation.Nullable String postCode) { + this.postCode = postCode; + } + + + public Address country(@javax.annotation.Nullable String country) { + this.country = country; + return this; + } + + /** + * Country of address + * @return country + */ + @javax.annotation.Nullable + public String getCountry() { + return country; + } + + public void setCountry(@javax.annotation.Nullable String country) { + this.country = country; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the Address instance itself + */ + public Address putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Address address = (Address) o; + return Objects.equals(this.id, address.id) && + Objects.equals(this.streetNr, address.streetNr) && + Objects.equals(this.streetName, address.streetName) && + Objects.equals(this.city, address.city) && + Objects.equals(this.stateOrProvince, address.stateOrProvince) && + Objects.equals(this.postCode, address.postCode) && + Objects.equals(this.country, address.country)&& + Objects.equals(this.additionalProperties, address.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(id, streetNr, streetName, city, stateOrProvince, postCode, country, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Address {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" streetNr: ").append(toIndentedString(streetNr)).append("\n"); + sb.append(" streetName: ").append(toIndentedString(streetName)).append("\n"); + sb.append(" city: ").append(toIndentedString(city)).append("\n"); + sb.append(" stateOrProvince: ").append(toIndentedString(stateOrProvince)).append("\n"); + sb.append(" postCode: ").append(toIndentedString(postCode)).append("\n"); + sb.append(" country: ").append(toIndentedString(country)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("id", "streetNr", "streetName", "city", "stateOrProvince", "postCode", "country")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to Address + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Address.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in Address is not found in the empty JSON string", Address.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if ((jsonObj.get("streetNr") != null && !jsonObj.get("streetNr").isJsonNull()) && !jsonObj.get("streetNr").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `streetNr` to be a primitive type in the JSON string but got `%s`", jsonObj.get("streetNr").toString())); + } + if ((jsonObj.get("streetName") != null && !jsonObj.get("streetName").isJsonNull()) && !jsonObj.get("streetName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `streetName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("streetName").toString())); + } + if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); + } + if ((jsonObj.get("stateOrProvince") != null && !jsonObj.get("stateOrProvince").isJsonNull()) && !jsonObj.get("stateOrProvince").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `stateOrProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("stateOrProvince").toString())); + } + if ((jsonObj.get("postCode") != null && !jsonObj.get("postCode").isJsonNull()) && !jsonObj.get("postCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `postCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("postCode").toString())); + } + if ((jsonObj.get("country") != null && !jsonObj.get("country").isJsonNull()) && !jsonObj.get("country").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `country` to be a primitive type in the JSON string but got `%s`", jsonObj.get("country").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!Address.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Address' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter
thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Address.class)); + + return (TypeAdapter) new TypeAdapter
() { + @Override + public void write(JsonWriter out, Address value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public Address read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + Address instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of Address given an JSON string + * + * @param jsonString JSON string + * @return An instance of Address + * @throws IOException if the JSON string is invalid with respect to Address + */ + public static Address fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, Address.class); + } + + /** + * Convert an instance of Address to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/GatewayAttachmentListResponse.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AllInterconnectPackagesResponse.java similarity index 73% rename from services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/GatewayAttachmentListResponse.java rename to services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AllInterconnectPackagesResponse.java index 5bc175e1..e45c600d 100644 --- a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/GatewayAttachmentListResponse.java +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AllInterconnectPackagesResponse.java @@ -13,7 +13,7 @@ import java.util.Objects; import java.util.Locale; -import com.equinix.sdk.fabricv4.model.GatewayAttachmentResponse; +import com.equinix.sdk.fabricv4.model.InterconnectPackage; import com.equinix.sdk.fabricv4.model.Pagination; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -50,24 +50,24 @@ import com.equinix.sdk.fabricv4.JSON; /** - * GatewayAttachmentListResponse + * Interconnect Packages response <font color=\"red\"> <sup color='red'>Beta</sup></font> */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") -public class GatewayAttachmentListResponse { +public class AllInterconnectPackagesResponse { public static final String SERIALIZED_NAME_PAGINATION = "pagination"; @SerializedName(SERIALIZED_NAME_PAGINATION) - @javax.annotation.Nonnull + @javax.annotation.Nullable private Pagination pagination; public static final String SERIALIZED_NAME_DATA = "data"; @SerializedName(SERIALIZED_NAME_DATA) @javax.annotation.Nonnull - private List data = new ArrayList<>(); + private List data = new ArrayList<>(); - public GatewayAttachmentListResponse() { + public AllInterconnectPackagesResponse() { } - public GatewayAttachmentListResponse pagination(@javax.annotation.Nonnull Pagination pagination) { + public AllInterconnectPackagesResponse pagination(@javax.annotation.Nullable Pagination pagination) { this.pagination = pagination; return this; } @@ -76,22 +76,22 @@ public GatewayAttachmentListResponse pagination(@javax.annotation.Nonnull Pagina * Get pagination * @return pagination */ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Pagination getPagination() { return pagination; } - public void setPagination(@javax.annotation.Nonnull Pagination pagination) { + public void setPagination(@javax.annotation.Nullable Pagination pagination) { this.pagination = pagination; } - public GatewayAttachmentListResponse data(@javax.annotation.Nonnull List data) { + public AllInterconnectPackagesResponse data(@javax.annotation.Nonnull List data) { this.data = data; return this; } - public GatewayAttachmentListResponse addDataItem(GatewayAttachmentResponse dataItem) { + public AllInterconnectPackagesResponse addDataItem(InterconnectPackage dataItem) { if (this.data == null) { this.data = new ArrayList<>(); } @@ -100,15 +100,15 @@ public GatewayAttachmentListResponse addDataItem(GatewayAttachmentResponse dataI } /** - * Get data + * List of Interconnect Packages * @return data */ @javax.annotation.Nonnull - public List getData() { + public List getData() { return data; } - public void setData(@javax.annotation.Nonnull List data) { + public void setData(@javax.annotation.Nonnull List data) { this.data = data; } @@ -125,9 +125,9 @@ public void setData(@javax.annotation.Nonnull List da * * @param key name of the property * @param value value of the property - * @return the GatewayAttachmentListResponse instance itself + * @return the AllInterconnectPackagesResponse instance itself */ - public GatewayAttachmentListResponse putAdditionalProperty(String key, Object value) { + public AllInterconnectPackagesResponse putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -166,10 +166,10 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - GatewayAttachmentListResponse gatewayAttachmentListResponse = (GatewayAttachmentListResponse) o; - return Objects.equals(this.pagination, gatewayAttachmentListResponse.pagination) && - Objects.equals(this.data, gatewayAttachmentListResponse.data)&& - Objects.equals(this.additionalProperties, gatewayAttachmentListResponse.additionalProperties); + AllInterconnectPackagesResponse allInterconnectPackagesResponse = (AllInterconnectPackagesResponse) o; + return Objects.equals(this.pagination, allInterconnectPackagesResponse.pagination) && + Objects.equals(this.data, allInterconnectPackagesResponse.data)&& + Objects.equals(this.additionalProperties, allInterconnectPackagesResponse.additionalProperties); } @Override @@ -180,7 +180,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class GatewayAttachmentListResponse {\n"); + sb.append("class AllInterconnectPackagesResponse {\n"); sb.append(" pagination: ").append(toIndentedString(pagination)).append("\n"); sb.append(" data: ").append(toIndentedString(data)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); @@ -208,31 +208,33 @@ private String toIndentedString(Object o) { openapiFields = new HashSet(Arrays.asList("pagination", "data")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("pagination", "data")); + openapiRequiredFields = new HashSet(Arrays.asList("data")); } /** * Validates the JSON Element and throws an exception if issues found * * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to GatewayAttachmentListResponse + * @throws IOException if the JSON Element is invalid with respect to AllInterconnectPackagesResponse */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { - if (!GatewayAttachmentListResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in GatewayAttachmentListResponse is not found in the empty JSON string", GatewayAttachmentListResponse.openapiRequiredFields.toString())); + if (!AllInterconnectPackagesResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in AllInterconnectPackagesResponse is not found in the empty JSON string", AllInterconnectPackagesResponse.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : GatewayAttachmentListResponse.openapiRequiredFields) { + for (String requiredField : AllInterconnectPackagesResponse.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the required field `pagination` - Pagination.validateJsonElement(jsonObj.get("pagination")); + // validate the optional field `pagination` + if (jsonObj.get("pagination") != null && !jsonObj.get("pagination").isJsonNull()) { + Pagination.validateJsonElement(jsonObj.get("pagination")); + } // ensure the json data is an array if (!jsonObj.get("data").isJsonArray()) { throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); @@ -241,7 +243,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); // validate the required field `data` (array) for (int i = 0; i < jsonArraydata.size(); i++) { - GatewayAttachmentResponse.validateJsonElement(jsonArraydata.get(i)); + InterconnectPackage.validateJsonElement(jsonArraydata.get(i)); }; } @@ -249,16 +251,16 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!GatewayAttachmentListResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'GatewayAttachmentListResponse' and its subtypes + if (!AllInterconnectPackagesResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AllInterconnectPackagesResponse' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(GatewayAttachmentListResponse.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AllInterconnectPackagesResponse.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, GatewayAttachmentListResponse value) throws IOException { + public void write(JsonWriter out, AllInterconnectPackagesResponse value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); // serialize additional properties @@ -286,12 +288,12 @@ else if (entry.getValue() instanceof Character) } @Override - public GatewayAttachmentListResponse read(JsonReader in) throws IOException { + public AllInterconnectPackagesResponse read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); JsonObject jsonObj = jsonElement.getAsJsonObject(); // store additional fields in the deserialized instance - GatewayAttachmentListResponse instance = thisAdapter.fromJsonTree(jsonObj); + AllInterconnectPackagesResponse instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { if (!openapiFields.contains(entry.getKey())) { if (entry.getValue().isJsonPrimitive()) { // primitive type @@ -318,18 +320,18 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } /** - * Create an instance of GatewayAttachmentListResponse given an JSON string + * Create an instance of AllInterconnectPackagesResponse given an JSON string * * @param jsonString JSON string - * @return An instance of GatewayAttachmentListResponse - * @throws IOException if the JSON string is invalid with respect to GatewayAttachmentListResponse + * @return An instance of AllInterconnectPackagesResponse + * @throws IOException if the JSON string is invalid with respect to AllInterconnectPackagesResponse */ - public static GatewayAttachmentListResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, GatewayAttachmentListResponse.class); + public static AllInterconnectPackagesResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AllInterconnectPackagesResponse.class); } /** - * Convert an instance of GatewayAttachmentListResponse to an JSON string + * Convert an instance of AllInterconnectPackagesResponse to an JSON string * * @return JSON string */ diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AgentTemplates.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppDomain.java similarity index 63% rename from services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AgentTemplates.java rename to services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppDomain.java index c0acfb7c..97539490 100644 --- a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AgentTemplates.java +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppDomain.java @@ -13,14 +13,18 @@ import java.util.Objects; import java.util.Locale; -import com.equinix.sdk.fabricv4.model.AgentDefinition; +import com.equinix.sdk.fabricv4.model.AppDomainChange; +import com.equinix.sdk.fabricv4.model.AppDomainState; +import com.equinix.sdk.fabricv4.model.AppDomainType; import com.equinix.sdk.fabricv4.model.Changelog; +import com.equinix.sdk.fabricv4.model.Project; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.net.URI; import java.util.Arrays; import java.util.UUID; @@ -49,19 +53,19 @@ import com.equinix.sdk.fabricv4.JSON; /** - * Agent Template object + * App Domain object */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") -public class AgentTemplates { +public class AppDomain { public static final String SERIALIZED_NAME_HREF = "href"; @SerializedName(SERIALIZED_NAME_HREF) @javax.annotation.Nullable - private UUID href; + private URI href; public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) - @javax.annotation.Nullable - private String type; + @javax.annotation.Nonnull + private AppDomainType type = AppDomainType.APP_DOMAIN; public static final String SERIALIZED_NAME_UUID = "uuid"; @SerializedName(SERIALIZED_NAME_UUID) @@ -70,7 +74,7 @@ public class AgentTemplates { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) - @javax.annotation.Nullable + @javax.annotation.Nonnull private String name; public static final String SERIALIZED_NAME_DESCRIPTION = "description"; @@ -78,128 +82,67 @@ public class AgentTemplates { @javax.annotation.Nullable private String description; - /** - * Agent state - */ - @JsonAdapter(StateEnum.Adapter.class) - public enum StateEnum { - PROVISIONING("PROVISIONING"), - - PROVISIONED("PROVISIONED"), - - REPROVISIONING("REPROVISIONING"), - - DEPROVISIONING("DEPROVISIONING"), - - DEPROVISIONED("DEPROVISIONED"), - - FAILED("FAILED"); - - private String value; - - StateEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static StateEnum fromValue(String value) { - for (StateEnum b : StateEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final StateEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public StateEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return StateEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - StateEnum.fromValue(value); - } - } - public static final String SERIALIZED_NAME_STATE = "state"; @SerializedName(SERIALIZED_NAME_STATE) @javax.annotation.Nullable - private StateEnum state; + private AppDomainState state; - public static final String SERIALIZED_NAME_ENABLED = "enabled"; - @SerializedName(SERIALIZED_NAME_ENABLED) - @javax.annotation.Nullable - private Boolean enabled; - - public static final String SERIALIZED_NAME_AGENT_DEFINITION = "agentDefinition"; - @SerializedName(SERIALIZED_NAME_AGENT_DEFINITION) - @javax.annotation.Nullable - private AgentDefinition agentDefinition; + public static final String SERIALIZED_NAME_PROJECT = "project"; + @SerializedName(SERIALIZED_NAME_PROJECT) + @javax.annotation.Nonnull + private Project project; public static final String SERIALIZED_NAME_CHANGE_LOG = "changeLog"; @SerializedName(SERIALIZED_NAME_CHANGE_LOG) @javax.annotation.Nullable private Changelog changeLog; - public AgentTemplates() { + public static final String SERIALIZED_NAME_CHANGE = "change"; + @SerializedName(SERIALIZED_NAME_CHANGE) + @javax.annotation.Nullable + private AppDomainChange change; + + public AppDomain() { } - public AgentTemplates href(@javax.annotation.Nullable UUID href) { + public AppDomain( + URI href + ) { + this(); this.href = href; - return this; } /** - * Agent Template URI + * Resource URI * @return href */ @javax.annotation.Nullable - public UUID getHref() { + public URI getHref() { return href; } - public void setHref(@javax.annotation.Nullable UUID href) { - this.href = href; - } - public AgentTemplates type(@javax.annotation.Nullable String type) { + public AppDomain type(@javax.annotation.Nonnull AppDomainType type) { this.type = type; return this; } /** - * type + * Get type * @return type */ - @javax.annotation.Nullable - public String getType() { + @javax.annotation.Nonnull + public AppDomainType getType() { return type; } - public void setType(@javax.annotation.Nullable String type) { + public void setType(@javax.annotation.Nonnull AppDomainType type) { this.type = type; } - public AgentTemplates uuid(@javax.annotation.Nullable UUID uuid) { + public AppDomain uuid(@javax.annotation.Nullable UUID uuid) { this.uuid = uuid; return this; } @@ -218,32 +161,32 @@ public void setUuid(@javax.annotation.Nullable UUID uuid) { } - public AgentTemplates name(@javax.annotation.Nullable String name) { + public AppDomain name(@javax.annotation.Nonnull String name) { this.name = name; return this; } /** - * Equinix-provided agent template name + * Customer-provided App Domain name * @return name */ - @javax.annotation.Nullable + @javax.annotation.Nonnull public String getName() { return name; } - public void setName(@javax.annotation.Nullable String name) { + public void setName(@javax.annotation.Nonnull String name) { this.name = name; } - public AgentTemplates description(@javax.annotation.Nullable String description) { + public AppDomain description(@javax.annotation.Nullable String description) { this.description = description; return this; } /** - * Equinix-provided agent template description + * Customer-provided App Domain description * @return description */ @javax.annotation.Nullable @@ -256,79 +199,79 @@ public void setDescription(@javax.annotation.Nullable String description) { } - public AgentTemplates state(@javax.annotation.Nullable StateEnum state) { + public AppDomain state(@javax.annotation.Nullable AppDomainState state) { this.state = state; return this; } /** - * Agent state + * Get state * @return state */ @javax.annotation.Nullable - public StateEnum getState() { + public AppDomainState getState() { return state; } - public void setState(@javax.annotation.Nullable StateEnum state) { + public void setState(@javax.annotation.Nullable AppDomainState state) { this.state = state; } - public AgentTemplates enabled(@javax.annotation.Nullable Boolean enabled) { - this.enabled = enabled; + public AppDomain project(@javax.annotation.Nonnull Project project) { + this.project = project; return this; } /** - * Equinix-provided agent template enabled status - * @return enabled + * Get project + * @return project */ - @javax.annotation.Nullable - public Boolean getEnabled() { - return enabled; + @javax.annotation.Nonnull + public Project getProject() { + return project; } - public void setEnabled(@javax.annotation.Nullable Boolean enabled) { - this.enabled = enabled; + public void setProject(@javax.annotation.Nonnull Project project) { + this.project = project; } - public AgentTemplates agentDefinition(@javax.annotation.Nullable AgentDefinition agentDefinition) { - this.agentDefinition = agentDefinition; + public AppDomain changeLog(@javax.annotation.Nullable Changelog changeLog) { + this.changeLog = changeLog; return this; } /** - * Get agentDefinition - * @return agentDefinition + * Get changeLog + * @return changeLog */ @javax.annotation.Nullable - public AgentDefinition getAgentDefinition() { - return agentDefinition; + public Changelog getChangeLog() { + return changeLog; } - public void setAgentDefinition(@javax.annotation.Nullable AgentDefinition agentDefinition) { - this.agentDefinition = agentDefinition; + public void setChangeLog(@javax.annotation.Nullable Changelog changeLog) { + this.changeLog = changeLog; } - public AgentTemplates changeLog(@javax.annotation.Nullable Changelog changeLog) { - this.changeLog = changeLog; + public AppDomain change(@javax.annotation.Nullable AppDomainChange change) { + this.change = change; return this; } /** - * Get changeLog - * @return changeLog + * Get change + * @return change */ @javax.annotation.Nullable - public Changelog getChangeLog() { - return changeLog; + public AppDomainChange getChange() { + return change; } - public void setChangeLog(@javax.annotation.Nullable Changelog changeLog) { - this.changeLog = changeLog; + public void setChange(@javax.annotation.Nullable AppDomainChange change) { + this.change = change; } /** @@ -344,9 +287,9 @@ public void setChangeLog(@javax.annotation.Nullable Changelog changeLog) { * * @param key name of the property * @param value value of the property - * @return the AgentTemplates instance itself + * @return the AppDomain instance itself */ - public AgentTemplates putAdditionalProperty(String key, Object value) { + public AppDomain putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -385,37 +328,37 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - AgentTemplates agentTemplates = (AgentTemplates) o; - return Objects.equals(this.href, agentTemplates.href) && - Objects.equals(this.type, agentTemplates.type) && - Objects.equals(this.uuid, agentTemplates.uuid) && - Objects.equals(this.name, agentTemplates.name) && - Objects.equals(this.description, agentTemplates.description) && - Objects.equals(this.state, agentTemplates.state) && - Objects.equals(this.enabled, agentTemplates.enabled) && - Objects.equals(this.agentDefinition, agentTemplates.agentDefinition) && - Objects.equals(this.changeLog, agentTemplates.changeLog)&& - Objects.equals(this.additionalProperties, agentTemplates.additionalProperties); + AppDomain appDomain = (AppDomain) o; + return Objects.equals(this.href, appDomain.href) && + Objects.equals(this.type, appDomain.type) && + Objects.equals(this.uuid, appDomain.uuid) && + Objects.equals(this.name, appDomain.name) && + Objects.equals(this.description, appDomain.description) && + Objects.equals(this.state, appDomain.state) && + Objects.equals(this.project, appDomain.project) && + Objects.equals(this.changeLog, appDomain.changeLog) && + Objects.equals(this.change, appDomain.change)&& + Objects.equals(this.additionalProperties, appDomain.additionalProperties); } @Override public int hashCode() { - return Objects.hash(href, type, uuid, name, description, state, enabled, agentDefinition, changeLog, additionalProperties); + return Objects.hash(href, type, uuid, name, description, state, project, changeLog, change, additionalProperties); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class AgentTemplates {\n"); + sb.append("class AppDomain {\n"); sb.append(" href: ").append(toIndentedString(href)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" description: ").append(toIndentedString(description)).append("\n"); sb.append(" state: ").append(toIndentedString(state)).append("\n"); - sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); - sb.append(" agentDefinition: ").append(toIndentedString(agentDefinition)).append("\n"); + sb.append(" project: ").append(toIndentedString(project)).append("\n"); sb.append(" changeLog: ").append(toIndentedString(changeLog)).append("\n"); + sb.append(" change: ").append(toIndentedString(change)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); @@ -438,71 +381,76 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("href", "type", "uuid", "name", "description", "state", "enabled", "agentDefinition", "changeLog")); + openapiFields = new HashSet(Arrays.asList("href", "type", "uuid", "name", "description", "state", "project", "changeLog", "change")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); + openapiRequiredFields = new HashSet(Arrays.asList("type", "name", "project")); } /** * Validates the JSON Element and throws an exception if issues found * * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to AgentTemplates + * @throws IOException if the JSON Element is invalid with respect to AppDomain */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { - if (!AgentTemplates.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in AgentTemplates is not found in the empty JSON string", AgentTemplates.openapiRequiredFields.toString())); + if (!AppDomain.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in AppDomain is not found in the empty JSON string", AppDomain.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : AppDomain.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("href") != null && !jsonObj.get("href").isJsonNull()) && !jsonObj.get("href").isJsonPrimitive()) { throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `href` to be a primitive type in the JSON string but got `%s`", jsonObj.get("href").toString())); } - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } + // validate the required field `type` + AppDomainType.validateJsonElement(jsonObj.get("type")); if ((jsonObj.get("uuid") != null && !jsonObj.get("uuid").isJsonNull()) && !jsonObj.get("uuid").isJsonPrimitive()) { throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `uuid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("uuid").toString())); } - if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { + if (!jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } - if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); - } // validate the optional field `state` if (jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) { - StateEnum.validateJsonElement(jsonObj.get("state")); - } - // validate the optional field `agentDefinition` - if (jsonObj.get("agentDefinition") != null && !jsonObj.get("agentDefinition").isJsonNull()) { - AgentDefinition.validateJsonElement(jsonObj.get("agentDefinition")); + AppDomainState.validateJsonElement(jsonObj.get("state")); } + // validate the required field `project` + Project.validateJsonElement(jsonObj.get("project")); // validate the optional field `changeLog` if (jsonObj.get("changeLog") != null && !jsonObj.get("changeLog").isJsonNull()) { Changelog.validateJsonElement(jsonObj.get("changeLog")); } + // validate the optional field `change` + if (jsonObj.get("change") != null && !jsonObj.get("change").isJsonNull()) { + AppDomainChange.validateJsonElement(jsonObj.get("change")); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!AgentTemplates.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'AgentTemplates' and its subtypes + if (!AppDomain.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AppDomain' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(AgentTemplates.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AppDomain.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, AgentTemplates value) throws IOException { + public void write(JsonWriter out, AppDomain value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); // serialize additional properties @@ -530,12 +478,12 @@ else if (entry.getValue() instanceof Character) } @Override - public AgentTemplates read(JsonReader in) throws IOException { + public AppDomain read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); JsonObject jsonObj = jsonElement.getAsJsonObject(); // store additional fields in the deserialized instance - AgentTemplates instance = thisAdapter.fromJsonTree(jsonObj); + AppDomain instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { if (!openapiFields.contains(entry.getKey())) { if (entry.getValue().isJsonPrimitive()) { // primitive type @@ -562,18 +510,18 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } /** - * Create an instance of AgentTemplates given an JSON string + * Create an instance of AppDomain given an JSON string * * @param jsonString JSON string - * @return An instance of AgentTemplates - * @throws IOException if the JSON string is invalid with respect to AgentTemplates + * @return An instance of AppDomain + * @throws IOException if the JSON string is invalid with respect to AppDomain */ - public static AgentTemplates fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, AgentTemplates.class); + public static AppDomain fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AppDomain.class); } /** - * Convert an instance of AgentTemplates to an JSON string + * Convert an instance of AppDomain to an JSON string * * @return JSON string */ diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppDomainAttachedAppLink.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppDomainAttachedAppLink.java new file mode 100644 index 00000000..074bae59 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppDomainAttachedAppLink.java @@ -0,0 +1,558 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.AppLinkCloudRouter; +import com.equinix.sdk.fabricv4.model.AppLinkState; +import com.equinix.sdk.fabricv4.model.AppLinkType; +import com.equinix.sdk.fabricv4.model.Project; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.net.URI; +import java.util.Arrays; +import java.util.UUID; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * App Link object + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class AppDomainAttachedAppLink { + public static final String SERIALIZED_NAME_HREF = "href"; + @SerializedName(SERIALIZED_NAME_HREF) + @javax.annotation.Nullable + private URI href; + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nonnull + private AppLinkType type = AppLinkType.APP_LINK; + + public static final String SERIALIZED_NAME_UUID = "uuid"; + @SerializedName(SERIALIZED_NAME_UUID) + @javax.annotation.Nonnull + private UUID uuid; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable + private String name; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable + private String description; + + public static final String SERIALIZED_NAME_STATE = "state"; + @SerializedName(SERIALIZED_NAME_STATE) + @javax.annotation.Nullable + private AppLinkState state; + + public static final String SERIALIZED_NAME_ROUTER = "router"; + @SerializedName(SERIALIZED_NAME_ROUTER) + @javax.annotation.Nullable + private AppLinkCloudRouter router; + + public static final String SERIALIZED_NAME_IPV4_ADDRESS = "ipv4Address"; + @SerializedName(SERIALIZED_NAME_IPV4_ADDRESS) + @javax.annotation.Nullable + private String ipv4Address; + + public static final String SERIALIZED_NAME_BANDWIDTH = "bandwidth"; + @SerializedName(SERIALIZED_NAME_BANDWIDTH) + @javax.annotation.Nullable + private Integer bandwidth; + + public static final String SERIALIZED_NAME_PROJECT = "project"; + @SerializedName(SERIALIZED_NAME_PROJECT) + @javax.annotation.Nullable + private Project project; + + public AppDomainAttachedAppLink() { + } + + public AppDomainAttachedAppLink( + URI href + ) { + this(); + this.href = href; + } + + /** + * Resource URI + * @return href + */ + @javax.annotation.Nullable + public URI getHref() { + return href; + } + + + + public AppDomainAttachedAppLink type(@javax.annotation.Nonnull AppLinkType type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + */ + @javax.annotation.Nonnull + public AppLinkType getType() { + return type; + } + + public void setType(@javax.annotation.Nonnull AppLinkType type) { + this.type = type; + } + + + public AppDomainAttachedAppLink uuid(@javax.annotation.Nonnull UUID uuid) { + this.uuid = uuid; + return this; + } + + /** + * Equinix-assigned access point identifier + * @return uuid + */ + @javax.annotation.Nonnull + public UUID getUuid() { + return uuid; + } + + public void setUuid(@javax.annotation.Nonnull UUID uuid) { + this.uuid = uuid; + } + + + public AppDomainAttachedAppLink name(@javax.annotation.Nullable String name) { + this.name = name; + return this; + } + + /** + * Customer-provided App Link name + * @return name + */ + @javax.annotation.Nullable + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nullable String name) { + this.name = name; + } + + + public AppDomainAttachedAppLink description(@javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * Customer-provided App Link description + * @return description + */ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + + + public AppDomainAttachedAppLink state(@javax.annotation.Nullable AppLinkState state) { + this.state = state; + return this; + } + + /** + * Get state + * @return state + */ + @javax.annotation.Nullable + public AppLinkState getState() { + return state; + } + + public void setState(@javax.annotation.Nullable AppLinkState state) { + this.state = state; + } + + + public AppDomainAttachedAppLink router(@javax.annotation.Nullable AppLinkCloudRouter router) { + this.router = router; + return this; + } + + /** + * Get router + * @return router + */ + @javax.annotation.Nullable + public AppLinkCloudRouter getRouter() { + return router; + } + + public void setRouter(@javax.annotation.Nullable AppLinkCloudRouter router) { + this.router = router; + } + + + public AppDomainAttachedAppLink ipv4Address(@javax.annotation.Nullable String ipv4Address) { + this.ipv4Address = ipv4Address; + return this; + } + + /** + * App Link IP address + * @return ipv4Address + */ + @javax.annotation.Nullable + public String getIpv4Address() { + return ipv4Address; + } + + public void setIpv4Address(@javax.annotation.Nullable String ipv4Address) { + this.ipv4Address = ipv4Address; + } + + + public AppDomainAttachedAppLink bandwidth(@javax.annotation.Nullable Integer bandwidth) { + this.bandwidth = bandwidth; + return this; + } + + /** + * App Link aggregated data transfer capacity in Mbps + * @return bandwidth + */ + @javax.annotation.Nullable + public Integer getBandwidth() { + return bandwidth; + } + + public void setBandwidth(@javax.annotation.Nullable Integer bandwidth) { + this.bandwidth = bandwidth; + } + + + public AppDomainAttachedAppLink project(@javax.annotation.Nullable Project project) { + this.project = project; + return this; + } + + /** + * Get project + * @return project + */ + @javax.annotation.Nullable + public Project getProject() { + return project; + } + + public void setProject(@javax.annotation.Nullable Project project) { + this.project = project; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AppDomainAttachedAppLink instance itself + */ + public AppDomainAttachedAppLink putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AppDomainAttachedAppLink appDomainAttachedAppLink = (AppDomainAttachedAppLink) o; + return Objects.equals(this.href, appDomainAttachedAppLink.href) && + Objects.equals(this.type, appDomainAttachedAppLink.type) && + Objects.equals(this.uuid, appDomainAttachedAppLink.uuid) && + Objects.equals(this.name, appDomainAttachedAppLink.name) && + Objects.equals(this.description, appDomainAttachedAppLink.description) && + Objects.equals(this.state, appDomainAttachedAppLink.state) && + Objects.equals(this.router, appDomainAttachedAppLink.router) && + Objects.equals(this.ipv4Address, appDomainAttachedAppLink.ipv4Address) && + Objects.equals(this.bandwidth, appDomainAttachedAppLink.bandwidth) && + Objects.equals(this.project, appDomainAttachedAppLink.project)&& + Objects.equals(this.additionalProperties, appDomainAttachedAppLink.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(href, type, uuid, name, description, state, router, ipv4Address, bandwidth, project, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AppDomainAttachedAppLink {\n"); + sb.append(" href: ").append(toIndentedString(href)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" state: ").append(toIndentedString(state)).append("\n"); + sb.append(" router: ").append(toIndentedString(router)).append("\n"); + sb.append(" ipv4Address: ").append(toIndentedString(ipv4Address)).append("\n"); + sb.append(" bandwidth: ").append(toIndentedString(bandwidth)).append("\n"); + sb.append(" project: ").append(toIndentedString(project)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("href", "type", "uuid", "name", "description", "state", "router", "ipv4Address", "bandwidth", "project")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("type", "uuid")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AppDomainAttachedAppLink + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AppDomainAttachedAppLink.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in AppDomainAttachedAppLink is not found in the empty JSON string", AppDomainAttachedAppLink.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : AppDomainAttachedAppLink.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("href") != null && !jsonObj.get("href").isJsonNull()) && !jsonObj.get("href").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `href` to be a primitive type in the JSON string but got `%s`", jsonObj.get("href").toString())); + } + // validate the required field `type` + AppLinkType.validateJsonElement(jsonObj.get("type")); + if (!jsonObj.get("uuid").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `uuid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("uuid").toString())); + } + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + } + // validate the optional field `state` + if (jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) { + AppLinkState.validateJsonElement(jsonObj.get("state")); + } + // validate the optional field `router` + if (jsonObj.get("router") != null && !jsonObj.get("router").isJsonNull()) { + AppLinkCloudRouter.validateJsonElement(jsonObj.get("router")); + } + if ((jsonObj.get("ipv4Address") != null && !jsonObj.get("ipv4Address").isJsonNull()) && !jsonObj.get("ipv4Address").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `ipv4Address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ipv4Address").toString())); + } + // validate the optional field `project` + if (jsonObj.get("project") != null && !jsonObj.get("project").isJsonNull()) { + Project.validateJsonElement(jsonObj.get("project")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AppDomainAttachedAppLink.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AppDomainAttachedAppLink' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AppDomainAttachedAppLink.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AppDomainAttachedAppLink value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AppDomainAttachedAppLink read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + AppDomainAttachedAppLink instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AppDomainAttachedAppLink given an JSON string + * + * @param jsonString JSON string + * @return An instance of AppDomainAttachedAppLink + * @throws IOException if the JSON string is invalid with respect to AppDomainAttachedAppLink + */ + public static AppDomainAttachedAppLink fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AppDomainAttachedAppLink.class); + } + + /** + * Convert an instance of AppDomainAttachedAppLink to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AgentTemplateGetAllResponse.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppDomainAttachedAppLinks.java similarity index 79% rename from services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AgentTemplateGetAllResponse.java rename to services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppDomainAttachedAppLinks.java index 292867f4..bb9031f1 100644 --- a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AgentTemplateGetAllResponse.java +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppDomainAttachedAppLinks.java @@ -13,7 +13,7 @@ import java.util.Objects; import java.util.Locale; -import com.equinix.sdk.fabricv4.model.AgentTemplates; +import com.equinix.sdk.fabricv4.model.AppDomainAttachedAppLink; import com.equinix.sdk.fabricv4.model.Pagination; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -50,10 +50,10 @@ import com.equinix.sdk.fabricv4.JSON; /** - * AgentTemplateGetAllResponse + * AppDomainAttachedAppLinks */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") -public class AgentTemplateGetAllResponse { +public class AppDomainAttachedAppLinks { public static final String SERIALIZED_NAME_PAGINATION = "pagination"; @SerializedName(SERIALIZED_NAME_PAGINATION) @javax.annotation.Nullable @@ -62,12 +62,12 @@ public class AgentTemplateGetAllResponse { public static final String SERIALIZED_NAME_DATA = "data"; @SerializedName(SERIALIZED_NAME_DATA) @javax.annotation.Nullable - private List data = new ArrayList<>(); + private List data = new ArrayList<>(); - public AgentTemplateGetAllResponse() { + public AppDomainAttachedAppLinks() { } - public AgentTemplateGetAllResponse pagination(@javax.annotation.Nullable Pagination pagination) { + public AppDomainAttachedAppLinks pagination(@javax.annotation.Nullable Pagination pagination) { this.pagination = pagination; return this; } @@ -86,12 +86,12 @@ public void setPagination(@javax.annotation.Nullable Pagination pagination) { } - public AgentTemplateGetAllResponse data(@javax.annotation.Nullable List data) { + public AppDomainAttachedAppLinks data(@javax.annotation.Nullable List data) { this.data = data; return this; } - public AgentTemplateGetAllResponse addDataItem(AgentTemplates dataItem) { + public AppDomainAttachedAppLinks addDataItem(AppDomainAttachedAppLink dataItem) { if (this.data == null) { this.data = new ArrayList<>(); } @@ -104,11 +104,11 @@ public AgentTemplateGetAllResponse addDataItem(AgentTemplates dataItem) { * @return data */ @javax.annotation.Nullable - public List getData() { + public List getData() { return data; } - public void setData(@javax.annotation.Nullable List data) { + public void setData(@javax.annotation.Nullable List data) { this.data = data; } @@ -125,9 +125,9 @@ public void setData(@javax.annotation.Nullable List data) { * * @param key name of the property * @param value value of the property - * @return the AgentTemplateGetAllResponse instance itself + * @return the AppDomainAttachedAppLinks instance itself */ - public AgentTemplateGetAllResponse putAdditionalProperty(String key, Object value) { + public AppDomainAttachedAppLinks putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -166,10 +166,10 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - AgentTemplateGetAllResponse agentTemplateGetAllResponse = (AgentTemplateGetAllResponse) o; - return Objects.equals(this.pagination, agentTemplateGetAllResponse.pagination) && - Objects.equals(this.data, agentTemplateGetAllResponse.data)&& - Objects.equals(this.additionalProperties, agentTemplateGetAllResponse.additionalProperties); + AppDomainAttachedAppLinks appDomainAttachedAppLinks = (AppDomainAttachedAppLinks) o; + return Objects.equals(this.pagination, appDomainAttachedAppLinks.pagination) && + Objects.equals(this.data, appDomainAttachedAppLinks.data)&& + Objects.equals(this.additionalProperties, appDomainAttachedAppLinks.additionalProperties); } @Override @@ -180,7 +180,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class AgentTemplateGetAllResponse {\n"); + sb.append("class AppDomainAttachedAppLinks {\n"); sb.append(" pagination: ").append(toIndentedString(pagination)).append("\n"); sb.append(" data: ").append(toIndentedString(data)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); @@ -215,12 +215,12 @@ private String toIndentedString(Object o) { * Validates the JSON Element and throws an exception if issues found * * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to AgentTemplateGetAllResponse + * @throws IOException if the JSON Element is invalid with respect to AppDomainAttachedAppLinks */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { - if (!AgentTemplateGetAllResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in AgentTemplateGetAllResponse is not found in the empty JSON string", AgentTemplateGetAllResponse.openapiRequiredFields.toString())); + if (!AppDomainAttachedAppLinks.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in AppDomainAttachedAppLinks is not found in the empty JSON string", AppDomainAttachedAppLinks.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -238,7 +238,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `data` (array) for (int i = 0; i < jsonArraydata.size(); i++) { - AgentTemplates.validateJsonElement(jsonArraydata.get(i)); + AppDomainAttachedAppLink.validateJsonElement(jsonArraydata.get(i)); }; } } @@ -248,16 +248,16 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!AgentTemplateGetAllResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'AgentTemplateGetAllResponse' and its subtypes + if (!AppDomainAttachedAppLinks.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AppDomainAttachedAppLinks' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(AgentTemplateGetAllResponse.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AppDomainAttachedAppLinks.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, AgentTemplateGetAllResponse value) throws IOException { + public void write(JsonWriter out, AppDomainAttachedAppLinks value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); // serialize additional properties @@ -285,12 +285,12 @@ else if (entry.getValue() instanceof Character) } @Override - public AgentTemplateGetAllResponse read(JsonReader in) throws IOException { + public AppDomainAttachedAppLinks read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); JsonObject jsonObj = jsonElement.getAsJsonObject(); // store additional fields in the deserialized instance - AgentTemplateGetAllResponse instance = thisAdapter.fromJsonTree(jsonObj); + AppDomainAttachedAppLinks instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { if (!openapiFields.contains(entry.getKey())) { if (entry.getValue().isJsonPrimitive()) { // primitive type @@ -317,18 +317,18 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } /** - * Create an instance of AgentTemplateGetAllResponse given an JSON string + * Create an instance of AppDomainAttachedAppLinks given an JSON string * * @param jsonString JSON string - * @return An instance of AgentTemplateGetAllResponse - * @throws IOException if the JSON string is invalid with respect to AgentTemplateGetAllResponse + * @return An instance of AppDomainAttachedAppLinks + * @throws IOException if the JSON string is invalid with respect to AppDomainAttachedAppLinks */ - public static AgentTemplateGetAllResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, AgentTemplateGetAllResponse.class); + public static AppDomainAttachedAppLinks fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AppDomainAttachedAppLinks.class); } /** - * Convert an instance of AgentTemplateGetAllResponse to an JSON string + * Convert an instance of AppDomainAttachedAppLinks to an JSON string * * @return JSON string */ diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppDomainChange.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppDomainChange.java new file mode 100644 index 00000000..5d8a857e --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppDomainChange.java @@ -0,0 +1,565 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.AppDomainChangeOperation; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * Current state of latest AppDomain change + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class AppDomainChange { + public static final String SERIALIZED_NAME_UUID = "uuid"; + @SerializedName(SERIALIZED_NAME_UUID) + @javax.annotation.Nullable + private String uuid; + + /** + * Type of change + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + APP_DOMAIN_UPDATE("APP_DOMAIN_UPDATE"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nonnull + private TypeEnum type; + + /** + * Current outcome of the change flow + */ + @JsonAdapter(StatusEnum.Adapter.class) + public enum StatusEnum { + COMPLETED("COMPLETED"), + + FAILED("FAILED"), + + REQUESTED("REQUESTED"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final StatusEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public StatusEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return StatusEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + StatusEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + @javax.annotation.Nullable + private StatusEnum status; + + public static final String SERIALIZED_NAME_CREATED_DATE_TIME = "createdDateTime"; + @SerializedName(SERIALIZED_NAME_CREATED_DATE_TIME) + @javax.annotation.Nullable + private OffsetDateTime createdDateTime; + + public static final String SERIALIZED_NAME_UPDATED_DATE_TIME = "updatedDateTime"; + @SerializedName(SERIALIZED_NAME_UPDATED_DATE_TIME) + @javax.annotation.Nonnull + private OffsetDateTime updatedDateTime; + + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + @javax.annotation.Nullable + private List data = new ArrayList<>(); + + public AppDomainChange() { + } + + public AppDomainChange uuid(@javax.annotation.Nullable String uuid) { + this.uuid = uuid; + return this; + } + + /** + * Uniquely identifies a change + * @return uuid + */ + @javax.annotation.Nullable + public String getUuid() { + return uuid; + } + + public void setUuid(@javax.annotation.Nullable String uuid) { + this.uuid = uuid; + } + + + public AppDomainChange type(@javax.annotation.Nonnull TypeEnum type) { + this.type = type; + return this; + } + + /** + * Type of change + * @return type + */ + @javax.annotation.Nonnull + public TypeEnum getType() { + return type; + } + + public void setType(@javax.annotation.Nonnull TypeEnum type) { + this.type = type; + } + + + public AppDomainChange status(@javax.annotation.Nullable StatusEnum status) { + this.status = status; + return this; + } + + /** + * Current outcome of the change flow + * @return status + */ + @javax.annotation.Nullable + public StatusEnum getStatus() { + return status; + } + + public void setStatus(@javax.annotation.Nullable StatusEnum status) { + this.status = status; + } + + + public AppDomainChange createdDateTime(@javax.annotation.Nullable OffsetDateTime createdDateTime) { + this.createdDateTime = createdDateTime; + return this; + } + + /** + * Set when change flow starts + * @return createdDateTime + */ + @javax.annotation.Nullable + public OffsetDateTime getCreatedDateTime() { + return createdDateTime; + } + + public void setCreatedDateTime(@javax.annotation.Nullable OffsetDateTime createdDateTime) { + this.createdDateTime = createdDateTime; + } + + + public AppDomainChange updatedDateTime(@javax.annotation.Nonnull OffsetDateTime updatedDateTime) { + this.updatedDateTime = updatedDateTime; + return this; + } + + /** + * Set when change object is updated + * @return updatedDateTime + */ + @javax.annotation.Nonnull + public OffsetDateTime getUpdatedDateTime() { + return updatedDateTime; + } + + public void setUpdatedDateTime(@javax.annotation.Nonnull OffsetDateTime updatedDateTime) { + this.updatedDateTime = updatedDateTime; + } + + + public AppDomainChange data(@javax.annotation.Nullable List data) { + this.data = data; + return this; + } + + public AppDomainChange addDataItem(AppDomainChangeOperation dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + return this; + } + + /** + * Get data + * @return data + */ + @javax.annotation.Nullable + public List getData() { + return data; + } + + public void setData(@javax.annotation.Nullable List data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AppDomainChange instance itself + */ + public AppDomainChange putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AppDomainChange appDomainChange = (AppDomainChange) o; + return Objects.equals(this.uuid, appDomainChange.uuid) && + Objects.equals(this.type, appDomainChange.type) && + Objects.equals(this.status, appDomainChange.status) && + Objects.equals(this.createdDateTime, appDomainChange.createdDateTime) && + Objects.equals(this.updatedDateTime, appDomainChange.updatedDateTime) && + Objects.equals(this.data, appDomainChange.data)&& + Objects.equals(this.additionalProperties, appDomainChange.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(uuid, type, status, createdDateTime, updatedDateTime, data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AppDomainChange {\n"); + sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" createdDateTime: ").append(toIndentedString(createdDateTime)).append("\n"); + sb.append(" updatedDateTime: ").append(toIndentedString(updatedDateTime)).append("\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("uuid", "type", "status", "createdDateTime", "updatedDateTime", "data")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("type", "updatedDateTime")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AppDomainChange + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AppDomainChange.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in AppDomainChange is not found in the empty JSON string", AppDomainChange.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : AppDomainChange.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("uuid") != null && !jsonObj.get("uuid").isJsonNull()) && !jsonObj.get("uuid").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `uuid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("uuid").toString())); + } + if (!jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // validate the required field `type` + TypeEnum.validateJsonElement(jsonObj.get("type")); + if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); + } + // validate the optional field `status` + if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) { + StatusEnum.validateJsonElement(jsonObj.get("status")); + } + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); + if (jsonArraydata != null) { + // ensure the json data is an array + if (!jsonObj.get("data").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + } + + // validate the optional field `data` (array) + for (int i = 0; i < jsonArraydata.size(); i++) { + AppDomainChangeOperation.validateJsonElement(jsonArraydata.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AppDomainChange.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AppDomainChange' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AppDomainChange.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AppDomainChange value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AppDomainChange read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + AppDomainChange instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AppDomainChange given an JSON string + * + * @param jsonString JSON string + * @return An instance of AppDomainChange + * @throws IOException if the JSON string is invalid with respect to AppDomainChange + */ + public static AppDomainChange fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AppDomainChange.class); + } + + /** + * Convert an instance of AppDomainChange to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppDomainChangeOperation.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppDomainChangeOperation.java new file mode 100644 index 00000000..c804f7d6 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppDomainChangeOperation.java @@ -0,0 +1,456 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * App Domain change operation data + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class AppDomainChangeOperation { + /** + * Handy shortcut for operation name + */ + @JsonAdapter(OpEnum.Adapter.class) + public enum OpEnum { + REPLACE("replace"), + + ADD("add"), + + REMOVE("remove"); + + private String value; + + OpEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static OpEnum fromValue(String value) { + for (OpEnum b : OpEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final OpEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public OpEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return OpEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + OpEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_OP = "op"; + @SerializedName(SERIALIZED_NAME_OP) + @javax.annotation.Nonnull + private OpEnum op; + + /** + * path inside document leading to updated parameter + */ + @JsonAdapter(PathEnum.Adapter.class) + public enum PathEnum { + _DESCRIPTION("/description"); + + private String value; + + PathEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static PathEnum fromValue(String value) { + for (PathEnum b : PathEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final PathEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public PathEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return PathEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + PathEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_PATH = "path"; + @SerializedName(SERIALIZED_NAME_PATH) + @javax.annotation.Nonnull + private PathEnum path; + + public static final String SERIALIZED_NAME_VALUE = "value"; + @SerializedName(SERIALIZED_NAME_VALUE) + @javax.annotation.Nonnull + private Object value; + + public AppDomainChangeOperation() { + } + + public AppDomainChangeOperation op(@javax.annotation.Nonnull OpEnum op) { + this.op = op; + return this; + } + + /** + * Handy shortcut for operation name + * @return op + */ + @javax.annotation.Nonnull + public OpEnum getOp() { + return op; + } + + public void setOp(@javax.annotation.Nonnull OpEnum op) { + this.op = op; + } + + + public AppDomainChangeOperation path(@javax.annotation.Nonnull PathEnum path) { + this.path = path; + return this; + } + + /** + * path inside document leading to updated parameter + * @return path + */ + @javax.annotation.Nonnull + public PathEnum getPath() { + return path; + } + + public void setPath(@javax.annotation.Nonnull PathEnum path) { + this.path = path; + } + + + public AppDomainChangeOperation value(@javax.annotation.Nonnull Object value) { + this.value = value; + return this; + } + + /** + * new value for updated parameter + * @return value + */ + @javax.annotation.Nonnull + public Object getValue() { + return value; + } + + public void setValue(@javax.annotation.Nonnull Object value) { + this.value = value; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AppDomainChangeOperation instance itself + */ + public AppDomainChangeOperation putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AppDomainChangeOperation appDomainChangeOperation = (AppDomainChangeOperation) o; + return Objects.equals(this.op, appDomainChangeOperation.op) && + Objects.equals(this.path, appDomainChangeOperation.path) && + Objects.equals(this.value, appDomainChangeOperation.value)&& + Objects.equals(this.additionalProperties, appDomainChangeOperation.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(op, path, value, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AppDomainChangeOperation {\n"); + sb.append(" op: ").append(toIndentedString(op)).append("\n"); + sb.append(" path: ").append(toIndentedString(path)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("op", "path", "value")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("op", "path", "value")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AppDomainChangeOperation + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AppDomainChangeOperation.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in AppDomainChangeOperation is not found in the empty JSON string", AppDomainChangeOperation.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : AppDomainChangeOperation.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("op").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `op` to be a primitive type in the JSON string but got `%s`", jsonObj.get("op").toString())); + } + // validate the required field `op` + OpEnum.validateJsonElement(jsonObj.get("op")); + if (!jsonObj.get("path").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `path` to be a primitive type in the JSON string but got `%s`", jsonObj.get("path").toString())); + } + // validate the required field `path` + PathEnum.validateJsonElement(jsonObj.get("path")); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AppDomainChangeOperation.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AppDomainChangeOperation' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AppDomainChangeOperation.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AppDomainChangeOperation value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AppDomainChangeOperation read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + AppDomainChangeOperation instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AppDomainChangeOperation given an JSON string + * + * @param jsonString JSON string + * @return An instance of AppDomainChangeOperation + * @throws IOException if the JSON string is invalid with respect to AppDomainChangeOperation + */ + public static AppDomainChangeOperation fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AppDomainChangeOperation.class); + } + + /** + * Convert an instance of AppDomainChangeOperation to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppDomainFilter.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppDomainFilter.java new file mode 100644 index 00000000..ff355081 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppDomainFilter.java @@ -0,0 +1,269 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.AppDomainOrFilter; +import com.equinix.sdk.fabricv4.model.AppDomainSimpleExpression; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + + + +import java.io.IOException; +import java.lang.reflect.Type; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Locale; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.JsonPrimitive; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonSerializationContext; +import com.google.gson.JsonSerializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonArray; +import com.google.gson.JsonParseException; + +import com.equinix.sdk.fabricv4.JSON; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class AppDomainFilter extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(AppDomainFilter.class.getName()); + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AppDomainFilter.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AppDomainFilter' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter adapterAppDomainSimpleExpression = gson.getDelegateAdapter(this, TypeToken.get(AppDomainSimpleExpression.class)); + final TypeAdapter adapterAppDomainOrFilter = gson.getDelegateAdapter(this, TypeToken.get(AppDomainOrFilter.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AppDomainFilter value) throws IOException { + if (value == null || value.getActualInstance() == null) { + elementAdapter.write(out, null); + return; + } + + // check if the actual instance is of the type `AppDomainSimpleExpression` + if (value.getActualInstance() instanceof AppDomainSimpleExpression) { + JsonElement element = adapterAppDomainSimpleExpression.toJsonTree((AppDomainSimpleExpression)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + // check if the actual instance is of the type `AppDomainOrFilter` + if (value.getActualInstance() instanceof AppDomainOrFilter) { + JsonElement element = adapterAppDomainOrFilter.toJsonTree((AppDomainOrFilter)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + throw new IOException("Failed to serialize as the type doesn't match anyOf schemas: AppDomainOrFilter, AppDomainSimpleExpression"); + } + + @Override + public AppDomainFilter read(JsonReader in) throws IOException { + Object deserialized = null; + JsonElement jsonElement = elementAdapter.read(in); + + ArrayList errorMessages = new ArrayList<>(); + TypeAdapter actualAdapter = elementAdapter; + + // deserialize AppDomainSimpleExpression + try { + // validate the JSON object to see if any exception is thrown + AppDomainSimpleExpression.validateJsonElement(jsonElement); + actualAdapter = adapterAppDomainSimpleExpression; + AppDomainFilter ret = new AppDomainFilter(); + ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); + return ret; + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format(Locale.ROOT, "Deserialization for AppDomainSimpleExpression failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'AppDomainSimpleExpression'", e); + } + // deserialize AppDomainOrFilter + try { + // validate the JSON object to see if any exception is thrown + AppDomainOrFilter.validateJsonElement(jsonElement); + actualAdapter = adapterAppDomainOrFilter; + AppDomainFilter ret = new AppDomainFilter(); + ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); + return ret; + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format(Locale.ROOT, "Deserialization for AppDomainOrFilter failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'AppDomainOrFilter'", e); + } + + throw new IOException(String.format(Locale.ROOT, "Failed deserialization for AppDomainFilter: no class matches result, expected at least 1. Detailed failure message for anyOf schemas: %s. JSON: %s", errorMessages, jsonElement.toString())); + } + }.nullSafe(); + } + } + + // store a list of schema names defined in anyOf + public static final Map> schemas = new HashMap>(); + + public AppDomainFilter() { + super("anyOf", Boolean.FALSE); + } + + public AppDomainFilter(Object o) { + super("anyOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("AppDomainSimpleExpression", AppDomainSimpleExpression.class); + schemas.put("AppDomainOrFilter", AppDomainOrFilter.class); + } + + @Override + public Map> getSchemas() { + return AppDomainFilter.schemas; + } + + /** + * Set the instance that matches the anyOf child schema, check + * the instance parameter is valid against the anyOf child schemas: + * AppDomainOrFilter, AppDomainSimpleExpression + * + * It could be an instance of the 'anyOf' schemas. + */ + @Override + public void setActualInstance(Object instance) { + if (instance instanceof AppDomainSimpleExpression) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof AppDomainOrFilter) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException("Invalid instance type. Must be AppDomainOrFilter, AppDomainSimpleExpression"); + } + + /** + * Get the actual instance, which can be the following: + * AppDomainOrFilter, AppDomainSimpleExpression + * + * @return The actual instance (AppDomainOrFilter, AppDomainSimpleExpression) + */ + @SuppressWarnings("unchecked") + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `AppDomainSimpleExpression`. If the actual instance is not `AppDomainSimpleExpression`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `AppDomainSimpleExpression` + * @throws ClassCastException if the instance is not `AppDomainSimpleExpression` + */ + public AppDomainSimpleExpression getAppDomainSimpleExpression() throws ClassCastException { + return (AppDomainSimpleExpression)super.getActualInstance(); + } + + /** + * Get the actual instance of `AppDomainOrFilter`. If the actual instance is not `AppDomainOrFilter`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `AppDomainOrFilter` + * @throws ClassCastException if the instance is not `AppDomainOrFilter` + */ + public AppDomainOrFilter getAppDomainOrFilter() throws ClassCastException { + return (AppDomainOrFilter)super.getActualInstance(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AppDomainFilter + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + // validate anyOf schemas one by one + ArrayList errorMessages = new ArrayList<>(); + // validate the json string with AppDomainSimpleExpression + try { + AppDomainSimpleExpression.validateJsonElement(jsonElement); + return; + } catch (Exception e) { + errorMessages.add(String.format(Locale.ROOT, "Deserialization for AppDomainSimpleExpression failed with `%s`.", e.getMessage())); + // continue to the next one + } + // validate the json string with AppDomainOrFilter + try { + AppDomainOrFilter.validateJsonElement(jsonElement); + return; + } catch (Exception e) { + errorMessages.add(String.format(Locale.ROOT, "Deserialization for AppDomainOrFilter failed with `%s`.", e.getMessage())); + // continue to the next one + } + throw new IOException(String.format(Locale.ROOT, "The JSON string is invalid for AppDomainFilter with anyOf schemas: AppDomainOrFilter, AppDomainSimpleExpression. no class match the result, expected at least 1. Detailed failure message for anyOf schemas: %s. JSON: %s", errorMessages, jsonElement.toString())); + } + + /** + * Create an instance of AppDomainFilter given an JSON string + * + * @param jsonString JSON string + * @return An instance of AppDomainFilter + * @throws IOException if the JSON string is invalid with respect to AppDomainFilter + */ + public static AppDomainFilter fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AppDomainFilter.class); + } + + /** + * Convert an instance of AppDomainFilter to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppDomainFilters.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppDomainFilters.java new file mode 100644 index 00000000..29bc3fa9 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppDomainFilters.java @@ -0,0 +1,308 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.AppDomainFilter; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * AppDomainFilters + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class AppDomainFilters { + public static final String SERIALIZED_NAME_AND = "and"; + @SerializedName(SERIALIZED_NAME_AND) + @javax.annotation.Nullable + private List and = new ArrayList<>(); + + public AppDomainFilters() { + } + + public AppDomainFilters and(@javax.annotation.Nullable List and) { + this.and = and; + return this; + } + + public AppDomainFilters addAndItem(AppDomainFilter andItem) { + if (this.and == null) { + this.and = new ArrayList<>(); + } + this.and.add(andItem); + return this; + } + + /** + * Get and + * @return and + */ + @javax.annotation.Nullable + public List getAnd() { + return and; + } + + public void setAnd(@javax.annotation.Nullable List and) { + this.and = and; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AppDomainFilters instance itself + */ + public AppDomainFilters putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AppDomainFilters appDomainFilters = (AppDomainFilters) o; + return Objects.equals(this.and, appDomainFilters.and)&& + Objects.equals(this.additionalProperties, appDomainFilters.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(and, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AppDomainFilters {\n"); + sb.append(" and: ").append(toIndentedString(and)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("and")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AppDomainFilters + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AppDomainFilters.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in AppDomainFilters is not found in the empty JSON string", AppDomainFilters.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("and") != null && !jsonObj.get("and").isJsonNull()) { + JsonArray jsonArrayand = jsonObj.getAsJsonArray("and"); + if (jsonArrayand != null) { + // ensure the json data is an array + if (!jsonObj.get("and").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `and` to be an array in the JSON string but got `%s`", jsonObj.get("and").toString())); + } + + // validate the optional field `and` (array) + for (int i = 0; i < jsonArrayand.size(); i++) { + AppDomainFilter.validateJsonElement(jsonArrayand.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AppDomainFilters.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AppDomainFilters' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AppDomainFilters.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AppDomainFilters value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AppDomainFilters read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + AppDomainFilters instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AppDomainFilters given an JSON string + * + * @param jsonString JSON string + * @return An instance of AppDomainFilters + * @throws IOException if the JSON string is invalid with respect to AppDomainFilters + */ + public static AppDomainFilters fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AppDomainFilters.class); + } + + /** + * Convert an instance of AppDomainFilters to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppDomainOrFilter.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppDomainOrFilter.java new file mode 100644 index 00000000..ddc07c3b --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppDomainOrFilter.java @@ -0,0 +1,308 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.AppDomainSimpleExpression; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * AppDomainOrFilter + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class AppDomainOrFilter { + public static final String SERIALIZED_NAME_OR = "or"; + @SerializedName(SERIALIZED_NAME_OR) + @javax.annotation.Nullable + private List or = new ArrayList<>(); + + public AppDomainOrFilter() { + } + + public AppDomainOrFilter or(@javax.annotation.Nullable List or) { + this.or = or; + return this; + } + + public AppDomainOrFilter addOrItem(AppDomainSimpleExpression orItem) { + if (this.or == null) { + this.or = new ArrayList<>(); + } + this.or.add(orItem); + return this; + } + + /** + * Get or + * @return or + */ + @javax.annotation.Nullable + public List getOr() { + return or; + } + + public void setOr(@javax.annotation.Nullable List or) { + this.or = or; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AppDomainOrFilter instance itself + */ + public AppDomainOrFilter putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AppDomainOrFilter appDomainOrFilter = (AppDomainOrFilter) o; + return Objects.equals(this.or, appDomainOrFilter.or)&& + Objects.equals(this.additionalProperties, appDomainOrFilter.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(or, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AppDomainOrFilter {\n"); + sb.append(" or: ").append(toIndentedString(or)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("or")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AppDomainOrFilter + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AppDomainOrFilter.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in AppDomainOrFilter is not found in the empty JSON string", AppDomainOrFilter.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("or") != null && !jsonObj.get("or").isJsonNull()) { + JsonArray jsonArrayor = jsonObj.getAsJsonArray("or"); + if (jsonArrayor != null) { + // ensure the json data is an array + if (!jsonObj.get("or").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `or` to be an array in the JSON string but got `%s`", jsonObj.get("or").toString())); + } + + // validate the optional field `or` (array) + for (int i = 0; i < jsonArrayor.size(); i++) { + AppDomainSimpleExpression.validateJsonElement(jsonArrayor.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AppDomainOrFilter.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AppDomainOrFilter' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AppDomainOrFilter.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AppDomainOrFilter value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AppDomainOrFilter read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + AppDomainOrFilter instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AppDomainOrFilter given an JSON string + * + * @param jsonString JSON string + * @return An instance of AppDomainOrFilter + * @throws IOException if the JSON string is invalid with respect to AppDomainOrFilter + */ + public static AppDomainOrFilter fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AppDomainOrFilter.class); + } + + /** + * Convert an instance of AppDomainOrFilter to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ServiceProfileLastMileAddress.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppDomainPostRequest.java similarity index 63% rename from services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ServiceProfileLastMileAddress.java rename to services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppDomainPostRequest.java index 4f5aafbe..19daba95 100644 --- a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ServiceProfileLastMileAddress.java +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppDomainPostRequest.java @@ -13,6 +13,8 @@ import java.util.Objects; import java.util.Locale; +import com.equinix.sdk.fabricv4.model.AppDomainType; +import com.equinix.sdk.fabricv4.model.Project; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -46,73 +48,78 @@ import com.equinix.sdk.fabricv4.JSON; /** - * Last-mile provisioning address. + * Create App Domain */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") -public class ServiceProfileLastMileAddress { - public static final String SERIALIZED_NAME_REQUIRE = "require"; - @SerializedName(SERIALIZED_NAME_REQUIRE) - @javax.annotation.Nullable - private Boolean require; +public class AppDomainPostRequest { + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nonnull + private AppDomainType type = AppDomainType.APP_DOMAIN; - public static final String SERIALIZED_NAME_DATA_TYPE = "dataType"; - @SerializedName(SERIALIZED_NAME_DATA_TYPE) - @javax.annotation.Nullable - private String dataType; + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; public static final String SERIALIZED_NAME_DESCRIPTION = "description"; @SerializedName(SERIALIZED_NAME_DESCRIPTION) @javax.annotation.Nullable private String description; - public ServiceProfileLastMileAddress() { + public static final String SERIALIZED_NAME_PROJECT = "project"; + @SerializedName(SERIALIZED_NAME_PROJECT) + @javax.annotation.Nonnull + private Project project; + + public AppDomainPostRequest() { } - public ServiceProfileLastMileAddress require(@javax.annotation.Nullable Boolean require) { - this.require = require; + public AppDomainPostRequest type(@javax.annotation.Nonnull AppDomainType type) { + this.type = type; return this; } /** - * Whether the address is required for provisioning and ordering. - * @return require + * Get type + * @return type */ - @javax.annotation.Nullable - public Boolean getRequire() { - return require; + @javax.annotation.Nonnull + public AppDomainType getType() { + return type; } - public void setRequire(@javax.annotation.Nullable Boolean require) { - this.require = require; + public void setType(@javax.annotation.Nonnull AppDomainType type) { + this.type = type; } - public ServiceProfileLastMileAddress dataType(@javax.annotation.Nullable String dataType) { - this.dataType = dataType; + public AppDomainPostRequest name(@javax.annotation.Nonnull String name) { + this.name = name; return this; } /** - * Expected format of the address. - * @return dataType + * Customer-provided App Domain name + * @return name */ - @javax.annotation.Nullable - public String getDataType() { - return dataType; + @javax.annotation.Nonnull + public String getName() { + return name; } - public void setDataType(@javax.annotation.Nullable String dataType) { - this.dataType = dataType; + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; } - public ServiceProfileLastMileAddress description(@javax.annotation.Nullable String description) { + public AppDomainPostRequest description(@javax.annotation.Nullable String description) { this.description = description; return this; } /** - * Additional information about the address requirement. + * Customer-provided App Domain description * @return description */ @javax.annotation.Nullable @@ -124,6 +131,25 @@ public void setDescription(@javax.annotation.Nullable String description) { this.description = description; } + + public AppDomainPostRequest project(@javax.annotation.Nonnull Project project) { + this.project = project; + return this; + } + + /** + * Get project + * @return project + */ + @javax.annotation.Nonnull + public Project getProject() { + return project; + } + + public void setProject(@javax.annotation.Nonnull Project project) { + this.project = project; + } + /** * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with @@ -137,9 +163,9 @@ public void setDescription(@javax.annotation.Nullable String description) { * * @param key name of the property * @param value value of the property - * @return the ServiceProfileLastMileAddress instance itself + * @return the AppDomainPostRequest instance itself */ - public ServiceProfileLastMileAddress putAdditionalProperty(String key, Object value) { + public AppDomainPostRequest putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -178,25 +204,27 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - ServiceProfileLastMileAddress serviceProfileLastMileAddress = (ServiceProfileLastMileAddress) o; - return Objects.equals(this.require, serviceProfileLastMileAddress.require) && - Objects.equals(this.dataType, serviceProfileLastMileAddress.dataType) && - Objects.equals(this.description, serviceProfileLastMileAddress.description)&& - Objects.equals(this.additionalProperties, serviceProfileLastMileAddress.additionalProperties); + AppDomainPostRequest appDomainPostRequest = (AppDomainPostRequest) o; + return Objects.equals(this.type, appDomainPostRequest.type) && + Objects.equals(this.name, appDomainPostRequest.name) && + Objects.equals(this.description, appDomainPostRequest.description) && + Objects.equals(this.project, appDomainPostRequest.project)&& + Objects.equals(this.additionalProperties, appDomainPostRequest.additionalProperties); } @Override public int hashCode() { - return Objects.hash(require, dataType, description, additionalProperties); + return Objects.hash(type, name, description, project, additionalProperties); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class ServiceProfileLastMileAddress {\n"); - sb.append(" require: ").append(toIndentedString(require)).append("\n"); - sb.append(" dataType: ").append(toIndentedString(dataType)).append("\n"); + sb.append("class AppDomainPostRequest {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" project: ").append(toIndentedString(project)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); @@ -219,47 +247,58 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("require", "dataType", "description")); + openapiFields = new HashSet(Arrays.asList("type", "name", "description", "project")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); + openapiRequiredFields = new HashSet(Arrays.asList("type", "name", "project")); } /** * Validates the JSON Element and throws an exception if issues found * * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ServiceProfileLastMileAddress + * @throws IOException if the JSON Element is invalid with respect to AppDomainPostRequest */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { - if (!ServiceProfileLastMileAddress.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in ServiceProfileLastMileAddress is not found in the empty JSON string", ServiceProfileLastMileAddress.openapiRequiredFields.toString())); + if (!AppDomainPostRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in AppDomainPostRequest is not found in the empty JSON string", AppDomainPostRequest.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : AppDomainPostRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("dataType") != null && !jsonObj.get("dataType").isJsonNull()) && !jsonObj.get("dataType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `dataType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dataType").toString())); + // validate the required field `type` + AppDomainType.validateJsonElement(jsonObj.get("type")); + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } + // validate the required field `project` + Project.validateJsonElement(jsonObj.get("project")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!ServiceProfileLastMileAddress.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ServiceProfileLastMileAddress' and its subtypes + if (!AppDomainPostRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AppDomainPostRequest' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ServiceProfileLastMileAddress.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AppDomainPostRequest.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, ServiceProfileLastMileAddress value) throws IOException { + public void write(JsonWriter out, AppDomainPostRequest value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); // serialize additional properties @@ -287,12 +326,12 @@ else if (entry.getValue() instanceof Character) } @Override - public ServiceProfileLastMileAddress read(JsonReader in) throws IOException { + public AppDomainPostRequest read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); JsonObject jsonObj = jsonElement.getAsJsonObject(); // store additional fields in the deserialized instance - ServiceProfileLastMileAddress instance = thisAdapter.fromJsonTree(jsonObj); + AppDomainPostRequest instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { if (!openapiFields.contains(entry.getKey())) { if (entry.getValue().isJsonPrimitive()) { // primitive type @@ -319,18 +358,18 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } /** - * Create an instance of ServiceProfileLastMileAddress given an JSON string + * Create an instance of AppDomainPostRequest given an JSON string * * @param jsonString JSON string - * @return An instance of ServiceProfileLastMileAddress - * @throws IOException if the JSON string is invalid with respect to ServiceProfileLastMileAddress + * @return An instance of AppDomainPostRequest + * @throws IOException if the JSON string is invalid with respect to AppDomainPostRequest */ - public static ServiceProfileLastMileAddress fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ServiceProfileLastMileAddress.class); + public static AppDomainPostRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AppDomainPostRequest.class); } /** - * Convert an instance of ServiceProfileLastMileAddress to an JSON string + * Convert an instance of AppDomainPostRequest to an JSON string * * @return JSON string */ diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppDomainSearchRequest.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppDomainSearchRequest.java new file mode 100644 index 00000000..eaa1580c --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppDomainSearchRequest.java @@ -0,0 +1,370 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.AppDomainFilters; +import com.equinix.sdk.fabricv4.model.AppDomainSortCriteria; +import com.equinix.sdk.fabricv4.model.PaginationRequest; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * Search requests containing criteria + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class AppDomainSearchRequest { + public static final String SERIALIZED_NAME_FILTER = "filter"; + @SerializedName(SERIALIZED_NAME_FILTER) + @javax.annotation.Nullable + private AppDomainFilters filter; + + public static final String SERIALIZED_NAME_PAGINATION = "pagination"; + @SerializedName(SERIALIZED_NAME_PAGINATION) + @javax.annotation.Nullable + private PaginationRequest pagination; + + public static final String SERIALIZED_NAME_SORT = "sort"; + @SerializedName(SERIALIZED_NAME_SORT) + @javax.annotation.Nullable + private List sort = new ArrayList<>(); + + public AppDomainSearchRequest() { + } + + public AppDomainSearchRequest filter(@javax.annotation.Nullable AppDomainFilters filter) { + this.filter = filter; + return this; + } + + /** + * Get filter + * @return filter + */ + @javax.annotation.Nullable + public AppDomainFilters getFilter() { + return filter; + } + + public void setFilter(@javax.annotation.Nullable AppDomainFilters filter) { + this.filter = filter; + } + + + public AppDomainSearchRequest pagination(@javax.annotation.Nullable PaginationRequest pagination) { + this.pagination = pagination; + return this; + } + + /** + * Get pagination + * @return pagination + */ + @javax.annotation.Nullable + public PaginationRequest getPagination() { + return pagination; + } + + public void setPagination(@javax.annotation.Nullable PaginationRequest pagination) { + this.pagination = pagination; + } + + + public AppDomainSearchRequest sort(@javax.annotation.Nullable List sort) { + this.sort = sort; + return this; + } + + public AppDomainSearchRequest addSortItem(AppDomainSortCriteria sortItem) { + if (this.sort == null) { + this.sort = new ArrayList<>(); + } + this.sort.add(sortItem); + return this; + } + + /** + * Get sort + * @return sort + */ + @javax.annotation.Nullable + public List getSort() { + return sort; + } + + public void setSort(@javax.annotation.Nullable List sort) { + this.sort = sort; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AppDomainSearchRequest instance itself + */ + public AppDomainSearchRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AppDomainSearchRequest appDomainSearchRequest = (AppDomainSearchRequest) o; + return Objects.equals(this.filter, appDomainSearchRequest.filter) && + Objects.equals(this.pagination, appDomainSearchRequest.pagination) && + Objects.equals(this.sort, appDomainSearchRequest.sort)&& + Objects.equals(this.additionalProperties, appDomainSearchRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(filter, pagination, sort, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AppDomainSearchRequest {\n"); + sb.append(" filter: ").append(toIndentedString(filter)).append("\n"); + sb.append(" pagination: ").append(toIndentedString(pagination)).append("\n"); + sb.append(" sort: ").append(toIndentedString(sort)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("filter", "pagination", "sort")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AppDomainSearchRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AppDomainSearchRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in AppDomainSearchRequest is not found in the empty JSON string", AppDomainSearchRequest.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `filter` + if (jsonObj.get("filter") != null && !jsonObj.get("filter").isJsonNull()) { + AppDomainFilters.validateJsonElement(jsonObj.get("filter")); + } + // validate the optional field `pagination` + if (jsonObj.get("pagination") != null && !jsonObj.get("pagination").isJsonNull()) { + PaginationRequest.validateJsonElement(jsonObj.get("pagination")); + } + if (jsonObj.get("sort") != null && !jsonObj.get("sort").isJsonNull()) { + JsonArray jsonArraysort = jsonObj.getAsJsonArray("sort"); + if (jsonArraysort != null) { + // ensure the json data is an array + if (!jsonObj.get("sort").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `sort` to be an array in the JSON string but got `%s`", jsonObj.get("sort").toString())); + } + + // validate the optional field `sort` (array) + for (int i = 0; i < jsonArraysort.size(); i++) { + AppDomainSortCriteria.validateJsonElement(jsonArraysort.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AppDomainSearchRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AppDomainSearchRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AppDomainSearchRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AppDomainSearchRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AppDomainSearchRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + AppDomainSearchRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AppDomainSearchRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of AppDomainSearchRequest + * @throws IOException if the JSON string is invalid with respect to AppDomainSearchRequest + */ + public static AppDomainSearchRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AppDomainSearchRequest.class); + } + + /** + * Convert an instance of AppDomainSearchRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppDomainSearchResponse.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppDomainSearchResponse.java new file mode 100644 index 00000000..e61a8d25 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppDomainSearchResponse.java @@ -0,0 +1,339 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.AppDomain; +import com.equinix.sdk.fabricv4.model.Pagination; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * AppDomainSearchResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class AppDomainSearchResponse { + public static final String SERIALIZED_NAME_PAGINATION = "pagination"; + @SerializedName(SERIALIZED_NAME_PAGINATION) + @javax.annotation.Nullable + private Pagination pagination; + + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + @javax.annotation.Nullable + private List data = new ArrayList<>(); + + public AppDomainSearchResponse() { + } + + public AppDomainSearchResponse pagination(@javax.annotation.Nullable Pagination pagination) { + this.pagination = pagination; + return this; + } + + /** + * Get pagination + * @return pagination + */ + @javax.annotation.Nullable + public Pagination getPagination() { + return pagination; + } + + public void setPagination(@javax.annotation.Nullable Pagination pagination) { + this.pagination = pagination; + } + + + public AppDomainSearchResponse data(@javax.annotation.Nullable List data) { + this.data = data; + return this; + } + + public AppDomainSearchResponse addDataItem(AppDomain dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + return this; + } + + /** + * Data returned from the API call. + * @return data + */ + @javax.annotation.Nullable + public List getData() { + return data; + } + + public void setData(@javax.annotation.Nullable List data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AppDomainSearchResponse instance itself + */ + public AppDomainSearchResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AppDomainSearchResponse appDomainSearchResponse = (AppDomainSearchResponse) o; + return Objects.equals(this.pagination, appDomainSearchResponse.pagination) && + Objects.equals(this.data, appDomainSearchResponse.data)&& + Objects.equals(this.additionalProperties, appDomainSearchResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(pagination, data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AppDomainSearchResponse {\n"); + sb.append(" pagination: ").append(toIndentedString(pagination)).append("\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("pagination", "data")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AppDomainSearchResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AppDomainSearchResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in AppDomainSearchResponse is not found in the empty JSON string", AppDomainSearchResponse.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `pagination` + if (jsonObj.get("pagination") != null && !jsonObj.get("pagination").isJsonNull()) { + Pagination.validateJsonElement(jsonObj.get("pagination")); + } + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); + if (jsonArraydata != null) { + // ensure the json data is an array + if (!jsonObj.get("data").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + } + + // validate the optional field `data` (array) + for (int i = 0; i < jsonArraydata.size(); i++) { + AppDomain.validateJsonElement(jsonArraydata.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AppDomainSearchResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AppDomainSearchResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AppDomainSearchResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AppDomainSearchResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AppDomainSearchResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + AppDomainSearchResponse instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AppDomainSearchResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of AppDomainSearchResponse + * @throws IOException if the JSON string is invalid with respect to AppDomainSearchResponse + */ + public static AppDomainSearchResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AppDomainSearchResponse.class); + } + + /** + * Convert an instance of AppDomainSearchResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppDomainSimpleExpression.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppDomainSimpleExpression.java new file mode 100644 index 00000000..336878df --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppDomainSimpleExpression.java @@ -0,0 +1,355 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * AppDomainSimpleExpression + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class AppDomainSimpleExpression { + public static final String SERIALIZED_NAME_PROPERTY = "property"; + @SerializedName(SERIALIZED_NAME_PROPERTY) + @javax.annotation.Nullable + private String property; + + public static final String SERIALIZED_NAME_OPERATOR = "operator"; + @SerializedName(SERIALIZED_NAME_OPERATOR) + @javax.annotation.Nullable + private String operator; + + public static final String SERIALIZED_NAME_VALUES = "values"; + @SerializedName(SERIALIZED_NAME_VALUES) + @javax.annotation.Nullable + private List values = new ArrayList<>(); + + public AppDomainSimpleExpression() { + } + + public AppDomainSimpleExpression property(@javax.annotation.Nullable String property) { + this.property = property; + return this; + } + + /** + * Possible field names to use on filters: * `/project/projectId` - project id * `/uuid` - App Domain uuid * `/name` - App Domain name * `/description` - App Domain description * `/state` - App Domain status * `/changeLog/createdDateTime` - App Domain creation timestamp * `/changeLog/updatedDateTime` - App Domain last updated timestamp * `/changeLog/deletedDateTime` - App Domain deletion timestamp + * @return property + */ + @javax.annotation.Nullable + public String getProperty() { + return property; + } + + public void setProperty(@javax.annotation.Nullable String property) { + this.property = property; + } + + + public AppDomainSimpleExpression operator(@javax.annotation.Nullable String operator) { + this.operator = operator; + return this; + } + + /** + * Possible operators to use on filters: * `=` - equal * `!=` - not equal * `>` - greater than * `<` - less than * `IN` - in * `NOT IN` - not in * `LIKE` - like * `ILIKE` - case-insensitive like * `BETWEEN` - between * `NOT BETWEEN` - not between + * @return operator + */ + @javax.annotation.Nullable + public String getOperator() { + return operator; + } + + public void setOperator(@javax.annotation.Nullable String operator) { + this.operator = operator; + } + + + public AppDomainSimpleExpression values(@javax.annotation.Nullable List values) { + this.values = values; + return this; + } + + public AppDomainSimpleExpression addValuesItem(String valuesItem) { + if (this.values == null) { + this.values = new ArrayList<>(); + } + this.values.add(valuesItem); + return this; + } + + /** + * Get values + * @return values + */ + @javax.annotation.Nullable + public List getValues() { + return values; + } + + public void setValues(@javax.annotation.Nullable List values) { + this.values = values; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AppDomainSimpleExpression instance itself + */ + public AppDomainSimpleExpression putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AppDomainSimpleExpression appDomainSimpleExpression = (AppDomainSimpleExpression) o; + return Objects.equals(this.property, appDomainSimpleExpression.property) && + Objects.equals(this.operator, appDomainSimpleExpression.operator) && + Objects.equals(this.values, appDomainSimpleExpression.values)&& + Objects.equals(this.additionalProperties, appDomainSimpleExpression.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(property, operator, values, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AppDomainSimpleExpression {\n"); + sb.append(" property: ").append(toIndentedString(property)).append("\n"); + sb.append(" operator: ").append(toIndentedString(operator)).append("\n"); + sb.append(" values: ").append(toIndentedString(values)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("property", "operator", "values")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AppDomainSimpleExpression + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AppDomainSimpleExpression.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in AppDomainSimpleExpression is not found in the empty JSON string", AppDomainSimpleExpression.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("property") != null && !jsonObj.get("property").isJsonNull()) && !jsonObj.get("property").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `property` to be a primitive type in the JSON string but got `%s`", jsonObj.get("property").toString())); + } + if ((jsonObj.get("operator") != null && !jsonObj.get("operator").isJsonNull()) && !jsonObj.get("operator").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `operator` to be a primitive type in the JSON string but got `%s`", jsonObj.get("operator").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("values") != null && !jsonObj.get("values").isJsonNull() && !jsonObj.get("values").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `values` to be an array in the JSON string but got `%s`", jsonObj.get("values").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AppDomainSimpleExpression.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AppDomainSimpleExpression' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AppDomainSimpleExpression.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AppDomainSimpleExpression value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AppDomainSimpleExpression read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + AppDomainSimpleExpression instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AppDomainSimpleExpression given an JSON string + * + * @param jsonString JSON string + * @return An instance of AppDomainSimpleExpression + * @throws IOException if the JSON string is invalid with respect to AppDomainSimpleExpression + */ + public static AppDomainSimpleExpression fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AppDomainSimpleExpression.class); + } + + /** + * Convert an instance of AppDomainSimpleExpression to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppDomainSortCriteria.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppDomainSortCriteria.java new file mode 100644 index 00000000..f2d566ba --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppDomainSortCriteria.java @@ -0,0 +1,317 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.AppDomainSortDirection; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * AppDomainSortCriteria + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class AppDomainSortCriteria { + public static final String SERIALIZED_NAME_DIRECTION = "direction"; + @SerializedName(SERIALIZED_NAME_DIRECTION) + @javax.annotation.Nullable + private AppDomainSortDirection direction = AppDomainSortDirection.DESC; + + public static final String SERIALIZED_NAME_PROPERTY = "property"; + @SerializedName(SERIALIZED_NAME_PROPERTY) + @javax.annotation.Nullable + private String property = "/changeLog/updatedDateTime"; + + public AppDomainSortCriteria() { + } + + public AppDomainSortCriteria direction(@javax.annotation.Nullable AppDomainSortDirection direction) { + this.direction = direction; + return this; + } + + /** + * Get direction + * @return direction + */ + @javax.annotation.Nullable + public AppDomainSortDirection getDirection() { + return direction; + } + + public void setDirection(@javax.annotation.Nullable AppDomainSortDirection direction) { + this.direction = direction; + } + + + public AppDomainSortCriteria property(@javax.annotation.Nullable String property) { + this.property = property; + return this; + } + + /** + * Possible field names to use on '400_InvalidSorting': * `/name` - App Domain name * `/uuid` - App Domain uuid * `/state` - App Domain status * `/changeLog/createdDateTime` - Date and time when change flow starts * `/changeLog/updatedDateTime` - Date and time when change object is updated + * @return property + */ + @javax.annotation.Nullable + public String getProperty() { + return property; + } + + public void setProperty(@javax.annotation.Nullable String property) { + this.property = property; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AppDomainSortCriteria instance itself + */ + public AppDomainSortCriteria putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AppDomainSortCriteria appDomainSortCriteria = (AppDomainSortCriteria) o; + return Objects.equals(this.direction, appDomainSortCriteria.direction) && + Objects.equals(this.property, appDomainSortCriteria.property)&& + Objects.equals(this.additionalProperties, appDomainSortCriteria.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(direction, property, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AppDomainSortCriteria {\n"); + sb.append(" direction: ").append(toIndentedString(direction)).append("\n"); + sb.append(" property: ").append(toIndentedString(property)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("direction", "property")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AppDomainSortCriteria + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AppDomainSortCriteria.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in AppDomainSortCriteria is not found in the empty JSON string", AppDomainSortCriteria.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `direction` + if (jsonObj.get("direction") != null && !jsonObj.get("direction").isJsonNull()) { + AppDomainSortDirection.validateJsonElement(jsonObj.get("direction")); + } + if ((jsonObj.get("property") != null && !jsonObj.get("property").isJsonNull()) && !jsonObj.get("property").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `property` to be a primitive type in the JSON string but got `%s`", jsonObj.get("property").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AppDomainSortCriteria.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AppDomainSortCriteria' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AppDomainSortCriteria.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AppDomainSortCriteria value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AppDomainSortCriteria read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + AppDomainSortCriteria instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AppDomainSortCriteria given an JSON string + * + * @param jsonString JSON string + * @return An instance of AppDomainSortCriteria + * @throws IOException if the JSON string is invalid with respect to AppDomainSortCriteria + */ + public static AppDomainSortCriteria fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AppDomainSortCriteria.class); + } + + /** + * Convert an instance of AppDomainSortCriteria to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppDomainSortDirection.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppDomainSortDirection.java new file mode 100644 index 00000000..4bb2d678 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppDomainSortDirection.java @@ -0,0 +1,78 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.google.gson.annotations.SerializedName; + +import java.io.IOException; +import java.util.Locale; +import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; + +/** + * Sorting direction + */ +@JsonAdapter(AppDomainSortDirection.Adapter.class) +public enum AppDomainSortDirection { + + DESC("DESC"), + + ASC("ASC"); + + private String value; + + AppDomainSortDirection(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static AppDomainSortDirection fromValue(String value) { + for (AppDomainSortDirection b : AppDomainSortDirection.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final AppDomainSortDirection enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public AppDomainSortDirection read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return AppDomainSortDirection.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + AppDomainSortDirection.fromValue(value); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppDomainState.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppDomainState.java new file mode 100644 index 00000000..8ac12b13 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppDomainState.java @@ -0,0 +1,86 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.google.gson.annotations.SerializedName; + +import java.io.IOException; +import java.util.Locale; +import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; + +/** + * App Domain lifecycle state + */ +@JsonAdapter(AppDomainState.Adapter.class) +public enum AppDomainState { + + PENDING_VERIFICATION("PENDING_VERIFICATION"), + + PROVISIONING_FAILED("PROVISIONING_FAILED"), + + PROVISIONED("PROVISIONED"), + + DEPROVISIONING("DEPROVISIONING"), + + DEPROVISIONING_FAILED("DEPROVISIONING_FAILED"), + + DEPROVISIONED("DEPROVISIONED"); + + private String value; + + AppDomainState(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static AppDomainState fromValue(String value) { + for (AppDomainState b : AppDomainState.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final AppDomainState enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public AppDomainState read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return AppDomainState.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + AppDomainState.fromValue(value); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppDomainType.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppDomainType.java new file mode 100644 index 00000000..e80eb118 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppDomainType.java @@ -0,0 +1,76 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.google.gson.annotations.SerializedName; + +import java.io.IOException; +import java.util.Locale; +import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; + +/** + * App Domain Type + */ +@JsonAdapter(AppDomainType.Adapter.class) +public enum AppDomainType { + + APP_DOMAIN("APP_DOMAIN"); + + private String value; + + AppDomainType(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static AppDomainType fromValue(String value) { + for (AppDomainType b : AppDomainType.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final AppDomainType enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public AppDomainType read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return AppDomainType.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + AppDomainType.fromValue(value); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLink.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLink.java new file mode 100644 index 00000000..319ced67 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLink.java @@ -0,0 +1,616 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.AppLinkChange; +import com.equinix.sdk.fabricv4.model.AppLinkCloudRouter; +import com.equinix.sdk.fabricv4.model.AppLinkState; +import com.equinix.sdk.fabricv4.model.AppLinkType; +import com.equinix.sdk.fabricv4.model.Changelog; +import com.equinix.sdk.fabricv4.model.Project; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.net.URI; +import java.util.Arrays; +import java.util.UUID; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * App Link object + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class AppLink { + public static final String SERIALIZED_NAME_HREF = "href"; + @SerializedName(SERIALIZED_NAME_HREF) + @javax.annotation.Nullable + private URI href; + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nonnull + private AppLinkType type = AppLinkType.APP_LINK; + + public static final String SERIALIZED_NAME_UUID = "uuid"; + @SerializedName(SERIALIZED_NAME_UUID) + @javax.annotation.Nullable + private UUID uuid; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable + private String description; + + public static final String SERIALIZED_NAME_STATE = "state"; + @SerializedName(SERIALIZED_NAME_STATE) + @javax.annotation.Nullable + private AppLinkState state; + + public static final String SERIALIZED_NAME_ROUTER = "router"; + @SerializedName(SERIALIZED_NAME_ROUTER) + @javax.annotation.Nonnull + private AppLinkCloudRouter router; + + public static final String SERIALIZED_NAME_IPV4_ADDRESS = "ipv4Address"; + @SerializedName(SERIALIZED_NAME_IPV4_ADDRESS) + @javax.annotation.Nullable + private String ipv4Address; + + public static final String SERIALIZED_NAME_BANDWIDTH = "bandwidth"; + @SerializedName(SERIALIZED_NAME_BANDWIDTH) + @javax.annotation.Nonnull + private Integer bandwidth; + + public static final String SERIALIZED_NAME_PROJECT = "project"; + @SerializedName(SERIALIZED_NAME_PROJECT) + @javax.annotation.Nonnull + private Project project; + + public static final String SERIALIZED_NAME_CHANGE_LOG = "changeLog"; + @SerializedName(SERIALIZED_NAME_CHANGE_LOG) + @javax.annotation.Nullable + private Changelog changeLog; + + public static final String SERIALIZED_NAME_CHANGE = "change"; + @SerializedName(SERIALIZED_NAME_CHANGE) + @javax.annotation.Nullable + private AppLinkChange change; + + public AppLink() { + } + + public AppLink( + URI href + ) { + this(); + this.href = href; + } + + /** + * Resource URI + * @return href + */ + @javax.annotation.Nullable + public URI getHref() { + return href; + } + + + + public AppLink type(@javax.annotation.Nonnull AppLinkType type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + */ + @javax.annotation.Nonnull + public AppLinkType getType() { + return type; + } + + public void setType(@javax.annotation.Nonnull AppLinkType type) { + this.type = type; + } + + + public AppLink uuid(@javax.annotation.Nullable UUID uuid) { + this.uuid = uuid; + return this; + } + + /** + * Equinix-assigned access point identifier + * @return uuid + */ + @javax.annotation.Nullable + public UUID getUuid() { + return uuid; + } + + public void setUuid(@javax.annotation.Nullable UUID uuid) { + this.uuid = uuid; + } + + + public AppLink name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Customer-provided App Link name + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public AppLink description(@javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * Customer-provided App Link description + * @return description + */ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + + + public AppLink state(@javax.annotation.Nullable AppLinkState state) { + this.state = state; + return this; + } + + /** + * Get state + * @return state + */ + @javax.annotation.Nullable + public AppLinkState getState() { + return state; + } + + public void setState(@javax.annotation.Nullable AppLinkState state) { + this.state = state; + } + + + public AppLink router(@javax.annotation.Nonnull AppLinkCloudRouter router) { + this.router = router; + return this; + } + + /** + * Get router + * @return router + */ + @javax.annotation.Nonnull + public AppLinkCloudRouter getRouter() { + return router; + } + + public void setRouter(@javax.annotation.Nonnull AppLinkCloudRouter router) { + this.router = router; + } + + + public AppLink ipv4Address(@javax.annotation.Nullable String ipv4Address) { + this.ipv4Address = ipv4Address; + return this; + } + + /** + * App Link IP address + * @return ipv4Address + */ + @javax.annotation.Nullable + public String getIpv4Address() { + return ipv4Address; + } + + public void setIpv4Address(@javax.annotation.Nullable String ipv4Address) { + this.ipv4Address = ipv4Address; + } + + + public AppLink bandwidth(@javax.annotation.Nonnull Integer bandwidth) { + this.bandwidth = bandwidth; + return this; + } + + /** + * App Link aggregated data transfer capacity in Mbps + * @return bandwidth + */ + @javax.annotation.Nonnull + public Integer getBandwidth() { + return bandwidth; + } + + public void setBandwidth(@javax.annotation.Nonnull Integer bandwidth) { + this.bandwidth = bandwidth; + } + + + public AppLink project(@javax.annotation.Nonnull Project project) { + this.project = project; + return this; + } + + /** + * Get project + * @return project + */ + @javax.annotation.Nonnull + public Project getProject() { + return project; + } + + public void setProject(@javax.annotation.Nonnull Project project) { + this.project = project; + } + + + public AppLink changeLog(@javax.annotation.Nullable Changelog changeLog) { + this.changeLog = changeLog; + return this; + } + + /** + * Get changeLog + * @return changeLog + */ + @javax.annotation.Nullable + public Changelog getChangeLog() { + return changeLog; + } + + public void setChangeLog(@javax.annotation.Nullable Changelog changeLog) { + this.changeLog = changeLog; + } + + + public AppLink change(@javax.annotation.Nullable AppLinkChange change) { + this.change = change; + return this; + } + + /** + * Get change + * @return change + */ + @javax.annotation.Nullable + public AppLinkChange getChange() { + return change; + } + + public void setChange(@javax.annotation.Nullable AppLinkChange change) { + this.change = change; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AppLink instance itself + */ + public AppLink putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AppLink appLink = (AppLink) o; + return Objects.equals(this.href, appLink.href) && + Objects.equals(this.type, appLink.type) && + Objects.equals(this.uuid, appLink.uuid) && + Objects.equals(this.name, appLink.name) && + Objects.equals(this.description, appLink.description) && + Objects.equals(this.state, appLink.state) && + Objects.equals(this.router, appLink.router) && + Objects.equals(this.ipv4Address, appLink.ipv4Address) && + Objects.equals(this.bandwidth, appLink.bandwidth) && + Objects.equals(this.project, appLink.project) && + Objects.equals(this.changeLog, appLink.changeLog) && + Objects.equals(this.change, appLink.change)&& + Objects.equals(this.additionalProperties, appLink.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(href, type, uuid, name, description, state, router, ipv4Address, bandwidth, project, changeLog, change, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AppLink {\n"); + sb.append(" href: ").append(toIndentedString(href)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" state: ").append(toIndentedString(state)).append("\n"); + sb.append(" router: ").append(toIndentedString(router)).append("\n"); + sb.append(" ipv4Address: ").append(toIndentedString(ipv4Address)).append("\n"); + sb.append(" bandwidth: ").append(toIndentedString(bandwidth)).append("\n"); + sb.append(" project: ").append(toIndentedString(project)).append("\n"); + sb.append(" changeLog: ").append(toIndentedString(changeLog)).append("\n"); + sb.append(" change: ").append(toIndentedString(change)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("href", "type", "uuid", "name", "description", "state", "router", "ipv4Address", "bandwidth", "project", "changeLog", "change")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("type", "name", "router", "bandwidth", "project")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AppLink + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AppLink.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in AppLink is not found in the empty JSON string", AppLink.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : AppLink.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("href") != null && !jsonObj.get("href").isJsonNull()) && !jsonObj.get("href").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `href` to be a primitive type in the JSON string but got `%s`", jsonObj.get("href").toString())); + } + // validate the required field `type` + AppLinkType.validateJsonElement(jsonObj.get("type")); + if ((jsonObj.get("uuid") != null && !jsonObj.get("uuid").isJsonNull()) && !jsonObj.get("uuid").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `uuid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("uuid").toString())); + } + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + } + // validate the optional field `state` + if (jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) { + AppLinkState.validateJsonElement(jsonObj.get("state")); + } + // validate the required field `router` + AppLinkCloudRouter.validateJsonElement(jsonObj.get("router")); + if ((jsonObj.get("ipv4Address") != null && !jsonObj.get("ipv4Address").isJsonNull()) && !jsonObj.get("ipv4Address").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `ipv4Address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ipv4Address").toString())); + } + // validate the required field `project` + Project.validateJsonElement(jsonObj.get("project")); + // validate the optional field `changeLog` + if (jsonObj.get("changeLog") != null && !jsonObj.get("changeLog").isJsonNull()) { + Changelog.validateJsonElement(jsonObj.get("changeLog")); + } + // validate the optional field `change` + if (jsonObj.get("change") != null && !jsonObj.get("change").isJsonNull()) { + AppLinkChange.validateJsonElement(jsonObj.get("change")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AppLink.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AppLink' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AppLink.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AppLink value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AppLink read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + AppLink instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AppLink given an JSON string + * + * @param jsonString JSON string + * @return An instance of AppLink + * @throws IOException if the JSON string is invalid with respect to AppLink + */ + public static AppLink fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AppLink.class); + } + + /** + * Convert an instance of AppLink to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkAppDomainAttachment.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkAppDomainAttachment.java new file mode 100644 index 00000000..0cfd8854 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkAppDomainAttachment.java @@ -0,0 +1,445 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.AppDomainType; +import com.equinix.sdk.fabricv4.model.AppLinkAttachState; +import com.equinix.sdk.fabricv4.model.Changelog; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.net.URI; +import java.util.Arrays; +import java.util.UUID; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * App Link Attached App Domain object + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class AppLinkAppDomainAttachment { + public static final String SERIALIZED_NAME_HREF = "href"; + @SerializedName(SERIALIZED_NAME_HREF) + @javax.annotation.Nullable + private URI href; + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nullable + private AppDomainType type = AppDomainType.APP_DOMAIN; + + public static final String SERIALIZED_NAME_UUID = "uuid"; + @SerializedName(SERIALIZED_NAME_UUID) + @javax.annotation.Nonnull + private UUID uuid; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable + private String name; + + public static final String SERIALIZED_NAME_ATTACHMENT_STATUS = "attachmentStatus"; + @SerializedName(SERIALIZED_NAME_ATTACHMENT_STATUS) + @javax.annotation.Nullable + private AppLinkAttachState attachmentStatus; + + public static final String SERIALIZED_NAME_CHANGE_LOG = "changeLog"; + @SerializedName(SERIALIZED_NAME_CHANGE_LOG) + @javax.annotation.Nullable + private Changelog changeLog; + + public AppLinkAppDomainAttachment() { + } + + public AppLinkAppDomainAttachment( + URI href + ) { + this(); + this.href = href; + } + + /** + * Resource URI + * @return href + */ + @javax.annotation.Nullable + public URI getHref() { + return href; + } + + + + public AppLinkAppDomainAttachment type(@javax.annotation.Nullable AppDomainType type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + */ + @javax.annotation.Nullable + public AppDomainType getType() { + return type; + } + + public void setType(@javax.annotation.Nullable AppDomainType type) { + this.type = type; + } + + + public AppLinkAppDomainAttachment uuid(@javax.annotation.Nonnull UUID uuid) { + this.uuid = uuid; + return this; + } + + /** + * Equinix-assigned access point identifier + * @return uuid + */ + @javax.annotation.Nonnull + public UUID getUuid() { + return uuid; + } + + public void setUuid(@javax.annotation.Nonnull UUID uuid) { + this.uuid = uuid; + } + + + public AppLinkAppDomainAttachment name(@javax.annotation.Nullable String name) { + this.name = name; + return this; + } + + /** + * Customer-provided App Domain name + * @return name + */ + @javax.annotation.Nullable + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nullable String name) { + this.name = name; + } + + + public AppLinkAppDomainAttachment attachmentStatus(@javax.annotation.Nullable AppLinkAttachState attachmentStatus) { + this.attachmentStatus = attachmentStatus; + return this; + } + + /** + * Get attachmentStatus + * @return attachmentStatus + */ + @javax.annotation.Nullable + public AppLinkAttachState getAttachmentStatus() { + return attachmentStatus; + } + + public void setAttachmentStatus(@javax.annotation.Nullable AppLinkAttachState attachmentStatus) { + this.attachmentStatus = attachmentStatus; + } + + + public AppLinkAppDomainAttachment changeLog(@javax.annotation.Nullable Changelog changeLog) { + this.changeLog = changeLog; + return this; + } + + /** + * Get changeLog + * @return changeLog + */ + @javax.annotation.Nullable + public Changelog getChangeLog() { + return changeLog; + } + + public void setChangeLog(@javax.annotation.Nullable Changelog changeLog) { + this.changeLog = changeLog; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AppLinkAppDomainAttachment instance itself + */ + public AppLinkAppDomainAttachment putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AppLinkAppDomainAttachment appLinkAppDomainAttachment = (AppLinkAppDomainAttachment) o; + return Objects.equals(this.href, appLinkAppDomainAttachment.href) && + Objects.equals(this.type, appLinkAppDomainAttachment.type) && + Objects.equals(this.uuid, appLinkAppDomainAttachment.uuid) && + Objects.equals(this.name, appLinkAppDomainAttachment.name) && + Objects.equals(this.attachmentStatus, appLinkAppDomainAttachment.attachmentStatus) && + Objects.equals(this.changeLog, appLinkAppDomainAttachment.changeLog)&& + Objects.equals(this.additionalProperties, appLinkAppDomainAttachment.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(href, type, uuid, name, attachmentStatus, changeLog, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AppLinkAppDomainAttachment {\n"); + sb.append(" href: ").append(toIndentedString(href)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" attachmentStatus: ").append(toIndentedString(attachmentStatus)).append("\n"); + sb.append(" changeLog: ").append(toIndentedString(changeLog)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("href", "type", "uuid", "name", "attachmentStatus", "changeLog")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("uuid")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AppLinkAppDomainAttachment + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AppLinkAppDomainAttachment.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in AppLinkAppDomainAttachment is not found in the empty JSON string", AppLinkAppDomainAttachment.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : AppLinkAppDomainAttachment.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("href") != null && !jsonObj.get("href").isJsonNull()) && !jsonObj.get("href").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `href` to be a primitive type in the JSON string but got `%s`", jsonObj.get("href").toString())); + } + // validate the optional field `type` + if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { + AppDomainType.validateJsonElement(jsonObj.get("type")); + } + if (!jsonObj.get("uuid").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `uuid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("uuid").toString())); + } + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + // validate the optional field `attachmentStatus` + if (jsonObj.get("attachmentStatus") != null && !jsonObj.get("attachmentStatus").isJsonNull()) { + AppLinkAttachState.validateJsonElement(jsonObj.get("attachmentStatus")); + } + // validate the optional field `changeLog` + if (jsonObj.get("changeLog") != null && !jsonObj.get("changeLog").isJsonNull()) { + Changelog.validateJsonElement(jsonObj.get("changeLog")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AppLinkAppDomainAttachment.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AppLinkAppDomainAttachment' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AppLinkAppDomainAttachment.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AppLinkAppDomainAttachment value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AppLinkAppDomainAttachment read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + AppLinkAppDomainAttachment instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AppLinkAppDomainAttachment given an JSON string + * + * @param jsonString JSON string + * @return An instance of AppLinkAppDomainAttachment + * @throws IOException if the JSON string is invalid with respect to AppLinkAppDomainAttachment + */ + public static AppLinkAppDomainAttachment fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AppLinkAppDomainAttachment.class); + } + + /** + * Convert an instance of AppLinkAppDomainAttachment to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkAppServiceAttachment.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkAppServiceAttachment.java new file mode 100644 index 00000000..c74db48f --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkAppServiceAttachment.java @@ -0,0 +1,505 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.AppLinkAppServiceAttachmentChange; +import com.equinix.sdk.fabricv4.model.AppLinkAttachState; +import com.equinix.sdk.fabricv4.model.AppServiceType; +import com.equinix.sdk.fabricv4.model.Changelog; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.net.URI; +import java.util.Arrays; +import java.util.UUID; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * App Link Attached App Service object + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class AppLinkAppServiceAttachment { + public static final String SERIALIZED_NAME_HREF = "href"; + @SerializedName(SERIALIZED_NAME_HREF) + @javax.annotation.Nullable + private URI href; + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nullable + private AppServiceType type = AppServiceType.APP_SERVICE; + + public static final String SERIALIZED_NAME_UUID = "uuid"; + @SerializedName(SERIALIZED_NAME_UUID) + @javax.annotation.Nonnull + private UUID uuid; + + public static final String SERIALIZED_NAME_GEO_SCOPE = "geoScope"; + @SerializedName(SERIALIZED_NAME_GEO_SCOPE) + @javax.annotation.Nonnull + private String geoScope; + + public static final String SERIALIZED_NAME_DESTINATION_IP = "destinationIp"; + @SerializedName(SERIALIZED_NAME_DESTINATION_IP) + @javax.annotation.Nonnull + private String destinationIp; + + public static final String SERIALIZED_NAME_ATTACHMENT_STATUS = "attachmentStatus"; + @SerializedName(SERIALIZED_NAME_ATTACHMENT_STATUS) + @javax.annotation.Nullable + private AppLinkAttachState attachmentStatus; + + public static final String SERIALIZED_NAME_CHANGE_LOG = "changeLog"; + @SerializedName(SERIALIZED_NAME_CHANGE_LOG) + @javax.annotation.Nullable + private Changelog changeLog; + + public static final String SERIALIZED_NAME_CHANGE = "change"; + @SerializedName(SERIALIZED_NAME_CHANGE) + @javax.annotation.Nullable + private AppLinkAppServiceAttachmentChange change; + + public AppLinkAppServiceAttachment() { + } + + public AppLinkAppServiceAttachment( + URI href + ) { + this(); + this.href = href; + } + + /** + * Resource URI + * @return href + */ + @javax.annotation.Nullable + public URI getHref() { + return href; + } + + + + public AppLinkAppServiceAttachment type(@javax.annotation.Nullable AppServiceType type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + */ + @javax.annotation.Nullable + public AppServiceType getType() { + return type; + } + + public void setType(@javax.annotation.Nullable AppServiceType type) { + this.type = type; + } + + + public AppLinkAppServiceAttachment uuid(@javax.annotation.Nonnull UUID uuid) { + this.uuid = uuid; + return this; + } + + /** + * Equinix-assigned access point identifier + * @return uuid + */ + @javax.annotation.Nonnull + public UUID getUuid() { + return uuid; + } + + public void setUuid(@javax.annotation.Nonnull UUID uuid) { + this.uuid = uuid; + } + + + public AppLinkAppServiceAttachment geoScope(@javax.annotation.Nonnull String geoScope) { + this.geoScope = geoScope; + return this; + } + + /** + * Geo scope for the App Service + * @return geoScope + */ + @javax.annotation.Nonnull + public String getGeoScope() { + return geoScope; + } + + public void setGeoScope(@javax.annotation.Nonnull String geoScope) { + this.geoScope = geoScope; + } + + + public AppLinkAppServiceAttachment destinationIp(@javax.annotation.Nonnull String destinationIp) { + this.destinationIp = destinationIp; + return this; + } + + /** + * Target IP for forwarding API requests + * @return destinationIp + */ + @javax.annotation.Nonnull + public String getDestinationIp() { + return destinationIp; + } + + public void setDestinationIp(@javax.annotation.Nonnull String destinationIp) { + this.destinationIp = destinationIp; + } + + + public AppLinkAppServiceAttachment attachmentStatus(@javax.annotation.Nullable AppLinkAttachState attachmentStatus) { + this.attachmentStatus = attachmentStatus; + return this; + } + + /** + * Get attachmentStatus + * @return attachmentStatus + */ + @javax.annotation.Nullable + public AppLinkAttachState getAttachmentStatus() { + return attachmentStatus; + } + + public void setAttachmentStatus(@javax.annotation.Nullable AppLinkAttachState attachmentStatus) { + this.attachmentStatus = attachmentStatus; + } + + + public AppLinkAppServiceAttachment changeLog(@javax.annotation.Nullable Changelog changeLog) { + this.changeLog = changeLog; + return this; + } + + /** + * Get changeLog + * @return changeLog + */ + @javax.annotation.Nullable + public Changelog getChangeLog() { + return changeLog; + } + + public void setChangeLog(@javax.annotation.Nullable Changelog changeLog) { + this.changeLog = changeLog; + } + + + public AppLinkAppServiceAttachment change(@javax.annotation.Nullable AppLinkAppServiceAttachmentChange change) { + this.change = change; + return this; + } + + /** + * Get change + * @return change + */ + @javax.annotation.Nullable + public AppLinkAppServiceAttachmentChange getChange() { + return change; + } + + public void setChange(@javax.annotation.Nullable AppLinkAppServiceAttachmentChange change) { + this.change = change; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AppLinkAppServiceAttachment instance itself + */ + public AppLinkAppServiceAttachment putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AppLinkAppServiceAttachment appLinkAppServiceAttachment = (AppLinkAppServiceAttachment) o; + return Objects.equals(this.href, appLinkAppServiceAttachment.href) && + Objects.equals(this.type, appLinkAppServiceAttachment.type) && + Objects.equals(this.uuid, appLinkAppServiceAttachment.uuid) && + Objects.equals(this.geoScope, appLinkAppServiceAttachment.geoScope) && + Objects.equals(this.destinationIp, appLinkAppServiceAttachment.destinationIp) && + Objects.equals(this.attachmentStatus, appLinkAppServiceAttachment.attachmentStatus) && + Objects.equals(this.changeLog, appLinkAppServiceAttachment.changeLog) && + Objects.equals(this.change, appLinkAppServiceAttachment.change)&& + Objects.equals(this.additionalProperties, appLinkAppServiceAttachment.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(href, type, uuid, geoScope, destinationIp, attachmentStatus, changeLog, change, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AppLinkAppServiceAttachment {\n"); + sb.append(" href: ").append(toIndentedString(href)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); + sb.append(" geoScope: ").append(toIndentedString(geoScope)).append("\n"); + sb.append(" destinationIp: ").append(toIndentedString(destinationIp)).append("\n"); + sb.append(" attachmentStatus: ").append(toIndentedString(attachmentStatus)).append("\n"); + sb.append(" changeLog: ").append(toIndentedString(changeLog)).append("\n"); + sb.append(" change: ").append(toIndentedString(change)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("href", "type", "uuid", "geoScope", "destinationIp", "attachmentStatus", "changeLog", "change")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("uuid", "geoScope", "destinationIp")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AppLinkAppServiceAttachment + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AppLinkAppServiceAttachment.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in AppLinkAppServiceAttachment is not found in the empty JSON string", AppLinkAppServiceAttachment.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : AppLinkAppServiceAttachment.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("href") != null && !jsonObj.get("href").isJsonNull()) && !jsonObj.get("href").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `href` to be a primitive type in the JSON string but got `%s`", jsonObj.get("href").toString())); + } + // validate the optional field `type` + if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { + AppServiceType.validateJsonElement(jsonObj.get("type")); + } + if (!jsonObj.get("uuid").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `uuid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("uuid").toString())); + } + if (!jsonObj.get("geoScope").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `geoScope` to be a primitive type in the JSON string but got `%s`", jsonObj.get("geoScope").toString())); + } + if (!jsonObj.get("destinationIp").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `destinationIp` to be a primitive type in the JSON string but got `%s`", jsonObj.get("destinationIp").toString())); + } + // validate the optional field `attachmentStatus` + if (jsonObj.get("attachmentStatus") != null && !jsonObj.get("attachmentStatus").isJsonNull()) { + AppLinkAttachState.validateJsonElement(jsonObj.get("attachmentStatus")); + } + // validate the optional field `changeLog` + if (jsonObj.get("changeLog") != null && !jsonObj.get("changeLog").isJsonNull()) { + Changelog.validateJsonElement(jsonObj.get("changeLog")); + } + // validate the optional field `change` + if (jsonObj.get("change") != null && !jsonObj.get("change").isJsonNull()) { + AppLinkAppServiceAttachmentChange.validateJsonElement(jsonObj.get("change")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AppLinkAppServiceAttachment.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AppLinkAppServiceAttachment' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AppLinkAppServiceAttachment.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AppLinkAppServiceAttachment value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AppLinkAppServiceAttachment read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + AppLinkAppServiceAttachment instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AppLinkAppServiceAttachment given an JSON string + * + * @param jsonString JSON string + * @return An instance of AppLinkAppServiceAttachment + * @throws IOException if the JSON string is invalid with respect to AppLinkAppServiceAttachment + */ + public static AppLinkAppServiceAttachment fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AppLinkAppServiceAttachment.class); + } + + /** + * Convert an instance of AppLinkAppServiceAttachment to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkAppServiceAttachmentChange.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkAppServiceAttachmentChange.java new file mode 100644 index 00000000..90c9fe60 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkAppServiceAttachmentChange.java @@ -0,0 +1,565 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.AppLinkChangeOperation; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * Current state of latest AppLink change + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class AppLinkAppServiceAttachmentChange { + public static final String SERIALIZED_NAME_UUID = "uuid"; + @SerializedName(SERIALIZED_NAME_UUID) + @javax.annotation.Nullable + private String uuid; + + /** + * Type of change + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + APP_LINK_UPDATE("APP_LINK_UPDATE"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nonnull + private TypeEnum type; + + /** + * Current outcome of the change flow + */ + @JsonAdapter(StatusEnum.Adapter.class) + public enum StatusEnum { + COMPLETED("COMPLETED"), + + FAILED("FAILED"), + + REQUESTED("REQUESTED"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final StatusEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public StatusEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return StatusEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + StatusEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + @javax.annotation.Nullable + private StatusEnum status; + + public static final String SERIALIZED_NAME_CREATED_DATE_TIME = "createdDateTime"; + @SerializedName(SERIALIZED_NAME_CREATED_DATE_TIME) + @javax.annotation.Nullable + private OffsetDateTime createdDateTime; + + public static final String SERIALIZED_NAME_UPDATED_DATE_TIME = "updatedDateTime"; + @SerializedName(SERIALIZED_NAME_UPDATED_DATE_TIME) + @javax.annotation.Nonnull + private OffsetDateTime updatedDateTime; + + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + @javax.annotation.Nullable + private List data = new ArrayList<>(); + + public AppLinkAppServiceAttachmentChange() { + } + + public AppLinkAppServiceAttachmentChange uuid(@javax.annotation.Nullable String uuid) { + this.uuid = uuid; + return this; + } + + /** + * Uniquely identifies a change + * @return uuid + */ + @javax.annotation.Nullable + public String getUuid() { + return uuid; + } + + public void setUuid(@javax.annotation.Nullable String uuid) { + this.uuid = uuid; + } + + + public AppLinkAppServiceAttachmentChange type(@javax.annotation.Nonnull TypeEnum type) { + this.type = type; + return this; + } + + /** + * Type of change + * @return type + */ + @javax.annotation.Nonnull + public TypeEnum getType() { + return type; + } + + public void setType(@javax.annotation.Nonnull TypeEnum type) { + this.type = type; + } + + + public AppLinkAppServiceAttachmentChange status(@javax.annotation.Nullable StatusEnum status) { + this.status = status; + return this; + } + + /** + * Current outcome of the change flow + * @return status + */ + @javax.annotation.Nullable + public StatusEnum getStatus() { + return status; + } + + public void setStatus(@javax.annotation.Nullable StatusEnum status) { + this.status = status; + } + + + public AppLinkAppServiceAttachmentChange createdDateTime(@javax.annotation.Nullable OffsetDateTime createdDateTime) { + this.createdDateTime = createdDateTime; + return this; + } + + /** + * Set when change flow starts + * @return createdDateTime + */ + @javax.annotation.Nullable + public OffsetDateTime getCreatedDateTime() { + return createdDateTime; + } + + public void setCreatedDateTime(@javax.annotation.Nullable OffsetDateTime createdDateTime) { + this.createdDateTime = createdDateTime; + } + + + public AppLinkAppServiceAttachmentChange updatedDateTime(@javax.annotation.Nonnull OffsetDateTime updatedDateTime) { + this.updatedDateTime = updatedDateTime; + return this; + } + + /** + * Set when change object is updated + * @return updatedDateTime + */ + @javax.annotation.Nonnull + public OffsetDateTime getUpdatedDateTime() { + return updatedDateTime; + } + + public void setUpdatedDateTime(@javax.annotation.Nonnull OffsetDateTime updatedDateTime) { + this.updatedDateTime = updatedDateTime; + } + + + public AppLinkAppServiceAttachmentChange data(@javax.annotation.Nullable List data) { + this.data = data; + return this; + } + + public AppLinkAppServiceAttachmentChange addDataItem(AppLinkChangeOperation dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + return this; + } + + /** + * Get data + * @return data + */ + @javax.annotation.Nullable + public List getData() { + return data; + } + + public void setData(@javax.annotation.Nullable List data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AppLinkAppServiceAttachmentChange instance itself + */ + public AppLinkAppServiceAttachmentChange putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AppLinkAppServiceAttachmentChange appLinkAppServiceAttachmentChange = (AppLinkAppServiceAttachmentChange) o; + return Objects.equals(this.uuid, appLinkAppServiceAttachmentChange.uuid) && + Objects.equals(this.type, appLinkAppServiceAttachmentChange.type) && + Objects.equals(this.status, appLinkAppServiceAttachmentChange.status) && + Objects.equals(this.createdDateTime, appLinkAppServiceAttachmentChange.createdDateTime) && + Objects.equals(this.updatedDateTime, appLinkAppServiceAttachmentChange.updatedDateTime) && + Objects.equals(this.data, appLinkAppServiceAttachmentChange.data)&& + Objects.equals(this.additionalProperties, appLinkAppServiceAttachmentChange.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(uuid, type, status, createdDateTime, updatedDateTime, data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AppLinkAppServiceAttachmentChange {\n"); + sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" createdDateTime: ").append(toIndentedString(createdDateTime)).append("\n"); + sb.append(" updatedDateTime: ").append(toIndentedString(updatedDateTime)).append("\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("uuid", "type", "status", "createdDateTime", "updatedDateTime", "data")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("type", "updatedDateTime")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AppLinkAppServiceAttachmentChange + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AppLinkAppServiceAttachmentChange.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in AppLinkAppServiceAttachmentChange is not found in the empty JSON string", AppLinkAppServiceAttachmentChange.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : AppLinkAppServiceAttachmentChange.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("uuid") != null && !jsonObj.get("uuid").isJsonNull()) && !jsonObj.get("uuid").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `uuid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("uuid").toString())); + } + if (!jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // validate the required field `type` + TypeEnum.validateJsonElement(jsonObj.get("type")); + if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); + } + // validate the optional field `status` + if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) { + StatusEnum.validateJsonElement(jsonObj.get("status")); + } + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); + if (jsonArraydata != null) { + // ensure the json data is an array + if (!jsonObj.get("data").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + } + + // validate the optional field `data` (array) + for (int i = 0; i < jsonArraydata.size(); i++) { + AppLinkChangeOperation.validateJsonElement(jsonArraydata.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AppLinkAppServiceAttachmentChange.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AppLinkAppServiceAttachmentChange' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AppLinkAppServiceAttachmentChange.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AppLinkAppServiceAttachmentChange value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AppLinkAppServiceAttachmentChange read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + AppLinkAppServiceAttachmentChange instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AppLinkAppServiceAttachmentChange given an JSON string + * + * @param jsonString JSON string + * @return An instance of AppLinkAppServiceAttachmentChange + * @throws IOException if the JSON string is invalid with respect to AppLinkAppServiceAttachmentChange + */ + public static AppLinkAppServiceAttachmentChange fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AppLinkAppServiceAttachmentChange.class); + } + + /** + * Convert an instance of AppLinkAppServiceAttachmentChange to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkAppServiceAttachmentChangeOperation.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkAppServiceAttachmentChangeOperation.java new file mode 100644 index 00000000..a7941a29 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkAppServiceAttachmentChangeOperation.java @@ -0,0 +1,456 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * App Link change operation data + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class AppLinkAppServiceAttachmentChangeOperation { + /** + * Handy shortcut for operation name + */ + @JsonAdapter(OpEnum.Adapter.class) + public enum OpEnum { + REPLACE("replace"), + + ADD("add"), + + REMOVE("remove"); + + private String value; + + OpEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static OpEnum fromValue(String value) { + for (OpEnum b : OpEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final OpEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public OpEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return OpEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + OpEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_OP = "op"; + @SerializedName(SERIALIZED_NAME_OP) + @javax.annotation.Nonnull + private OpEnum op; + + /** + * path inside document leading to updated parameter + */ + @JsonAdapter(PathEnum.Adapter.class) + public enum PathEnum { + _DESTINATIONIP("/destinationIp"); + + private String value; + + PathEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static PathEnum fromValue(String value) { + for (PathEnum b : PathEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final PathEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public PathEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return PathEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + PathEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_PATH = "path"; + @SerializedName(SERIALIZED_NAME_PATH) + @javax.annotation.Nonnull + private PathEnum path; + + public static final String SERIALIZED_NAME_VALUE = "value"; + @SerializedName(SERIALIZED_NAME_VALUE) + @javax.annotation.Nonnull + private Object value; + + public AppLinkAppServiceAttachmentChangeOperation() { + } + + public AppLinkAppServiceAttachmentChangeOperation op(@javax.annotation.Nonnull OpEnum op) { + this.op = op; + return this; + } + + /** + * Handy shortcut for operation name + * @return op + */ + @javax.annotation.Nonnull + public OpEnum getOp() { + return op; + } + + public void setOp(@javax.annotation.Nonnull OpEnum op) { + this.op = op; + } + + + public AppLinkAppServiceAttachmentChangeOperation path(@javax.annotation.Nonnull PathEnum path) { + this.path = path; + return this; + } + + /** + * path inside document leading to updated parameter + * @return path + */ + @javax.annotation.Nonnull + public PathEnum getPath() { + return path; + } + + public void setPath(@javax.annotation.Nonnull PathEnum path) { + this.path = path; + } + + + public AppLinkAppServiceAttachmentChangeOperation value(@javax.annotation.Nonnull Object value) { + this.value = value; + return this; + } + + /** + * new value for updated parameter + * @return value + */ + @javax.annotation.Nonnull + public Object getValue() { + return value; + } + + public void setValue(@javax.annotation.Nonnull Object value) { + this.value = value; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AppLinkAppServiceAttachmentChangeOperation instance itself + */ + public AppLinkAppServiceAttachmentChangeOperation putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AppLinkAppServiceAttachmentChangeOperation appLinkAppServiceAttachmentChangeOperation = (AppLinkAppServiceAttachmentChangeOperation) o; + return Objects.equals(this.op, appLinkAppServiceAttachmentChangeOperation.op) && + Objects.equals(this.path, appLinkAppServiceAttachmentChangeOperation.path) && + Objects.equals(this.value, appLinkAppServiceAttachmentChangeOperation.value)&& + Objects.equals(this.additionalProperties, appLinkAppServiceAttachmentChangeOperation.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(op, path, value, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AppLinkAppServiceAttachmentChangeOperation {\n"); + sb.append(" op: ").append(toIndentedString(op)).append("\n"); + sb.append(" path: ").append(toIndentedString(path)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("op", "path", "value")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("op", "path", "value")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AppLinkAppServiceAttachmentChangeOperation + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AppLinkAppServiceAttachmentChangeOperation.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in AppLinkAppServiceAttachmentChangeOperation is not found in the empty JSON string", AppLinkAppServiceAttachmentChangeOperation.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : AppLinkAppServiceAttachmentChangeOperation.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("op").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `op` to be a primitive type in the JSON string but got `%s`", jsonObj.get("op").toString())); + } + // validate the required field `op` + OpEnum.validateJsonElement(jsonObj.get("op")); + if (!jsonObj.get("path").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `path` to be a primitive type in the JSON string but got `%s`", jsonObj.get("path").toString())); + } + // validate the required field `path` + PathEnum.validateJsonElement(jsonObj.get("path")); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AppLinkAppServiceAttachmentChangeOperation.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AppLinkAppServiceAttachmentChangeOperation' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AppLinkAppServiceAttachmentChangeOperation.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AppLinkAppServiceAttachmentChangeOperation value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AppLinkAppServiceAttachmentChangeOperation read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + AppLinkAppServiceAttachmentChangeOperation instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AppLinkAppServiceAttachmentChangeOperation given an JSON string + * + * @param jsonString JSON string + * @return An instance of AppLinkAppServiceAttachmentChangeOperation + * @throws IOException if the JSON string is invalid with respect to AppLinkAppServiceAttachmentChangeOperation + */ + public static AppLinkAppServiceAttachmentChangeOperation fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AppLinkAppServiceAttachmentChangeOperation.class); + } + + /** + * Convert an instance of AppLinkAppServiceAttachmentChangeOperation to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkAttachDomainFilter.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkAttachDomainFilter.java new file mode 100644 index 00000000..3c55aa5b --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkAttachDomainFilter.java @@ -0,0 +1,269 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.AppLinkAttachDomainOrFilter; +import com.equinix.sdk.fabricv4.model.AppLinkAttachDomainSimpleExpression; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + + + +import java.io.IOException; +import java.lang.reflect.Type; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Locale; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.JsonPrimitive; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonSerializationContext; +import com.google.gson.JsonSerializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonArray; +import com.google.gson.JsonParseException; + +import com.equinix.sdk.fabricv4.JSON; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class AppLinkAttachDomainFilter extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(AppLinkAttachDomainFilter.class.getName()); + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AppLinkAttachDomainFilter.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AppLinkAttachDomainFilter' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter adapterAppLinkAttachDomainSimpleExpression = gson.getDelegateAdapter(this, TypeToken.get(AppLinkAttachDomainSimpleExpression.class)); + final TypeAdapter adapterAppLinkAttachDomainOrFilter = gson.getDelegateAdapter(this, TypeToken.get(AppLinkAttachDomainOrFilter.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AppLinkAttachDomainFilter value) throws IOException { + if (value == null || value.getActualInstance() == null) { + elementAdapter.write(out, null); + return; + } + + // check if the actual instance is of the type `AppLinkAttachDomainSimpleExpression` + if (value.getActualInstance() instanceof AppLinkAttachDomainSimpleExpression) { + JsonElement element = adapterAppLinkAttachDomainSimpleExpression.toJsonTree((AppLinkAttachDomainSimpleExpression)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + // check if the actual instance is of the type `AppLinkAttachDomainOrFilter` + if (value.getActualInstance() instanceof AppLinkAttachDomainOrFilter) { + JsonElement element = adapterAppLinkAttachDomainOrFilter.toJsonTree((AppLinkAttachDomainOrFilter)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + throw new IOException("Failed to serialize as the type doesn't match anyOf schemas: AppLinkAttachDomainOrFilter, AppLinkAttachDomainSimpleExpression"); + } + + @Override + public AppLinkAttachDomainFilter read(JsonReader in) throws IOException { + Object deserialized = null; + JsonElement jsonElement = elementAdapter.read(in); + + ArrayList errorMessages = new ArrayList<>(); + TypeAdapter actualAdapter = elementAdapter; + + // deserialize AppLinkAttachDomainSimpleExpression + try { + // validate the JSON object to see if any exception is thrown + AppLinkAttachDomainSimpleExpression.validateJsonElement(jsonElement); + actualAdapter = adapterAppLinkAttachDomainSimpleExpression; + AppLinkAttachDomainFilter ret = new AppLinkAttachDomainFilter(); + ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); + return ret; + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format(Locale.ROOT, "Deserialization for AppLinkAttachDomainSimpleExpression failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'AppLinkAttachDomainSimpleExpression'", e); + } + // deserialize AppLinkAttachDomainOrFilter + try { + // validate the JSON object to see if any exception is thrown + AppLinkAttachDomainOrFilter.validateJsonElement(jsonElement); + actualAdapter = adapterAppLinkAttachDomainOrFilter; + AppLinkAttachDomainFilter ret = new AppLinkAttachDomainFilter(); + ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); + return ret; + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format(Locale.ROOT, "Deserialization for AppLinkAttachDomainOrFilter failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'AppLinkAttachDomainOrFilter'", e); + } + + throw new IOException(String.format(Locale.ROOT, "Failed deserialization for AppLinkAttachDomainFilter: no class matches result, expected at least 1. Detailed failure message for anyOf schemas: %s. JSON: %s", errorMessages, jsonElement.toString())); + } + }.nullSafe(); + } + } + + // store a list of schema names defined in anyOf + public static final Map> schemas = new HashMap>(); + + public AppLinkAttachDomainFilter() { + super("anyOf", Boolean.FALSE); + } + + public AppLinkAttachDomainFilter(Object o) { + super("anyOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("AppLinkAttachDomainSimpleExpression", AppLinkAttachDomainSimpleExpression.class); + schemas.put("AppLinkAttachDomainOrFilter", AppLinkAttachDomainOrFilter.class); + } + + @Override + public Map> getSchemas() { + return AppLinkAttachDomainFilter.schemas; + } + + /** + * Set the instance that matches the anyOf child schema, check + * the instance parameter is valid against the anyOf child schemas: + * AppLinkAttachDomainOrFilter, AppLinkAttachDomainSimpleExpression + * + * It could be an instance of the 'anyOf' schemas. + */ + @Override + public void setActualInstance(Object instance) { + if (instance instanceof AppLinkAttachDomainSimpleExpression) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof AppLinkAttachDomainOrFilter) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException("Invalid instance type. Must be AppLinkAttachDomainOrFilter, AppLinkAttachDomainSimpleExpression"); + } + + /** + * Get the actual instance, which can be the following: + * AppLinkAttachDomainOrFilter, AppLinkAttachDomainSimpleExpression + * + * @return The actual instance (AppLinkAttachDomainOrFilter, AppLinkAttachDomainSimpleExpression) + */ + @SuppressWarnings("unchecked") + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `AppLinkAttachDomainSimpleExpression`. If the actual instance is not `AppLinkAttachDomainSimpleExpression`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `AppLinkAttachDomainSimpleExpression` + * @throws ClassCastException if the instance is not `AppLinkAttachDomainSimpleExpression` + */ + public AppLinkAttachDomainSimpleExpression getAppLinkAttachDomainSimpleExpression() throws ClassCastException { + return (AppLinkAttachDomainSimpleExpression)super.getActualInstance(); + } + + /** + * Get the actual instance of `AppLinkAttachDomainOrFilter`. If the actual instance is not `AppLinkAttachDomainOrFilter`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `AppLinkAttachDomainOrFilter` + * @throws ClassCastException if the instance is not `AppLinkAttachDomainOrFilter` + */ + public AppLinkAttachDomainOrFilter getAppLinkAttachDomainOrFilter() throws ClassCastException { + return (AppLinkAttachDomainOrFilter)super.getActualInstance(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AppLinkAttachDomainFilter + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + // validate anyOf schemas one by one + ArrayList errorMessages = new ArrayList<>(); + // validate the json string with AppLinkAttachDomainSimpleExpression + try { + AppLinkAttachDomainSimpleExpression.validateJsonElement(jsonElement); + return; + } catch (Exception e) { + errorMessages.add(String.format(Locale.ROOT, "Deserialization for AppLinkAttachDomainSimpleExpression failed with `%s`.", e.getMessage())); + // continue to the next one + } + // validate the json string with AppLinkAttachDomainOrFilter + try { + AppLinkAttachDomainOrFilter.validateJsonElement(jsonElement); + return; + } catch (Exception e) { + errorMessages.add(String.format(Locale.ROOT, "Deserialization for AppLinkAttachDomainOrFilter failed with `%s`.", e.getMessage())); + // continue to the next one + } + throw new IOException(String.format(Locale.ROOT, "The JSON string is invalid for AppLinkAttachDomainFilter with anyOf schemas: AppLinkAttachDomainOrFilter, AppLinkAttachDomainSimpleExpression. no class match the result, expected at least 1. Detailed failure message for anyOf schemas: %s. JSON: %s", errorMessages, jsonElement.toString())); + } + + /** + * Create an instance of AppLinkAttachDomainFilter given an JSON string + * + * @param jsonString JSON string + * @return An instance of AppLinkAttachDomainFilter + * @throws IOException if the JSON string is invalid with respect to AppLinkAttachDomainFilter + */ + public static AppLinkAttachDomainFilter fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AppLinkAttachDomainFilter.class); + } + + /** + * Convert an instance of AppLinkAttachDomainFilter to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkAttachDomainFilters.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkAttachDomainFilters.java new file mode 100644 index 00000000..aff50a29 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkAttachDomainFilters.java @@ -0,0 +1,308 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.AppLinkAttachDomainFilter; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * AppLinkAttachDomainFilters + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class AppLinkAttachDomainFilters { + public static final String SERIALIZED_NAME_AND = "and"; + @SerializedName(SERIALIZED_NAME_AND) + @javax.annotation.Nullable + private List and = new ArrayList<>(); + + public AppLinkAttachDomainFilters() { + } + + public AppLinkAttachDomainFilters and(@javax.annotation.Nullable List and) { + this.and = and; + return this; + } + + public AppLinkAttachDomainFilters addAndItem(AppLinkAttachDomainFilter andItem) { + if (this.and == null) { + this.and = new ArrayList<>(); + } + this.and.add(andItem); + return this; + } + + /** + * Get and + * @return and + */ + @javax.annotation.Nullable + public List getAnd() { + return and; + } + + public void setAnd(@javax.annotation.Nullable List and) { + this.and = and; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AppLinkAttachDomainFilters instance itself + */ + public AppLinkAttachDomainFilters putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AppLinkAttachDomainFilters appLinkAttachDomainFilters = (AppLinkAttachDomainFilters) o; + return Objects.equals(this.and, appLinkAttachDomainFilters.and)&& + Objects.equals(this.additionalProperties, appLinkAttachDomainFilters.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(and, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AppLinkAttachDomainFilters {\n"); + sb.append(" and: ").append(toIndentedString(and)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("and")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AppLinkAttachDomainFilters + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AppLinkAttachDomainFilters.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in AppLinkAttachDomainFilters is not found in the empty JSON string", AppLinkAttachDomainFilters.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("and") != null && !jsonObj.get("and").isJsonNull()) { + JsonArray jsonArrayand = jsonObj.getAsJsonArray("and"); + if (jsonArrayand != null) { + // ensure the json data is an array + if (!jsonObj.get("and").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `and` to be an array in the JSON string but got `%s`", jsonObj.get("and").toString())); + } + + // validate the optional field `and` (array) + for (int i = 0; i < jsonArrayand.size(); i++) { + AppLinkAttachDomainFilter.validateJsonElement(jsonArrayand.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AppLinkAttachDomainFilters.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AppLinkAttachDomainFilters' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AppLinkAttachDomainFilters.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AppLinkAttachDomainFilters value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AppLinkAttachDomainFilters read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + AppLinkAttachDomainFilters instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AppLinkAttachDomainFilters given an JSON string + * + * @param jsonString JSON string + * @return An instance of AppLinkAttachDomainFilters + * @throws IOException if the JSON string is invalid with respect to AppLinkAttachDomainFilters + */ + public static AppLinkAttachDomainFilters fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AppLinkAttachDomainFilters.class); + } + + /** + * Convert an instance of AppLinkAttachDomainFilters to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkAttachDomainOrFilter.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkAttachDomainOrFilter.java new file mode 100644 index 00000000..016e8262 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkAttachDomainOrFilter.java @@ -0,0 +1,308 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.AppLinkAttachDomainSimpleExpression; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * AppLinkAttachDomainOrFilter + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class AppLinkAttachDomainOrFilter { + public static final String SERIALIZED_NAME_OR = "or"; + @SerializedName(SERIALIZED_NAME_OR) + @javax.annotation.Nullable + private List or = new ArrayList<>(); + + public AppLinkAttachDomainOrFilter() { + } + + public AppLinkAttachDomainOrFilter or(@javax.annotation.Nullable List or) { + this.or = or; + return this; + } + + public AppLinkAttachDomainOrFilter addOrItem(AppLinkAttachDomainSimpleExpression orItem) { + if (this.or == null) { + this.or = new ArrayList<>(); + } + this.or.add(orItem); + return this; + } + + /** + * Get or + * @return or + */ + @javax.annotation.Nullable + public List getOr() { + return or; + } + + public void setOr(@javax.annotation.Nullable List or) { + this.or = or; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AppLinkAttachDomainOrFilter instance itself + */ + public AppLinkAttachDomainOrFilter putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AppLinkAttachDomainOrFilter appLinkAttachDomainOrFilter = (AppLinkAttachDomainOrFilter) o; + return Objects.equals(this.or, appLinkAttachDomainOrFilter.or)&& + Objects.equals(this.additionalProperties, appLinkAttachDomainOrFilter.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(or, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AppLinkAttachDomainOrFilter {\n"); + sb.append(" or: ").append(toIndentedString(or)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("or")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AppLinkAttachDomainOrFilter + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AppLinkAttachDomainOrFilter.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in AppLinkAttachDomainOrFilter is not found in the empty JSON string", AppLinkAttachDomainOrFilter.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("or") != null && !jsonObj.get("or").isJsonNull()) { + JsonArray jsonArrayor = jsonObj.getAsJsonArray("or"); + if (jsonArrayor != null) { + // ensure the json data is an array + if (!jsonObj.get("or").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `or` to be an array in the JSON string but got `%s`", jsonObj.get("or").toString())); + } + + // validate the optional field `or` (array) + for (int i = 0; i < jsonArrayor.size(); i++) { + AppLinkAttachDomainSimpleExpression.validateJsonElement(jsonArrayor.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AppLinkAttachDomainOrFilter.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AppLinkAttachDomainOrFilter' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AppLinkAttachDomainOrFilter.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AppLinkAttachDomainOrFilter value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AppLinkAttachDomainOrFilter read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + AppLinkAttachDomainOrFilter instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AppLinkAttachDomainOrFilter given an JSON string + * + * @param jsonString JSON string + * @return An instance of AppLinkAttachDomainOrFilter + * @throws IOException if the JSON string is invalid with respect to AppLinkAttachDomainOrFilter + */ + public static AppLinkAttachDomainOrFilter fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AppLinkAttachDomainOrFilter.class); + } + + /** + * Convert an instance of AppLinkAttachDomainOrFilter to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkAttachDomainSearchRequest.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkAttachDomainSearchRequest.java new file mode 100644 index 00000000..618d7918 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkAttachDomainSearchRequest.java @@ -0,0 +1,370 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.AppLinkAttachDomainFilters; +import com.equinix.sdk.fabricv4.model.AppLinkAttachDomainSortCriteria; +import com.equinix.sdk.fabricv4.model.PaginationRequest; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * Search requests containing criteria + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class AppLinkAttachDomainSearchRequest { + public static final String SERIALIZED_NAME_FILTER = "filter"; + @SerializedName(SERIALIZED_NAME_FILTER) + @javax.annotation.Nullable + private AppLinkAttachDomainFilters filter; + + public static final String SERIALIZED_NAME_PAGINATION = "pagination"; + @SerializedName(SERIALIZED_NAME_PAGINATION) + @javax.annotation.Nullable + private PaginationRequest pagination; + + public static final String SERIALIZED_NAME_SORT = "sort"; + @SerializedName(SERIALIZED_NAME_SORT) + @javax.annotation.Nullable + private List sort = new ArrayList<>(); + + public AppLinkAttachDomainSearchRequest() { + } + + public AppLinkAttachDomainSearchRequest filter(@javax.annotation.Nullable AppLinkAttachDomainFilters filter) { + this.filter = filter; + return this; + } + + /** + * Get filter + * @return filter + */ + @javax.annotation.Nullable + public AppLinkAttachDomainFilters getFilter() { + return filter; + } + + public void setFilter(@javax.annotation.Nullable AppLinkAttachDomainFilters filter) { + this.filter = filter; + } + + + public AppLinkAttachDomainSearchRequest pagination(@javax.annotation.Nullable PaginationRequest pagination) { + this.pagination = pagination; + return this; + } + + /** + * Get pagination + * @return pagination + */ + @javax.annotation.Nullable + public PaginationRequest getPagination() { + return pagination; + } + + public void setPagination(@javax.annotation.Nullable PaginationRequest pagination) { + this.pagination = pagination; + } + + + public AppLinkAttachDomainSearchRequest sort(@javax.annotation.Nullable List sort) { + this.sort = sort; + return this; + } + + public AppLinkAttachDomainSearchRequest addSortItem(AppLinkAttachDomainSortCriteria sortItem) { + if (this.sort == null) { + this.sort = new ArrayList<>(); + } + this.sort.add(sortItem); + return this; + } + + /** + * Get sort + * @return sort + */ + @javax.annotation.Nullable + public List getSort() { + return sort; + } + + public void setSort(@javax.annotation.Nullable List sort) { + this.sort = sort; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AppLinkAttachDomainSearchRequest instance itself + */ + public AppLinkAttachDomainSearchRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AppLinkAttachDomainSearchRequest appLinkAttachDomainSearchRequest = (AppLinkAttachDomainSearchRequest) o; + return Objects.equals(this.filter, appLinkAttachDomainSearchRequest.filter) && + Objects.equals(this.pagination, appLinkAttachDomainSearchRequest.pagination) && + Objects.equals(this.sort, appLinkAttachDomainSearchRequest.sort)&& + Objects.equals(this.additionalProperties, appLinkAttachDomainSearchRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(filter, pagination, sort, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AppLinkAttachDomainSearchRequest {\n"); + sb.append(" filter: ").append(toIndentedString(filter)).append("\n"); + sb.append(" pagination: ").append(toIndentedString(pagination)).append("\n"); + sb.append(" sort: ").append(toIndentedString(sort)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("filter", "pagination", "sort")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AppLinkAttachDomainSearchRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AppLinkAttachDomainSearchRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in AppLinkAttachDomainSearchRequest is not found in the empty JSON string", AppLinkAttachDomainSearchRequest.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `filter` + if (jsonObj.get("filter") != null && !jsonObj.get("filter").isJsonNull()) { + AppLinkAttachDomainFilters.validateJsonElement(jsonObj.get("filter")); + } + // validate the optional field `pagination` + if (jsonObj.get("pagination") != null && !jsonObj.get("pagination").isJsonNull()) { + PaginationRequest.validateJsonElement(jsonObj.get("pagination")); + } + if (jsonObj.get("sort") != null && !jsonObj.get("sort").isJsonNull()) { + JsonArray jsonArraysort = jsonObj.getAsJsonArray("sort"); + if (jsonArraysort != null) { + // ensure the json data is an array + if (!jsonObj.get("sort").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `sort` to be an array in the JSON string but got `%s`", jsonObj.get("sort").toString())); + } + + // validate the optional field `sort` (array) + for (int i = 0; i < jsonArraysort.size(); i++) { + AppLinkAttachDomainSortCriteria.validateJsonElement(jsonArraysort.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AppLinkAttachDomainSearchRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AppLinkAttachDomainSearchRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AppLinkAttachDomainSearchRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AppLinkAttachDomainSearchRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AppLinkAttachDomainSearchRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + AppLinkAttachDomainSearchRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AppLinkAttachDomainSearchRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of AppLinkAttachDomainSearchRequest + * @throws IOException if the JSON string is invalid with respect to AppLinkAttachDomainSearchRequest + */ + public static AppLinkAttachDomainSearchRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AppLinkAttachDomainSearchRequest.class); + } + + /** + * Convert an instance of AppLinkAttachDomainSearchRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkAttachDomainSearchResponse.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkAttachDomainSearchResponse.java new file mode 100644 index 00000000..45a7fac2 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkAttachDomainSearchResponse.java @@ -0,0 +1,339 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.AppLinkAppDomainAttachment; +import com.equinix.sdk.fabricv4.model.Pagination; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * AppLinkAttachDomainSearchResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class AppLinkAttachDomainSearchResponse { + public static final String SERIALIZED_NAME_PAGINATION = "pagination"; + @SerializedName(SERIALIZED_NAME_PAGINATION) + @javax.annotation.Nullable + private Pagination pagination; + + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + @javax.annotation.Nullable + private List data = new ArrayList<>(); + + public AppLinkAttachDomainSearchResponse() { + } + + public AppLinkAttachDomainSearchResponse pagination(@javax.annotation.Nullable Pagination pagination) { + this.pagination = pagination; + return this; + } + + /** + * Get pagination + * @return pagination + */ + @javax.annotation.Nullable + public Pagination getPagination() { + return pagination; + } + + public void setPagination(@javax.annotation.Nullable Pagination pagination) { + this.pagination = pagination; + } + + + public AppLinkAttachDomainSearchResponse data(@javax.annotation.Nullable List data) { + this.data = data; + return this; + } + + public AppLinkAttachDomainSearchResponse addDataItem(AppLinkAppDomainAttachment dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + return this; + } + + /** + * Data returned from the API call. + * @return data + */ + @javax.annotation.Nullable + public List getData() { + return data; + } + + public void setData(@javax.annotation.Nullable List data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AppLinkAttachDomainSearchResponse instance itself + */ + public AppLinkAttachDomainSearchResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AppLinkAttachDomainSearchResponse appLinkAttachDomainSearchResponse = (AppLinkAttachDomainSearchResponse) o; + return Objects.equals(this.pagination, appLinkAttachDomainSearchResponse.pagination) && + Objects.equals(this.data, appLinkAttachDomainSearchResponse.data)&& + Objects.equals(this.additionalProperties, appLinkAttachDomainSearchResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(pagination, data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AppLinkAttachDomainSearchResponse {\n"); + sb.append(" pagination: ").append(toIndentedString(pagination)).append("\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("pagination", "data")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AppLinkAttachDomainSearchResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AppLinkAttachDomainSearchResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in AppLinkAttachDomainSearchResponse is not found in the empty JSON string", AppLinkAttachDomainSearchResponse.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `pagination` + if (jsonObj.get("pagination") != null && !jsonObj.get("pagination").isJsonNull()) { + Pagination.validateJsonElement(jsonObj.get("pagination")); + } + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); + if (jsonArraydata != null) { + // ensure the json data is an array + if (!jsonObj.get("data").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + } + + // validate the optional field `data` (array) + for (int i = 0; i < jsonArraydata.size(); i++) { + AppLinkAppDomainAttachment.validateJsonElement(jsonArraydata.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AppLinkAttachDomainSearchResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AppLinkAttachDomainSearchResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AppLinkAttachDomainSearchResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AppLinkAttachDomainSearchResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AppLinkAttachDomainSearchResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + AppLinkAttachDomainSearchResponse instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AppLinkAttachDomainSearchResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of AppLinkAttachDomainSearchResponse + * @throws IOException if the JSON string is invalid with respect to AppLinkAttachDomainSearchResponse + */ + public static AppLinkAttachDomainSearchResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AppLinkAttachDomainSearchResponse.class); + } + + /** + * Convert an instance of AppLinkAttachDomainSearchResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkAttachDomainSimpleExpression.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkAttachDomainSimpleExpression.java new file mode 100644 index 00000000..7335b04b --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkAttachDomainSimpleExpression.java @@ -0,0 +1,355 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * AppLinkAttachDomainSimpleExpression + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class AppLinkAttachDomainSimpleExpression { + public static final String SERIALIZED_NAME_PROPERTY = "property"; + @SerializedName(SERIALIZED_NAME_PROPERTY) + @javax.annotation.Nullable + private String property; + + public static final String SERIALIZED_NAME_OPERATOR = "operator"; + @SerializedName(SERIALIZED_NAME_OPERATOR) + @javax.annotation.Nullable + private String operator; + + public static final String SERIALIZED_NAME_VALUES = "values"; + @SerializedName(SERIALIZED_NAME_VALUES) + @javax.annotation.Nullable + private List values = new ArrayList<>(); + + public AppLinkAttachDomainSimpleExpression() { + } + + public AppLinkAttachDomainSimpleExpression property(@javax.annotation.Nullable String property) { + this.property = property; + return this; + } + + /** + * Possible field names to use on filters: * `/uuid` - App Domain attach to App Link uuid * `/attachmentStatus` - App Domain attach to App Link status + * @return property + */ + @javax.annotation.Nullable + public String getProperty() { + return property; + } + + public void setProperty(@javax.annotation.Nullable String property) { + this.property = property; + } + + + public AppLinkAttachDomainSimpleExpression operator(@javax.annotation.Nullable String operator) { + this.operator = operator; + return this; + } + + /** + * Possible operators to use on filters: * `=` - equal * `!=` - not equal * `IN` - in * `NOT IN` - not in + * @return operator + */ + @javax.annotation.Nullable + public String getOperator() { + return operator; + } + + public void setOperator(@javax.annotation.Nullable String operator) { + this.operator = operator; + } + + + public AppLinkAttachDomainSimpleExpression values(@javax.annotation.Nullable List values) { + this.values = values; + return this; + } + + public AppLinkAttachDomainSimpleExpression addValuesItem(String valuesItem) { + if (this.values == null) { + this.values = new ArrayList<>(); + } + this.values.add(valuesItem); + return this; + } + + /** + * Get values + * @return values + */ + @javax.annotation.Nullable + public List getValues() { + return values; + } + + public void setValues(@javax.annotation.Nullable List values) { + this.values = values; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AppLinkAttachDomainSimpleExpression instance itself + */ + public AppLinkAttachDomainSimpleExpression putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AppLinkAttachDomainSimpleExpression appLinkAttachDomainSimpleExpression = (AppLinkAttachDomainSimpleExpression) o; + return Objects.equals(this.property, appLinkAttachDomainSimpleExpression.property) && + Objects.equals(this.operator, appLinkAttachDomainSimpleExpression.operator) && + Objects.equals(this.values, appLinkAttachDomainSimpleExpression.values)&& + Objects.equals(this.additionalProperties, appLinkAttachDomainSimpleExpression.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(property, operator, values, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AppLinkAttachDomainSimpleExpression {\n"); + sb.append(" property: ").append(toIndentedString(property)).append("\n"); + sb.append(" operator: ").append(toIndentedString(operator)).append("\n"); + sb.append(" values: ").append(toIndentedString(values)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("property", "operator", "values")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AppLinkAttachDomainSimpleExpression + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AppLinkAttachDomainSimpleExpression.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in AppLinkAttachDomainSimpleExpression is not found in the empty JSON string", AppLinkAttachDomainSimpleExpression.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("property") != null && !jsonObj.get("property").isJsonNull()) && !jsonObj.get("property").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `property` to be a primitive type in the JSON string but got `%s`", jsonObj.get("property").toString())); + } + if ((jsonObj.get("operator") != null && !jsonObj.get("operator").isJsonNull()) && !jsonObj.get("operator").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `operator` to be a primitive type in the JSON string but got `%s`", jsonObj.get("operator").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("values") != null && !jsonObj.get("values").isJsonNull() && !jsonObj.get("values").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `values` to be an array in the JSON string but got `%s`", jsonObj.get("values").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AppLinkAttachDomainSimpleExpression.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AppLinkAttachDomainSimpleExpression' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AppLinkAttachDomainSimpleExpression.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AppLinkAttachDomainSimpleExpression value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AppLinkAttachDomainSimpleExpression read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + AppLinkAttachDomainSimpleExpression instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AppLinkAttachDomainSimpleExpression given an JSON string + * + * @param jsonString JSON string + * @return An instance of AppLinkAttachDomainSimpleExpression + * @throws IOException if the JSON string is invalid with respect to AppLinkAttachDomainSimpleExpression + */ + public static AppLinkAttachDomainSimpleExpression fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AppLinkAttachDomainSimpleExpression.class); + } + + /** + * Convert an instance of AppLinkAttachDomainSimpleExpression to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkAttachDomainSortCriteria.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkAttachDomainSortCriteria.java new file mode 100644 index 00000000..8b505e65 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkAttachDomainSortCriteria.java @@ -0,0 +1,317 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.AppLinkAttachDomainSortDirection; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * AppLinkAttachDomainSortCriteria + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class AppLinkAttachDomainSortCriteria { + public static final String SERIALIZED_NAME_DIRECTION = "direction"; + @SerializedName(SERIALIZED_NAME_DIRECTION) + @javax.annotation.Nullable + private AppLinkAttachDomainSortDirection direction = AppLinkAttachDomainSortDirection.DESC; + + public static final String SERIALIZED_NAME_PROPERTY = "property"; + @SerializedName(SERIALIZED_NAME_PROPERTY) + @javax.annotation.Nullable + private String property = "/changeLog/updatedDateTime"; + + public AppLinkAttachDomainSortCriteria() { + } + + public AppLinkAttachDomainSortCriteria direction(@javax.annotation.Nullable AppLinkAttachDomainSortDirection direction) { + this.direction = direction; + return this; + } + + /** + * Get direction + * @return direction + */ + @javax.annotation.Nullable + public AppLinkAttachDomainSortDirection getDirection() { + return direction; + } + + public void setDirection(@javax.annotation.Nullable AppLinkAttachDomainSortDirection direction) { + this.direction = direction; + } + + + public AppLinkAttachDomainSortCriteria property(@javax.annotation.Nullable String property) { + this.property = property; + return this; + } + + /** + * Possible field names to use on '400_InvalidSorting': * `/uuid` - App Domain attach to App Link uuid * `/attachmentStatus` - App Domain attach to App Link status * `/changeLog/createdDateTime` - Date and time when change flow starts * `/changeLog/updatedDateTime` - Date and time when change object is updated + * @return property + */ + @javax.annotation.Nullable + public String getProperty() { + return property; + } + + public void setProperty(@javax.annotation.Nullable String property) { + this.property = property; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AppLinkAttachDomainSortCriteria instance itself + */ + public AppLinkAttachDomainSortCriteria putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AppLinkAttachDomainSortCriteria appLinkAttachDomainSortCriteria = (AppLinkAttachDomainSortCriteria) o; + return Objects.equals(this.direction, appLinkAttachDomainSortCriteria.direction) && + Objects.equals(this.property, appLinkAttachDomainSortCriteria.property)&& + Objects.equals(this.additionalProperties, appLinkAttachDomainSortCriteria.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(direction, property, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AppLinkAttachDomainSortCriteria {\n"); + sb.append(" direction: ").append(toIndentedString(direction)).append("\n"); + sb.append(" property: ").append(toIndentedString(property)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("direction", "property")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AppLinkAttachDomainSortCriteria + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AppLinkAttachDomainSortCriteria.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in AppLinkAttachDomainSortCriteria is not found in the empty JSON string", AppLinkAttachDomainSortCriteria.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `direction` + if (jsonObj.get("direction") != null && !jsonObj.get("direction").isJsonNull()) { + AppLinkAttachDomainSortDirection.validateJsonElement(jsonObj.get("direction")); + } + if ((jsonObj.get("property") != null && !jsonObj.get("property").isJsonNull()) && !jsonObj.get("property").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `property` to be a primitive type in the JSON string but got `%s`", jsonObj.get("property").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AppLinkAttachDomainSortCriteria.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AppLinkAttachDomainSortCriteria' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AppLinkAttachDomainSortCriteria.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AppLinkAttachDomainSortCriteria value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AppLinkAttachDomainSortCriteria read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + AppLinkAttachDomainSortCriteria instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AppLinkAttachDomainSortCriteria given an JSON string + * + * @param jsonString JSON string + * @return An instance of AppLinkAttachDomainSortCriteria + * @throws IOException if the JSON string is invalid with respect to AppLinkAttachDomainSortCriteria + */ + public static AppLinkAttachDomainSortCriteria fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AppLinkAttachDomainSortCriteria.class); + } + + /** + * Convert an instance of AppLinkAttachDomainSortCriteria to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkAttachDomainSortDirection.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkAttachDomainSortDirection.java new file mode 100644 index 00000000..5f29728c --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkAttachDomainSortDirection.java @@ -0,0 +1,78 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.google.gson.annotations.SerializedName; + +import java.io.IOException; +import java.util.Locale; +import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; + +/** + * Sorting direction + */ +@JsonAdapter(AppLinkAttachDomainSortDirection.Adapter.class) +public enum AppLinkAttachDomainSortDirection { + + DESC("DESC"), + + ASC("ASC"); + + private String value; + + AppLinkAttachDomainSortDirection(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static AppLinkAttachDomainSortDirection fromValue(String value) { + for (AppLinkAttachDomainSortDirection b : AppLinkAttachDomainSortDirection.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final AppLinkAttachDomainSortDirection enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public AppLinkAttachDomainSortDirection read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return AppLinkAttachDomainSortDirection.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + AppLinkAttachDomainSortDirection.fromValue(value); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkAttachServiceFilter.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkAttachServiceFilter.java new file mode 100644 index 00000000..26460af3 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkAttachServiceFilter.java @@ -0,0 +1,269 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.AppLinkAttachServiceOrFilter; +import com.equinix.sdk.fabricv4.model.AppLinkAttachServiceSimpleExpression; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + + + +import java.io.IOException; +import java.lang.reflect.Type; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Locale; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.JsonPrimitive; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonSerializationContext; +import com.google.gson.JsonSerializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonArray; +import com.google.gson.JsonParseException; + +import com.equinix.sdk.fabricv4.JSON; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class AppLinkAttachServiceFilter extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(AppLinkAttachServiceFilter.class.getName()); + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AppLinkAttachServiceFilter.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AppLinkAttachServiceFilter' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter adapterAppLinkAttachServiceSimpleExpression = gson.getDelegateAdapter(this, TypeToken.get(AppLinkAttachServiceSimpleExpression.class)); + final TypeAdapter adapterAppLinkAttachServiceOrFilter = gson.getDelegateAdapter(this, TypeToken.get(AppLinkAttachServiceOrFilter.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AppLinkAttachServiceFilter value) throws IOException { + if (value == null || value.getActualInstance() == null) { + elementAdapter.write(out, null); + return; + } + + // check if the actual instance is of the type `AppLinkAttachServiceSimpleExpression` + if (value.getActualInstance() instanceof AppLinkAttachServiceSimpleExpression) { + JsonElement element = adapterAppLinkAttachServiceSimpleExpression.toJsonTree((AppLinkAttachServiceSimpleExpression)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + // check if the actual instance is of the type `AppLinkAttachServiceOrFilter` + if (value.getActualInstance() instanceof AppLinkAttachServiceOrFilter) { + JsonElement element = adapterAppLinkAttachServiceOrFilter.toJsonTree((AppLinkAttachServiceOrFilter)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + throw new IOException("Failed to serialize as the type doesn't match anyOf schemas: AppLinkAttachServiceOrFilter, AppLinkAttachServiceSimpleExpression"); + } + + @Override + public AppLinkAttachServiceFilter read(JsonReader in) throws IOException { + Object deserialized = null; + JsonElement jsonElement = elementAdapter.read(in); + + ArrayList errorMessages = new ArrayList<>(); + TypeAdapter actualAdapter = elementAdapter; + + // deserialize AppLinkAttachServiceSimpleExpression + try { + // validate the JSON object to see if any exception is thrown + AppLinkAttachServiceSimpleExpression.validateJsonElement(jsonElement); + actualAdapter = adapterAppLinkAttachServiceSimpleExpression; + AppLinkAttachServiceFilter ret = new AppLinkAttachServiceFilter(); + ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); + return ret; + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format(Locale.ROOT, "Deserialization for AppLinkAttachServiceSimpleExpression failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'AppLinkAttachServiceSimpleExpression'", e); + } + // deserialize AppLinkAttachServiceOrFilter + try { + // validate the JSON object to see if any exception is thrown + AppLinkAttachServiceOrFilter.validateJsonElement(jsonElement); + actualAdapter = adapterAppLinkAttachServiceOrFilter; + AppLinkAttachServiceFilter ret = new AppLinkAttachServiceFilter(); + ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); + return ret; + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format(Locale.ROOT, "Deserialization for AppLinkAttachServiceOrFilter failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'AppLinkAttachServiceOrFilter'", e); + } + + throw new IOException(String.format(Locale.ROOT, "Failed deserialization for AppLinkAttachServiceFilter: no class matches result, expected at least 1. Detailed failure message for anyOf schemas: %s. JSON: %s", errorMessages, jsonElement.toString())); + } + }.nullSafe(); + } + } + + // store a list of schema names defined in anyOf + public static final Map> schemas = new HashMap>(); + + public AppLinkAttachServiceFilter() { + super("anyOf", Boolean.FALSE); + } + + public AppLinkAttachServiceFilter(Object o) { + super("anyOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("AppLinkAttachServiceSimpleExpression", AppLinkAttachServiceSimpleExpression.class); + schemas.put("AppLinkAttachServiceOrFilter", AppLinkAttachServiceOrFilter.class); + } + + @Override + public Map> getSchemas() { + return AppLinkAttachServiceFilter.schemas; + } + + /** + * Set the instance that matches the anyOf child schema, check + * the instance parameter is valid against the anyOf child schemas: + * AppLinkAttachServiceOrFilter, AppLinkAttachServiceSimpleExpression + * + * It could be an instance of the 'anyOf' schemas. + */ + @Override + public void setActualInstance(Object instance) { + if (instance instanceof AppLinkAttachServiceSimpleExpression) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof AppLinkAttachServiceOrFilter) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException("Invalid instance type. Must be AppLinkAttachServiceOrFilter, AppLinkAttachServiceSimpleExpression"); + } + + /** + * Get the actual instance, which can be the following: + * AppLinkAttachServiceOrFilter, AppLinkAttachServiceSimpleExpression + * + * @return The actual instance (AppLinkAttachServiceOrFilter, AppLinkAttachServiceSimpleExpression) + */ + @SuppressWarnings("unchecked") + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `AppLinkAttachServiceSimpleExpression`. If the actual instance is not `AppLinkAttachServiceSimpleExpression`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `AppLinkAttachServiceSimpleExpression` + * @throws ClassCastException if the instance is not `AppLinkAttachServiceSimpleExpression` + */ + public AppLinkAttachServiceSimpleExpression getAppLinkAttachServiceSimpleExpression() throws ClassCastException { + return (AppLinkAttachServiceSimpleExpression)super.getActualInstance(); + } + + /** + * Get the actual instance of `AppLinkAttachServiceOrFilter`. If the actual instance is not `AppLinkAttachServiceOrFilter`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `AppLinkAttachServiceOrFilter` + * @throws ClassCastException if the instance is not `AppLinkAttachServiceOrFilter` + */ + public AppLinkAttachServiceOrFilter getAppLinkAttachServiceOrFilter() throws ClassCastException { + return (AppLinkAttachServiceOrFilter)super.getActualInstance(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AppLinkAttachServiceFilter + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + // validate anyOf schemas one by one + ArrayList errorMessages = new ArrayList<>(); + // validate the json string with AppLinkAttachServiceSimpleExpression + try { + AppLinkAttachServiceSimpleExpression.validateJsonElement(jsonElement); + return; + } catch (Exception e) { + errorMessages.add(String.format(Locale.ROOT, "Deserialization for AppLinkAttachServiceSimpleExpression failed with `%s`.", e.getMessage())); + // continue to the next one + } + // validate the json string with AppLinkAttachServiceOrFilter + try { + AppLinkAttachServiceOrFilter.validateJsonElement(jsonElement); + return; + } catch (Exception e) { + errorMessages.add(String.format(Locale.ROOT, "Deserialization for AppLinkAttachServiceOrFilter failed with `%s`.", e.getMessage())); + // continue to the next one + } + throw new IOException(String.format(Locale.ROOT, "The JSON string is invalid for AppLinkAttachServiceFilter with anyOf schemas: AppLinkAttachServiceOrFilter, AppLinkAttachServiceSimpleExpression. no class match the result, expected at least 1. Detailed failure message for anyOf schemas: %s. JSON: %s", errorMessages, jsonElement.toString())); + } + + /** + * Create an instance of AppLinkAttachServiceFilter given an JSON string + * + * @param jsonString JSON string + * @return An instance of AppLinkAttachServiceFilter + * @throws IOException if the JSON string is invalid with respect to AppLinkAttachServiceFilter + */ + public static AppLinkAttachServiceFilter fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AppLinkAttachServiceFilter.class); + } + + /** + * Convert an instance of AppLinkAttachServiceFilter to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkAttachServiceFilters.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkAttachServiceFilters.java new file mode 100644 index 00000000..6e93059f --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkAttachServiceFilters.java @@ -0,0 +1,308 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.AppLinkAttachServiceFilter; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * AppLinkAttachServiceFilters + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class AppLinkAttachServiceFilters { + public static final String SERIALIZED_NAME_AND = "and"; + @SerializedName(SERIALIZED_NAME_AND) + @javax.annotation.Nullable + private List and = new ArrayList<>(); + + public AppLinkAttachServiceFilters() { + } + + public AppLinkAttachServiceFilters and(@javax.annotation.Nullable List and) { + this.and = and; + return this; + } + + public AppLinkAttachServiceFilters addAndItem(AppLinkAttachServiceFilter andItem) { + if (this.and == null) { + this.and = new ArrayList<>(); + } + this.and.add(andItem); + return this; + } + + /** + * Get and + * @return and + */ + @javax.annotation.Nullable + public List getAnd() { + return and; + } + + public void setAnd(@javax.annotation.Nullable List and) { + this.and = and; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AppLinkAttachServiceFilters instance itself + */ + public AppLinkAttachServiceFilters putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AppLinkAttachServiceFilters appLinkAttachServiceFilters = (AppLinkAttachServiceFilters) o; + return Objects.equals(this.and, appLinkAttachServiceFilters.and)&& + Objects.equals(this.additionalProperties, appLinkAttachServiceFilters.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(and, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AppLinkAttachServiceFilters {\n"); + sb.append(" and: ").append(toIndentedString(and)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("and")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AppLinkAttachServiceFilters + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AppLinkAttachServiceFilters.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in AppLinkAttachServiceFilters is not found in the empty JSON string", AppLinkAttachServiceFilters.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("and") != null && !jsonObj.get("and").isJsonNull()) { + JsonArray jsonArrayand = jsonObj.getAsJsonArray("and"); + if (jsonArrayand != null) { + // ensure the json data is an array + if (!jsonObj.get("and").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `and` to be an array in the JSON string but got `%s`", jsonObj.get("and").toString())); + } + + // validate the optional field `and` (array) + for (int i = 0; i < jsonArrayand.size(); i++) { + AppLinkAttachServiceFilter.validateJsonElement(jsonArrayand.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AppLinkAttachServiceFilters.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AppLinkAttachServiceFilters' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AppLinkAttachServiceFilters.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AppLinkAttachServiceFilters value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AppLinkAttachServiceFilters read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + AppLinkAttachServiceFilters instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AppLinkAttachServiceFilters given an JSON string + * + * @param jsonString JSON string + * @return An instance of AppLinkAttachServiceFilters + * @throws IOException if the JSON string is invalid with respect to AppLinkAttachServiceFilters + */ + public static AppLinkAttachServiceFilters fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AppLinkAttachServiceFilters.class); + } + + /** + * Convert an instance of AppLinkAttachServiceFilters to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkAttachServiceOrFilter.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkAttachServiceOrFilter.java new file mode 100644 index 00000000..8cf985cb --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkAttachServiceOrFilter.java @@ -0,0 +1,308 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.AppLinkAttachServiceSimpleExpression; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * AppLinkAttachServiceOrFilter + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class AppLinkAttachServiceOrFilter { + public static final String SERIALIZED_NAME_OR = "or"; + @SerializedName(SERIALIZED_NAME_OR) + @javax.annotation.Nullable + private List or = new ArrayList<>(); + + public AppLinkAttachServiceOrFilter() { + } + + public AppLinkAttachServiceOrFilter or(@javax.annotation.Nullable List or) { + this.or = or; + return this; + } + + public AppLinkAttachServiceOrFilter addOrItem(AppLinkAttachServiceSimpleExpression orItem) { + if (this.or == null) { + this.or = new ArrayList<>(); + } + this.or.add(orItem); + return this; + } + + /** + * Get or + * @return or + */ + @javax.annotation.Nullable + public List getOr() { + return or; + } + + public void setOr(@javax.annotation.Nullable List or) { + this.or = or; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AppLinkAttachServiceOrFilter instance itself + */ + public AppLinkAttachServiceOrFilter putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AppLinkAttachServiceOrFilter appLinkAttachServiceOrFilter = (AppLinkAttachServiceOrFilter) o; + return Objects.equals(this.or, appLinkAttachServiceOrFilter.or)&& + Objects.equals(this.additionalProperties, appLinkAttachServiceOrFilter.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(or, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AppLinkAttachServiceOrFilter {\n"); + sb.append(" or: ").append(toIndentedString(or)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("or")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AppLinkAttachServiceOrFilter + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AppLinkAttachServiceOrFilter.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in AppLinkAttachServiceOrFilter is not found in the empty JSON string", AppLinkAttachServiceOrFilter.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("or") != null && !jsonObj.get("or").isJsonNull()) { + JsonArray jsonArrayor = jsonObj.getAsJsonArray("or"); + if (jsonArrayor != null) { + // ensure the json data is an array + if (!jsonObj.get("or").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `or` to be an array in the JSON string but got `%s`", jsonObj.get("or").toString())); + } + + // validate the optional field `or` (array) + for (int i = 0; i < jsonArrayor.size(); i++) { + AppLinkAttachServiceSimpleExpression.validateJsonElement(jsonArrayor.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AppLinkAttachServiceOrFilter.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AppLinkAttachServiceOrFilter' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AppLinkAttachServiceOrFilter.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AppLinkAttachServiceOrFilter value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AppLinkAttachServiceOrFilter read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + AppLinkAttachServiceOrFilter instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AppLinkAttachServiceOrFilter given an JSON string + * + * @param jsonString JSON string + * @return An instance of AppLinkAttachServiceOrFilter + * @throws IOException if the JSON string is invalid with respect to AppLinkAttachServiceOrFilter + */ + public static AppLinkAttachServiceOrFilter fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AppLinkAttachServiceOrFilter.class); + } + + /** + * Convert an instance of AppLinkAttachServiceOrFilter to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkAttachServiceRequest.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkAttachServiceRequest.java new file mode 100644 index 00000000..407b76c6 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkAttachServiceRequest.java @@ -0,0 +1,322 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * Attach App Service to App Link + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class AppLinkAttachServiceRequest { + public static final String SERIALIZED_NAME_GEO_SCOPE = "geoScope"; + @SerializedName(SERIALIZED_NAME_GEO_SCOPE) + @javax.annotation.Nonnull + private String geoScope; + + public static final String SERIALIZED_NAME_DESTINATION_IP = "destinationIp"; + @SerializedName(SERIALIZED_NAME_DESTINATION_IP) + @javax.annotation.Nonnull + private String destinationIp; + + public AppLinkAttachServiceRequest() { + } + + public AppLinkAttachServiceRequest geoScope(@javax.annotation.Nonnull String geoScope) { + this.geoScope = geoScope; + return this; + } + + /** + * Geo scope for the App Service + * @return geoScope + */ + @javax.annotation.Nonnull + public String getGeoScope() { + return geoScope; + } + + public void setGeoScope(@javax.annotation.Nonnull String geoScope) { + this.geoScope = geoScope; + } + + + public AppLinkAttachServiceRequest destinationIp(@javax.annotation.Nonnull String destinationIp) { + this.destinationIp = destinationIp; + return this; + } + + /** + * Target IP for forwarding API requests + * @return destinationIp + */ + @javax.annotation.Nonnull + public String getDestinationIp() { + return destinationIp; + } + + public void setDestinationIp(@javax.annotation.Nonnull String destinationIp) { + this.destinationIp = destinationIp; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AppLinkAttachServiceRequest instance itself + */ + public AppLinkAttachServiceRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AppLinkAttachServiceRequest appLinkAttachServiceRequest = (AppLinkAttachServiceRequest) o; + return Objects.equals(this.geoScope, appLinkAttachServiceRequest.geoScope) && + Objects.equals(this.destinationIp, appLinkAttachServiceRequest.destinationIp)&& + Objects.equals(this.additionalProperties, appLinkAttachServiceRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(geoScope, destinationIp, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AppLinkAttachServiceRequest {\n"); + sb.append(" geoScope: ").append(toIndentedString(geoScope)).append("\n"); + sb.append(" destinationIp: ").append(toIndentedString(destinationIp)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("geoScope", "destinationIp")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("geoScope", "destinationIp")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AppLinkAttachServiceRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AppLinkAttachServiceRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in AppLinkAttachServiceRequest is not found in the empty JSON string", AppLinkAttachServiceRequest.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : AppLinkAttachServiceRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("geoScope").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `geoScope` to be a primitive type in the JSON string but got `%s`", jsonObj.get("geoScope").toString())); + } + if (!jsonObj.get("destinationIp").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `destinationIp` to be a primitive type in the JSON string but got `%s`", jsonObj.get("destinationIp").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AppLinkAttachServiceRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AppLinkAttachServiceRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AppLinkAttachServiceRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AppLinkAttachServiceRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AppLinkAttachServiceRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + AppLinkAttachServiceRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AppLinkAttachServiceRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of AppLinkAttachServiceRequest + * @throws IOException if the JSON string is invalid with respect to AppLinkAttachServiceRequest + */ + public static AppLinkAttachServiceRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AppLinkAttachServiceRequest.class); + } + + /** + * Convert an instance of AppLinkAttachServiceRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkAttachServiceSearchRequest.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkAttachServiceSearchRequest.java new file mode 100644 index 00000000..12e6d213 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkAttachServiceSearchRequest.java @@ -0,0 +1,370 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.AppLinkAttachServiceFilters; +import com.equinix.sdk.fabricv4.model.AppLinkAttachServiceSortCriteria; +import com.equinix.sdk.fabricv4.model.PaginationRequest; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * Search requests containing criteria + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class AppLinkAttachServiceSearchRequest { + public static final String SERIALIZED_NAME_FILTER = "filter"; + @SerializedName(SERIALIZED_NAME_FILTER) + @javax.annotation.Nullable + private AppLinkAttachServiceFilters filter; + + public static final String SERIALIZED_NAME_PAGINATION = "pagination"; + @SerializedName(SERIALIZED_NAME_PAGINATION) + @javax.annotation.Nullable + private PaginationRequest pagination; + + public static final String SERIALIZED_NAME_SORT = "sort"; + @SerializedName(SERIALIZED_NAME_SORT) + @javax.annotation.Nullable + private List sort = new ArrayList<>(); + + public AppLinkAttachServiceSearchRequest() { + } + + public AppLinkAttachServiceSearchRequest filter(@javax.annotation.Nullable AppLinkAttachServiceFilters filter) { + this.filter = filter; + return this; + } + + /** + * Get filter + * @return filter + */ + @javax.annotation.Nullable + public AppLinkAttachServiceFilters getFilter() { + return filter; + } + + public void setFilter(@javax.annotation.Nullable AppLinkAttachServiceFilters filter) { + this.filter = filter; + } + + + public AppLinkAttachServiceSearchRequest pagination(@javax.annotation.Nullable PaginationRequest pagination) { + this.pagination = pagination; + return this; + } + + /** + * Get pagination + * @return pagination + */ + @javax.annotation.Nullable + public PaginationRequest getPagination() { + return pagination; + } + + public void setPagination(@javax.annotation.Nullable PaginationRequest pagination) { + this.pagination = pagination; + } + + + public AppLinkAttachServiceSearchRequest sort(@javax.annotation.Nullable List sort) { + this.sort = sort; + return this; + } + + public AppLinkAttachServiceSearchRequest addSortItem(AppLinkAttachServiceSortCriteria sortItem) { + if (this.sort == null) { + this.sort = new ArrayList<>(); + } + this.sort.add(sortItem); + return this; + } + + /** + * Get sort + * @return sort + */ + @javax.annotation.Nullable + public List getSort() { + return sort; + } + + public void setSort(@javax.annotation.Nullable List sort) { + this.sort = sort; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AppLinkAttachServiceSearchRequest instance itself + */ + public AppLinkAttachServiceSearchRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AppLinkAttachServiceSearchRequest appLinkAttachServiceSearchRequest = (AppLinkAttachServiceSearchRequest) o; + return Objects.equals(this.filter, appLinkAttachServiceSearchRequest.filter) && + Objects.equals(this.pagination, appLinkAttachServiceSearchRequest.pagination) && + Objects.equals(this.sort, appLinkAttachServiceSearchRequest.sort)&& + Objects.equals(this.additionalProperties, appLinkAttachServiceSearchRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(filter, pagination, sort, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AppLinkAttachServiceSearchRequest {\n"); + sb.append(" filter: ").append(toIndentedString(filter)).append("\n"); + sb.append(" pagination: ").append(toIndentedString(pagination)).append("\n"); + sb.append(" sort: ").append(toIndentedString(sort)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("filter", "pagination", "sort")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AppLinkAttachServiceSearchRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AppLinkAttachServiceSearchRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in AppLinkAttachServiceSearchRequest is not found in the empty JSON string", AppLinkAttachServiceSearchRequest.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `filter` + if (jsonObj.get("filter") != null && !jsonObj.get("filter").isJsonNull()) { + AppLinkAttachServiceFilters.validateJsonElement(jsonObj.get("filter")); + } + // validate the optional field `pagination` + if (jsonObj.get("pagination") != null && !jsonObj.get("pagination").isJsonNull()) { + PaginationRequest.validateJsonElement(jsonObj.get("pagination")); + } + if (jsonObj.get("sort") != null && !jsonObj.get("sort").isJsonNull()) { + JsonArray jsonArraysort = jsonObj.getAsJsonArray("sort"); + if (jsonArraysort != null) { + // ensure the json data is an array + if (!jsonObj.get("sort").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `sort` to be an array in the JSON string but got `%s`", jsonObj.get("sort").toString())); + } + + // validate the optional field `sort` (array) + for (int i = 0; i < jsonArraysort.size(); i++) { + AppLinkAttachServiceSortCriteria.validateJsonElement(jsonArraysort.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AppLinkAttachServiceSearchRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AppLinkAttachServiceSearchRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AppLinkAttachServiceSearchRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AppLinkAttachServiceSearchRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AppLinkAttachServiceSearchRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + AppLinkAttachServiceSearchRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AppLinkAttachServiceSearchRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of AppLinkAttachServiceSearchRequest + * @throws IOException if the JSON string is invalid with respect to AppLinkAttachServiceSearchRequest + */ + public static AppLinkAttachServiceSearchRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AppLinkAttachServiceSearchRequest.class); + } + + /** + * Convert an instance of AppLinkAttachServiceSearchRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkAttachServiceSearchResponse.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkAttachServiceSearchResponse.java new file mode 100644 index 00000000..2ad471e1 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkAttachServiceSearchResponse.java @@ -0,0 +1,339 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.AppLinkAppServiceAttachment; +import com.equinix.sdk.fabricv4.model.Pagination; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * AppLinkAttachServiceSearchResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class AppLinkAttachServiceSearchResponse { + public static final String SERIALIZED_NAME_PAGINATION = "pagination"; + @SerializedName(SERIALIZED_NAME_PAGINATION) + @javax.annotation.Nullable + private Pagination pagination; + + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + @javax.annotation.Nullable + private List data = new ArrayList<>(); + + public AppLinkAttachServiceSearchResponse() { + } + + public AppLinkAttachServiceSearchResponse pagination(@javax.annotation.Nullable Pagination pagination) { + this.pagination = pagination; + return this; + } + + /** + * Get pagination + * @return pagination + */ + @javax.annotation.Nullable + public Pagination getPagination() { + return pagination; + } + + public void setPagination(@javax.annotation.Nullable Pagination pagination) { + this.pagination = pagination; + } + + + public AppLinkAttachServiceSearchResponse data(@javax.annotation.Nullable List data) { + this.data = data; + return this; + } + + public AppLinkAttachServiceSearchResponse addDataItem(AppLinkAppServiceAttachment dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + return this; + } + + /** + * Data returned from the API call. + * @return data + */ + @javax.annotation.Nullable + public List getData() { + return data; + } + + public void setData(@javax.annotation.Nullable List data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AppLinkAttachServiceSearchResponse instance itself + */ + public AppLinkAttachServiceSearchResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AppLinkAttachServiceSearchResponse appLinkAttachServiceSearchResponse = (AppLinkAttachServiceSearchResponse) o; + return Objects.equals(this.pagination, appLinkAttachServiceSearchResponse.pagination) && + Objects.equals(this.data, appLinkAttachServiceSearchResponse.data)&& + Objects.equals(this.additionalProperties, appLinkAttachServiceSearchResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(pagination, data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AppLinkAttachServiceSearchResponse {\n"); + sb.append(" pagination: ").append(toIndentedString(pagination)).append("\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("pagination", "data")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AppLinkAttachServiceSearchResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AppLinkAttachServiceSearchResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in AppLinkAttachServiceSearchResponse is not found in the empty JSON string", AppLinkAttachServiceSearchResponse.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `pagination` + if (jsonObj.get("pagination") != null && !jsonObj.get("pagination").isJsonNull()) { + Pagination.validateJsonElement(jsonObj.get("pagination")); + } + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); + if (jsonArraydata != null) { + // ensure the json data is an array + if (!jsonObj.get("data").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + } + + // validate the optional field `data` (array) + for (int i = 0; i < jsonArraydata.size(); i++) { + AppLinkAppServiceAttachment.validateJsonElement(jsonArraydata.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AppLinkAttachServiceSearchResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AppLinkAttachServiceSearchResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AppLinkAttachServiceSearchResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AppLinkAttachServiceSearchResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AppLinkAttachServiceSearchResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + AppLinkAttachServiceSearchResponse instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AppLinkAttachServiceSearchResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of AppLinkAttachServiceSearchResponse + * @throws IOException if the JSON string is invalid with respect to AppLinkAttachServiceSearchResponse + */ + public static AppLinkAttachServiceSearchResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AppLinkAttachServiceSearchResponse.class); + } + + /** + * Convert an instance of AppLinkAttachServiceSearchResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkAttachServiceSimpleExpression.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkAttachServiceSimpleExpression.java new file mode 100644 index 00000000..ed3e3e19 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkAttachServiceSimpleExpression.java @@ -0,0 +1,355 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * AppLinkAttachServiceSimpleExpression + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class AppLinkAttachServiceSimpleExpression { + public static final String SERIALIZED_NAME_PROPERTY = "property"; + @SerializedName(SERIALIZED_NAME_PROPERTY) + @javax.annotation.Nullable + private String property; + + public static final String SERIALIZED_NAME_OPERATOR = "operator"; + @SerializedName(SERIALIZED_NAME_OPERATOR) + @javax.annotation.Nullable + private String operator; + + public static final String SERIALIZED_NAME_VALUES = "values"; + @SerializedName(SERIALIZED_NAME_VALUES) + @javax.annotation.Nullable + private List values = new ArrayList<>(); + + public AppLinkAttachServiceSimpleExpression() { + } + + public AppLinkAttachServiceSimpleExpression property(@javax.annotation.Nullable String property) { + this.property = property; + return this; + } + + /** + * Possible field names to use on filters: * `/uuid` - App Service attach to App Link uuid * `/attachmentStatus` - App Service attach to App Link status + * @return property + */ + @javax.annotation.Nullable + public String getProperty() { + return property; + } + + public void setProperty(@javax.annotation.Nullable String property) { + this.property = property; + } + + + public AppLinkAttachServiceSimpleExpression operator(@javax.annotation.Nullable String operator) { + this.operator = operator; + return this; + } + + /** + * Possible operators to use on filters: * `=` - equal * `!=` - not equal * `IN` - in * `NOT IN` - not in + * @return operator + */ + @javax.annotation.Nullable + public String getOperator() { + return operator; + } + + public void setOperator(@javax.annotation.Nullable String operator) { + this.operator = operator; + } + + + public AppLinkAttachServiceSimpleExpression values(@javax.annotation.Nullable List values) { + this.values = values; + return this; + } + + public AppLinkAttachServiceSimpleExpression addValuesItem(String valuesItem) { + if (this.values == null) { + this.values = new ArrayList<>(); + } + this.values.add(valuesItem); + return this; + } + + /** + * Get values + * @return values + */ + @javax.annotation.Nullable + public List getValues() { + return values; + } + + public void setValues(@javax.annotation.Nullable List values) { + this.values = values; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AppLinkAttachServiceSimpleExpression instance itself + */ + public AppLinkAttachServiceSimpleExpression putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AppLinkAttachServiceSimpleExpression appLinkAttachServiceSimpleExpression = (AppLinkAttachServiceSimpleExpression) o; + return Objects.equals(this.property, appLinkAttachServiceSimpleExpression.property) && + Objects.equals(this.operator, appLinkAttachServiceSimpleExpression.operator) && + Objects.equals(this.values, appLinkAttachServiceSimpleExpression.values)&& + Objects.equals(this.additionalProperties, appLinkAttachServiceSimpleExpression.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(property, operator, values, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AppLinkAttachServiceSimpleExpression {\n"); + sb.append(" property: ").append(toIndentedString(property)).append("\n"); + sb.append(" operator: ").append(toIndentedString(operator)).append("\n"); + sb.append(" values: ").append(toIndentedString(values)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("property", "operator", "values")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AppLinkAttachServiceSimpleExpression + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AppLinkAttachServiceSimpleExpression.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in AppLinkAttachServiceSimpleExpression is not found in the empty JSON string", AppLinkAttachServiceSimpleExpression.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("property") != null && !jsonObj.get("property").isJsonNull()) && !jsonObj.get("property").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `property` to be a primitive type in the JSON string but got `%s`", jsonObj.get("property").toString())); + } + if ((jsonObj.get("operator") != null && !jsonObj.get("operator").isJsonNull()) && !jsonObj.get("operator").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `operator` to be a primitive type in the JSON string but got `%s`", jsonObj.get("operator").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("values") != null && !jsonObj.get("values").isJsonNull() && !jsonObj.get("values").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `values` to be an array in the JSON string but got `%s`", jsonObj.get("values").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AppLinkAttachServiceSimpleExpression.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AppLinkAttachServiceSimpleExpression' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AppLinkAttachServiceSimpleExpression.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AppLinkAttachServiceSimpleExpression value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AppLinkAttachServiceSimpleExpression read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + AppLinkAttachServiceSimpleExpression instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AppLinkAttachServiceSimpleExpression given an JSON string + * + * @param jsonString JSON string + * @return An instance of AppLinkAttachServiceSimpleExpression + * @throws IOException if the JSON string is invalid with respect to AppLinkAttachServiceSimpleExpression + */ + public static AppLinkAttachServiceSimpleExpression fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AppLinkAttachServiceSimpleExpression.class); + } + + /** + * Convert an instance of AppLinkAttachServiceSimpleExpression to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkAttachServiceSortCriteria.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkAttachServiceSortCriteria.java new file mode 100644 index 00000000..99d9b154 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkAttachServiceSortCriteria.java @@ -0,0 +1,317 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.AppLinkAttachServiceSortDirection; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * AppLinkAttachServiceSortCriteria + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class AppLinkAttachServiceSortCriteria { + public static final String SERIALIZED_NAME_DIRECTION = "direction"; + @SerializedName(SERIALIZED_NAME_DIRECTION) + @javax.annotation.Nullable + private AppLinkAttachServiceSortDirection direction = AppLinkAttachServiceSortDirection.DESC; + + public static final String SERIALIZED_NAME_PROPERTY = "property"; + @SerializedName(SERIALIZED_NAME_PROPERTY) + @javax.annotation.Nullable + private String property = "/changeLog/updatedDateTime"; + + public AppLinkAttachServiceSortCriteria() { + } + + public AppLinkAttachServiceSortCriteria direction(@javax.annotation.Nullable AppLinkAttachServiceSortDirection direction) { + this.direction = direction; + return this; + } + + /** + * Get direction + * @return direction + */ + @javax.annotation.Nullable + public AppLinkAttachServiceSortDirection getDirection() { + return direction; + } + + public void setDirection(@javax.annotation.Nullable AppLinkAttachServiceSortDirection direction) { + this.direction = direction; + } + + + public AppLinkAttachServiceSortCriteria property(@javax.annotation.Nullable String property) { + this.property = property; + return this; + } + + /** + * Possible field names to use on '400_InvalidSorting': * `/uuid` - App Service attach to App Link uuid * `/attachmentStatus` - App Service attach to App Link status * `/changeLog/createdDateTime` - Date and time when change flow starts * `/changeLog/updatedDateTime` - Date and time when change object is updated + * @return property + */ + @javax.annotation.Nullable + public String getProperty() { + return property; + } + + public void setProperty(@javax.annotation.Nullable String property) { + this.property = property; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AppLinkAttachServiceSortCriteria instance itself + */ + public AppLinkAttachServiceSortCriteria putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AppLinkAttachServiceSortCriteria appLinkAttachServiceSortCriteria = (AppLinkAttachServiceSortCriteria) o; + return Objects.equals(this.direction, appLinkAttachServiceSortCriteria.direction) && + Objects.equals(this.property, appLinkAttachServiceSortCriteria.property)&& + Objects.equals(this.additionalProperties, appLinkAttachServiceSortCriteria.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(direction, property, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AppLinkAttachServiceSortCriteria {\n"); + sb.append(" direction: ").append(toIndentedString(direction)).append("\n"); + sb.append(" property: ").append(toIndentedString(property)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("direction", "property")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AppLinkAttachServiceSortCriteria + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AppLinkAttachServiceSortCriteria.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in AppLinkAttachServiceSortCriteria is not found in the empty JSON string", AppLinkAttachServiceSortCriteria.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `direction` + if (jsonObj.get("direction") != null && !jsonObj.get("direction").isJsonNull()) { + AppLinkAttachServiceSortDirection.validateJsonElement(jsonObj.get("direction")); + } + if ((jsonObj.get("property") != null && !jsonObj.get("property").isJsonNull()) && !jsonObj.get("property").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `property` to be a primitive type in the JSON string but got `%s`", jsonObj.get("property").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AppLinkAttachServiceSortCriteria.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AppLinkAttachServiceSortCriteria' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AppLinkAttachServiceSortCriteria.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AppLinkAttachServiceSortCriteria value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AppLinkAttachServiceSortCriteria read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + AppLinkAttachServiceSortCriteria instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AppLinkAttachServiceSortCriteria given an JSON string + * + * @param jsonString JSON string + * @return An instance of AppLinkAttachServiceSortCriteria + * @throws IOException if the JSON string is invalid with respect to AppLinkAttachServiceSortCriteria + */ + public static AppLinkAttachServiceSortCriteria fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AppLinkAttachServiceSortCriteria.class); + } + + /** + * Convert an instance of AppLinkAttachServiceSortCriteria to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkAttachServiceSortDirection.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkAttachServiceSortDirection.java new file mode 100644 index 00000000..6e0a114e --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkAttachServiceSortDirection.java @@ -0,0 +1,78 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.google.gson.annotations.SerializedName; + +import java.io.IOException; +import java.util.Locale; +import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; + +/** + * Sorting direction + */ +@JsonAdapter(AppLinkAttachServiceSortDirection.Adapter.class) +public enum AppLinkAttachServiceSortDirection { + + DESC("DESC"), + + ASC("ASC"); + + private String value; + + AppLinkAttachServiceSortDirection(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static AppLinkAttachServiceSortDirection fromValue(String value) { + for (AppLinkAttachServiceSortDirection b : AppLinkAttachServiceSortDirection.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final AppLinkAttachServiceSortDirection enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public AppLinkAttachServiceSortDirection read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return AppLinkAttachServiceSortDirection.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + AppLinkAttachServiceSortDirection.fromValue(value); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkAttachState.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkAttachState.java new file mode 100644 index 00000000..690c7b5b --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkAttachState.java @@ -0,0 +1,84 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.google.gson.annotations.SerializedName; + +import java.io.IOException; +import java.util.Locale; +import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; + +/** + * App Link attachment lifecycle state + */ +@JsonAdapter(AppLinkAttachState.Adapter.class) +public enum AppLinkAttachState { + + ATTACHING("ATTACHING"), + + ATTACHED("ATTACHED"), + + DETACHING("DETACHING"), + + DETACHED("DETACHED"), + + FAILED("FAILED"); + + private String value; + + AppLinkAttachState(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static AppLinkAttachState fromValue(String value) { + for (AppLinkAttachState b : AppLinkAttachState.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final AppLinkAttachState enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public AppLinkAttachState read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return AppLinkAttachState.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + AppLinkAttachState.fromValue(value); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkAttachedAppDomain.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkAttachedAppDomain.java new file mode 100644 index 00000000..d030c2cd --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkAttachedAppDomain.java @@ -0,0 +1,503 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.AppDomainState; +import com.equinix.sdk.fabricv4.model.AppDomainType; +import com.equinix.sdk.fabricv4.model.AppLinkAttachState; +import com.equinix.sdk.fabricv4.model.Project; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.net.URI; +import java.util.Arrays; +import java.util.UUID; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * App Domain object associated with App Link + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class AppLinkAttachedAppDomain { + public static final String SERIALIZED_NAME_HREF = "href"; + @SerializedName(SERIALIZED_NAME_HREF) + @javax.annotation.Nullable + private URI href; + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nonnull + private AppDomainType type = AppDomainType.APP_DOMAIN; + + public static final String SERIALIZED_NAME_UUID = "uuid"; + @SerializedName(SERIALIZED_NAME_UUID) + @javax.annotation.Nonnull + private UUID uuid; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable + private String name; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable + private String description; + + public static final String SERIALIZED_NAME_STATE = "state"; + @SerializedName(SERIALIZED_NAME_STATE) + @javax.annotation.Nullable + private AppDomainState state; + + public static final String SERIALIZED_NAME_PROJECT = "project"; + @SerializedName(SERIALIZED_NAME_PROJECT) + @javax.annotation.Nullable + private Project project; + + public static final String SERIALIZED_NAME_ATTACHMENT_STATUS = "attachmentStatus"; + @SerializedName(SERIALIZED_NAME_ATTACHMENT_STATUS) + @javax.annotation.Nullable + private AppLinkAttachState attachmentStatus; + + public AppLinkAttachedAppDomain() { + } + + public AppLinkAttachedAppDomain( + URI href + ) { + this(); + this.href = href; + } + + /** + * Resource URI + * @return href + */ + @javax.annotation.Nullable + public URI getHref() { + return href; + } + + + + public AppLinkAttachedAppDomain type(@javax.annotation.Nonnull AppDomainType type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + */ + @javax.annotation.Nonnull + public AppDomainType getType() { + return type; + } + + public void setType(@javax.annotation.Nonnull AppDomainType type) { + this.type = type; + } + + + public AppLinkAttachedAppDomain uuid(@javax.annotation.Nonnull UUID uuid) { + this.uuid = uuid; + return this; + } + + /** + * Equinix-assigned access point identifier + * @return uuid + */ + @javax.annotation.Nonnull + public UUID getUuid() { + return uuid; + } + + public void setUuid(@javax.annotation.Nonnull UUID uuid) { + this.uuid = uuid; + } + + + public AppLinkAttachedAppDomain name(@javax.annotation.Nullable String name) { + this.name = name; + return this; + } + + /** + * Customer-provided App Domain name + * @return name + */ + @javax.annotation.Nullable + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nullable String name) { + this.name = name; + } + + + public AppLinkAttachedAppDomain description(@javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * Customer-provided App Domain description + * @return description + */ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + + + public AppLinkAttachedAppDomain state(@javax.annotation.Nullable AppDomainState state) { + this.state = state; + return this; + } + + /** + * Get state + * @return state + */ + @javax.annotation.Nullable + public AppDomainState getState() { + return state; + } + + public void setState(@javax.annotation.Nullable AppDomainState state) { + this.state = state; + } + + + public AppLinkAttachedAppDomain project(@javax.annotation.Nullable Project project) { + this.project = project; + return this; + } + + /** + * Get project + * @return project + */ + @javax.annotation.Nullable + public Project getProject() { + return project; + } + + public void setProject(@javax.annotation.Nullable Project project) { + this.project = project; + } + + + public AppLinkAttachedAppDomain attachmentStatus(@javax.annotation.Nullable AppLinkAttachState attachmentStatus) { + this.attachmentStatus = attachmentStatus; + return this; + } + + /** + * Get attachmentStatus + * @return attachmentStatus + */ + @javax.annotation.Nullable + public AppLinkAttachState getAttachmentStatus() { + return attachmentStatus; + } + + public void setAttachmentStatus(@javax.annotation.Nullable AppLinkAttachState attachmentStatus) { + this.attachmentStatus = attachmentStatus; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AppLinkAttachedAppDomain instance itself + */ + public AppLinkAttachedAppDomain putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AppLinkAttachedAppDomain appLinkAttachedAppDomain = (AppLinkAttachedAppDomain) o; + return Objects.equals(this.href, appLinkAttachedAppDomain.href) && + Objects.equals(this.type, appLinkAttachedAppDomain.type) && + Objects.equals(this.uuid, appLinkAttachedAppDomain.uuid) && + Objects.equals(this.name, appLinkAttachedAppDomain.name) && + Objects.equals(this.description, appLinkAttachedAppDomain.description) && + Objects.equals(this.state, appLinkAttachedAppDomain.state) && + Objects.equals(this.project, appLinkAttachedAppDomain.project) && + Objects.equals(this.attachmentStatus, appLinkAttachedAppDomain.attachmentStatus)&& + Objects.equals(this.additionalProperties, appLinkAttachedAppDomain.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(href, type, uuid, name, description, state, project, attachmentStatus, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AppLinkAttachedAppDomain {\n"); + sb.append(" href: ").append(toIndentedString(href)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" state: ").append(toIndentedString(state)).append("\n"); + sb.append(" project: ").append(toIndentedString(project)).append("\n"); + sb.append(" attachmentStatus: ").append(toIndentedString(attachmentStatus)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("href", "type", "uuid", "name", "description", "state", "project", "attachmentStatus")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("type", "uuid")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AppLinkAttachedAppDomain + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AppLinkAttachedAppDomain.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in AppLinkAttachedAppDomain is not found in the empty JSON string", AppLinkAttachedAppDomain.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : AppLinkAttachedAppDomain.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("href") != null && !jsonObj.get("href").isJsonNull()) && !jsonObj.get("href").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `href` to be a primitive type in the JSON string but got `%s`", jsonObj.get("href").toString())); + } + // validate the required field `type` + AppDomainType.validateJsonElement(jsonObj.get("type")); + if (!jsonObj.get("uuid").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `uuid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("uuid").toString())); + } + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + } + // validate the optional field `state` + if (jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) { + AppDomainState.validateJsonElement(jsonObj.get("state")); + } + // validate the optional field `project` + if (jsonObj.get("project") != null && !jsonObj.get("project").isJsonNull()) { + Project.validateJsonElement(jsonObj.get("project")); + } + // validate the optional field `attachmentStatus` + if (jsonObj.get("attachmentStatus") != null && !jsonObj.get("attachmentStatus").isJsonNull()) { + AppLinkAttachState.validateJsonElement(jsonObj.get("attachmentStatus")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AppLinkAttachedAppDomain.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AppLinkAttachedAppDomain' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AppLinkAttachedAppDomain.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AppLinkAttachedAppDomain value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AppLinkAttachedAppDomain read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + AppLinkAttachedAppDomain instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AppLinkAttachedAppDomain given an JSON string + * + * @param jsonString JSON string + * @return An instance of AppLinkAttachedAppDomain + * @throws IOException if the JSON string is invalid with respect to AppLinkAttachedAppDomain + */ + public static AppLinkAttachedAppDomain fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AppLinkAttachedAppDomain.class); + } + + /** + * Convert an instance of AppLinkAttachedAppDomain to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkAttachedAppDomains.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkAttachedAppDomains.java new file mode 100644 index 00000000..3c9a7868 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkAttachedAppDomains.java @@ -0,0 +1,339 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.AppLinkAttachedAppDomain; +import com.equinix.sdk.fabricv4.model.Pagination; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * AppLinkAttachedAppDomains + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class AppLinkAttachedAppDomains { + public static final String SERIALIZED_NAME_PAGINATION = "pagination"; + @SerializedName(SERIALIZED_NAME_PAGINATION) + @javax.annotation.Nullable + private Pagination pagination; + + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + @javax.annotation.Nullable + private List data = new ArrayList<>(); + + public AppLinkAttachedAppDomains() { + } + + public AppLinkAttachedAppDomains pagination(@javax.annotation.Nullable Pagination pagination) { + this.pagination = pagination; + return this; + } + + /** + * Get pagination + * @return pagination + */ + @javax.annotation.Nullable + public Pagination getPagination() { + return pagination; + } + + public void setPagination(@javax.annotation.Nullable Pagination pagination) { + this.pagination = pagination; + } + + + public AppLinkAttachedAppDomains data(@javax.annotation.Nullable List data) { + this.data = data; + return this; + } + + public AppLinkAttachedAppDomains addDataItem(AppLinkAttachedAppDomain dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + return this; + } + + /** + * Data returned from the API call. + * @return data + */ + @javax.annotation.Nullable + public List getData() { + return data; + } + + public void setData(@javax.annotation.Nullable List data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AppLinkAttachedAppDomains instance itself + */ + public AppLinkAttachedAppDomains putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AppLinkAttachedAppDomains appLinkAttachedAppDomains = (AppLinkAttachedAppDomains) o; + return Objects.equals(this.pagination, appLinkAttachedAppDomains.pagination) && + Objects.equals(this.data, appLinkAttachedAppDomains.data)&& + Objects.equals(this.additionalProperties, appLinkAttachedAppDomains.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(pagination, data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AppLinkAttachedAppDomains {\n"); + sb.append(" pagination: ").append(toIndentedString(pagination)).append("\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("pagination", "data")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AppLinkAttachedAppDomains + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AppLinkAttachedAppDomains.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in AppLinkAttachedAppDomains is not found in the empty JSON string", AppLinkAttachedAppDomains.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `pagination` + if (jsonObj.get("pagination") != null && !jsonObj.get("pagination").isJsonNull()) { + Pagination.validateJsonElement(jsonObj.get("pagination")); + } + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); + if (jsonArraydata != null) { + // ensure the json data is an array + if (!jsonObj.get("data").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + } + + // validate the optional field `data` (array) + for (int i = 0; i < jsonArraydata.size(); i++) { + AppLinkAttachedAppDomain.validateJsonElement(jsonArraydata.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AppLinkAttachedAppDomains.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AppLinkAttachedAppDomains' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AppLinkAttachedAppDomains.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AppLinkAttachedAppDomains value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AppLinkAttachedAppDomains read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + AppLinkAttachedAppDomains instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AppLinkAttachedAppDomains given an JSON string + * + * @param jsonString JSON string + * @return An instance of AppLinkAttachedAppDomains + * @throws IOException if the JSON string is invalid with respect to AppLinkAttachedAppDomains + */ + public static AppLinkAttachedAppDomains fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AppLinkAttachedAppDomains.class); + } + + /** + * Convert an instance of AppLinkAttachedAppDomains to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkAttachedAppService.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkAttachedAppService.java new file mode 100644 index 00000000..6aa47238 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkAttachedAppService.java @@ -0,0 +1,630 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.AppLinkAttachState; +import com.equinix.sdk.fabricv4.model.AppServiceState; +import com.equinix.sdk.fabricv4.model.AppServiceType; +import com.equinix.sdk.fabricv4.model.Project; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.net.URI; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * App Service object associated with App Link + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class AppLinkAttachedAppService { + public static final String SERIALIZED_NAME_HREF = "href"; + @SerializedName(SERIALIZED_NAME_HREF) + @javax.annotation.Nullable + private URI href; + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nonnull + private AppServiceType type = AppServiceType.APP_SERVICE; + + public static final String SERIALIZED_NAME_UUID = "uuid"; + @SerializedName(SERIALIZED_NAME_UUID) + @javax.annotation.Nonnull + private UUID uuid; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable + private String name; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable + private String description; + + public static final String SERIALIZED_NAME_STATE = "state"; + @SerializedName(SERIALIZED_NAME_STATE) + @javax.annotation.Nullable + private AppServiceState state; + + public static final String SERIALIZED_NAME_ENDPOINT = "endpoint"; + @SerializedName(SERIALIZED_NAME_ENDPOINT) + @javax.annotation.Nullable + private String endpoint; + + public static final String SERIALIZED_NAME_SOURCE_DOMAINS = "sourceDomains"; + @SerializedName(SERIALIZED_NAME_SOURCE_DOMAINS) + @javax.annotation.Nullable + private List sourceDomains = new ArrayList<>(); + + public static final String SERIALIZED_NAME_PROJECT = "project"; + @SerializedName(SERIALIZED_NAME_PROJECT) + @javax.annotation.Nullable + private Project project; + + public static final String SERIALIZED_NAME_GEO_SCOPE = "geoScope"; + @SerializedName(SERIALIZED_NAME_GEO_SCOPE) + @javax.annotation.Nonnull + private String geoScope; + + public static final String SERIALIZED_NAME_DESTINATION_IP = "destinationIp"; + @SerializedName(SERIALIZED_NAME_DESTINATION_IP) + @javax.annotation.Nonnull + private String destinationIp; + + public static final String SERIALIZED_NAME_ATTACHMENT_STATUS = "attachmentStatus"; + @SerializedName(SERIALIZED_NAME_ATTACHMENT_STATUS) + @javax.annotation.Nullable + private AppLinkAttachState attachmentStatus; + + public AppLinkAttachedAppService() { + } + + public AppLinkAttachedAppService( + URI href + ) { + this(); + this.href = href; + } + + /** + * Resource URI + * @return href + */ + @javax.annotation.Nullable + public URI getHref() { + return href; + } + + + + public AppLinkAttachedAppService type(@javax.annotation.Nonnull AppServiceType type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + */ + @javax.annotation.Nonnull + public AppServiceType getType() { + return type; + } + + public void setType(@javax.annotation.Nonnull AppServiceType type) { + this.type = type; + } + + + public AppLinkAttachedAppService uuid(@javax.annotation.Nonnull UUID uuid) { + this.uuid = uuid; + return this; + } + + /** + * Equinix-assigned access point identifier + * @return uuid + */ + @javax.annotation.Nonnull + public UUID getUuid() { + return uuid; + } + + public void setUuid(@javax.annotation.Nonnull UUID uuid) { + this.uuid = uuid; + } + + + public AppLinkAttachedAppService name(@javax.annotation.Nullable String name) { + this.name = name; + return this; + } + + /** + * Customer-provided App Service name + * @return name + */ + @javax.annotation.Nullable + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nullable String name) { + this.name = name; + } + + + public AppLinkAttachedAppService description(@javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * Customer-provided App Service description + * @return description + */ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + + + public AppLinkAttachedAppService state(@javax.annotation.Nullable AppServiceState state) { + this.state = state; + return this; + } + + /** + * Get state + * @return state + */ + @javax.annotation.Nullable + public AppServiceState getState() { + return state; + } + + public void setState(@javax.annotation.Nullable AppServiceState state) { + this.state = state; + } + + + public AppLinkAttachedAppService endpoint(@javax.annotation.Nullable String endpoint) { + this.endpoint = endpoint; + return this; + } + + /** + * Accessible endpoint through this service + * @return endpoint + */ + @javax.annotation.Nullable + public String getEndpoint() { + return endpoint; + } + + public void setEndpoint(@javax.annotation.Nullable String endpoint) { + this.endpoint = endpoint; + } + + + public AppLinkAttachedAppService sourceDomains(@javax.annotation.Nullable List sourceDomains) { + this.sourceDomains = sourceDomains; + return this; + } + + public AppLinkAttachedAppService addSourceDomainsItem(String sourceDomainsItem) { + if (this.sourceDomains == null) { + this.sourceDomains = new ArrayList<>(); + } + this.sourceDomains.add(sourceDomainsItem); + return this; + } + + /** + * List of source domains from where traffic is allowed + * @return sourceDomains + */ + @javax.annotation.Nullable + public List getSourceDomains() { + return sourceDomains; + } + + public void setSourceDomains(@javax.annotation.Nullable List sourceDomains) { + this.sourceDomains = sourceDomains; + } + + + public AppLinkAttachedAppService project(@javax.annotation.Nullable Project project) { + this.project = project; + return this; + } + + /** + * Get project + * @return project + */ + @javax.annotation.Nullable + public Project getProject() { + return project; + } + + public void setProject(@javax.annotation.Nullable Project project) { + this.project = project; + } + + + public AppLinkAttachedAppService geoScope(@javax.annotation.Nonnull String geoScope) { + this.geoScope = geoScope; + return this; + } + + /** + * Geo scope for the App Service + * @return geoScope + */ + @javax.annotation.Nonnull + public String getGeoScope() { + return geoScope; + } + + public void setGeoScope(@javax.annotation.Nonnull String geoScope) { + this.geoScope = geoScope; + } + + + public AppLinkAttachedAppService destinationIp(@javax.annotation.Nonnull String destinationIp) { + this.destinationIp = destinationIp; + return this; + } + + /** + * Target IP for forwarding API requests + * @return destinationIp + */ + @javax.annotation.Nonnull + public String getDestinationIp() { + return destinationIp; + } + + public void setDestinationIp(@javax.annotation.Nonnull String destinationIp) { + this.destinationIp = destinationIp; + } + + + public AppLinkAttachedAppService attachmentStatus(@javax.annotation.Nullable AppLinkAttachState attachmentStatus) { + this.attachmentStatus = attachmentStatus; + return this; + } + + /** + * Get attachmentStatus + * @return attachmentStatus + */ + @javax.annotation.Nullable + public AppLinkAttachState getAttachmentStatus() { + return attachmentStatus; + } + + public void setAttachmentStatus(@javax.annotation.Nullable AppLinkAttachState attachmentStatus) { + this.attachmentStatus = attachmentStatus; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AppLinkAttachedAppService instance itself + */ + public AppLinkAttachedAppService putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AppLinkAttachedAppService appLinkAttachedAppService = (AppLinkAttachedAppService) o; + return Objects.equals(this.href, appLinkAttachedAppService.href) && + Objects.equals(this.type, appLinkAttachedAppService.type) && + Objects.equals(this.uuid, appLinkAttachedAppService.uuid) && + Objects.equals(this.name, appLinkAttachedAppService.name) && + Objects.equals(this.description, appLinkAttachedAppService.description) && + Objects.equals(this.state, appLinkAttachedAppService.state) && + Objects.equals(this.endpoint, appLinkAttachedAppService.endpoint) && + Objects.equals(this.sourceDomains, appLinkAttachedAppService.sourceDomains) && + Objects.equals(this.project, appLinkAttachedAppService.project) && + Objects.equals(this.geoScope, appLinkAttachedAppService.geoScope) && + Objects.equals(this.destinationIp, appLinkAttachedAppService.destinationIp) && + Objects.equals(this.attachmentStatus, appLinkAttachedAppService.attachmentStatus)&& + Objects.equals(this.additionalProperties, appLinkAttachedAppService.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(href, type, uuid, name, description, state, endpoint, sourceDomains, project, geoScope, destinationIp, attachmentStatus, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AppLinkAttachedAppService {\n"); + sb.append(" href: ").append(toIndentedString(href)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" state: ").append(toIndentedString(state)).append("\n"); + sb.append(" endpoint: ").append(toIndentedString(endpoint)).append("\n"); + sb.append(" sourceDomains: ").append(toIndentedString(sourceDomains)).append("\n"); + sb.append(" project: ").append(toIndentedString(project)).append("\n"); + sb.append(" geoScope: ").append(toIndentedString(geoScope)).append("\n"); + sb.append(" destinationIp: ").append(toIndentedString(destinationIp)).append("\n"); + sb.append(" attachmentStatus: ").append(toIndentedString(attachmentStatus)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("href", "type", "uuid", "name", "description", "state", "endpoint", "sourceDomains", "project", "geoScope", "destinationIp", "attachmentStatus")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("type", "uuid", "geoScope", "destinationIp")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AppLinkAttachedAppService + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AppLinkAttachedAppService.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in AppLinkAttachedAppService is not found in the empty JSON string", AppLinkAttachedAppService.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : AppLinkAttachedAppService.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("href") != null && !jsonObj.get("href").isJsonNull()) && !jsonObj.get("href").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `href` to be a primitive type in the JSON string but got `%s`", jsonObj.get("href").toString())); + } + // validate the required field `type` + AppServiceType.validateJsonElement(jsonObj.get("type")); + if (!jsonObj.get("uuid").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `uuid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("uuid").toString())); + } + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + } + // validate the optional field `state` + if (jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) { + AppServiceState.validateJsonElement(jsonObj.get("state")); + } + if ((jsonObj.get("endpoint") != null && !jsonObj.get("endpoint").isJsonNull()) && !jsonObj.get("endpoint").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `endpoint` to be a primitive type in the JSON string but got `%s`", jsonObj.get("endpoint").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("sourceDomains") != null && !jsonObj.get("sourceDomains").isJsonNull() && !jsonObj.get("sourceDomains").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `sourceDomains` to be an array in the JSON string but got `%s`", jsonObj.get("sourceDomains").toString())); + } + // validate the optional field `project` + if (jsonObj.get("project") != null && !jsonObj.get("project").isJsonNull()) { + Project.validateJsonElement(jsonObj.get("project")); + } + if (!jsonObj.get("geoScope").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `geoScope` to be a primitive type in the JSON string but got `%s`", jsonObj.get("geoScope").toString())); + } + if (!jsonObj.get("destinationIp").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `destinationIp` to be a primitive type in the JSON string but got `%s`", jsonObj.get("destinationIp").toString())); + } + // validate the optional field `attachmentStatus` + if (jsonObj.get("attachmentStatus") != null && !jsonObj.get("attachmentStatus").isJsonNull()) { + AppLinkAttachState.validateJsonElement(jsonObj.get("attachmentStatus")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AppLinkAttachedAppService.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AppLinkAttachedAppService' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AppLinkAttachedAppService.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AppLinkAttachedAppService value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AppLinkAttachedAppService read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + AppLinkAttachedAppService instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AppLinkAttachedAppService given an JSON string + * + * @param jsonString JSON string + * @return An instance of AppLinkAttachedAppService + * @throws IOException if the JSON string is invalid with respect to AppLinkAttachedAppService + */ + public static AppLinkAttachedAppService fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AppLinkAttachedAppService.class); + } + + /** + * Convert an instance of AppLinkAttachedAppService to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkAttachedAppServices.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkAttachedAppServices.java new file mode 100644 index 00000000..3f154ae8 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkAttachedAppServices.java @@ -0,0 +1,339 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.AppLinkAttachedAppService; +import com.equinix.sdk.fabricv4.model.Pagination; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * AppLinkAttachedAppServices + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class AppLinkAttachedAppServices { + public static final String SERIALIZED_NAME_PAGINATION = "pagination"; + @SerializedName(SERIALIZED_NAME_PAGINATION) + @javax.annotation.Nullable + private Pagination pagination; + + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + @javax.annotation.Nullable + private List data = new ArrayList<>(); + + public AppLinkAttachedAppServices() { + } + + public AppLinkAttachedAppServices pagination(@javax.annotation.Nullable Pagination pagination) { + this.pagination = pagination; + return this; + } + + /** + * Get pagination + * @return pagination + */ + @javax.annotation.Nullable + public Pagination getPagination() { + return pagination; + } + + public void setPagination(@javax.annotation.Nullable Pagination pagination) { + this.pagination = pagination; + } + + + public AppLinkAttachedAppServices data(@javax.annotation.Nullable List data) { + this.data = data; + return this; + } + + public AppLinkAttachedAppServices addDataItem(AppLinkAttachedAppService dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + return this; + } + + /** + * Data returned from the API call. + * @return data + */ + @javax.annotation.Nullable + public List getData() { + return data; + } + + public void setData(@javax.annotation.Nullable List data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AppLinkAttachedAppServices instance itself + */ + public AppLinkAttachedAppServices putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AppLinkAttachedAppServices appLinkAttachedAppServices = (AppLinkAttachedAppServices) o; + return Objects.equals(this.pagination, appLinkAttachedAppServices.pagination) && + Objects.equals(this.data, appLinkAttachedAppServices.data)&& + Objects.equals(this.additionalProperties, appLinkAttachedAppServices.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(pagination, data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AppLinkAttachedAppServices {\n"); + sb.append(" pagination: ").append(toIndentedString(pagination)).append("\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("pagination", "data")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AppLinkAttachedAppServices + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AppLinkAttachedAppServices.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in AppLinkAttachedAppServices is not found in the empty JSON string", AppLinkAttachedAppServices.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `pagination` + if (jsonObj.get("pagination") != null && !jsonObj.get("pagination").isJsonNull()) { + Pagination.validateJsonElement(jsonObj.get("pagination")); + } + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); + if (jsonArraydata != null) { + // ensure the json data is an array + if (!jsonObj.get("data").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + } + + // validate the optional field `data` (array) + for (int i = 0; i < jsonArraydata.size(); i++) { + AppLinkAttachedAppService.validateJsonElement(jsonArraydata.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AppLinkAttachedAppServices.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AppLinkAttachedAppServices' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AppLinkAttachedAppServices.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AppLinkAttachedAppServices value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AppLinkAttachedAppServices read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + AppLinkAttachedAppServices instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AppLinkAttachedAppServices given an JSON string + * + * @param jsonString JSON string + * @return An instance of AppLinkAttachedAppServices + * @throws IOException if the JSON string is invalid with respect to AppLinkAttachedAppServices + */ + public static AppLinkAttachedAppServices fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AppLinkAttachedAppServices.class); + } + + /** + * Convert an instance of AppLinkAttachedAppServices to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkChange.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkChange.java new file mode 100644 index 00000000..f03ecfee --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkChange.java @@ -0,0 +1,565 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.AppLinkChangeOperation; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * Current state of latest AppLink change + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class AppLinkChange { + public static final String SERIALIZED_NAME_UUID = "uuid"; + @SerializedName(SERIALIZED_NAME_UUID) + @javax.annotation.Nullable + private String uuid; + + /** + * Type of change + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + APP_LINK_UPDATE("APP_LINK_UPDATE"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nonnull + private TypeEnum type; + + /** + * Current outcome of the change flow + */ + @JsonAdapter(StatusEnum.Adapter.class) + public enum StatusEnum { + COMPLETED("COMPLETED"), + + FAILED("FAILED"), + + REQUESTED("REQUESTED"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final StatusEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public StatusEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return StatusEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + StatusEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + @javax.annotation.Nullable + private StatusEnum status; + + public static final String SERIALIZED_NAME_CREATED_DATE_TIME = "createdDateTime"; + @SerializedName(SERIALIZED_NAME_CREATED_DATE_TIME) + @javax.annotation.Nullable + private OffsetDateTime createdDateTime; + + public static final String SERIALIZED_NAME_UPDATED_DATE_TIME = "updatedDateTime"; + @SerializedName(SERIALIZED_NAME_UPDATED_DATE_TIME) + @javax.annotation.Nonnull + private OffsetDateTime updatedDateTime; + + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + @javax.annotation.Nullable + private List data = new ArrayList<>(); + + public AppLinkChange() { + } + + public AppLinkChange uuid(@javax.annotation.Nullable String uuid) { + this.uuid = uuid; + return this; + } + + /** + * Uniquely identifies a change + * @return uuid + */ + @javax.annotation.Nullable + public String getUuid() { + return uuid; + } + + public void setUuid(@javax.annotation.Nullable String uuid) { + this.uuid = uuid; + } + + + public AppLinkChange type(@javax.annotation.Nonnull TypeEnum type) { + this.type = type; + return this; + } + + /** + * Type of change + * @return type + */ + @javax.annotation.Nonnull + public TypeEnum getType() { + return type; + } + + public void setType(@javax.annotation.Nonnull TypeEnum type) { + this.type = type; + } + + + public AppLinkChange status(@javax.annotation.Nullable StatusEnum status) { + this.status = status; + return this; + } + + /** + * Current outcome of the change flow + * @return status + */ + @javax.annotation.Nullable + public StatusEnum getStatus() { + return status; + } + + public void setStatus(@javax.annotation.Nullable StatusEnum status) { + this.status = status; + } + + + public AppLinkChange createdDateTime(@javax.annotation.Nullable OffsetDateTime createdDateTime) { + this.createdDateTime = createdDateTime; + return this; + } + + /** + * Set when change flow starts + * @return createdDateTime + */ + @javax.annotation.Nullable + public OffsetDateTime getCreatedDateTime() { + return createdDateTime; + } + + public void setCreatedDateTime(@javax.annotation.Nullable OffsetDateTime createdDateTime) { + this.createdDateTime = createdDateTime; + } + + + public AppLinkChange updatedDateTime(@javax.annotation.Nonnull OffsetDateTime updatedDateTime) { + this.updatedDateTime = updatedDateTime; + return this; + } + + /** + * Set when change object is updated + * @return updatedDateTime + */ + @javax.annotation.Nonnull + public OffsetDateTime getUpdatedDateTime() { + return updatedDateTime; + } + + public void setUpdatedDateTime(@javax.annotation.Nonnull OffsetDateTime updatedDateTime) { + this.updatedDateTime = updatedDateTime; + } + + + public AppLinkChange data(@javax.annotation.Nullable List data) { + this.data = data; + return this; + } + + public AppLinkChange addDataItem(AppLinkChangeOperation dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + return this; + } + + /** + * Get data + * @return data + */ + @javax.annotation.Nullable + public List getData() { + return data; + } + + public void setData(@javax.annotation.Nullable List data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AppLinkChange instance itself + */ + public AppLinkChange putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AppLinkChange appLinkChange = (AppLinkChange) o; + return Objects.equals(this.uuid, appLinkChange.uuid) && + Objects.equals(this.type, appLinkChange.type) && + Objects.equals(this.status, appLinkChange.status) && + Objects.equals(this.createdDateTime, appLinkChange.createdDateTime) && + Objects.equals(this.updatedDateTime, appLinkChange.updatedDateTime) && + Objects.equals(this.data, appLinkChange.data)&& + Objects.equals(this.additionalProperties, appLinkChange.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(uuid, type, status, createdDateTime, updatedDateTime, data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AppLinkChange {\n"); + sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" createdDateTime: ").append(toIndentedString(createdDateTime)).append("\n"); + sb.append(" updatedDateTime: ").append(toIndentedString(updatedDateTime)).append("\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("uuid", "type", "status", "createdDateTime", "updatedDateTime", "data")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("type", "updatedDateTime")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AppLinkChange + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AppLinkChange.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in AppLinkChange is not found in the empty JSON string", AppLinkChange.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : AppLinkChange.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("uuid") != null && !jsonObj.get("uuid").isJsonNull()) && !jsonObj.get("uuid").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `uuid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("uuid").toString())); + } + if (!jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // validate the required field `type` + TypeEnum.validateJsonElement(jsonObj.get("type")); + if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); + } + // validate the optional field `status` + if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) { + StatusEnum.validateJsonElement(jsonObj.get("status")); + } + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); + if (jsonArraydata != null) { + // ensure the json data is an array + if (!jsonObj.get("data").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + } + + // validate the optional field `data` (array) + for (int i = 0; i < jsonArraydata.size(); i++) { + AppLinkChangeOperation.validateJsonElement(jsonArraydata.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AppLinkChange.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AppLinkChange' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AppLinkChange.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AppLinkChange value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AppLinkChange read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + AppLinkChange instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AppLinkChange given an JSON string + * + * @param jsonString JSON string + * @return An instance of AppLinkChange + * @throws IOException if the JSON string is invalid with respect to AppLinkChange + */ + public static AppLinkChange fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AppLinkChange.class); + } + + /** + * Convert an instance of AppLinkChange to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkChangeOperation.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkChangeOperation.java new file mode 100644 index 00000000..7cfa60e5 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkChangeOperation.java @@ -0,0 +1,462 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * App Link change operation data + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class AppLinkChangeOperation { + /** + * Handy shortcut for operation name + */ + @JsonAdapter(OpEnum.Adapter.class) + public enum OpEnum { + REPLACE("replace"), + + ADD("add"), + + REMOVE("remove"); + + private String value; + + OpEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static OpEnum fromValue(String value) { + for (OpEnum b : OpEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final OpEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public OpEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return OpEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + OpEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_OP = "op"; + @SerializedName(SERIALIZED_NAME_OP) + @javax.annotation.Nonnull + private OpEnum op; + + /** + * path inside document leading to updated parameter + */ + @JsonAdapter(PathEnum.Adapter.class) + public enum PathEnum { + NAME("/name"), + + DESCRIPTION("/description"), + + BANDWIDTH("/bandwidth"), + + IPV4ADDRESS("/ipv4Address"); + + private String value; + + PathEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static PathEnum fromValue(String value) { + for (PathEnum b : PathEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final PathEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public PathEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return PathEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + PathEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_PATH = "path"; + @SerializedName(SERIALIZED_NAME_PATH) + @javax.annotation.Nonnull + private PathEnum path; + + public static final String SERIALIZED_NAME_VALUE = "value"; + @SerializedName(SERIALIZED_NAME_VALUE) + @javax.annotation.Nonnull + private Object value; + + public AppLinkChangeOperation() { + } + + public AppLinkChangeOperation op(@javax.annotation.Nonnull OpEnum op) { + this.op = op; + return this; + } + + /** + * Handy shortcut for operation name + * @return op + */ + @javax.annotation.Nonnull + public OpEnum getOp() { + return op; + } + + public void setOp(@javax.annotation.Nonnull OpEnum op) { + this.op = op; + } + + + public AppLinkChangeOperation path(@javax.annotation.Nonnull PathEnum path) { + this.path = path; + return this; + } + + /** + * path inside document leading to updated parameter + * @return path + */ + @javax.annotation.Nonnull + public PathEnum getPath() { + return path; + } + + public void setPath(@javax.annotation.Nonnull PathEnum path) { + this.path = path; + } + + + public AppLinkChangeOperation value(@javax.annotation.Nonnull Object value) { + this.value = value; + return this; + } + + /** + * new value for updated parameter + * @return value + */ + @javax.annotation.Nonnull + public Object getValue() { + return value; + } + + public void setValue(@javax.annotation.Nonnull Object value) { + this.value = value; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AppLinkChangeOperation instance itself + */ + public AppLinkChangeOperation putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AppLinkChangeOperation appLinkChangeOperation = (AppLinkChangeOperation) o; + return Objects.equals(this.op, appLinkChangeOperation.op) && + Objects.equals(this.path, appLinkChangeOperation.path) && + Objects.equals(this.value, appLinkChangeOperation.value)&& + Objects.equals(this.additionalProperties, appLinkChangeOperation.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(op, path, value, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AppLinkChangeOperation {\n"); + sb.append(" op: ").append(toIndentedString(op)).append("\n"); + sb.append(" path: ").append(toIndentedString(path)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("op", "path", "value")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("op", "path", "value")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AppLinkChangeOperation + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AppLinkChangeOperation.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in AppLinkChangeOperation is not found in the empty JSON string", AppLinkChangeOperation.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : AppLinkChangeOperation.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("op").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `op` to be a primitive type in the JSON string but got `%s`", jsonObj.get("op").toString())); + } + // validate the required field `op` + OpEnum.validateJsonElement(jsonObj.get("op")); + if (!jsonObj.get("path").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `path` to be a primitive type in the JSON string but got `%s`", jsonObj.get("path").toString())); + } + // validate the required field `path` + PathEnum.validateJsonElement(jsonObj.get("path")); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AppLinkChangeOperation.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AppLinkChangeOperation' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AppLinkChangeOperation.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AppLinkChangeOperation value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AppLinkChangeOperation read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + AppLinkChangeOperation instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AppLinkChangeOperation given an JSON string + * + * @param jsonString JSON string + * @return An instance of AppLinkChangeOperation + * @throws IOException if the JSON string is invalid with respect to AppLinkChangeOperation + */ + public static AppLinkChangeOperation fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AppLinkChangeOperation.class); + } + + /** + * Convert an instance of AppLinkChangeOperation to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkCloudRouter.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkCloudRouter.java new file mode 100644 index 00000000..8f009891 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkCloudRouter.java @@ -0,0 +1,400 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.net.URI; +import java.util.Arrays; +import java.util.UUID; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * App Link Cloud Router + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class AppLinkCloudRouter { + public static final String SERIALIZED_NAME_HREF = "href"; + @SerializedName(SERIALIZED_NAME_HREF) + @javax.annotation.Nullable + private URI href; + + /** + * Cloud Router Type + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + XF_ROUTER("XF_ROUTER"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nullable + private TypeEnum type; + + public static final String SERIALIZED_NAME_UUID = "uuid"; + @SerializedName(SERIALIZED_NAME_UUID) + @javax.annotation.Nullable + private UUID uuid; + + public AppLinkCloudRouter() { + } + + public AppLinkCloudRouter href(@javax.annotation.Nullable URI href) { + this.href = href; + return this; + } + + /** + * Resource URI + * @return href + */ + @javax.annotation.Nullable + public URI getHref() { + return href; + } + + public void setHref(@javax.annotation.Nullable URI href) { + this.href = href; + } + + + public AppLinkCloudRouter type(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + return this; + } + + /** + * Cloud Router Type + * @return type + */ + @javax.annotation.Nullable + public TypeEnum getType() { + return type; + } + + public void setType(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + } + + + public AppLinkCloudRouter uuid(@javax.annotation.Nullable UUID uuid) { + this.uuid = uuid; + return this; + } + + /** + * Cloud Router UUID + * @return uuid + */ + @javax.annotation.Nullable + public UUID getUuid() { + return uuid; + } + + public void setUuid(@javax.annotation.Nullable UUID uuid) { + this.uuid = uuid; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AppLinkCloudRouter instance itself + */ + public AppLinkCloudRouter putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AppLinkCloudRouter appLinkCloudRouter = (AppLinkCloudRouter) o; + return Objects.equals(this.href, appLinkCloudRouter.href) && + Objects.equals(this.type, appLinkCloudRouter.type) && + Objects.equals(this.uuid, appLinkCloudRouter.uuid)&& + Objects.equals(this.additionalProperties, appLinkCloudRouter.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(href, type, uuid, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AppLinkCloudRouter {\n"); + sb.append(" href: ").append(toIndentedString(href)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("href", "type", "uuid")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AppLinkCloudRouter + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AppLinkCloudRouter.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in AppLinkCloudRouter is not found in the empty JSON string", AppLinkCloudRouter.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("href") != null && !jsonObj.get("href").isJsonNull()) && !jsonObj.get("href").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `href` to be a primitive type in the JSON string but got `%s`", jsonObj.get("href").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // validate the optional field `type` + if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { + TypeEnum.validateJsonElement(jsonObj.get("type")); + } + if ((jsonObj.get("uuid") != null && !jsonObj.get("uuid").isJsonNull()) && !jsonObj.get("uuid").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `uuid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("uuid").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AppLinkCloudRouter.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AppLinkCloudRouter' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AppLinkCloudRouter.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AppLinkCloudRouter value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AppLinkCloudRouter read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + AppLinkCloudRouter instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AppLinkCloudRouter given an JSON string + * + * @param jsonString JSON string + * @return An instance of AppLinkCloudRouter + * @throws IOException if the JSON string is invalid with respect to AppLinkCloudRouter + */ + public static AppLinkCloudRouter fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AppLinkCloudRouter.class); + } + + /** + * Convert an instance of AppLinkCloudRouter to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkFilter.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkFilter.java new file mode 100644 index 00000000..38542092 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkFilter.java @@ -0,0 +1,269 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.AppLinkOrFilter; +import com.equinix.sdk.fabricv4.model.AppLinkSimpleExpression; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + + + +import java.io.IOException; +import java.lang.reflect.Type; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Locale; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.JsonPrimitive; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonSerializationContext; +import com.google.gson.JsonSerializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonArray; +import com.google.gson.JsonParseException; + +import com.equinix.sdk.fabricv4.JSON; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class AppLinkFilter extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(AppLinkFilter.class.getName()); + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AppLinkFilter.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AppLinkFilter' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter adapterAppLinkSimpleExpression = gson.getDelegateAdapter(this, TypeToken.get(AppLinkSimpleExpression.class)); + final TypeAdapter adapterAppLinkOrFilter = gson.getDelegateAdapter(this, TypeToken.get(AppLinkOrFilter.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AppLinkFilter value) throws IOException { + if (value == null || value.getActualInstance() == null) { + elementAdapter.write(out, null); + return; + } + + // check if the actual instance is of the type `AppLinkSimpleExpression` + if (value.getActualInstance() instanceof AppLinkSimpleExpression) { + JsonElement element = adapterAppLinkSimpleExpression.toJsonTree((AppLinkSimpleExpression)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + // check if the actual instance is of the type `AppLinkOrFilter` + if (value.getActualInstance() instanceof AppLinkOrFilter) { + JsonElement element = adapterAppLinkOrFilter.toJsonTree((AppLinkOrFilter)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + throw new IOException("Failed to serialize as the type doesn't match anyOf schemas: AppLinkOrFilter, AppLinkSimpleExpression"); + } + + @Override + public AppLinkFilter read(JsonReader in) throws IOException { + Object deserialized = null; + JsonElement jsonElement = elementAdapter.read(in); + + ArrayList errorMessages = new ArrayList<>(); + TypeAdapter actualAdapter = elementAdapter; + + // deserialize AppLinkSimpleExpression + try { + // validate the JSON object to see if any exception is thrown + AppLinkSimpleExpression.validateJsonElement(jsonElement); + actualAdapter = adapterAppLinkSimpleExpression; + AppLinkFilter ret = new AppLinkFilter(); + ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); + return ret; + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format(Locale.ROOT, "Deserialization for AppLinkSimpleExpression failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'AppLinkSimpleExpression'", e); + } + // deserialize AppLinkOrFilter + try { + // validate the JSON object to see if any exception is thrown + AppLinkOrFilter.validateJsonElement(jsonElement); + actualAdapter = adapterAppLinkOrFilter; + AppLinkFilter ret = new AppLinkFilter(); + ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); + return ret; + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format(Locale.ROOT, "Deserialization for AppLinkOrFilter failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'AppLinkOrFilter'", e); + } + + throw new IOException(String.format(Locale.ROOT, "Failed deserialization for AppLinkFilter: no class matches result, expected at least 1. Detailed failure message for anyOf schemas: %s. JSON: %s", errorMessages, jsonElement.toString())); + } + }.nullSafe(); + } + } + + // store a list of schema names defined in anyOf + public static final Map> schemas = new HashMap>(); + + public AppLinkFilter() { + super("anyOf", Boolean.FALSE); + } + + public AppLinkFilter(Object o) { + super("anyOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("AppLinkSimpleExpression", AppLinkSimpleExpression.class); + schemas.put("AppLinkOrFilter", AppLinkOrFilter.class); + } + + @Override + public Map> getSchemas() { + return AppLinkFilter.schemas; + } + + /** + * Set the instance that matches the anyOf child schema, check + * the instance parameter is valid against the anyOf child schemas: + * AppLinkOrFilter, AppLinkSimpleExpression + * + * It could be an instance of the 'anyOf' schemas. + */ + @Override + public void setActualInstance(Object instance) { + if (instance instanceof AppLinkSimpleExpression) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof AppLinkOrFilter) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException("Invalid instance type. Must be AppLinkOrFilter, AppLinkSimpleExpression"); + } + + /** + * Get the actual instance, which can be the following: + * AppLinkOrFilter, AppLinkSimpleExpression + * + * @return The actual instance (AppLinkOrFilter, AppLinkSimpleExpression) + */ + @SuppressWarnings("unchecked") + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `AppLinkSimpleExpression`. If the actual instance is not `AppLinkSimpleExpression`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `AppLinkSimpleExpression` + * @throws ClassCastException if the instance is not `AppLinkSimpleExpression` + */ + public AppLinkSimpleExpression getAppLinkSimpleExpression() throws ClassCastException { + return (AppLinkSimpleExpression)super.getActualInstance(); + } + + /** + * Get the actual instance of `AppLinkOrFilter`. If the actual instance is not `AppLinkOrFilter`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `AppLinkOrFilter` + * @throws ClassCastException if the instance is not `AppLinkOrFilter` + */ + public AppLinkOrFilter getAppLinkOrFilter() throws ClassCastException { + return (AppLinkOrFilter)super.getActualInstance(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AppLinkFilter + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + // validate anyOf schemas one by one + ArrayList errorMessages = new ArrayList<>(); + // validate the json string with AppLinkSimpleExpression + try { + AppLinkSimpleExpression.validateJsonElement(jsonElement); + return; + } catch (Exception e) { + errorMessages.add(String.format(Locale.ROOT, "Deserialization for AppLinkSimpleExpression failed with `%s`.", e.getMessage())); + // continue to the next one + } + // validate the json string with AppLinkOrFilter + try { + AppLinkOrFilter.validateJsonElement(jsonElement); + return; + } catch (Exception e) { + errorMessages.add(String.format(Locale.ROOT, "Deserialization for AppLinkOrFilter failed with `%s`.", e.getMessage())); + // continue to the next one + } + throw new IOException(String.format(Locale.ROOT, "The JSON string is invalid for AppLinkFilter with anyOf schemas: AppLinkOrFilter, AppLinkSimpleExpression. no class match the result, expected at least 1. Detailed failure message for anyOf schemas: %s. JSON: %s", errorMessages, jsonElement.toString())); + } + + /** + * Create an instance of AppLinkFilter given an JSON string + * + * @param jsonString JSON string + * @return An instance of AppLinkFilter + * @throws IOException if the JSON string is invalid with respect to AppLinkFilter + */ + public static AppLinkFilter fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AppLinkFilter.class); + } + + /** + * Convert an instance of AppLinkFilter to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkFilters.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkFilters.java new file mode 100644 index 00000000..8a13b9e9 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkFilters.java @@ -0,0 +1,308 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.AppLinkFilter; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * AppLinkFilters + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class AppLinkFilters { + public static final String SERIALIZED_NAME_AND = "and"; + @SerializedName(SERIALIZED_NAME_AND) + @javax.annotation.Nullable + private List and = new ArrayList<>(); + + public AppLinkFilters() { + } + + public AppLinkFilters and(@javax.annotation.Nullable List and) { + this.and = and; + return this; + } + + public AppLinkFilters addAndItem(AppLinkFilter andItem) { + if (this.and == null) { + this.and = new ArrayList<>(); + } + this.and.add(andItem); + return this; + } + + /** + * Get and + * @return and + */ + @javax.annotation.Nullable + public List getAnd() { + return and; + } + + public void setAnd(@javax.annotation.Nullable List and) { + this.and = and; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AppLinkFilters instance itself + */ + public AppLinkFilters putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AppLinkFilters appLinkFilters = (AppLinkFilters) o; + return Objects.equals(this.and, appLinkFilters.and)&& + Objects.equals(this.additionalProperties, appLinkFilters.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(and, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AppLinkFilters {\n"); + sb.append(" and: ").append(toIndentedString(and)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("and")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AppLinkFilters + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AppLinkFilters.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in AppLinkFilters is not found in the empty JSON string", AppLinkFilters.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("and") != null && !jsonObj.get("and").isJsonNull()) { + JsonArray jsonArrayand = jsonObj.getAsJsonArray("and"); + if (jsonArrayand != null) { + // ensure the json data is an array + if (!jsonObj.get("and").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `and` to be an array in the JSON string but got `%s`", jsonObj.get("and").toString())); + } + + // validate the optional field `and` (array) + for (int i = 0; i < jsonArrayand.size(); i++) { + AppLinkFilter.validateJsonElement(jsonArrayand.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AppLinkFilters.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AppLinkFilters' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AppLinkFilters.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AppLinkFilters value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AppLinkFilters read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + AppLinkFilters instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AppLinkFilters given an JSON string + * + * @param jsonString JSON string + * @return An instance of AppLinkFilters + * @throws IOException if the JSON string is invalid with respect to AppLinkFilters + */ + public static AppLinkFilters fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AppLinkFilters.class); + } + + /** + * Convert an instance of AppLinkFilters to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkOrFilter.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkOrFilter.java new file mode 100644 index 00000000..b39d0bf3 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkOrFilter.java @@ -0,0 +1,308 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.AppLinkSimpleExpression; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * AppLinkOrFilter + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class AppLinkOrFilter { + public static final String SERIALIZED_NAME_OR = "or"; + @SerializedName(SERIALIZED_NAME_OR) + @javax.annotation.Nullable + private List or = new ArrayList<>(); + + public AppLinkOrFilter() { + } + + public AppLinkOrFilter or(@javax.annotation.Nullable List or) { + this.or = or; + return this; + } + + public AppLinkOrFilter addOrItem(AppLinkSimpleExpression orItem) { + if (this.or == null) { + this.or = new ArrayList<>(); + } + this.or.add(orItem); + return this; + } + + /** + * Get or + * @return or + */ + @javax.annotation.Nullable + public List getOr() { + return or; + } + + public void setOr(@javax.annotation.Nullable List or) { + this.or = or; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AppLinkOrFilter instance itself + */ + public AppLinkOrFilter putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AppLinkOrFilter appLinkOrFilter = (AppLinkOrFilter) o; + return Objects.equals(this.or, appLinkOrFilter.or)&& + Objects.equals(this.additionalProperties, appLinkOrFilter.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(or, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AppLinkOrFilter {\n"); + sb.append(" or: ").append(toIndentedString(or)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("or")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AppLinkOrFilter + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AppLinkOrFilter.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in AppLinkOrFilter is not found in the empty JSON string", AppLinkOrFilter.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("or") != null && !jsonObj.get("or").isJsonNull()) { + JsonArray jsonArrayor = jsonObj.getAsJsonArray("or"); + if (jsonArrayor != null) { + // ensure the json data is an array + if (!jsonObj.get("or").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `or` to be an array in the JSON string but got `%s`", jsonObj.get("or").toString())); + } + + // validate the optional field `or` (array) + for (int i = 0; i < jsonArrayor.size(); i++) { + AppLinkSimpleExpression.validateJsonElement(jsonArrayor.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AppLinkOrFilter.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AppLinkOrFilter' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AppLinkOrFilter.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AppLinkOrFilter value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AppLinkOrFilter read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + AppLinkOrFilter instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AppLinkOrFilter given an JSON string + * + * @param jsonString JSON string + * @return An instance of AppLinkOrFilter + * @throws IOException if the JSON string is invalid with respect to AppLinkOrFilter + */ + public static AppLinkOrFilter fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AppLinkOrFilter.class); + } + + /** + * Convert an instance of AppLinkOrFilter to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AgentPostRequest.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkPostRequest.java similarity index 67% rename from services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AgentPostRequest.java rename to services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkPostRequest.java index e4be85a3..e80cb1ab 100644 --- a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AgentPostRequest.java +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkPostRequest.java @@ -13,8 +13,8 @@ import java.util.Objects; import java.util.Locale; -import com.equinix.sdk.fabricv4.model.AgentTemplate; -import com.equinix.sdk.fabricv4.model.ModelConfiguration; +import com.equinix.sdk.fabricv4.model.AppLinkPostRequestRouter; +import com.equinix.sdk.fabricv4.model.AppLinkType; import com.equinix.sdk.fabricv4.model.Project; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -49,14 +49,14 @@ import com.equinix.sdk.fabricv4.JSON; /** - * Create Agent + * Create App Link */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") -public class AgentPostRequest { +public class AppLinkPostRequest { public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) @javax.annotation.Nonnull - private String type; + private AppLinkType type = AppLinkType.APP_LINK; public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) @@ -68,30 +68,30 @@ public class AgentPostRequest { @javax.annotation.Nullable private String description; - public static final String SERIALIZED_NAME_ENABLED = "enabled"; - @SerializedName(SERIALIZED_NAME_ENABLED) + public static final String SERIALIZED_NAME_ROUTER = "router"; + @SerializedName(SERIALIZED_NAME_ROUTER) + @javax.annotation.Nonnull + private AppLinkPostRequestRouter router; + + public static final String SERIALIZED_NAME_IPV4_ADDRESS = "ipv4Address"; + @SerializedName(SERIALIZED_NAME_IPV4_ADDRESS) @javax.annotation.Nullable - private Boolean enabled; + private String ipv4Address; + + public static final String SERIALIZED_NAME_BANDWIDTH = "bandwidth"; + @SerializedName(SERIALIZED_NAME_BANDWIDTH) + @javax.annotation.Nonnull + private Integer bandwidth; public static final String SERIALIZED_NAME_PROJECT = "project"; @SerializedName(SERIALIZED_NAME_PROJECT) @javax.annotation.Nonnull private Project project; - public static final String SERIALIZED_NAME_AGENT_TEMPLATE = "agentTemplate"; - @SerializedName(SERIALIZED_NAME_AGENT_TEMPLATE) - @javax.annotation.Nonnull - private AgentTemplate agentTemplate; - - public static final String SERIALIZED_NAME_CONFIGURATION = "configuration"; - @SerializedName(SERIALIZED_NAME_CONFIGURATION) - @javax.annotation.Nullable - private ModelConfiguration _configuration; - - public AgentPostRequest() { + public AppLinkPostRequest() { } - public AgentPostRequest type(@javax.annotation.Nonnull String type) { + public AppLinkPostRequest type(@javax.annotation.Nonnull AppLinkType type) { this.type = type; return this; } @@ -101,22 +101,22 @@ public AgentPostRequest type(@javax.annotation.Nonnull String type) { * @return type */ @javax.annotation.Nonnull - public String getType() { + public AppLinkType getType() { return type; } - public void setType(@javax.annotation.Nonnull String type) { + public void setType(@javax.annotation.Nonnull AppLinkType type) { this.type = type; } - public AgentPostRequest name(@javax.annotation.Nonnull String name) { + public AppLinkPostRequest name(@javax.annotation.Nonnull String name) { this.name = name; return this; } /** - * Customer-provided agent name + * Customer-provided App Link name * @return name */ @javax.annotation.Nonnull @@ -129,13 +129,13 @@ public void setName(@javax.annotation.Nonnull String name) { } - public AgentPostRequest description(@javax.annotation.Nullable String description) { + public AppLinkPostRequest description(@javax.annotation.Nullable String description) { this.description = description; return this; } /** - * Customer-provided agent description + * Customer-provided App Link description * @return description */ @javax.annotation.Nullable @@ -148,79 +148,79 @@ public void setDescription(@javax.annotation.Nullable String description) { } - public AgentPostRequest enabled(@javax.annotation.Nullable Boolean enabled) { - this.enabled = enabled; + public AppLinkPostRequest router(@javax.annotation.Nonnull AppLinkPostRequestRouter router) { + this.router = router; return this; } /** - * Customer-provided agent enabled status - * @return enabled + * Get router + * @return router */ - @javax.annotation.Nullable - public Boolean getEnabled() { - return enabled; + @javax.annotation.Nonnull + public AppLinkPostRequestRouter getRouter() { + return router; } - public void setEnabled(@javax.annotation.Nullable Boolean enabled) { - this.enabled = enabled; + public void setRouter(@javax.annotation.Nonnull AppLinkPostRequestRouter router) { + this.router = router; } - public AgentPostRequest project(@javax.annotation.Nonnull Project project) { - this.project = project; + public AppLinkPostRequest ipv4Address(@javax.annotation.Nullable String ipv4Address) { + this.ipv4Address = ipv4Address; return this; } /** - * Get project - * @return project + * AppLink IP address + * @return ipv4Address */ - @javax.annotation.Nonnull - public Project getProject() { - return project; + @javax.annotation.Nullable + public String getIpv4Address() { + return ipv4Address; } - public void setProject(@javax.annotation.Nonnull Project project) { - this.project = project; + public void setIpv4Address(@javax.annotation.Nullable String ipv4Address) { + this.ipv4Address = ipv4Address; } - public AgentPostRequest agentTemplate(@javax.annotation.Nonnull AgentTemplate agentTemplate) { - this.agentTemplate = agentTemplate; + public AppLinkPostRequest bandwidth(@javax.annotation.Nonnull Integer bandwidth) { + this.bandwidth = bandwidth; return this; } /** - * Get agentTemplate - * @return agentTemplate + * App Link aggregated data transfer capacity in Mbps + * @return bandwidth */ @javax.annotation.Nonnull - public AgentTemplate getAgentTemplate() { - return agentTemplate; + public Integer getBandwidth() { + return bandwidth; } - public void setAgentTemplate(@javax.annotation.Nonnull AgentTemplate agentTemplate) { - this.agentTemplate = agentTemplate; + public void setBandwidth(@javax.annotation.Nonnull Integer bandwidth) { + this.bandwidth = bandwidth; } - public AgentPostRequest _configuration(@javax.annotation.Nullable ModelConfiguration _configuration) { - this._configuration = _configuration; + public AppLinkPostRequest project(@javax.annotation.Nonnull Project project) { + this.project = project; return this; } /** - * Get _configuration - * @return _configuration + * Get project + * @return project */ - @javax.annotation.Nullable - public ModelConfiguration getConfiguration() { - return _configuration; + @javax.annotation.Nonnull + public Project getProject() { + return project; } - public void setConfiguration(@javax.annotation.Nullable ModelConfiguration _configuration) { - this._configuration = _configuration; + public void setProject(@javax.annotation.Nonnull Project project) { + this.project = project; } /** @@ -236,9 +236,9 @@ public void setConfiguration(@javax.annotation.Nullable ModelConfiguration _conf * * @param key name of the property * @param value value of the property - * @return the AgentPostRequest instance itself + * @return the AppLinkPostRequest instance itself */ - public AgentPostRequest putAdditionalProperty(String key, Object value) { + public AppLinkPostRequest putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -277,33 +277,33 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - AgentPostRequest agentPostRequest = (AgentPostRequest) o; - return Objects.equals(this.type, agentPostRequest.type) && - Objects.equals(this.name, agentPostRequest.name) && - Objects.equals(this.description, agentPostRequest.description) && - Objects.equals(this.enabled, agentPostRequest.enabled) && - Objects.equals(this.project, agentPostRequest.project) && - Objects.equals(this.agentTemplate, agentPostRequest.agentTemplate) && - Objects.equals(this._configuration, agentPostRequest._configuration)&& - Objects.equals(this.additionalProperties, agentPostRequest.additionalProperties); + AppLinkPostRequest appLinkPostRequest = (AppLinkPostRequest) o; + return Objects.equals(this.type, appLinkPostRequest.type) && + Objects.equals(this.name, appLinkPostRequest.name) && + Objects.equals(this.description, appLinkPostRequest.description) && + Objects.equals(this.router, appLinkPostRequest.router) && + Objects.equals(this.ipv4Address, appLinkPostRequest.ipv4Address) && + Objects.equals(this.bandwidth, appLinkPostRequest.bandwidth) && + Objects.equals(this.project, appLinkPostRequest.project)&& + Objects.equals(this.additionalProperties, appLinkPostRequest.additionalProperties); } @Override public int hashCode() { - return Objects.hash(type, name, description, enabled, project, agentTemplate, _configuration, additionalProperties); + return Objects.hash(type, name, description, router, ipv4Address, bandwidth, project, additionalProperties); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class AgentPostRequest {\n"); + sb.append("class AppLinkPostRequest {\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); + sb.append(" router: ").append(toIndentedString(router)).append("\n"); + sb.append(" ipv4Address: ").append(toIndentedString(ipv4Address)).append("\n"); + sb.append(" bandwidth: ").append(toIndentedString(bandwidth)).append("\n"); sb.append(" project: ").append(toIndentedString(project)).append("\n"); - sb.append(" agentTemplate: ").append(toIndentedString(agentTemplate)).append("\n"); - sb.append(" _configuration: ").append(toIndentedString(_configuration)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); @@ -326,65 +326,63 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("type", "name", "description", "enabled", "project", "agentTemplate", "configuration")); + openapiFields = new HashSet(Arrays.asList("type", "name", "description", "router", "ipv4Address", "bandwidth", "project")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("type", "name", "project", "agentTemplate")); + openapiRequiredFields = new HashSet(Arrays.asList("type", "name", "router", "bandwidth", "project")); } /** * Validates the JSON Element and throws an exception if issues found * * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to AgentPostRequest + * @throws IOException if the JSON Element is invalid with respect to AppLinkPostRequest */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { - if (!AgentPostRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in AgentPostRequest is not found in the empty JSON string", AgentPostRequest.openapiRequiredFields.toString())); + if (!AppLinkPostRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in AppLinkPostRequest is not found in the empty JSON string", AppLinkPostRequest.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : AgentPostRequest.openapiRequiredFields) { + for (String requiredField : AppLinkPostRequest.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } + // validate the required field `type` + AppLinkType.validateJsonElement(jsonObj.get("type")); if (!jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } + // validate the required field `router` + AppLinkPostRequestRouter.validateJsonElement(jsonObj.get("router")); + if ((jsonObj.get("ipv4Address") != null && !jsonObj.get("ipv4Address").isJsonNull()) && !jsonObj.get("ipv4Address").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `ipv4Address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ipv4Address").toString())); + } // validate the required field `project` Project.validateJsonElement(jsonObj.get("project")); - // validate the required field `agentTemplate` - AgentTemplate.validateJsonElement(jsonObj.get("agentTemplate")); - // validate the optional field `configuration` - if (jsonObj.get("configuration") != null && !jsonObj.get("configuration").isJsonNull()) { - ModelConfiguration.validateJsonElement(jsonObj.get("configuration")); - } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!AgentPostRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'AgentPostRequest' and its subtypes + if (!AppLinkPostRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AppLinkPostRequest' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(AgentPostRequest.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AppLinkPostRequest.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, AgentPostRequest value) throws IOException { + public void write(JsonWriter out, AppLinkPostRequest value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); // serialize additional properties @@ -412,12 +410,12 @@ else if (entry.getValue() instanceof Character) } @Override - public AgentPostRequest read(JsonReader in) throws IOException { + public AppLinkPostRequest read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); JsonObject jsonObj = jsonElement.getAsJsonObject(); // store additional fields in the deserialized instance - AgentPostRequest instance = thisAdapter.fromJsonTree(jsonObj); + AppLinkPostRequest instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { if (!openapiFields.contains(entry.getKey())) { if (entry.getValue().isJsonPrimitive()) { // primitive type @@ -444,18 +442,18 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } /** - * Create an instance of AgentPostRequest given an JSON string + * Create an instance of AppLinkPostRequest given an JSON string * * @param jsonString JSON string - * @return An instance of AgentPostRequest - * @throws IOException if the JSON string is invalid with respect to AgentPostRequest + * @return An instance of AppLinkPostRequest + * @throws IOException if the JSON string is invalid with respect to AppLinkPostRequest */ - public static AgentPostRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, AgentPostRequest.class); + public static AppLinkPostRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AppLinkPostRequest.class); } /** - * Convert an instance of AgentPostRequest to an JSON string + * Convert an instance of AppLinkPostRequest to an JSON string * * @return JSON string */ diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/Agent.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkPostRequestRouter.java similarity index 74% rename from services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/Agent.java rename to services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkPostRequestRouter.java index 9ec1c763..a5c314ba 100644 --- a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/Agent.java +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkPostRequestRouter.java @@ -47,60 +47,36 @@ import com.equinix.sdk.fabricv4.JSON; /** - * Agent + * Cloud Router reference for App Link */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") -public class Agent { +public class AppLinkPostRequestRouter { public static final String SERIALIZED_NAME_UUID = "uuid"; @SerializedName(SERIALIZED_NAME_UUID) - @javax.annotation.Nullable + @javax.annotation.Nonnull private UUID uuid; - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - @javax.annotation.Nullable - private String type; - - public Agent() { + public AppLinkPostRequestRouter() { } - public Agent uuid(@javax.annotation.Nullable UUID uuid) { + public AppLinkPostRequestRouter uuid(@javax.annotation.Nonnull UUID uuid) { this.uuid = uuid; return this; } /** - * Agent Uuid + * Cloud Router UUID * @return uuid */ - @javax.annotation.Nullable + @javax.annotation.Nonnull public UUID getUuid() { return uuid; } - public void setUuid(@javax.annotation.Nullable UUID uuid) { + public void setUuid(@javax.annotation.Nonnull UUID uuid) { this.uuid = uuid; } - - public Agent type(@javax.annotation.Nullable String type) { - this.type = type; - return this; - } - - /** - * Get type - * @return type - */ - @javax.annotation.Nullable - public String getType() { - return type; - } - - public void setType(@javax.annotation.Nullable String type) { - this.type = type; - } - /** * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with @@ -114,9 +90,9 @@ public void setType(@javax.annotation.Nullable String type) { * * @param key name of the property * @param value value of the property - * @return the Agent instance itself + * @return the AppLinkPostRequestRouter instance itself */ - public Agent putAdditionalProperty(String key, Object value) { + public AppLinkPostRequestRouter putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -155,23 +131,21 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - Agent agent = (Agent) o; - return Objects.equals(this.uuid, agent.uuid) && - Objects.equals(this.type, agent.type)&& - Objects.equals(this.additionalProperties, agent.additionalProperties); + AppLinkPostRequestRouter appLinkPostRequestRouter = (AppLinkPostRequestRouter) o; + return Objects.equals(this.uuid, appLinkPostRequestRouter.uuid)&& + Objects.equals(this.additionalProperties, appLinkPostRequestRouter.additionalProperties); } @Override public int hashCode() { - return Objects.hash(uuid, type, additionalProperties); + return Objects.hash(uuid, additionalProperties); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class Agent {\n"); + sb.append("class AppLinkPostRequestRouter {\n"); sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); @@ -194,47 +168,51 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("uuid", "type")); + openapiFields = new HashSet(Arrays.asList("uuid")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); + openapiRequiredFields = new HashSet(Arrays.asList("uuid")); } /** * Validates the JSON Element and throws an exception if issues found * * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Agent + * @throws IOException if the JSON Element is invalid with respect to AppLinkPostRequestRouter */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { - if (!Agent.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in Agent is not found in the empty JSON string", Agent.openapiRequiredFields.toString())); + if (!AppLinkPostRequestRouter.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in AppLinkPostRequestRouter is not found in the empty JSON string", AppLinkPostRequestRouter.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : AppLinkPostRequestRouter.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("uuid") != null && !jsonObj.get("uuid").isJsonNull()) && !jsonObj.get("uuid").isJsonPrimitive()) { + if (!jsonObj.get("uuid").isJsonPrimitive()) { throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `uuid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("uuid").toString())); } - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!Agent.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Agent' and its subtypes + if (!AppLinkPostRequestRouter.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AppLinkPostRequestRouter' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Agent.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AppLinkPostRequestRouter.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, Agent value) throws IOException { + public void write(JsonWriter out, AppLinkPostRequestRouter value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); // serialize additional properties @@ -262,12 +240,12 @@ else if (entry.getValue() instanceof Character) } @Override - public Agent read(JsonReader in) throws IOException { + public AppLinkPostRequestRouter read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); JsonObject jsonObj = jsonElement.getAsJsonObject(); // store additional fields in the deserialized instance - Agent instance = thisAdapter.fromJsonTree(jsonObj); + AppLinkPostRequestRouter instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { if (!openapiFields.contains(entry.getKey())) { if (entry.getValue().isJsonPrimitive()) { // primitive type @@ -294,18 +272,18 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } /** - * Create an instance of Agent given an JSON string + * Create an instance of AppLinkPostRequestRouter given an JSON string * * @param jsonString JSON string - * @return An instance of Agent - * @throws IOException if the JSON string is invalid with respect to Agent + * @return An instance of AppLinkPostRequestRouter + * @throws IOException if the JSON string is invalid with respect to AppLinkPostRequestRouter */ - public static Agent fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Agent.class); + public static AppLinkPostRequestRouter fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AppLinkPostRequestRouter.class); } /** - * Convert an instance of Agent to an JSON string + * Convert an instance of AppLinkPostRequestRouter to an JSON string * * @return JSON string */ diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkSearchRequest.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkSearchRequest.java new file mode 100644 index 00000000..c4863d03 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkSearchRequest.java @@ -0,0 +1,370 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.AppLinkFilters; +import com.equinix.sdk.fabricv4.model.AppLinkSortCriteria; +import com.equinix.sdk.fabricv4.model.PaginationRequest; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * Search requests containing criteria + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class AppLinkSearchRequest { + public static final String SERIALIZED_NAME_FILTER = "filter"; + @SerializedName(SERIALIZED_NAME_FILTER) + @javax.annotation.Nullable + private AppLinkFilters filter; + + public static final String SERIALIZED_NAME_PAGINATION = "pagination"; + @SerializedName(SERIALIZED_NAME_PAGINATION) + @javax.annotation.Nullable + private PaginationRequest pagination; + + public static final String SERIALIZED_NAME_SORT = "sort"; + @SerializedName(SERIALIZED_NAME_SORT) + @javax.annotation.Nullable + private List sort = new ArrayList<>(); + + public AppLinkSearchRequest() { + } + + public AppLinkSearchRequest filter(@javax.annotation.Nullable AppLinkFilters filter) { + this.filter = filter; + return this; + } + + /** + * Get filter + * @return filter + */ + @javax.annotation.Nullable + public AppLinkFilters getFilter() { + return filter; + } + + public void setFilter(@javax.annotation.Nullable AppLinkFilters filter) { + this.filter = filter; + } + + + public AppLinkSearchRequest pagination(@javax.annotation.Nullable PaginationRequest pagination) { + this.pagination = pagination; + return this; + } + + /** + * Get pagination + * @return pagination + */ + @javax.annotation.Nullable + public PaginationRequest getPagination() { + return pagination; + } + + public void setPagination(@javax.annotation.Nullable PaginationRequest pagination) { + this.pagination = pagination; + } + + + public AppLinkSearchRequest sort(@javax.annotation.Nullable List sort) { + this.sort = sort; + return this; + } + + public AppLinkSearchRequest addSortItem(AppLinkSortCriteria sortItem) { + if (this.sort == null) { + this.sort = new ArrayList<>(); + } + this.sort.add(sortItem); + return this; + } + + /** + * Get sort + * @return sort + */ + @javax.annotation.Nullable + public List getSort() { + return sort; + } + + public void setSort(@javax.annotation.Nullable List sort) { + this.sort = sort; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AppLinkSearchRequest instance itself + */ + public AppLinkSearchRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AppLinkSearchRequest appLinkSearchRequest = (AppLinkSearchRequest) o; + return Objects.equals(this.filter, appLinkSearchRequest.filter) && + Objects.equals(this.pagination, appLinkSearchRequest.pagination) && + Objects.equals(this.sort, appLinkSearchRequest.sort)&& + Objects.equals(this.additionalProperties, appLinkSearchRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(filter, pagination, sort, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AppLinkSearchRequest {\n"); + sb.append(" filter: ").append(toIndentedString(filter)).append("\n"); + sb.append(" pagination: ").append(toIndentedString(pagination)).append("\n"); + sb.append(" sort: ").append(toIndentedString(sort)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("filter", "pagination", "sort")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AppLinkSearchRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AppLinkSearchRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in AppLinkSearchRequest is not found in the empty JSON string", AppLinkSearchRequest.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `filter` + if (jsonObj.get("filter") != null && !jsonObj.get("filter").isJsonNull()) { + AppLinkFilters.validateJsonElement(jsonObj.get("filter")); + } + // validate the optional field `pagination` + if (jsonObj.get("pagination") != null && !jsonObj.get("pagination").isJsonNull()) { + PaginationRequest.validateJsonElement(jsonObj.get("pagination")); + } + if (jsonObj.get("sort") != null && !jsonObj.get("sort").isJsonNull()) { + JsonArray jsonArraysort = jsonObj.getAsJsonArray("sort"); + if (jsonArraysort != null) { + // ensure the json data is an array + if (!jsonObj.get("sort").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `sort` to be an array in the JSON string but got `%s`", jsonObj.get("sort").toString())); + } + + // validate the optional field `sort` (array) + for (int i = 0; i < jsonArraysort.size(); i++) { + AppLinkSortCriteria.validateJsonElement(jsonArraysort.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AppLinkSearchRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AppLinkSearchRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AppLinkSearchRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AppLinkSearchRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AppLinkSearchRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + AppLinkSearchRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AppLinkSearchRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of AppLinkSearchRequest + * @throws IOException if the JSON string is invalid with respect to AppLinkSearchRequest + */ + public static AppLinkSearchRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AppLinkSearchRequest.class); + } + + /** + * Convert an instance of AppLinkSearchRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AgentGetActivities.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkSearchResponse.java similarity index 80% rename from services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AgentGetActivities.java rename to services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkSearchResponse.java index 3ea5bd7f..06696157 100644 --- a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AgentGetActivities.java +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkSearchResponse.java @@ -13,7 +13,7 @@ import java.util.Objects; import java.util.Locale; -import com.equinix.sdk.fabricv4.model.AgentActivities; +import com.equinix.sdk.fabricv4.model.AppLink; import com.equinix.sdk.fabricv4.model.Pagination; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -50,10 +50,10 @@ import com.equinix.sdk.fabricv4.JSON; /** - * AgentGetActivities + * AppLinkSearchResponse */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") -public class AgentGetActivities { +public class AppLinkSearchResponse { public static final String SERIALIZED_NAME_PAGINATION = "pagination"; @SerializedName(SERIALIZED_NAME_PAGINATION) @javax.annotation.Nullable @@ -62,12 +62,12 @@ public class AgentGetActivities { public static final String SERIALIZED_NAME_DATA = "data"; @SerializedName(SERIALIZED_NAME_DATA) @javax.annotation.Nullable - private List data = new ArrayList<>(); + private List data = new ArrayList<>(); - public AgentGetActivities() { + public AppLinkSearchResponse() { } - public AgentGetActivities pagination(@javax.annotation.Nullable Pagination pagination) { + public AppLinkSearchResponse pagination(@javax.annotation.Nullable Pagination pagination) { this.pagination = pagination; return this; } @@ -86,12 +86,12 @@ public void setPagination(@javax.annotation.Nullable Pagination pagination) { } - public AgentGetActivities data(@javax.annotation.Nullable List data) { + public AppLinkSearchResponse data(@javax.annotation.Nullable List data) { this.data = data; return this; } - public AgentGetActivities addDataItem(AgentActivities dataItem) { + public AppLinkSearchResponse addDataItem(AppLink dataItem) { if (this.data == null) { this.data = new ArrayList<>(); } @@ -104,11 +104,11 @@ public AgentGetActivities addDataItem(AgentActivities dataItem) { * @return data */ @javax.annotation.Nullable - public List getData() { + public List getData() { return data; } - public void setData(@javax.annotation.Nullable List data) { + public void setData(@javax.annotation.Nullable List data) { this.data = data; } @@ -125,9 +125,9 @@ public void setData(@javax.annotation.Nullable List data) { * * @param key name of the property * @param value value of the property - * @return the AgentGetActivities instance itself + * @return the AppLinkSearchResponse instance itself */ - public AgentGetActivities putAdditionalProperty(String key, Object value) { + public AppLinkSearchResponse putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -166,10 +166,10 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - AgentGetActivities agentGetActivities = (AgentGetActivities) o; - return Objects.equals(this.pagination, agentGetActivities.pagination) && - Objects.equals(this.data, agentGetActivities.data)&& - Objects.equals(this.additionalProperties, agentGetActivities.additionalProperties); + AppLinkSearchResponse appLinkSearchResponse = (AppLinkSearchResponse) o; + return Objects.equals(this.pagination, appLinkSearchResponse.pagination) && + Objects.equals(this.data, appLinkSearchResponse.data)&& + Objects.equals(this.additionalProperties, appLinkSearchResponse.additionalProperties); } @Override @@ -180,7 +180,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class AgentGetActivities {\n"); + sb.append("class AppLinkSearchResponse {\n"); sb.append(" pagination: ").append(toIndentedString(pagination)).append("\n"); sb.append(" data: ").append(toIndentedString(data)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); @@ -215,12 +215,12 @@ private String toIndentedString(Object o) { * Validates the JSON Element and throws an exception if issues found * * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to AgentGetActivities + * @throws IOException if the JSON Element is invalid with respect to AppLinkSearchResponse */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { - if (!AgentGetActivities.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in AgentGetActivities is not found in the empty JSON string", AgentGetActivities.openapiRequiredFields.toString())); + if (!AppLinkSearchResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in AppLinkSearchResponse is not found in the empty JSON string", AppLinkSearchResponse.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -238,7 +238,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `data` (array) for (int i = 0; i < jsonArraydata.size(); i++) { - AgentActivities.validateJsonElement(jsonArraydata.get(i)); + AppLink.validateJsonElement(jsonArraydata.get(i)); }; } } @@ -248,16 +248,16 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!AgentGetActivities.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'AgentGetActivities' and its subtypes + if (!AppLinkSearchResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AppLinkSearchResponse' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(AgentGetActivities.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AppLinkSearchResponse.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, AgentGetActivities value) throws IOException { + public void write(JsonWriter out, AppLinkSearchResponse value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); // serialize additional properties @@ -285,12 +285,12 @@ else if (entry.getValue() instanceof Character) } @Override - public AgentGetActivities read(JsonReader in) throws IOException { + public AppLinkSearchResponse read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); JsonObject jsonObj = jsonElement.getAsJsonObject(); // store additional fields in the deserialized instance - AgentGetActivities instance = thisAdapter.fromJsonTree(jsonObj); + AppLinkSearchResponse instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { if (!openapiFields.contains(entry.getKey())) { if (entry.getValue().isJsonPrimitive()) { // primitive type @@ -317,18 +317,18 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } /** - * Create an instance of AgentGetActivities given an JSON string + * Create an instance of AppLinkSearchResponse given an JSON string * * @param jsonString JSON string - * @return An instance of AgentGetActivities - * @throws IOException if the JSON string is invalid with respect to AgentGetActivities + * @return An instance of AppLinkSearchResponse + * @throws IOException if the JSON string is invalid with respect to AppLinkSearchResponse */ - public static AgentGetActivities fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, AgentGetActivities.class); + public static AppLinkSearchResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AppLinkSearchResponse.class); } /** - * Convert an instance of AgentGetActivities to an JSON string + * Convert an instance of AppLinkSearchResponse to an JSON string * * @return JSON string */ diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AgentActivitiesMetadata.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkSimpleExpression.java similarity index 58% rename from services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AgentActivitiesMetadata.java rename to services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkSimpleExpression.java index 6bc68dfe..36a07b41 100644 --- a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AgentActivitiesMetadata.java +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkSimpleExpression.java @@ -13,8 +13,6 @@ import java.util.Objects; import java.util.Locale; -import com.equinix.sdk.fabricv4.model.ChatMessage; -import com.equinix.sdk.fabricv4.model.ToolCallInformationInner; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -50,66 +48,90 @@ import com.equinix.sdk.fabricv4.JSON; /** - * AgentActivitiesMetadata + * AppLinkSimpleExpression */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") -public class AgentActivitiesMetadata { - public static final String SERIALIZED_NAME_CHAT_MESSAGE = "chatMessage"; - @SerializedName(SERIALIZED_NAME_CHAT_MESSAGE) +public class AppLinkSimpleExpression { + public static final String SERIALIZED_NAME_PROPERTY = "property"; + @SerializedName(SERIALIZED_NAME_PROPERTY) @javax.annotation.Nullable - private ChatMessage chatMessage; + private String property; - public static final String SERIALIZED_NAME_TOOL_CALL_INFORMATION = "toolCallInformation"; - @SerializedName(SERIALIZED_NAME_TOOL_CALL_INFORMATION) + public static final String SERIALIZED_NAME_OPERATOR = "operator"; + @SerializedName(SERIALIZED_NAME_OPERATOR) @javax.annotation.Nullable - private List toolCallInformation = new ArrayList<>(); + private String operator; - public AgentActivitiesMetadata() { + public static final String SERIALIZED_NAME_VALUES = "values"; + @SerializedName(SERIALIZED_NAME_VALUES) + @javax.annotation.Nullable + private List values = new ArrayList<>(); + + public AppLinkSimpleExpression() { } - public AgentActivitiesMetadata chatMessage(@javax.annotation.Nullable ChatMessage chatMessage) { - this.chatMessage = chatMessage; + public AppLinkSimpleExpression property(@javax.annotation.Nullable String property) { + this.property = property; return this; } /** - * Get chatMessage - * @return chatMessage + * Possible field names to use on filters: * `/project/projectId` - project id * `/uuid` - App Link uuid * `/name` - App Link name * `/description` - App Link description * `/state` - App Link status * `/ipv4Address` - App Link ipv4 address * `/bandwidth` - App Link bandwidth * `/changeLog/createdDateTime` - App Link creation timestamp * `/changeLog/updatedDateTime` - App Link last updated timestamp * `/changeLog/deletedDateTime` - App Link deletion timestamp + * @return property */ @javax.annotation.Nullable - public ChatMessage getChatMessage() { - return chatMessage; + public String getProperty() { + return property; } - public void setChatMessage(@javax.annotation.Nullable ChatMessage chatMessage) { - this.chatMessage = chatMessage; + public void setProperty(@javax.annotation.Nullable String property) { + this.property = property; } - public AgentActivitiesMetadata toolCallInformation(@javax.annotation.Nullable List toolCallInformation) { - this.toolCallInformation = toolCallInformation; + public AppLinkSimpleExpression operator(@javax.annotation.Nullable String operator) { + this.operator = operator; return this; } - public AgentActivitiesMetadata addToolCallInformationItem(ToolCallInformationInner toolCallInformationItem) { - if (this.toolCallInformation == null) { - this.toolCallInformation = new ArrayList<>(); + /** + * Possible operators to use on filters: * `=` - equal * `!=` - not equal * `>` - greater than * `<` - less than * `IN` - in * `NOT IN` - not in * `LIKE` - like * `ILIKE` - case-insensitive like * `BETWEEN` - between * `NOT BETWEEN` - not between + * @return operator + */ + @javax.annotation.Nullable + public String getOperator() { + return operator; + } + + public void setOperator(@javax.annotation.Nullable String operator) { + this.operator = operator; + } + + + public AppLinkSimpleExpression values(@javax.annotation.Nullable List values) { + this.values = values; + return this; + } + + public AppLinkSimpleExpression addValuesItem(String valuesItem) { + if (this.values == null) { + this.values = new ArrayList<>(); } - this.toolCallInformation.add(toolCallInformationItem); + this.values.add(valuesItem); return this; } /** - * List of tools called during the agent operation - * @return toolCallInformation + * Get values + * @return values */ @javax.annotation.Nullable - public List getToolCallInformation() { - return toolCallInformation; + public List getValues() { + return values; } - public void setToolCallInformation(@javax.annotation.Nullable List toolCallInformation) { - this.toolCallInformation = toolCallInformation; + public void setValues(@javax.annotation.Nullable List values) { + this.values = values; } /** @@ -125,9 +147,9 @@ public void setToolCallInformation(@javax.annotation.Nullable List(); } @@ -166,23 +188,25 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - AgentActivitiesMetadata agentActivitiesMetadata = (AgentActivitiesMetadata) o; - return Objects.equals(this.chatMessage, agentActivitiesMetadata.chatMessage) && - Objects.equals(this.toolCallInformation, agentActivitiesMetadata.toolCallInformation)&& - Objects.equals(this.additionalProperties, agentActivitiesMetadata.additionalProperties); + AppLinkSimpleExpression appLinkSimpleExpression = (AppLinkSimpleExpression) o; + return Objects.equals(this.property, appLinkSimpleExpression.property) && + Objects.equals(this.operator, appLinkSimpleExpression.operator) && + Objects.equals(this.values, appLinkSimpleExpression.values)&& + Objects.equals(this.additionalProperties, appLinkSimpleExpression.additionalProperties); } @Override public int hashCode() { - return Objects.hash(chatMessage, toolCallInformation, additionalProperties); + return Objects.hash(property, operator, values, additionalProperties); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class AgentActivitiesMetadata {\n"); - sb.append(" chatMessage: ").append(toIndentedString(chatMessage)).append("\n"); - sb.append(" toolCallInformation: ").append(toIndentedString(toolCallInformation)).append("\n"); + sb.append("class AppLinkSimpleExpression {\n"); + sb.append(" property: ").append(toIndentedString(property)).append("\n"); + sb.append(" operator: ").append(toIndentedString(operator)).append("\n"); + sb.append(" values: ").append(toIndentedString(values)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); @@ -205,7 +229,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("chatMessage", "toolCallInformation")); + openapiFields = new HashSet(Arrays.asList("property", "operator", "values")); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(0); @@ -215,32 +239,24 @@ private String toIndentedString(Object o) { * Validates the JSON Element and throws an exception if issues found * * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to AgentActivitiesMetadata + * @throws IOException if the JSON Element is invalid with respect to AppLinkSimpleExpression */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { - if (!AgentActivitiesMetadata.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in AgentActivitiesMetadata is not found in the empty JSON string", AgentActivitiesMetadata.openapiRequiredFields.toString())); + if (!AppLinkSimpleExpression.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in AppLinkSimpleExpression is not found in the empty JSON string", AppLinkSimpleExpression.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `chatMessage` - if (jsonObj.get("chatMessage") != null && !jsonObj.get("chatMessage").isJsonNull()) { - ChatMessage.validateJsonElement(jsonObj.get("chatMessage")); + if ((jsonObj.get("property") != null && !jsonObj.get("property").isJsonNull()) && !jsonObj.get("property").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `property` to be a primitive type in the JSON string but got `%s`", jsonObj.get("property").toString())); } - if (jsonObj.get("toolCallInformation") != null && !jsonObj.get("toolCallInformation").isJsonNull()) { - JsonArray jsonArraytoolCallInformation = jsonObj.getAsJsonArray("toolCallInformation"); - if (jsonArraytoolCallInformation != null) { - // ensure the json data is an array - if (!jsonObj.get("toolCallInformation").isJsonArray()) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `toolCallInformation` to be an array in the JSON string but got `%s`", jsonObj.get("toolCallInformation").toString())); - } - - // validate the optional field `toolCallInformation` (array) - for (int i = 0; i < jsonArraytoolCallInformation.size(); i++) { - ToolCallInformationInner.validateJsonElement(jsonArraytoolCallInformation.get(i)); - }; - } + if ((jsonObj.get("operator") != null && !jsonObj.get("operator").isJsonNull()) && !jsonObj.get("operator").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `operator` to be a primitive type in the JSON string but got `%s`", jsonObj.get("operator").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("values") != null && !jsonObj.get("values").isJsonNull() && !jsonObj.get("values").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `values` to be an array in the JSON string but got `%s`", jsonObj.get("values").toString())); } } @@ -248,16 +264,16 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!AgentActivitiesMetadata.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'AgentActivitiesMetadata' and its subtypes + if (!AppLinkSimpleExpression.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AppLinkSimpleExpression' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(AgentActivitiesMetadata.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AppLinkSimpleExpression.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, AgentActivitiesMetadata value) throws IOException { + public void write(JsonWriter out, AppLinkSimpleExpression value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); // serialize additional properties @@ -285,12 +301,12 @@ else if (entry.getValue() instanceof Character) } @Override - public AgentActivitiesMetadata read(JsonReader in) throws IOException { + public AppLinkSimpleExpression read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); JsonObject jsonObj = jsonElement.getAsJsonObject(); // store additional fields in the deserialized instance - AgentActivitiesMetadata instance = thisAdapter.fromJsonTree(jsonObj); + AppLinkSimpleExpression instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { if (!openapiFields.contains(entry.getKey())) { if (entry.getValue().isJsonPrimitive()) { // primitive type @@ -317,18 +333,18 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } /** - * Create an instance of AgentActivitiesMetadata given an JSON string + * Create an instance of AppLinkSimpleExpression given an JSON string * * @param jsonString JSON string - * @return An instance of AgentActivitiesMetadata - * @throws IOException if the JSON string is invalid with respect to AgentActivitiesMetadata + * @return An instance of AppLinkSimpleExpression + * @throws IOException if the JSON string is invalid with respect to AppLinkSimpleExpression */ - public static AgentActivitiesMetadata fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, AgentActivitiesMetadata.class); + public static AppLinkSimpleExpression fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AppLinkSimpleExpression.class); } /** - * Convert an instance of AgentActivitiesMetadata to an JSON string + * Convert an instance of AppLinkSimpleExpression to an JSON string * * @return JSON string */ diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkSortCriteria.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkSortCriteria.java new file mode 100644 index 00000000..e4980b28 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkSortCriteria.java @@ -0,0 +1,317 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.AppLinkSortDirection; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * AppLinkSortCriteria + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class AppLinkSortCriteria { + public static final String SERIALIZED_NAME_DIRECTION = "direction"; + @SerializedName(SERIALIZED_NAME_DIRECTION) + @javax.annotation.Nullable + private AppLinkSortDirection direction = AppLinkSortDirection.DESC; + + public static final String SERIALIZED_NAME_PROPERTY = "property"; + @SerializedName(SERIALIZED_NAME_PROPERTY) + @javax.annotation.Nullable + private String property = "/changeLog/updatedDateTime"; + + public AppLinkSortCriteria() { + } + + public AppLinkSortCriteria direction(@javax.annotation.Nullable AppLinkSortDirection direction) { + this.direction = direction; + return this; + } + + /** + * Get direction + * @return direction + */ + @javax.annotation.Nullable + public AppLinkSortDirection getDirection() { + return direction; + } + + public void setDirection(@javax.annotation.Nullable AppLinkSortDirection direction) { + this.direction = direction; + } + + + public AppLinkSortCriteria property(@javax.annotation.Nullable String property) { + this.property = property; + return this; + } + + /** + * Possible field names to use on '400_InvalidSorting': * `/name` - App Link name * `/uuid` - App Link uuid * `/state` - App Link status * `/changeLog/createdDateTime` - Date and time when change flow starts * `/changeLog/updatedDateTime` - Date and time when change object is updated + * @return property + */ + @javax.annotation.Nullable + public String getProperty() { + return property; + } + + public void setProperty(@javax.annotation.Nullable String property) { + this.property = property; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AppLinkSortCriteria instance itself + */ + public AppLinkSortCriteria putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AppLinkSortCriteria appLinkSortCriteria = (AppLinkSortCriteria) o; + return Objects.equals(this.direction, appLinkSortCriteria.direction) && + Objects.equals(this.property, appLinkSortCriteria.property)&& + Objects.equals(this.additionalProperties, appLinkSortCriteria.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(direction, property, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AppLinkSortCriteria {\n"); + sb.append(" direction: ").append(toIndentedString(direction)).append("\n"); + sb.append(" property: ").append(toIndentedString(property)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("direction", "property")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AppLinkSortCriteria + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AppLinkSortCriteria.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in AppLinkSortCriteria is not found in the empty JSON string", AppLinkSortCriteria.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `direction` + if (jsonObj.get("direction") != null && !jsonObj.get("direction").isJsonNull()) { + AppLinkSortDirection.validateJsonElement(jsonObj.get("direction")); + } + if ((jsonObj.get("property") != null && !jsonObj.get("property").isJsonNull()) && !jsonObj.get("property").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `property` to be a primitive type in the JSON string but got `%s`", jsonObj.get("property").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AppLinkSortCriteria.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AppLinkSortCriteria' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AppLinkSortCriteria.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AppLinkSortCriteria value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AppLinkSortCriteria read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + AppLinkSortCriteria instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AppLinkSortCriteria given an JSON string + * + * @param jsonString JSON string + * @return An instance of AppLinkSortCriteria + * @throws IOException if the JSON string is invalid with respect to AppLinkSortCriteria + */ + public static AppLinkSortCriteria fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AppLinkSortCriteria.class); + } + + /** + * Convert an instance of AppLinkSortCriteria to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkSortDirection.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkSortDirection.java new file mode 100644 index 00000000..ed477c20 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkSortDirection.java @@ -0,0 +1,78 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.google.gson.annotations.SerializedName; + +import java.io.IOException; +import java.util.Locale; +import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; + +/** + * Sorting direction + */ +@JsonAdapter(AppLinkSortDirection.Adapter.class) +public enum AppLinkSortDirection { + + DESC("DESC"), + + ASC("ASC"); + + private String value; + + AppLinkSortDirection(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static AppLinkSortDirection fromValue(String value) { + for (AppLinkSortDirection b : AppLinkSortDirection.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final AppLinkSortDirection enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public AppLinkSortDirection read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return AppLinkSortDirection.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + AppLinkSortDirection.fromValue(value); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkState.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkState.java new file mode 100644 index 00000000..d6794741 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkState.java @@ -0,0 +1,88 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.google.gson.annotations.SerializedName; + +import java.io.IOException; +import java.util.Locale; +import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; + +/** + * App Link lifecycle state + */ +@JsonAdapter(AppLinkState.Adapter.class) +public enum AppLinkState { + + PROVISIONING("PROVISIONING"), + + PROVISIONING_FAILED("PROVISIONING_FAILED"), + + PROVISIONED("PROVISIONED"), + + DEPROVISIONING("DEPROVISIONING"), + + DEPROVISIONING_FAILED("DEPROVISIONING_FAILED"), + + DEPROVISIONED("DEPROVISIONED"), + + REPROVISIONING("REPROVISIONING"); + + private String value; + + AppLinkState(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static AppLinkState fromValue(String value) { + for (AppLinkState b : AppLinkState.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final AppLinkState enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public AppLinkState read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return AppLinkState.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + AppLinkState.fromValue(value); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkType.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkType.java new file mode 100644 index 00000000..c78e4948 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppLinkType.java @@ -0,0 +1,76 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.google.gson.annotations.SerializedName; + +import java.io.IOException; +import java.util.Locale; +import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; + +/** + * App Link Type + */ +@JsonAdapter(AppLinkType.Adapter.class) +public enum AppLinkType { + + APP_LINK("APP_LINK"); + + private String value; + + AppLinkType(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static AppLinkType fromValue(String value) { + for (AppLinkType b : AppLinkType.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final AppLinkType enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public AppLinkType read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return AppLinkType.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + AppLinkType.fromValue(value); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppService.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppService.java new file mode 100644 index 00000000..55f706f0 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppService.java @@ -0,0 +1,634 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.AppServiceChange; +import com.equinix.sdk.fabricv4.model.AppServiceState; +import com.equinix.sdk.fabricv4.model.AppServiceType; +import com.equinix.sdk.fabricv4.model.Changelog; +import com.equinix.sdk.fabricv4.model.Project; +import com.equinix.sdk.fabricv4.model.SimplifiedAccount; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.net.URI; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * App Service object + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class AppService { + public static final String SERIALIZED_NAME_HREF = "href"; + @SerializedName(SERIALIZED_NAME_HREF) + @javax.annotation.Nullable + private URI href; + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nonnull + private AppServiceType type = AppServiceType.APP_SERVICE; + + public static final String SERIALIZED_NAME_UUID = "uuid"; + @SerializedName(SERIALIZED_NAME_UUID) + @javax.annotation.Nullable + private UUID uuid; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable + private String description; + + public static final String SERIALIZED_NAME_STATE = "state"; + @SerializedName(SERIALIZED_NAME_STATE) + @javax.annotation.Nullable + private AppServiceState state; + + public static final String SERIALIZED_NAME_ENDPOINT = "endpoint"; + @SerializedName(SERIALIZED_NAME_ENDPOINT) + @javax.annotation.Nullable + private String endpoint; + + public static final String SERIALIZED_NAME_SOURCE_DOMAINS = "sourceDomains"; + @SerializedName(SERIALIZED_NAME_SOURCE_DOMAINS) + @javax.annotation.Nullable + private List sourceDomains = new ArrayList<>(); + + public static final String SERIALIZED_NAME_ACCOUNT = "account"; + @SerializedName(SERIALIZED_NAME_ACCOUNT) + @javax.annotation.Nullable + private SimplifiedAccount account; + + public static final String SERIALIZED_NAME_PROJECT = "project"; + @SerializedName(SERIALIZED_NAME_PROJECT) + @javax.annotation.Nullable + private Project project; + + public static final String SERIALIZED_NAME_CHANGE_LOG = "changeLog"; + @SerializedName(SERIALIZED_NAME_CHANGE_LOG) + @javax.annotation.Nullable + private Changelog changeLog; + + public static final String SERIALIZED_NAME_CHANGE = "change"; + @SerializedName(SERIALIZED_NAME_CHANGE) + @javax.annotation.Nullable + private AppServiceChange change; + + public AppService() { + } + + public AppService( + URI href + ) { + this(); + this.href = href; + } + + /** + * Resource URI + * @return href + */ + @javax.annotation.Nullable + public URI getHref() { + return href; + } + + + + public AppService type(@javax.annotation.Nonnull AppServiceType type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + */ + @javax.annotation.Nonnull + public AppServiceType getType() { + return type; + } + + public void setType(@javax.annotation.Nonnull AppServiceType type) { + this.type = type; + } + + + public AppService uuid(@javax.annotation.Nullable UUID uuid) { + this.uuid = uuid; + return this; + } + + /** + * Equinix-assigned access point identifier + * @return uuid + */ + @javax.annotation.Nullable + public UUID getUuid() { + return uuid; + } + + public void setUuid(@javax.annotation.Nullable UUID uuid) { + this.uuid = uuid; + } + + + public AppService name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Customer-provided App Service name + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public AppService description(@javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * Customer-provided App Service description + * @return description + */ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + + + public AppService state(@javax.annotation.Nullable AppServiceState state) { + this.state = state; + return this; + } + + /** + * Get state + * @return state + */ + @javax.annotation.Nullable + public AppServiceState getState() { + return state; + } + + public void setState(@javax.annotation.Nullable AppServiceState state) { + this.state = state; + } + + + public AppService endpoint(@javax.annotation.Nullable String endpoint) { + this.endpoint = endpoint; + return this; + } + + /** + * Accessible endpoint through this service + * @return endpoint + */ + @javax.annotation.Nullable + public String getEndpoint() { + return endpoint; + } + + public void setEndpoint(@javax.annotation.Nullable String endpoint) { + this.endpoint = endpoint; + } + + + public AppService sourceDomains(@javax.annotation.Nullable List sourceDomains) { + this.sourceDomains = sourceDomains; + return this; + } + + public AppService addSourceDomainsItem(String sourceDomainsItem) { + if (this.sourceDomains == null) { + this.sourceDomains = new ArrayList<>(); + } + this.sourceDomains.add(sourceDomainsItem); + return this; + } + + /** + * List of source domains from where traffic is allowed + * @return sourceDomains + */ + @javax.annotation.Nullable + public List getSourceDomains() { + return sourceDomains; + } + + public void setSourceDomains(@javax.annotation.Nullable List sourceDomains) { + this.sourceDomains = sourceDomains; + } + + + public AppService account(@javax.annotation.Nullable SimplifiedAccount account) { + this.account = account; + return this; + } + + /** + * Get account + * @return account + */ + @javax.annotation.Nullable + public SimplifiedAccount getAccount() { + return account; + } + + public void setAccount(@javax.annotation.Nullable SimplifiedAccount account) { + this.account = account; + } + + + public AppService project(@javax.annotation.Nullable Project project) { + this.project = project; + return this; + } + + /** + * Get project + * @return project + */ + @javax.annotation.Nullable + public Project getProject() { + return project; + } + + public void setProject(@javax.annotation.Nullable Project project) { + this.project = project; + } + + + public AppService changeLog(@javax.annotation.Nullable Changelog changeLog) { + this.changeLog = changeLog; + return this; + } + + /** + * Get changeLog + * @return changeLog + */ + @javax.annotation.Nullable + public Changelog getChangeLog() { + return changeLog; + } + + public void setChangeLog(@javax.annotation.Nullable Changelog changeLog) { + this.changeLog = changeLog; + } + + + public AppService change(@javax.annotation.Nullable AppServiceChange change) { + this.change = change; + return this; + } + + /** + * Get change + * @return change + */ + @javax.annotation.Nullable + public AppServiceChange getChange() { + return change; + } + + public void setChange(@javax.annotation.Nullable AppServiceChange change) { + this.change = change; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AppService instance itself + */ + public AppService putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AppService appService = (AppService) o; + return Objects.equals(this.href, appService.href) && + Objects.equals(this.type, appService.type) && + Objects.equals(this.uuid, appService.uuid) && + Objects.equals(this.name, appService.name) && + Objects.equals(this.description, appService.description) && + Objects.equals(this.state, appService.state) && + Objects.equals(this.endpoint, appService.endpoint) && + Objects.equals(this.sourceDomains, appService.sourceDomains) && + Objects.equals(this.account, appService.account) && + Objects.equals(this.project, appService.project) && + Objects.equals(this.changeLog, appService.changeLog) && + Objects.equals(this.change, appService.change)&& + Objects.equals(this.additionalProperties, appService.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(href, type, uuid, name, description, state, endpoint, sourceDomains, account, project, changeLog, change, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AppService {\n"); + sb.append(" href: ").append(toIndentedString(href)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" state: ").append(toIndentedString(state)).append("\n"); + sb.append(" endpoint: ").append(toIndentedString(endpoint)).append("\n"); + sb.append(" sourceDomains: ").append(toIndentedString(sourceDomains)).append("\n"); + sb.append(" account: ").append(toIndentedString(account)).append("\n"); + sb.append(" project: ").append(toIndentedString(project)).append("\n"); + sb.append(" changeLog: ").append(toIndentedString(changeLog)).append("\n"); + sb.append(" change: ").append(toIndentedString(change)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("href", "type", "uuid", "name", "description", "state", "endpoint", "sourceDomains", "account", "project", "changeLog", "change")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("type", "name")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AppService + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AppService.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in AppService is not found in the empty JSON string", AppService.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : AppService.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("href") != null && !jsonObj.get("href").isJsonNull()) && !jsonObj.get("href").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `href` to be a primitive type in the JSON string but got `%s`", jsonObj.get("href").toString())); + } + // validate the required field `type` + AppServiceType.validateJsonElement(jsonObj.get("type")); + if ((jsonObj.get("uuid") != null && !jsonObj.get("uuid").isJsonNull()) && !jsonObj.get("uuid").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `uuid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("uuid").toString())); + } + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + } + // validate the optional field `state` + if (jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) { + AppServiceState.validateJsonElement(jsonObj.get("state")); + } + if ((jsonObj.get("endpoint") != null && !jsonObj.get("endpoint").isJsonNull()) && !jsonObj.get("endpoint").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `endpoint` to be a primitive type in the JSON string but got `%s`", jsonObj.get("endpoint").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("sourceDomains") != null && !jsonObj.get("sourceDomains").isJsonNull() && !jsonObj.get("sourceDomains").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `sourceDomains` to be an array in the JSON string but got `%s`", jsonObj.get("sourceDomains").toString())); + } + // validate the optional field `account` + if (jsonObj.get("account") != null && !jsonObj.get("account").isJsonNull()) { + SimplifiedAccount.validateJsonElement(jsonObj.get("account")); + } + // validate the optional field `project` + if (jsonObj.get("project") != null && !jsonObj.get("project").isJsonNull()) { + Project.validateJsonElement(jsonObj.get("project")); + } + // validate the optional field `changeLog` + if (jsonObj.get("changeLog") != null && !jsonObj.get("changeLog").isJsonNull()) { + Changelog.validateJsonElement(jsonObj.get("changeLog")); + } + // validate the optional field `change` + if (jsonObj.get("change") != null && !jsonObj.get("change").isJsonNull()) { + AppServiceChange.validateJsonElement(jsonObj.get("change")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AppService.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AppService' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AppService.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AppService value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AppService read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + AppService instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AppService given an JSON string + * + * @param jsonString JSON string + * @return An instance of AppService + * @throws IOException if the JSON string is invalid with respect to AppService + */ + public static AppService fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AppService.class); + } + + /** + * Convert an instance of AppService to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppServiceAttachedAppLink.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppServiceAttachedAppLink.java new file mode 100644 index 00000000..24563ca2 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppServiceAttachedAppLink.java @@ -0,0 +1,558 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.AppLinkCloudRouter; +import com.equinix.sdk.fabricv4.model.AppLinkState; +import com.equinix.sdk.fabricv4.model.AppLinkType; +import com.equinix.sdk.fabricv4.model.Project; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.net.URI; +import java.util.Arrays; +import java.util.UUID; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * App Link object + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class AppServiceAttachedAppLink { + public static final String SERIALIZED_NAME_HREF = "href"; + @SerializedName(SERIALIZED_NAME_HREF) + @javax.annotation.Nullable + private URI href; + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nonnull + private AppLinkType type = AppLinkType.APP_LINK; + + public static final String SERIALIZED_NAME_UUID = "uuid"; + @SerializedName(SERIALIZED_NAME_UUID) + @javax.annotation.Nonnull + private UUID uuid; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable + private String name; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable + private String description; + + public static final String SERIALIZED_NAME_STATE = "state"; + @SerializedName(SERIALIZED_NAME_STATE) + @javax.annotation.Nullable + private AppLinkState state; + + public static final String SERIALIZED_NAME_ROUTER = "router"; + @SerializedName(SERIALIZED_NAME_ROUTER) + @javax.annotation.Nullable + private AppLinkCloudRouter router; + + public static final String SERIALIZED_NAME_IPV4_ADDRESS = "ipv4Address"; + @SerializedName(SERIALIZED_NAME_IPV4_ADDRESS) + @javax.annotation.Nullable + private String ipv4Address; + + public static final String SERIALIZED_NAME_BANDWIDTH = "bandwidth"; + @SerializedName(SERIALIZED_NAME_BANDWIDTH) + @javax.annotation.Nullable + private Integer bandwidth; + + public static final String SERIALIZED_NAME_PROJECT = "project"; + @SerializedName(SERIALIZED_NAME_PROJECT) + @javax.annotation.Nullable + private Project project; + + public AppServiceAttachedAppLink() { + } + + public AppServiceAttachedAppLink( + URI href + ) { + this(); + this.href = href; + } + + /** + * Resource URI + * @return href + */ + @javax.annotation.Nullable + public URI getHref() { + return href; + } + + + + public AppServiceAttachedAppLink type(@javax.annotation.Nonnull AppLinkType type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + */ + @javax.annotation.Nonnull + public AppLinkType getType() { + return type; + } + + public void setType(@javax.annotation.Nonnull AppLinkType type) { + this.type = type; + } + + + public AppServiceAttachedAppLink uuid(@javax.annotation.Nonnull UUID uuid) { + this.uuid = uuid; + return this; + } + + /** + * Equinix-assigned access point identifier + * @return uuid + */ + @javax.annotation.Nonnull + public UUID getUuid() { + return uuid; + } + + public void setUuid(@javax.annotation.Nonnull UUID uuid) { + this.uuid = uuid; + } + + + public AppServiceAttachedAppLink name(@javax.annotation.Nullable String name) { + this.name = name; + return this; + } + + /** + * Customer-provided App Link name + * @return name + */ + @javax.annotation.Nullable + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nullable String name) { + this.name = name; + } + + + public AppServiceAttachedAppLink description(@javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * Customer-provided App Link description + * @return description + */ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + + + public AppServiceAttachedAppLink state(@javax.annotation.Nullable AppLinkState state) { + this.state = state; + return this; + } + + /** + * Get state + * @return state + */ + @javax.annotation.Nullable + public AppLinkState getState() { + return state; + } + + public void setState(@javax.annotation.Nullable AppLinkState state) { + this.state = state; + } + + + public AppServiceAttachedAppLink router(@javax.annotation.Nullable AppLinkCloudRouter router) { + this.router = router; + return this; + } + + /** + * Get router + * @return router + */ + @javax.annotation.Nullable + public AppLinkCloudRouter getRouter() { + return router; + } + + public void setRouter(@javax.annotation.Nullable AppLinkCloudRouter router) { + this.router = router; + } + + + public AppServiceAttachedAppLink ipv4Address(@javax.annotation.Nullable String ipv4Address) { + this.ipv4Address = ipv4Address; + return this; + } + + /** + * App Link IP address + * @return ipv4Address + */ + @javax.annotation.Nullable + public String getIpv4Address() { + return ipv4Address; + } + + public void setIpv4Address(@javax.annotation.Nullable String ipv4Address) { + this.ipv4Address = ipv4Address; + } + + + public AppServiceAttachedAppLink bandwidth(@javax.annotation.Nullable Integer bandwidth) { + this.bandwidth = bandwidth; + return this; + } + + /** + * App Link aggregated data transfer capacity in Mbps + * @return bandwidth + */ + @javax.annotation.Nullable + public Integer getBandwidth() { + return bandwidth; + } + + public void setBandwidth(@javax.annotation.Nullable Integer bandwidth) { + this.bandwidth = bandwidth; + } + + + public AppServiceAttachedAppLink project(@javax.annotation.Nullable Project project) { + this.project = project; + return this; + } + + /** + * Get project + * @return project + */ + @javax.annotation.Nullable + public Project getProject() { + return project; + } + + public void setProject(@javax.annotation.Nullable Project project) { + this.project = project; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AppServiceAttachedAppLink instance itself + */ + public AppServiceAttachedAppLink putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AppServiceAttachedAppLink appServiceAttachedAppLink = (AppServiceAttachedAppLink) o; + return Objects.equals(this.href, appServiceAttachedAppLink.href) && + Objects.equals(this.type, appServiceAttachedAppLink.type) && + Objects.equals(this.uuid, appServiceAttachedAppLink.uuid) && + Objects.equals(this.name, appServiceAttachedAppLink.name) && + Objects.equals(this.description, appServiceAttachedAppLink.description) && + Objects.equals(this.state, appServiceAttachedAppLink.state) && + Objects.equals(this.router, appServiceAttachedAppLink.router) && + Objects.equals(this.ipv4Address, appServiceAttachedAppLink.ipv4Address) && + Objects.equals(this.bandwidth, appServiceAttachedAppLink.bandwidth) && + Objects.equals(this.project, appServiceAttachedAppLink.project)&& + Objects.equals(this.additionalProperties, appServiceAttachedAppLink.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(href, type, uuid, name, description, state, router, ipv4Address, bandwidth, project, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AppServiceAttachedAppLink {\n"); + sb.append(" href: ").append(toIndentedString(href)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" state: ").append(toIndentedString(state)).append("\n"); + sb.append(" router: ").append(toIndentedString(router)).append("\n"); + sb.append(" ipv4Address: ").append(toIndentedString(ipv4Address)).append("\n"); + sb.append(" bandwidth: ").append(toIndentedString(bandwidth)).append("\n"); + sb.append(" project: ").append(toIndentedString(project)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("href", "type", "uuid", "name", "description", "state", "router", "ipv4Address", "bandwidth", "project")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("type", "uuid")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AppServiceAttachedAppLink + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AppServiceAttachedAppLink.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in AppServiceAttachedAppLink is not found in the empty JSON string", AppServiceAttachedAppLink.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : AppServiceAttachedAppLink.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("href") != null && !jsonObj.get("href").isJsonNull()) && !jsonObj.get("href").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `href` to be a primitive type in the JSON string but got `%s`", jsonObj.get("href").toString())); + } + // validate the required field `type` + AppLinkType.validateJsonElement(jsonObj.get("type")); + if (!jsonObj.get("uuid").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `uuid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("uuid").toString())); + } + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + } + // validate the optional field `state` + if (jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) { + AppLinkState.validateJsonElement(jsonObj.get("state")); + } + // validate the optional field `router` + if (jsonObj.get("router") != null && !jsonObj.get("router").isJsonNull()) { + AppLinkCloudRouter.validateJsonElement(jsonObj.get("router")); + } + if ((jsonObj.get("ipv4Address") != null && !jsonObj.get("ipv4Address").isJsonNull()) && !jsonObj.get("ipv4Address").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `ipv4Address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ipv4Address").toString())); + } + // validate the optional field `project` + if (jsonObj.get("project") != null && !jsonObj.get("project").isJsonNull()) { + Project.validateJsonElement(jsonObj.get("project")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AppServiceAttachedAppLink.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AppServiceAttachedAppLink' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AppServiceAttachedAppLink.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AppServiceAttachedAppLink value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AppServiceAttachedAppLink read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + AppServiceAttachedAppLink instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AppServiceAttachedAppLink given an JSON string + * + * @param jsonString JSON string + * @return An instance of AppServiceAttachedAppLink + * @throws IOException if the JSON string is invalid with respect to AppServiceAttachedAppLink + */ + public static AppServiceAttachedAppLink fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AppServiceAttachedAppLink.class); + } + + /** + * Convert an instance of AppServiceAttachedAppLink to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppServiceAttachedAppLinks.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppServiceAttachedAppLinks.java new file mode 100644 index 00000000..6842acbb --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppServiceAttachedAppLinks.java @@ -0,0 +1,339 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.AppServiceAttachedAppLink; +import com.equinix.sdk.fabricv4.model.Pagination; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * AppServiceAttachedAppLinks + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class AppServiceAttachedAppLinks { + public static final String SERIALIZED_NAME_PAGINATION = "pagination"; + @SerializedName(SERIALIZED_NAME_PAGINATION) + @javax.annotation.Nullable + private Pagination pagination; + + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + @javax.annotation.Nullable + private List data = new ArrayList<>(); + + public AppServiceAttachedAppLinks() { + } + + public AppServiceAttachedAppLinks pagination(@javax.annotation.Nullable Pagination pagination) { + this.pagination = pagination; + return this; + } + + /** + * Get pagination + * @return pagination + */ + @javax.annotation.Nullable + public Pagination getPagination() { + return pagination; + } + + public void setPagination(@javax.annotation.Nullable Pagination pagination) { + this.pagination = pagination; + } + + + public AppServiceAttachedAppLinks data(@javax.annotation.Nullable List data) { + this.data = data; + return this; + } + + public AppServiceAttachedAppLinks addDataItem(AppServiceAttachedAppLink dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + return this; + } + + /** + * Data returned from the API call. + * @return data + */ + @javax.annotation.Nullable + public List getData() { + return data; + } + + public void setData(@javax.annotation.Nullable List data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AppServiceAttachedAppLinks instance itself + */ + public AppServiceAttachedAppLinks putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AppServiceAttachedAppLinks appServiceAttachedAppLinks = (AppServiceAttachedAppLinks) o; + return Objects.equals(this.pagination, appServiceAttachedAppLinks.pagination) && + Objects.equals(this.data, appServiceAttachedAppLinks.data)&& + Objects.equals(this.additionalProperties, appServiceAttachedAppLinks.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(pagination, data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AppServiceAttachedAppLinks {\n"); + sb.append(" pagination: ").append(toIndentedString(pagination)).append("\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("pagination", "data")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AppServiceAttachedAppLinks + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AppServiceAttachedAppLinks.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in AppServiceAttachedAppLinks is not found in the empty JSON string", AppServiceAttachedAppLinks.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `pagination` + if (jsonObj.get("pagination") != null && !jsonObj.get("pagination").isJsonNull()) { + Pagination.validateJsonElement(jsonObj.get("pagination")); + } + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); + if (jsonArraydata != null) { + // ensure the json data is an array + if (!jsonObj.get("data").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + } + + // validate the optional field `data` (array) + for (int i = 0; i < jsonArraydata.size(); i++) { + AppServiceAttachedAppLink.validateJsonElement(jsonArraydata.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AppServiceAttachedAppLinks.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AppServiceAttachedAppLinks' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AppServiceAttachedAppLinks.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AppServiceAttachedAppLinks value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AppServiceAttachedAppLinks read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + AppServiceAttachedAppLinks instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AppServiceAttachedAppLinks given an JSON string + * + * @param jsonString JSON string + * @return An instance of AppServiceAttachedAppLinks + * @throws IOException if the JSON string is invalid with respect to AppServiceAttachedAppLinks + */ + public static AppServiceAttachedAppLinks fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AppServiceAttachedAppLinks.class); + } + + /** + * Convert an instance of AppServiceAttachedAppLinks to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AttachLogoResponse.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppServiceAttachedAppSubscription.java similarity index 65% rename from services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AttachLogoResponse.java rename to services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppServiceAttachedAppSubscription.java index 61f97895..d04348dc 100644 --- a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AttachLogoResponse.java +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppServiceAttachedAppSubscription.java @@ -13,13 +13,18 @@ import java.util.Objects; import java.util.Locale; +import com.equinix.sdk.fabricv4.model.AppSubscriptionState; +import com.equinix.sdk.fabricv4.model.AppSubscriptionType; +import com.equinix.sdk.fabricv4.model.SimplifiedAccount; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.net.URI; import java.util.Arrays; +import java.util.UUID; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -46,130 +51,129 @@ import com.equinix.sdk.fabricv4.JSON; /** - * AttachLogoResponse + * App Subscription object attached to an App Service */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") -public class AttachLogoResponse { +public class AppServiceAttachedAppSubscription { public static final String SERIALIZED_NAME_HREF = "href"; @SerializedName(SERIALIZED_NAME_HREF) @javax.annotation.Nullable - private String href; + private URI href; public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) @javax.annotation.Nonnull - private String type; + private AppSubscriptionType type = AppSubscriptionType.APP_SUBSCRIPTION; public static final String SERIALIZED_NAME_UUID = "uuid"; @SerializedName(SERIALIZED_NAME_UUID) @javax.annotation.Nonnull - private String uuid; + private UUID uuid; - public static final String SERIALIZED_NAME_ATTACHMENT_STATUS = "attachmentStatus"; - @SerializedName(SERIALIZED_NAME_ATTACHMENT_STATUS) - @javax.annotation.Nullable - private String attachmentStatus; + public static final String SERIALIZED_NAME_STATE = "state"; + @SerializedName(SERIALIZED_NAME_STATE) + @javax.annotation.Nonnull + private AppSubscriptionState state; - public static final String SERIALIZED_NAME_EXTENSION_TYPE = "extensionType"; - @SerializedName(SERIALIZED_NAME_EXTENSION_TYPE) + public static final String SERIALIZED_NAME_ACCOUNT = "account"; + @SerializedName(SERIALIZED_NAME_ACCOUNT) @javax.annotation.Nullable - private String extensionType; + private SimplifiedAccount account; - public AttachLogoResponse() { + public AppServiceAttachedAppSubscription() { } - public AttachLogoResponse href(@javax.annotation.Nullable String href) { + public AppServiceAttachedAppSubscription( + URI href + ) { + this(); this.href = href; - return this; } /** - * URL to the attached logo + * Resource URI * @return href */ @javax.annotation.Nullable - public String getHref() { + public URI getHref() { return href; } - public void setHref(@javax.annotation.Nullable String href) { - this.href = href; - } - public AttachLogoResponse type(@javax.annotation.Nonnull String type) { + public AppServiceAttachedAppSubscription type(@javax.annotation.Nonnull AppSubscriptionType type) { this.type = type; return this; } /** - * Type of the logo or attachment + * Get type * @return type */ @javax.annotation.Nonnull - public String getType() { + public AppSubscriptionType getType() { return type; } - public void setType(@javax.annotation.Nonnull String type) { + public void setType(@javax.annotation.Nonnull AppSubscriptionType type) { this.type = type; } - public AttachLogoResponse uuid(@javax.annotation.Nonnull String uuid) { + public AppServiceAttachedAppSubscription uuid(@javax.annotation.Nonnull UUID uuid) { this.uuid = uuid; return this; } /** - * Unique identifier for the logo + * Equinix-assigned access point identifier * @return uuid */ @javax.annotation.Nonnull - public String getUuid() { + public UUID getUuid() { return uuid; } - public void setUuid(@javax.annotation.Nonnull String uuid) { + public void setUuid(@javax.annotation.Nonnull UUID uuid) { this.uuid = uuid; } - public AttachLogoResponse attachmentStatus(@javax.annotation.Nullable String attachmentStatus) { - this.attachmentStatus = attachmentStatus; + public AppServiceAttachedAppSubscription state(@javax.annotation.Nonnull AppSubscriptionState state) { + this.state = state; return this; } /** - * Status of the attachment operation - * @return attachmentStatus + * Get state + * @return state */ - @javax.annotation.Nullable - public String getAttachmentStatus() { - return attachmentStatus; + @javax.annotation.Nonnull + public AppSubscriptionState getState() { + return state; } - public void setAttachmentStatus(@javax.annotation.Nullable String attachmentStatus) { - this.attachmentStatus = attachmentStatus; + public void setState(@javax.annotation.Nonnull AppSubscriptionState state) { + this.state = state; } - public AttachLogoResponse extensionType(@javax.annotation.Nullable String extensionType) { - this.extensionType = extensionType; + public AppServiceAttachedAppSubscription account(@javax.annotation.Nullable SimplifiedAccount account) { + this.account = account; return this; } /** - * Extension type of logo - * @return extensionType + * Get account + * @return account */ @javax.annotation.Nullable - public String getExtensionType() { - return extensionType; + public SimplifiedAccount getAccount() { + return account; } - public void setExtensionType(@javax.annotation.Nullable String extensionType) { - this.extensionType = extensionType; + public void setAccount(@javax.annotation.Nullable SimplifiedAccount account) { + this.account = account; } /** @@ -185,9 +189,9 @@ public void setExtensionType(@javax.annotation.Nullable String extensionType) { * * @param key name of the property * @param value value of the property - * @return the AttachLogoResponse instance itself + * @return the AppServiceAttachedAppSubscription instance itself */ - public AttachLogoResponse putAdditionalProperty(String key, Object value) { + public AppServiceAttachedAppSubscription putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -226,29 +230,29 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - AttachLogoResponse attachLogoResponse = (AttachLogoResponse) o; - return Objects.equals(this.href, attachLogoResponse.href) && - Objects.equals(this.type, attachLogoResponse.type) && - Objects.equals(this.uuid, attachLogoResponse.uuid) && - Objects.equals(this.attachmentStatus, attachLogoResponse.attachmentStatus) && - Objects.equals(this.extensionType, attachLogoResponse.extensionType)&& - Objects.equals(this.additionalProperties, attachLogoResponse.additionalProperties); + AppServiceAttachedAppSubscription appServiceAttachedAppSubscription = (AppServiceAttachedAppSubscription) o; + return Objects.equals(this.href, appServiceAttachedAppSubscription.href) && + Objects.equals(this.type, appServiceAttachedAppSubscription.type) && + Objects.equals(this.uuid, appServiceAttachedAppSubscription.uuid) && + Objects.equals(this.state, appServiceAttachedAppSubscription.state) && + Objects.equals(this.account, appServiceAttachedAppSubscription.account)&& + Objects.equals(this.additionalProperties, appServiceAttachedAppSubscription.additionalProperties); } @Override public int hashCode() { - return Objects.hash(href, type, uuid, attachmentStatus, extensionType, additionalProperties); + return Objects.hash(href, type, uuid, state, account, additionalProperties); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class AttachLogoResponse {\n"); + sb.append("class AppServiceAttachedAppSubscription {\n"); sb.append(" href: ").append(toIndentedString(href)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); - sb.append(" attachmentStatus: ").append(toIndentedString(attachmentStatus)).append("\n"); - sb.append(" extensionType: ").append(toIndentedString(extensionType)).append("\n"); + sb.append(" state: ").append(toIndentedString(state)).append("\n"); + sb.append(" account: ").append(toIndentedString(account)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); @@ -271,27 +275,27 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("href", "type", "uuid", "attachmentStatus", "extensionType")); + openapiFields = new HashSet(Arrays.asList("href", "type", "uuid", "state", "account")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("type", "uuid")); + openapiRequiredFields = new HashSet(Arrays.asList("type", "uuid", "state")); } /** * Validates the JSON Element and throws an exception if issues found * * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to AttachLogoResponse + * @throws IOException if the JSON Element is invalid with respect to AppServiceAttachedAppSubscription */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { - if (!AttachLogoResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in AttachLogoResponse is not found in the empty JSON string", AttachLogoResponse.openapiRequiredFields.toString())); + if (!AppServiceAttachedAppSubscription.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in AppServiceAttachedAppSubscription is not found in the empty JSON string", AppServiceAttachedAppSubscription.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : AttachLogoResponse.openapiRequiredFields) { + for (String requiredField : AppServiceAttachedAppSubscription.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } @@ -300,17 +304,16 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("href") != null && !jsonObj.get("href").isJsonNull()) && !jsonObj.get("href").isJsonPrimitive()) { throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `href` to be a primitive type in the JSON string but got `%s`", jsonObj.get("href").toString())); } - if (!jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } + // validate the required field `type` + AppSubscriptionType.validateJsonElement(jsonObj.get("type")); if (!jsonObj.get("uuid").isJsonPrimitive()) { throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `uuid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("uuid").toString())); } - if ((jsonObj.get("attachmentStatus") != null && !jsonObj.get("attachmentStatus").isJsonNull()) && !jsonObj.get("attachmentStatus").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `attachmentStatus` to be a primitive type in the JSON string but got `%s`", jsonObj.get("attachmentStatus").toString())); - } - if ((jsonObj.get("extensionType") != null && !jsonObj.get("extensionType").isJsonNull()) && !jsonObj.get("extensionType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `extensionType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("extensionType").toString())); + // validate the required field `state` + AppSubscriptionState.validateJsonElement(jsonObj.get("state")); + // validate the optional field `account` + if (jsonObj.get("account") != null && !jsonObj.get("account").isJsonNull()) { + SimplifiedAccount.validateJsonElement(jsonObj.get("account")); } } @@ -318,16 +321,16 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!AttachLogoResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'AttachLogoResponse' and its subtypes + if (!AppServiceAttachedAppSubscription.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AppServiceAttachedAppSubscription' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(AttachLogoResponse.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AppServiceAttachedAppSubscription.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, AttachLogoResponse value) throws IOException { + public void write(JsonWriter out, AppServiceAttachedAppSubscription value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); // serialize additional properties @@ -355,12 +358,12 @@ else if (entry.getValue() instanceof Character) } @Override - public AttachLogoResponse read(JsonReader in) throws IOException { + public AppServiceAttachedAppSubscription read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); JsonObject jsonObj = jsonElement.getAsJsonObject(); // store additional fields in the deserialized instance - AttachLogoResponse instance = thisAdapter.fromJsonTree(jsonObj); + AppServiceAttachedAppSubscription instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { if (!openapiFields.contains(entry.getKey())) { if (entry.getValue().isJsonPrimitive()) { // primitive type @@ -387,18 +390,18 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } /** - * Create an instance of AttachLogoResponse given an JSON string + * Create an instance of AppServiceAttachedAppSubscription given an JSON string * * @param jsonString JSON string - * @return An instance of AttachLogoResponse - * @throws IOException if the JSON string is invalid with respect to AttachLogoResponse + * @return An instance of AppServiceAttachedAppSubscription + * @throws IOException if the JSON string is invalid with respect to AppServiceAttachedAppSubscription */ - public static AttachLogoResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, AttachLogoResponse.class); + public static AppServiceAttachedAppSubscription fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AppServiceAttachedAppSubscription.class); } /** - * Convert an instance of AttachLogoResponse to an JSON string + * Convert an instance of AppServiceAttachedAppSubscription to an JSON string * * @return JSON string */ diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppServiceAttachedAppSubscriptionFilter.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppServiceAttachedAppSubscriptionFilter.java new file mode 100644 index 00000000..4c6c4112 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppServiceAttachedAppSubscriptionFilter.java @@ -0,0 +1,269 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.AppServiceAttachedAppSubscriptionOrFilter; +import com.equinix.sdk.fabricv4.model.AppServiceAttachedAppSubscriptionSimpleExpression; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + + + +import java.io.IOException; +import java.lang.reflect.Type; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Locale; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.JsonPrimitive; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonSerializationContext; +import com.google.gson.JsonSerializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonArray; +import com.google.gson.JsonParseException; + +import com.equinix.sdk.fabricv4.JSON; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class AppServiceAttachedAppSubscriptionFilter extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(AppServiceAttachedAppSubscriptionFilter.class.getName()); + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AppServiceAttachedAppSubscriptionFilter.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AppServiceAttachedAppSubscriptionFilter' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter adapterAppServiceAttachedAppSubscriptionSimpleExpression = gson.getDelegateAdapter(this, TypeToken.get(AppServiceAttachedAppSubscriptionSimpleExpression.class)); + final TypeAdapter adapterAppServiceAttachedAppSubscriptionOrFilter = gson.getDelegateAdapter(this, TypeToken.get(AppServiceAttachedAppSubscriptionOrFilter.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AppServiceAttachedAppSubscriptionFilter value) throws IOException { + if (value == null || value.getActualInstance() == null) { + elementAdapter.write(out, null); + return; + } + + // check if the actual instance is of the type `AppServiceAttachedAppSubscriptionSimpleExpression` + if (value.getActualInstance() instanceof AppServiceAttachedAppSubscriptionSimpleExpression) { + JsonElement element = adapterAppServiceAttachedAppSubscriptionSimpleExpression.toJsonTree((AppServiceAttachedAppSubscriptionSimpleExpression)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + // check if the actual instance is of the type `AppServiceAttachedAppSubscriptionOrFilter` + if (value.getActualInstance() instanceof AppServiceAttachedAppSubscriptionOrFilter) { + JsonElement element = adapterAppServiceAttachedAppSubscriptionOrFilter.toJsonTree((AppServiceAttachedAppSubscriptionOrFilter)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + throw new IOException("Failed to serialize as the type doesn't match anyOf schemas: AppServiceAttachedAppSubscriptionOrFilter, AppServiceAttachedAppSubscriptionSimpleExpression"); + } + + @Override + public AppServiceAttachedAppSubscriptionFilter read(JsonReader in) throws IOException { + Object deserialized = null; + JsonElement jsonElement = elementAdapter.read(in); + + ArrayList errorMessages = new ArrayList<>(); + TypeAdapter actualAdapter = elementAdapter; + + // deserialize AppServiceAttachedAppSubscriptionSimpleExpression + try { + // validate the JSON object to see if any exception is thrown + AppServiceAttachedAppSubscriptionSimpleExpression.validateJsonElement(jsonElement); + actualAdapter = adapterAppServiceAttachedAppSubscriptionSimpleExpression; + AppServiceAttachedAppSubscriptionFilter ret = new AppServiceAttachedAppSubscriptionFilter(); + ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); + return ret; + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format(Locale.ROOT, "Deserialization for AppServiceAttachedAppSubscriptionSimpleExpression failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'AppServiceAttachedAppSubscriptionSimpleExpression'", e); + } + // deserialize AppServiceAttachedAppSubscriptionOrFilter + try { + // validate the JSON object to see if any exception is thrown + AppServiceAttachedAppSubscriptionOrFilter.validateJsonElement(jsonElement); + actualAdapter = adapterAppServiceAttachedAppSubscriptionOrFilter; + AppServiceAttachedAppSubscriptionFilter ret = new AppServiceAttachedAppSubscriptionFilter(); + ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); + return ret; + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format(Locale.ROOT, "Deserialization for AppServiceAttachedAppSubscriptionOrFilter failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'AppServiceAttachedAppSubscriptionOrFilter'", e); + } + + throw new IOException(String.format(Locale.ROOT, "Failed deserialization for AppServiceAttachedAppSubscriptionFilter: no class matches result, expected at least 1. Detailed failure message for anyOf schemas: %s. JSON: %s", errorMessages, jsonElement.toString())); + } + }.nullSafe(); + } + } + + // store a list of schema names defined in anyOf + public static final Map> schemas = new HashMap>(); + + public AppServiceAttachedAppSubscriptionFilter() { + super("anyOf", Boolean.FALSE); + } + + public AppServiceAttachedAppSubscriptionFilter(Object o) { + super("anyOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("AppServiceAttachedAppSubscriptionSimpleExpression", AppServiceAttachedAppSubscriptionSimpleExpression.class); + schemas.put("AppServiceAttachedAppSubscriptionOrFilter", AppServiceAttachedAppSubscriptionOrFilter.class); + } + + @Override + public Map> getSchemas() { + return AppServiceAttachedAppSubscriptionFilter.schemas; + } + + /** + * Set the instance that matches the anyOf child schema, check + * the instance parameter is valid against the anyOf child schemas: + * AppServiceAttachedAppSubscriptionOrFilter, AppServiceAttachedAppSubscriptionSimpleExpression + * + * It could be an instance of the 'anyOf' schemas. + */ + @Override + public void setActualInstance(Object instance) { + if (instance instanceof AppServiceAttachedAppSubscriptionSimpleExpression) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof AppServiceAttachedAppSubscriptionOrFilter) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException("Invalid instance type. Must be AppServiceAttachedAppSubscriptionOrFilter, AppServiceAttachedAppSubscriptionSimpleExpression"); + } + + /** + * Get the actual instance, which can be the following: + * AppServiceAttachedAppSubscriptionOrFilter, AppServiceAttachedAppSubscriptionSimpleExpression + * + * @return The actual instance (AppServiceAttachedAppSubscriptionOrFilter, AppServiceAttachedAppSubscriptionSimpleExpression) + */ + @SuppressWarnings("unchecked") + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `AppServiceAttachedAppSubscriptionSimpleExpression`. If the actual instance is not `AppServiceAttachedAppSubscriptionSimpleExpression`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `AppServiceAttachedAppSubscriptionSimpleExpression` + * @throws ClassCastException if the instance is not `AppServiceAttachedAppSubscriptionSimpleExpression` + */ + public AppServiceAttachedAppSubscriptionSimpleExpression getAppServiceAttachedAppSubscriptionSimpleExpression() throws ClassCastException { + return (AppServiceAttachedAppSubscriptionSimpleExpression)super.getActualInstance(); + } + + /** + * Get the actual instance of `AppServiceAttachedAppSubscriptionOrFilter`. If the actual instance is not `AppServiceAttachedAppSubscriptionOrFilter`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `AppServiceAttachedAppSubscriptionOrFilter` + * @throws ClassCastException if the instance is not `AppServiceAttachedAppSubscriptionOrFilter` + */ + public AppServiceAttachedAppSubscriptionOrFilter getAppServiceAttachedAppSubscriptionOrFilter() throws ClassCastException { + return (AppServiceAttachedAppSubscriptionOrFilter)super.getActualInstance(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AppServiceAttachedAppSubscriptionFilter + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + // validate anyOf schemas one by one + ArrayList errorMessages = new ArrayList<>(); + // validate the json string with AppServiceAttachedAppSubscriptionSimpleExpression + try { + AppServiceAttachedAppSubscriptionSimpleExpression.validateJsonElement(jsonElement); + return; + } catch (Exception e) { + errorMessages.add(String.format(Locale.ROOT, "Deserialization for AppServiceAttachedAppSubscriptionSimpleExpression failed with `%s`.", e.getMessage())); + // continue to the next one + } + // validate the json string with AppServiceAttachedAppSubscriptionOrFilter + try { + AppServiceAttachedAppSubscriptionOrFilter.validateJsonElement(jsonElement); + return; + } catch (Exception e) { + errorMessages.add(String.format(Locale.ROOT, "Deserialization for AppServiceAttachedAppSubscriptionOrFilter failed with `%s`.", e.getMessage())); + // continue to the next one + } + throw new IOException(String.format(Locale.ROOT, "The JSON string is invalid for AppServiceAttachedAppSubscriptionFilter with anyOf schemas: AppServiceAttachedAppSubscriptionOrFilter, AppServiceAttachedAppSubscriptionSimpleExpression. no class match the result, expected at least 1. Detailed failure message for anyOf schemas: %s. JSON: %s", errorMessages, jsonElement.toString())); + } + + /** + * Create an instance of AppServiceAttachedAppSubscriptionFilter given an JSON string + * + * @param jsonString JSON string + * @return An instance of AppServiceAttachedAppSubscriptionFilter + * @throws IOException if the JSON string is invalid with respect to AppServiceAttachedAppSubscriptionFilter + */ + public static AppServiceAttachedAppSubscriptionFilter fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AppServiceAttachedAppSubscriptionFilter.class); + } + + /** + * Convert an instance of AppServiceAttachedAppSubscriptionFilter to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppServiceAttachedAppSubscriptionFilters.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppServiceAttachedAppSubscriptionFilters.java new file mode 100644 index 00000000..f19c419d --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppServiceAttachedAppSubscriptionFilters.java @@ -0,0 +1,308 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.AppServiceAttachedAppSubscriptionFilter; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * AppServiceAttachedAppSubscriptionFilters + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class AppServiceAttachedAppSubscriptionFilters { + public static final String SERIALIZED_NAME_AND = "and"; + @SerializedName(SERIALIZED_NAME_AND) + @javax.annotation.Nullable + private List and = new ArrayList<>(); + + public AppServiceAttachedAppSubscriptionFilters() { + } + + public AppServiceAttachedAppSubscriptionFilters and(@javax.annotation.Nullable List and) { + this.and = and; + return this; + } + + public AppServiceAttachedAppSubscriptionFilters addAndItem(AppServiceAttachedAppSubscriptionFilter andItem) { + if (this.and == null) { + this.and = new ArrayList<>(); + } + this.and.add(andItem); + return this; + } + + /** + * Get and + * @return and + */ + @javax.annotation.Nullable + public List getAnd() { + return and; + } + + public void setAnd(@javax.annotation.Nullable List and) { + this.and = and; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AppServiceAttachedAppSubscriptionFilters instance itself + */ + public AppServiceAttachedAppSubscriptionFilters putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AppServiceAttachedAppSubscriptionFilters appServiceAttachedAppSubscriptionFilters = (AppServiceAttachedAppSubscriptionFilters) o; + return Objects.equals(this.and, appServiceAttachedAppSubscriptionFilters.and)&& + Objects.equals(this.additionalProperties, appServiceAttachedAppSubscriptionFilters.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(and, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AppServiceAttachedAppSubscriptionFilters {\n"); + sb.append(" and: ").append(toIndentedString(and)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("and")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AppServiceAttachedAppSubscriptionFilters + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AppServiceAttachedAppSubscriptionFilters.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in AppServiceAttachedAppSubscriptionFilters is not found in the empty JSON string", AppServiceAttachedAppSubscriptionFilters.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("and") != null && !jsonObj.get("and").isJsonNull()) { + JsonArray jsonArrayand = jsonObj.getAsJsonArray("and"); + if (jsonArrayand != null) { + // ensure the json data is an array + if (!jsonObj.get("and").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `and` to be an array in the JSON string but got `%s`", jsonObj.get("and").toString())); + } + + // validate the optional field `and` (array) + for (int i = 0; i < jsonArrayand.size(); i++) { + AppServiceAttachedAppSubscriptionFilter.validateJsonElement(jsonArrayand.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AppServiceAttachedAppSubscriptionFilters.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AppServiceAttachedAppSubscriptionFilters' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AppServiceAttachedAppSubscriptionFilters.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AppServiceAttachedAppSubscriptionFilters value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AppServiceAttachedAppSubscriptionFilters read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + AppServiceAttachedAppSubscriptionFilters instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AppServiceAttachedAppSubscriptionFilters given an JSON string + * + * @param jsonString JSON string + * @return An instance of AppServiceAttachedAppSubscriptionFilters + * @throws IOException if the JSON string is invalid with respect to AppServiceAttachedAppSubscriptionFilters + */ + public static AppServiceAttachedAppSubscriptionFilters fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AppServiceAttachedAppSubscriptionFilters.class); + } + + /** + * Convert an instance of AppServiceAttachedAppSubscriptionFilters to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppServiceAttachedAppSubscriptionOrFilter.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppServiceAttachedAppSubscriptionOrFilter.java new file mode 100644 index 00000000..8e69b1bc --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppServiceAttachedAppSubscriptionOrFilter.java @@ -0,0 +1,308 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.AppServiceAttachedAppSubscriptionSimpleExpression; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * AppServiceAttachedAppSubscriptionOrFilter + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class AppServiceAttachedAppSubscriptionOrFilter { + public static final String SERIALIZED_NAME_OR = "or"; + @SerializedName(SERIALIZED_NAME_OR) + @javax.annotation.Nullable + private List or = new ArrayList<>(); + + public AppServiceAttachedAppSubscriptionOrFilter() { + } + + public AppServiceAttachedAppSubscriptionOrFilter or(@javax.annotation.Nullable List or) { + this.or = or; + return this; + } + + public AppServiceAttachedAppSubscriptionOrFilter addOrItem(AppServiceAttachedAppSubscriptionSimpleExpression orItem) { + if (this.or == null) { + this.or = new ArrayList<>(); + } + this.or.add(orItem); + return this; + } + + /** + * Get or + * @return or + */ + @javax.annotation.Nullable + public List getOr() { + return or; + } + + public void setOr(@javax.annotation.Nullable List or) { + this.or = or; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AppServiceAttachedAppSubscriptionOrFilter instance itself + */ + public AppServiceAttachedAppSubscriptionOrFilter putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AppServiceAttachedAppSubscriptionOrFilter appServiceAttachedAppSubscriptionOrFilter = (AppServiceAttachedAppSubscriptionOrFilter) o; + return Objects.equals(this.or, appServiceAttachedAppSubscriptionOrFilter.or)&& + Objects.equals(this.additionalProperties, appServiceAttachedAppSubscriptionOrFilter.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(or, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AppServiceAttachedAppSubscriptionOrFilter {\n"); + sb.append(" or: ").append(toIndentedString(or)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("or")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AppServiceAttachedAppSubscriptionOrFilter + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AppServiceAttachedAppSubscriptionOrFilter.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in AppServiceAttachedAppSubscriptionOrFilter is not found in the empty JSON string", AppServiceAttachedAppSubscriptionOrFilter.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("or") != null && !jsonObj.get("or").isJsonNull()) { + JsonArray jsonArrayor = jsonObj.getAsJsonArray("or"); + if (jsonArrayor != null) { + // ensure the json data is an array + if (!jsonObj.get("or").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `or` to be an array in the JSON string but got `%s`", jsonObj.get("or").toString())); + } + + // validate the optional field `or` (array) + for (int i = 0; i < jsonArrayor.size(); i++) { + AppServiceAttachedAppSubscriptionSimpleExpression.validateJsonElement(jsonArrayor.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AppServiceAttachedAppSubscriptionOrFilter.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AppServiceAttachedAppSubscriptionOrFilter' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AppServiceAttachedAppSubscriptionOrFilter.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AppServiceAttachedAppSubscriptionOrFilter value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AppServiceAttachedAppSubscriptionOrFilter read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + AppServiceAttachedAppSubscriptionOrFilter instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AppServiceAttachedAppSubscriptionOrFilter given an JSON string + * + * @param jsonString JSON string + * @return An instance of AppServiceAttachedAppSubscriptionOrFilter + * @throws IOException if the JSON string is invalid with respect to AppServiceAttachedAppSubscriptionOrFilter + */ + public static AppServiceAttachedAppSubscriptionOrFilter fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AppServiceAttachedAppSubscriptionOrFilter.class); + } + + /** + * Convert an instance of AppServiceAttachedAppSubscriptionOrFilter to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppServiceAttachedAppSubscriptionSearchRequest.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppServiceAttachedAppSubscriptionSearchRequest.java new file mode 100644 index 00000000..77a90d5b --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppServiceAttachedAppSubscriptionSearchRequest.java @@ -0,0 +1,370 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.AppServiceAttachedAppSubscriptionFilters; +import com.equinix.sdk.fabricv4.model.AppServiceAttachedAppSubscriptionSortCriteria; +import com.equinix.sdk.fabricv4.model.PaginationRequest; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * Search requests containing criteria + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class AppServiceAttachedAppSubscriptionSearchRequest { + public static final String SERIALIZED_NAME_FILTER = "filter"; + @SerializedName(SERIALIZED_NAME_FILTER) + @javax.annotation.Nullable + private AppServiceAttachedAppSubscriptionFilters filter; + + public static final String SERIALIZED_NAME_PAGINATION = "pagination"; + @SerializedName(SERIALIZED_NAME_PAGINATION) + @javax.annotation.Nullable + private PaginationRequest pagination; + + public static final String SERIALIZED_NAME_SORT = "sort"; + @SerializedName(SERIALIZED_NAME_SORT) + @javax.annotation.Nullable + private List sort = new ArrayList<>(); + + public AppServiceAttachedAppSubscriptionSearchRequest() { + } + + public AppServiceAttachedAppSubscriptionSearchRequest filter(@javax.annotation.Nullable AppServiceAttachedAppSubscriptionFilters filter) { + this.filter = filter; + return this; + } + + /** + * Get filter + * @return filter + */ + @javax.annotation.Nullable + public AppServiceAttachedAppSubscriptionFilters getFilter() { + return filter; + } + + public void setFilter(@javax.annotation.Nullable AppServiceAttachedAppSubscriptionFilters filter) { + this.filter = filter; + } + + + public AppServiceAttachedAppSubscriptionSearchRequest pagination(@javax.annotation.Nullable PaginationRequest pagination) { + this.pagination = pagination; + return this; + } + + /** + * Get pagination + * @return pagination + */ + @javax.annotation.Nullable + public PaginationRequest getPagination() { + return pagination; + } + + public void setPagination(@javax.annotation.Nullable PaginationRequest pagination) { + this.pagination = pagination; + } + + + public AppServiceAttachedAppSubscriptionSearchRequest sort(@javax.annotation.Nullable List sort) { + this.sort = sort; + return this; + } + + public AppServiceAttachedAppSubscriptionSearchRequest addSortItem(AppServiceAttachedAppSubscriptionSortCriteria sortItem) { + if (this.sort == null) { + this.sort = new ArrayList<>(); + } + this.sort.add(sortItem); + return this; + } + + /** + * Get sort + * @return sort + */ + @javax.annotation.Nullable + public List getSort() { + return sort; + } + + public void setSort(@javax.annotation.Nullable List sort) { + this.sort = sort; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AppServiceAttachedAppSubscriptionSearchRequest instance itself + */ + public AppServiceAttachedAppSubscriptionSearchRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AppServiceAttachedAppSubscriptionSearchRequest appServiceAttachedAppSubscriptionSearchRequest = (AppServiceAttachedAppSubscriptionSearchRequest) o; + return Objects.equals(this.filter, appServiceAttachedAppSubscriptionSearchRequest.filter) && + Objects.equals(this.pagination, appServiceAttachedAppSubscriptionSearchRequest.pagination) && + Objects.equals(this.sort, appServiceAttachedAppSubscriptionSearchRequest.sort)&& + Objects.equals(this.additionalProperties, appServiceAttachedAppSubscriptionSearchRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(filter, pagination, sort, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AppServiceAttachedAppSubscriptionSearchRequest {\n"); + sb.append(" filter: ").append(toIndentedString(filter)).append("\n"); + sb.append(" pagination: ").append(toIndentedString(pagination)).append("\n"); + sb.append(" sort: ").append(toIndentedString(sort)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("filter", "pagination", "sort")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AppServiceAttachedAppSubscriptionSearchRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AppServiceAttachedAppSubscriptionSearchRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in AppServiceAttachedAppSubscriptionSearchRequest is not found in the empty JSON string", AppServiceAttachedAppSubscriptionSearchRequest.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `filter` + if (jsonObj.get("filter") != null && !jsonObj.get("filter").isJsonNull()) { + AppServiceAttachedAppSubscriptionFilters.validateJsonElement(jsonObj.get("filter")); + } + // validate the optional field `pagination` + if (jsonObj.get("pagination") != null && !jsonObj.get("pagination").isJsonNull()) { + PaginationRequest.validateJsonElement(jsonObj.get("pagination")); + } + if (jsonObj.get("sort") != null && !jsonObj.get("sort").isJsonNull()) { + JsonArray jsonArraysort = jsonObj.getAsJsonArray("sort"); + if (jsonArraysort != null) { + // ensure the json data is an array + if (!jsonObj.get("sort").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `sort` to be an array in the JSON string but got `%s`", jsonObj.get("sort").toString())); + } + + // validate the optional field `sort` (array) + for (int i = 0; i < jsonArraysort.size(); i++) { + AppServiceAttachedAppSubscriptionSortCriteria.validateJsonElement(jsonArraysort.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AppServiceAttachedAppSubscriptionSearchRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AppServiceAttachedAppSubscriptionSearchRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AppServiceAttachedAppSubscriptionSearchRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AppServiceAttachedAppSubscriptionSearchRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AppServiceAttachedAppSubscriptionSearchRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + AppServiceAttachedAppSubscriptionSearchRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AppServiceAttachedAppSubscriptionSearchRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of AppServiceAttachedAppSubscriptionSearchRequest + * @throws IOException if the JSON string is invalid with respect to AppServiceAttachedAppSubscriptionSearchRequest + */ + public static AppServiceAttachedAppSubscriptionSearchRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AppServiceAttachedAppSubscriptionSearchRequest.class); + } + + /** + * Convert an instance of AppServiceAttachedAppSubscriptionSearchRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppServiceAttachedAppSubscriptionSearchResponse.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppServiceAttachedAppSubscriptionSearchResponse.java new file mode 100644 index 00000000..09baef67 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppServiceAttachedAppSubscriptionSearchResponse.java @@ -0,0 +1,339 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.AppServiceAttachedAppSubscription; +import com.equinix.sdk.fabricv4.model.Pagination; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * AppServiceAttachedAppSubscriptionSearchResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class AppServiceAttachedAppSubscriptionSearchResponse { + public static final String SERIALIZED_NAME_PAGINATION = "pagination"; + @SerializedName(SERIALIZED_NAME_PAGINATION) + @javax.annotation.Nullable + private Pagination pagination; + + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + @javax.annotation.Nullable + private List data = new ArrayList<>(); + + public AppServiceAttachedAppSubscriptionSearchResponse() { + } + + public AppServiceAttachedAppSubscriptionSearchResponse pagination(@javax.annotation.Nullable Pagination pagination) { + this.pagination = pagination; + return this; + } + + /** + * Get pagination + * @return pagination + */ + @javax.annotation.Nullable + public Pagination getPagination() { + return pagination; + } + + public void setPagination(@javax.annotation.Nullable Pagination pagination) { + this.pagination = pagination; + } + + + public AppServiceAttachedAppSubscriptionSearchResponse data(@javax.annotation.Nullable List data) { + this.data = data; + return this; + } + + public AppServiceAttachedAppSubscriptionSearchResponse addDataItem(AppServiceAttachedAppSubscription dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + return this; + } + + /** + * Data returned from the API call. + * @return data + */ + @javax.annotation.Nullable + public List getData() { + return data; + } + + public void setData(@javax.annotation.Nullable List data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AppServiceAttachedAppSubscriptionSearchResponse instance itself + */ + public AppServiceAttachedAppSubscriptionSearchResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AppServiceAttachedAppSubscriptionSearchResponse appServiceAttachedAppSubscriptionSearchResponse = (AppServiceAttachedAppSubscriptionSearchResponse) o; + return Objects.equals(this.pagination, appServiceAttachedAppSubscriptionSearchResponse.pagination) && + Objects.equals(this.data, appServiceAttachedAppSubscriptionSearchResponse.data)&& + Objects.equals(this.additionalProperties, appServiceAttachedAppSubscriptionSearchResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(pagination, data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AppServiceAttachedAppSubscriptionSearchResponse {\n"); + sb.append(" pagination: ").append(toIndentedString(pagination)).append("\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("pagination", "data")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AppServiceAttachedAppSubscriptionSearchResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AppServiceAttachedAppSubscriptionSearchResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in AppServiceAttachedAppSubscriptionSearchResponse is not found in the empty JSON string", AppServiceAttachedAppSubscriptionSearchResponse.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `pagination` + if (jsonObj.get("pagination") != null && !jsonObj.get("pagination").isJsonNull()) { + Pagination.validateJsonElement(jsonObj.get("pagination")); + } + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); + if (jsonArraydata != null) { + // ensure the json data is an array + if (!jsonObj.get("data").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + } + + // validate the optional field `data` (array) + for (int i = 0; i < jsonArraydata.size(); i++) { + AppServiceAttachedAppSubscription.validateJsonElement(jsonArraydata.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AppServiceAttachedAppSubscriptionSearchResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AppServiceAttachedAppSubscriptionSearchResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AppServiceAttachedAppSubscriptionSearchResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AppServiceAttachedAppSubscriptionSearchResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AppServiceAttachedAppSubscriptionSearchResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + AppServiceAttachedAppSubscriptionSearchResponse instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AppServiceAttachedAppSubscriptionSearchResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of AppServiceAttachedAppSubscriptionSearchResponse + * @throws IOException if the JSON string is invalid with respect to AppServiceAttachedAppSubscriptionSearchResponse + */ + public static AppServiceAttachedAppSubscriptionSearchResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AppServiceAttachedAppSubscriptionSearchResponse.class); + } + + /** + * Convert an instance of AppServiceAttachedAppSubscriptionSearchResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppServiceAttachedAppSubscriptionSimpleExpression.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppServiceAttachedAppSubscriptionSimpleExpression.java new file mode 100644 index 00000000..03170a2b --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppServiceAttachedAppSubscriptionSimpleExpression.java @@ -0,0 +1,355 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * AppServiceAttachedAppSubscriptionSimpleExpression + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class AppServiceAttachedAppSubscriptionSimpleExpression { + public static final String SERIALIZED_NAME_PROPERTY = "property"; + @SerializedName(SERIALIZED_NAME_PROPERTY) + @javax.annotation.Nullable + private String property; + + public static final String SERIALIZED_NAME_OPERATOR = "operator"; + @SerializedName(SERIALIZED_NAME_OPERATOR) + @javax.annotation.Nullable + private String operator; + + public static final String SERIALIZED_NAME_VALUES = "values"; + @SerializedName(SERIALIZED_NAME_VALUES) + @javax.annotation.Nullable + private List values = new ArrayList<>(); + + public AppServiceAttachedAppSubscriptionSimpleExpression() { + } + + public AppServiceAttachedAppSubscriptionSimpleExpression property(@javax.annotation.Nullable String property) { + this.property = property; + return this; + } + + /** + * Possible field names to use on filters: * `/uuid` - App Subscription UUID * `/state` - App Subscription lifecycle state + * @return property + */ + @javax.annotation.Nullable + public String getProperty() { + return property; + } + + public void setProperty(@javax.annotation.Nullable String property) { + this.property = property; + } + + + public AppServiceAttachedAppSubscriptionSimpleExpression operator(@javax.annotation.Nullable String operator) { + this.operator = operator; + return this; + } + + /** + * Possible operators to use on filters: * `=` - equal * `!=` - not equal * `IN` - in * `NOT IN` - not in + * @return operator + */ + @javax.annotation.Nullable + public String getOperator() { + return operator; + } + + public void setOperator(@javax.annotation.Nullable String operator) { + this.operator = operator; + } + + + public AppServiceAttachedAppSubscriptionSimpleExpression values(@javax.annotation.Nullable List values) { + this.values = values; + return this; + } + + public AppServiceAttachedAppSubscriptionSimpleExpression addValuesItem(String valuesItem) { + if (this.values == null) { + this.values = new ArrayList<>(); + } + this.values.add(valuesItem); + return this; + } + + /** + * Get values + * @return values + */ + @javax.annotation.Nullable + public List getValues() { + return values; + } + + public void setValues(@javax.annotation.Nullable List values) { + this.values = values; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AppServiceAttachedAppSubscriptionSimpleExpression instance itself + */ + public AppServiceAttachedAppSubscriptionSimpleExpression putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AppServiceAttachedAppSubscriptionSimpleExpression appServiceAttachedAppSubscriptionSimpleExpression = (AppServiceAttachedAppSubscriptionSimpleExpression) o; + return Objects.equals(this.property, appServiceAttachedAppSubscriptionSimpleExpression.property) && + Objects.equals(this.operator, appServiceAttachedAppSubscriptionSimpleExpression.operator) && + Objects.equals(this.values, appServiceAttachedAppSubscriptionSimpleExpression.values)&& + Objects.equals(this.additionalProperties, appServiceAttachedAppSubscriptionSimpleExpression.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(property, operator, values, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AppServiceAttachedAppSubscriptionSimpleExpression {\n"); + sb.append(" property: ").append(toIndentedString(property)).append("\n"); + sb.append(" operator: ").append(toIndentedString(operator)).append("\n"); + sb.append(" values: ").append(toIndentedString(values)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("property", "operator", "values")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AppServiceAttachedAppSubscriptionSimpleExpression + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AppServiceAttachedAppSubscriptionSimpleExpression.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in AppServiceAttachedAppSubscriptionSimpleExpression is not found in the empty JSON string", AppServiceAttachedAppSubscriptionSimpleExpression.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("property") != null && !jsonObj.get("property").isJsonNull()) && !jsonObj.get("property").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `property` to be a primitive type in the JSON string but got `%s`", jsonObj.get("property").toString())); + } + if ((jsonObj.get("operator") != null && !jsonObj.get("operator").isJsonNull()) && !jsonObj.get("operator").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `operator` to be a primitive type in the JSON string but got `%s`", jsonObj.get("operator").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("values") != null && !jsonObj.get("values").isJsonNull() && !jsonObj.get("values").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `values` to be an array in the JSON string but got `%s`", jsonObj.get("values").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AppServiceAttachedAppSubscriptionSimpleExpression.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AppServiceAttachedAppSubscriptionSimpleExpression' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AppServiceAttachedAppSubscriptionSimpleExpression.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AppServiceAttachedAppSubscriptionSimpleExpression value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AppServiceAttachedAppSubscriptionSimpleExpression read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + AppServiceAttachedAppSubscriptionSimpleExpression instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AppServiceAttachedAppSubscriptionSimpleExpression given an JSON string + * + * @param jsonString JSON string + * @return An instance of AppServiceAttachedAppSubscriptionSimpleExpression + * @throws IOException if the JSON string is invalid with respect to AppServiceAttachedAppSubscriptionSimpleExpression + */ + public static AppServiceAttachedAppSubscriptionSimpleExpression fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AppServiceAttachedAppSubscriptionSimpleExpression.class); + } + + /** + * Convert an instance of AppServiceAttachedAppSubscriptionSimpleExpression to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppServiceAttachedAppSubscriptionSortCriteria.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppServiceAttachedAppSubscriptionSortCriteria.java new file mode 100644 index 00000000..7835faf4 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppServiceAttachedAppSubscriptionSortCriteria.java @@ -0,0 +1,317 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.AppServiceAttachedAppSubscriptionSortDirection; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * AppServiceAttachedAppSubscriptionSortCriteria + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class AppServiceAttachedAppSubscriptionSortCriteria { + public static final String SERIALIZED_NAME_DIRECTION = "direction"; + @SerializedName(SERIALIZED_NAME_DIRECTION) + @javax.annotation.Nullable + private AppServiceAttachedAppSubscriptionSortDirection direction = AppServiceAttachedAppSubscriptionSortDirection.DESC; + + public static final String SERIALIZED_NAME_PROPERTY = "property"; + @SerializedName(SERIALIZED_NAME_PROPERTY) + @javax.annotation.Nullable + private String property = "/uuid"; + + public AppServiceAttachedAppSubscriptionSortCriteria() { + } + + public AppServiceAttachedAppSubscriptionSortCriteria direction(@javax.annotation.Nullable AppServiceAttachedAppSubscriptionSortDirection direction) { + this.direction = direction; + return this; + } + + /** + * Get direction + * @return direction + */ + @javax.annotation.Nullable + public AppServiceAttachedAppSubscriptionSortDirection getDirection() { + return direction; + } + + public void setDirection(@javax.annotation.Nullable AppServiceAttachedAppSubscriptionSortDirection direction) { + this.direction = direction; + } + + + public AppServiceAttachedAppSubscriptionSortCriteria property(@javax.annotation.Nullable String property) { + this.property = property; + return this; + } + + /** + * Possible field names to use on '400_InvalidSorting': * `/uuid` - App Subscription UUID * `/state` - App Subscription lifecycle state + * @return property + */ + @javax.annotation.Nullable + public String getProperty() { + return property; + } + + public void setProperty(@javax.annotation.Nullable String property) { + this.property = property; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AppServiceAttachedAppSubscriptionSortCriteria instance itself + */ + public AppServiceAttachedAppSubscriptionSortCriteria putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AppServiceAttachedAppSubscriptionSortCriteria appServiceAttachedAppSubscriptionSortCriteria = (AppServiceAttachedAppSubscriptionSortCriteria) o; + return Objects.equals(this.direction, appServiceAttachedAppSubscriptionSortCriteria.direction) && + Objects.equals(this.property, appServiceAttachedAppSubscriptionSortCriteria.property)&& + Objects.equals(this.additionalProperties, appServiceAttachedAppSubscriptionSortCriteria.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(direction, property, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AppServiceAttachedAppSubscriptionSortCriteria {\n"); + sb.append(" direction: ").append(toIndentedString(direction)).append("\n"); + sb.append(" property: ").append(toIndentedString(property)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("direction", "property")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AppServiceAttachedAppSubscriptionSortCriteria + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AppServiceAttachedAppSubscriptionSortCriteria.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in AppServiceAttachedAppSubscriptionSortCriteria is not found in the empty JSON string", AppServiceAttachedAppSubscriptionSortCriteria.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `direction` + if (jsonObj.get("direction") != null && !jsonObj.get("direction").isJsonNull()) { + AppServiceAttachedAppSubscriptionSortDirection.validateJsonElement(jsonObj.get("direction")); + } + if ((jsonObj.get("property") != null && !jsonObj.get("property").isJsonNull()) && !jsonObj.get("property").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `property` to be a primitive type in the JSON string but got `%s`", jsonObj.get("property").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AppServiceAttachedAppSubscriptionSortCriteria.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AppServiceAttachedAppSubscriptionSortCriteria' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AppServiceAttachedAppSubscriptionSortCriteria.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AppServiceAttachedAppSubscriptionSortCriteria value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AppServiceAttachedAppSubscriptionSortCriteria read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + AppServiceAttachedAppSubscriptionSortCriteria instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AppServiceAttachedAppSubscriptionSortCriteria given an JSON string + * + * @param jsonString JSON string + * @return An instance of AppServiceAttachedAppSubscriptionSortCriteria + * @throws IOException if the JSON string is invalid with respect to AppServiceAttachedAppSubscriptionSortCriteria + */ + public static AppServiceAttachedAppSubscriptionSortCriteria fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AppServiceAttachedAppSubscriptionSortCriteria.class); + } + + /** + * Convert an instance of AppServiceAttachedAppSubscriptionSortCriteria to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppServiceAttachedAppSubscriptionSortDirection.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppServiceAttachedAppSubscriptionSortDirection.java new file mode 100644 index 00000000..2a87a0b5 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppServiceAttachedAppSubscriptionSortDirection.java @@ -0,0 +1,78 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.google.gson.annotations.SerializedName; + +import java.io.IOException; +import java.util.Locale; +import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; + +/** + * Sorting direction + */ +@JsonAdapter(AppServiceAttachedAppSubscriptionSortDirection.Adapter.class) +public enum AppServiceAttachedAppSubscriptionSortDirection { + + DESC("DESC"), + + ASC("ASC"); + + private String value; + + AppServiceAttachedAppSubscriptionSortDirection(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static AppServiceAttachedAppSubscriptionSortDirection fromValue(String value) { + for (AppServiceAttachedAppSubscriptionSortDirection b : AppServiceAttachedAppSubscriptionSortDirection.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final AppServiceAttachedAppSubscriptionSortDirection enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public AppServiceAttachedAppSubscriptionSortDirection read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return AppServiceAttachedAppSubscriptionSortDirection.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + AppServiceAttachedAppSubscriptionSortDirection.fromValue(value); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppServiceAttachedAppSubscriptions.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppServiceAttachedAppSubscriptions.java new file mode 100644 index 00000000..294c419c --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppServiceAttachedAppSubscriptions.java @@ -0,0 +1,339 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.AppServiceAttachedAppSubscription; +import com.equinix.sdk.fabricv4.model.Pagination; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * AppServiceAttachedAppSubscriptions + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class AppServiceAttachedAppSubscriptions { + public static final String SERIALIZED_NAME_PAGINATION = "pagination"; + @SerializedName(SERIALIZED_NAME_PAGINATION) + @javax.annotation.Nullable + private Pagination pagination; + + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + @javax.annotation.Nullable + private List data = new ArrayList<>(); + + public AppServiceAttachedAppSubscriptions() { + } + + public AppServiceAttachedAppSubscriptions pagination(@javax.annotation.Nullable Pagination pagination) { + this.pagination = pagination; + return this; + } + + /** + * Get pagination + * @return pagination + */ + @javax.annotation.Nullable + public Pagination getPagination() { + return pagination; + } + + public void setPagination(@javax.annotation.Nullable Pagination pagination) { + this.pagination = pagination; + } + + + public AppServiceAttachedAppSubscriptions data(@javax.annotation.Nullable List data) { + this.data = data; + return this; + } + + public AppServiceAttachedAppSubscriptions addDataItem(AppServiceAttachedAppSubscription dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + return this; + } + + /** + * Data returned from the API call. + * @return data + */ + @javax.annotation.Nullable + public List getData() { + return data; + } + + public void setData(@javax.annotation.Nullable List data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AppServiceAttachedAppSubscriptions instance itself + */ + public AppServiceAttachedAppSubscriptions putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AppServiceAttachedAppSubscriptions appServiceAttachedAppSubscriptions = (AppServiceAttachedAppSubscriptions) o; + return Objects.equals(this.pagination, appServiceAttachedAppSubscriptions.pagination) && + Objects.equals(this.data, appServiceAttachedAppSubscriptions.data)&& + Objects.equals(this.additionalProperties, appServiceAttachedAppSubscriptions.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(pagination, data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AppServiceAttachedAppSubscriptions {\n"); + sb.append(" pagination: ").append(toIndentedString(pagination)).append("\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("pagination", "data")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AppServiceAttachedAppSubscriptions + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AppServiceAttachedAppSubscriptions.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in AppServiceAttachedAppSubscriptions is not found in the empty JSON string", AppServiceAttachedAppSubscriptions.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `pagination` + if (jsonObj.get("pagination") != null && !jsonObj.get("pagination").isJsonNull()) { + Pagination.validateJsonElement(jsonObj.get("pagination")); + } + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); + if (jsonArraydata != null) { + // ensure the json data is an array + if (!jsonObj.get("data").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + } + + // validate the optional field `data` (array) + for (int i = 0; i < jsonArraydata.size(); i++) { + AppServiceAttachedAppSubscription.validateJsonElement(jsonArraydata.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AppServiceAttachedAppSubscriptions.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AppServiceAttachedAppSubscriptions' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AppServiceAttachedAppSubscriptions.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AppServiceAttachedAppSubscriptions value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AppServiceAttachedAppSubscriptions read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + AppServiceAttachedAppSubscriptions instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AppServiceAttachedAppSubscriptions given an JSON string + * + * @param jsonString JSON string + * @return An instance of AppServiceAttachedAppSubscriptions + * @throws IOException if the JSON string is invalid with respect to AppServiceAttachedAppSubscriptions + */ + public static AppServiceAttachedAppSubscriptions fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AppServiceAttachedAppSubscriptions.class); + } + + /** + * Convert an instance of AppServiceAttachedAppSubscriptions to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppServiceChange.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppServiceChange.java new file mode 100644 index 00000000..e5a8035b --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppServiceChange.java @@ -0,0 +1,565 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.AppServiceChangeOperation; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * Current state of latest AppService change + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class AppServiceChange { + public static final String SERIALIZED_NAME_UUID = "uuid"; + @SerializedName(SERIALIZED_NAME_UUID) + @javax.annotation.Nullable + private String uuid; + + /** + * Type of change + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + APP_SERVICE_UPDATE("APP_SERVICE_UPDATE"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nonnull + private TypeEnum type; + + /** + * Current outcome of the change flow + */ + @JsonAdapter(StatusEnum.Adapter.class) + public enum StatusEnum { + COMPLETED("COMPLETED"), + + FAILED("FAILED"), + + REQUESTED("REQUESTED"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final StatusEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public StatusEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return StatusEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + StatusEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + @javax.annotation.Nullable + private StatusEnum status; + + public static final String SERIALIZED_NAME_CREATED_DATE_TIME = "createdDateTime"; + @SerializedName(SERIALIZED_NAME_CREATED_DATE_TIME) + @javax.annotation.Nullable + private OffsetDateTime createdDateTime; + + public static final String SERIALIZED_NAME_UPDATED_DATE_TIME = "updatedDateTime"; + @SerializedName(SERIALIZED_NAME_UPDATED_DATE_TIME) + @javax.annotation.Nonnull + private OffsetDateTime updatedDateTime; + + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + @javax.annotation.Nullable + private List data = new ArrayList<>(); + + public AppServiceChange() { + } + + public AppServiceChange uuid(@javax.annotation.Nullable String uuid) { + this.uuid = uuid; + return this; + } + + /** + * Uniquely identifies a change + * @return uuid + */ + @javax.annotation.Nullable + public String getUuid() { + return uuid; + } + + public void setUuid(@javax.annotation.Nullable String uuid) { + this.uuid = uuid; + } + + + public AppServiceChange type(@javax.annotation.Nonnull TypeEnum type) { + this.type = type; + return this; + } + + /** + * Type of change + * @return type + */ + @javax.annotation.Nonnull + public TypeEnum getType() { + return type; + } + + public void setType(@javax.annotation.Nonnull TypeEnum type) { + this.type = type; + } + + + public AppServiceChange status(@javax.annotation.Nullable StatusEnum status) { + this.status = status; + return this; + } + + /** + * Current outcome of the change flow + * @return status + */ + @javax.annotation.Nullable + public StatusEnum getStatus() { + return status; + } + + public void setStatus(@javax.annotation.Nullable StatusEnum status) { + this.status = status; + } + + + public AppServiceChange createdDateTime(@javax.annotation.Nullable OffsetDateTime createdDateTime) { + this.createdDateTime = createdDateTime; + return this; + } + + /** + * Set when change flow starts + * @return createdDateTime + */ + @javax.annotation.Nullable + public OffsetDateTime getCreatedDateTime() { + return createdDateTime; + } + + public void setCreatedDateTime(@javax.annotation.Nullable OffsetDateTime createdDateTime) { + this.createdDateTime = createdDateTime; + } + + + public AppServiceChange updatedDateTime(@javax.annotation.Nonnull OffsetDateTime updatedDateTime) { + this.updatedDateTime = updatedDateTime; + return this; + } + + /** + * Set when change object is updated + * @return updatedDateTime + */ + @javax.annotation.Nonnull + public OffsetDateTime getUpdatedDateTime() { + return updatedDateTime; + } + + public void setUpdatedDateTime(@javax.annotation.Nonnull OffsetDateTime updatedDateTime) { + this.updatedDateTime = updatedDateTime; + } + + + public AppServiceChange data(@javax.annotation.Nullable List data) { + this.data = data; + return this; + } + + public AppServiceChange addDataItem(AppServiceChangeOperation dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + return this; + } + + /** + * Get data + * @return data + */ + @javax.annotation.Nullable + public List getData() { + return data; + } + + public void setData(@javax.annotation.Nullable List data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AppServiceChange instance itself + */ + public AppServiceChange putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AppServiceChange appServiceChange = (AppServiceChange) o; + return Objects.equals(this.uuid, appServiceChange.uuid) && + Objects.equals(this.type, appServiceChange.type) && + Objects.equals(this.status, appServiceChange.status) && + Objects.equals(this.createdDateTime, appServiceChange.createdDateTime) && + Objects.equals(this.updatedDateTime, appServiceChange.updatedDateTime) && + Objects.equals(this.data, appServiceChange.data)&& + Objects.equals(this.additionalProperties, appServiceChange.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(uuid, type, status, createdDateTime, updatedDateTime, data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AppServiceChange {\n"); + sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" createdDateTime: ").append(toIndentedString(createdDateTime)).append("\n"); + sb.append(" updatedDateTime: ").append(toIndentedString(updatedDateTime)).append("\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("uuid", "type", "status", "createdDateTime", "updatedDateTime", "data")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("type", "updatedDateTime")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AppServiceChange + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AppServiceChange.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in AppServiceChange is not found in the empty JSON string", AppServiceChange.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : AppServiceChange.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("uuid") != null && !jsonObj.get("uuid").isJsonNull()) && !jsonObj.get("uuid").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `uuid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("uuid").toString())); + } + if (!jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // validate the required field `type` + TypeEnum.validateJsonElement(jsonObj.get("type")); + if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); + } + // validate the optional field `status` + if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) { + StatusEnum.validateJsonElement(jsonObj.get("status")); + } + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); + if (jsonArraydata != null) { + // ensure the json data is an array + if (!jsonObj.get("data").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + } + + // validate the optional field `data` (array) + for (int i = 0; i < jsonArraydata.size(); i++) { + AppServiceChangeOperation.validateJsonElement(jsonArraydata.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AppServiceChange.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AppServiceChange' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AppServiceChange.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AppServiceChange value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AppServiceChange read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + AppServiceChange instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AppServiceChange given an JSON string + * + * @param jsonString JSON string + * @return An instance of AppServiceChange + * @throws IOException if the JSON string is invalid with respect to AppServiceChange + */ + public static AppServiceChange fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AppServiceChange.class); + } + + /** + * Convert an instance of AppServiceChange to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppServiceChangeOperation.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppServiceChangeOperation.java new file mode 100644 index 00000000..53a15f60 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppServiceChangeOperation.java @@ -0,0 +1,460 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * App Service change operation data + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class AppServiceChangeOperation { + /** + * Handy shortcut for operation name + */ + @JsonAdapter(OpEnum.Adapter.class) + public enum OpEnum { + REPLACE("replace"), + + ADD("add"), + + REMOVE("remove"); + + private String value; + + OpEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static OpEnum fromValue(String value) { + for (OpEnum b : OpEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final OpEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public OpEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return OpEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + OpEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_OP = "op"; + @SerializedName(SERIALIZED_NAME_OP) + @javax.annotation.Nonnull + private OpEnum op; + + /** + * path inside document leading to updated parameter + */ + @JsonAdapter(PathEnum.Adapter.class) + public enum PathEnum { + NAME("/name"), + + DESCRIPTION("/description"), + + SOURCEDOMAINS("/sourceDomains"); + + private String value; + + PathEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static PathEnum fromValue(String value) { + for (PathEnum b : PathEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final PathEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public PathEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return PathEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + PathEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_PATH = "path"; + @SerializedName(SERIALIZED_NAME_PATH) + @javax.annotation.Nonnull + private PathEnum path; + + public static final String SERIALIZED_NAME_VALUE = "value"; + @SerializedName(SERIALIZED_NAME_VALUE) + @javax.annotation.Nonnull + private Object value; + + public AppServiceChangeOperation() { + } + + public AppServiceChangeOperation op(@javax.annotation.Nonnull OpEnum op) { + this.op = op; + return this; + } + + /** + * Handy shortcut for operation name + * @return op + */ + @javax.annotation.Nonnull + public OpEnum getOp() { + return op; + } + + public void setOp(@javax.annotation.Nonnull OpEnum op) { + this.op = op; + } + + + public AppServiceChangeOperation path(@javax.annotation.Nonnull PathEnum path) { + this.path = path; + return this; + } + + /** + * path inside document leading to updated parameter + * @return path + */ + @javax.annotation.Nonnull + public PathEnum getPath() { + return path; + } + + public void setPath(@javax.annotation.Nonnull PathEnum path) { + this.path = path; + } + + + public AppServiceChangeOperation value(@javax.annotation.Nonnull Object value) { + this.value = value; + return this; + } + + /** + * new value for updated parameter + * @return value + */ + @javax.annotation.Nonnull + public Object getValue() { + return value; + } + + public void setValue(@javax.annotation.Nonnull Object value) { + this.value = value; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AppServiceChangeOperation instance itself + */ + public AppServiceChangeOperation putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AppServiceChangeOperation appServiceChangeOperation = (AppServiceChangeOperation) o; + return Objects.equals(this.op, appServiceChangeOperation.op) && + Objects.equals(this.path, appServiceChangeOperation.path) && + Objects.equals(this.value, appServiceChangeOperation.value)&& + Objects.equals(this.additionalProperties, appServiceChangeOperation.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(op, path, value, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AppServiceChangeOperation {\n"); + sb.append(" op: ").append(toIndentedString(op)).append("\n"); + sb.append(" path: ").append(toIndentedString(path)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("op", "path", "value")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("op", "path", "value")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AppServiceChangeOperation + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AppServiceChangeOperation.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in AppServiceChangeOperation is not found in the empty JSON string", AppServiceChangeOperation.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : AppServiceChangeOperation.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("op").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `op` to be a primitive type in the JSON string but got `%s`", jsonObj.get("op").toString())); + } + // validate the required field `op` + OpEnum.validateJsonElement(jsonObj.get("op")); + if (!jsonObj.get("path").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `path` to be a primitive type in the JSON string but got `%s`", jsonObj.get("path").toString())); + } + // validate the required field `path` + PathEnum.validateJsonElement(jsonObj.get("path")); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AppServiceChangeOperation.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AppServiceChangeOperation' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AppServiceChangeOperation.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AppServiceChangeOperation value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AppServiceChangeOperation read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + AppServiceChangeOperation instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AppServiceChangeOperation given an JSON string + * + * @param jsonString JSON string + * @return An instance of AppServiceChangeOperation + * @throws IOException if the JSON string is invalid with respect to AppServiceChangeOperation + */ + public static AppServiceChangeOperation fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AppServiceChangeOperation.class); + } + + /** + * Convert an instance of AppServiceChangeOperation to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppServiceFilter.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppServiceFilter.java new file mode 100644 index 00000000..a0f2bafc --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppServiceFilter.java @@ -0,0 +1,269 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.AppServiceOrFilter; +import com.equinix.sdk.fabricv4.model.AppServiceSimpleExpression; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + + + +import java.io.IOException; +import java.lang.reflect.Type; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Locale; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.JsonPrimitive; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonSerializationContext; +import com.google.gson.JsonSerializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonArray; +import com.google.gson.JsonParseException; + +import com.equinix.sdk.fabricv4.JSON; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class AppServiceFilter extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(AppServiceFilter.class.getName()); + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AppServiceFilter.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AppServiceFilter' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter adapterAppServiceSimpleExpression = gson.getDelegateAdapter(this, TypeToken.get(AppServiceSimpleExpression.class)); + final TypeAdapter adapterAppServiceOrFilter = gson.getDelegateAdapter(this, TypeToken.get(AppServiceOrFilter.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AppServiceFilter value) throws IOException { + if (value == null || value.getActualInstance() == null) { + elementAdapter.write(out, null); + return; + } + + // check if the actual instance is of the type `AppServiceSimpleExpression` + if (value.getActualInstance() instanceof AppServiceSimpleExpression) { + JsonElement element = adapterAppServiceSimpleExpression.toJsonTree((AppServiceSimpleExpression)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + // check if the actual instance is of the type `AppServiceOrFilter` + if (value.getActualInstance() instanceof AppServiceOrFilter) { + JsonElement element = adapterAppServiceOrFilter.toJsonTree((AppServiceOrFilter)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + throw new IOException("Failed to serialize as the type doesn't match anyOf schemas: AppServiceOrFilter, AppServiceSimpleExpression"); + } + + @Override + public AppServiceFilter read(JsonReader in) throws IOException { + Object deserialized = null; + JsonElement jsonElement = elementAdapter.read(in); + + ArrayList errorMessages = new ArrayList<>(); + TypeAdapter actualAdapter = elementAdapter; + + // deserialize AppServiceSimpleExpression + try { + // validate the JSON object to see if any exception is thrown + AppServiceSimpleExpression.validateJsonElement(jsonElement); + actualAdapter = adapterAppServiceSimpleExpression; + AppServiceFilter ret = new AppServiceFilter(); + ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); + return ret; + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format(Locale.ROOT, "Deserialization for AppServiceSimpleExpression failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'AppServiceSimpleExpression'", e); + } + // deserialize AppServiceOrFilter + try { + // validate the JSON object to see if any exception is thrown + AppServiceOrFilter.validateJsonElement(jsonElement); + actualAdapter = adapterAppServiceOrFilter; + AppServiceFilter ret = new AppServiceFilter(); + ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); + return ret; + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format(Locale.ROOT, "Deserialization for AppServiceOrFilter failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'AppServiceOrFilter'", e); + } + + throw new IOException(String.format(Locale.ROOT, "Failed deserialization for AppServiceFilter: no class matches result, expected at least 1. Detailed failure message for anyOf schemas: %s. JSON: %s", errorMessages, jsonElement.toString())); + } + }.nullSafe(); + } + } + + // store a list of schema names defined in anyOf + public static final Map> schemas = new HashMap>(); + + public AppServiceFilter() { + super("anyOf", Boolean.FALSE); + } + + public AppServiceFilter(Object o) { + super("anyOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("AppServiceSimpleExpression", AppServiceSimpleExpression.class); + schemas.put("AppServiceOrFilter", AppServiceOrFilter.class); + } + + @Override + public Map> getSchemas() { + return AppServiceFilter.schemas; + } + + /** + * Set the instance that matches the anyOf child schema, check + * the instance parameter is valid against the anyOf child schemas: + * AppServiceOrFilter, AppServiceSimpleExpression + * + * It could be an instance of the 'anyOf' schemas. + */ + @Override + public void setActualInstance(Object instance) { + if (instance instanceof AppServiceSimpleExpression) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof AppServiceOrFilter) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException("Invalid instance type. Must be AppServiceOrFilter, AppServiceSimpleExpression"); + } + + /** + * Get the actual instance, which can be the following: + * AppServiceOrFilter, AppServiceSimpleExpression + * + * @return The actual instance (AppServiceOrFilter, AppServiceSimpleExpression) + */ + @SuppressWarnings("unchecked") + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `AppServiceSimpleExpression`. If the actual instance is not `AppServiceSimpleExpression`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `AppServiceSimpleExpression` + * @throws ClassCastException if the instance is not `AppServiceSimpleExpression` + */ + public AppServiceSimpleExpression getAppServiceSimpleExpression() throws ClassCastException { + return (AppServiceSimpleExpression)super.getActualInstance(); + } + + /** + * Get the actual instance of `AppServiceOrFilter`. If the actual instance is not `AppServiceOrFilter`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `AppServiceOrFilter` + * @throws ClassCastException if the instance is not `AppServiceOrFilter` + */ + public AppServiceOrFilter getAppServiceOrFilter() throws ClassCastException { + return (AppServiceOrFilter)super.getActualInstance(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AppServiceFilter + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + // validate anyOf schemas one by one + ArrayList errorMessages = new ArrayList<>(); + // validate the json string with AppServiceSimpleExpression + try { + AppServiceSimpleExpression.validateJsonElement(jsonElement); + return; + } catch (Exception e) { + errorMessages.add(String.format(Locale.ROOT, "Deserialization for AppServiceSimpleExpression failed with `%s`.", e.getMessage())); + // continue to the next one + } + // validate the json string with AppServiceOrFilter + try { + AppServiceOrFilter.validateJsonElement(jsonElement); + return; + } catch (Exception e) { + errorMessages.add(String.format(Locale.ROOT, "Deserialization for AppServiceOrFilter failed with `%s`.", e.getMessage())); + // continue to the next one + } + throw new IOException(String.format(Locale.ROOT, "The JSON string is invalid for AppServiceFilter with anyOf schemas: AppServiceOrFilter, AppServiceSimpleExpression. no class match the result, expected at least 1. Detailed failure message for anyOf schemas: %s. JSON: %s", errorMessages, jsonElement.toString())); + } + + /** + * Create an instance of AppServiceFilter given an JSON string + * + * @param jsonString JSON string + * @return An instance of AppServiceFilter + * @throws IOException if the JSON string is invalid with respect to AppServiceFilter + */ + public static AppServiceFilter fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AppServiceFilter.class); + } + + /** + * Convert an instance of AppServiceFilter to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppServiceFilters.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppServiceFilters.java new file mode 100644 index 00000000..e8ba98ea --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppServiceFilters.java @@ -0,0 +1,308 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.AppServiceFilter; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * AppServiceFilters + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class AppServiceFilters { + public static final String SERIALIZED_NAME_AND = "and"; + @SerializedName(SERIALIZED_NAME_AND) + @javax.annotation.Nullable + private List and = new ArrayList<>(); + + public AppServiceFilters() { + } + + public AppServiceFilters and(@javax.annotation.Nullable List and) { + this.and = and; + return this; + } + + public AppServiceFilters addAndItem(AppServiceFilter andItem) { + if (this.and == null) { + this.and = new ArrayList<>(); + } + this.and.add(andItem); + return this; + } + + /** + * Get and + * @return and + */ + @javax.annotation.Nullable + public List getAnd() { + return and; + } + + public void setAnd(@javax.annotation.Nullable List and) { + this.and = and; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AppServiceFilters instance itself + */ + public AppServiceFilters putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AppServiceFilters appServiceFilters = (AppServiceFilters) o; + return Objects.equals(this.and, appServiceFilters.and)&& + Objects.equals(this.additionalProperties, appServiceFilters.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(and, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AppServiceFilters {\n"); + sb.append(" and: ").append(toIndentedString(and)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("and")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AppServiceFilters + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AppServiceFilters.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in AppServiceFilters is not found in the empty JSON string", AppServiceFilters.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("and") != null && !jsonObj.get("and").isJsonNull()) { + JsonArray jsonArrayand = jsonObj.getAsJsonArray("and"); + if (jsonArrayand != null) { + // ensure the json data is an array + if (!jsonObj.get("and").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `and` to be an array in the JSON string but got `%s`", jsonObj.get("and").toString())); + } + + // validate the optional field `and` (array) + for (int i = 0; i < jsonArrayand.size(); i++) { + AppServiceFilter.validateJsonElement(jsonArrayand.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AppServiceFilters.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AppServiceFilters' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AppServiceFilters.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AppServiceFilters value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AppServiceFilters read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + AppServiceFilters instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AppServiceFilters given an JSON string + * + * @param jsonString JSON string + * @return An instance of AppServiceFilters + * @throws IOException if the JSON string is invalid with respect to AppServiceFilters + */ + public static AppServiceFilters fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AppServiceFilters.class); + } + + /** + * Convert an instance of AppServiceFilters to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppServiceOrFilter.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppServiceOrFilter.java new file mode 100644 index 00000000..ff75ce96 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppServiceOrFilter.java @@ -0,0 +1,308 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.AppServiceSimpleExpression; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * AppServiceOrFilter + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class AppServiceOrFilter { + public static final String SERIALIZED_NAME_OR = "or"; + @SerializedName(SERIALIZED_NAME_OR) + @javax.annotation.Nullable + private List or = new ArrayList<>(); + + public AppServiceOrFilter() { + } + + public AppServiceOrFilter or(@javax.annotation.Nullable List or) { + this.or = or; + return this; + } + + public AppServiceOrFilter addOrItem(AppServiceSimpleExpression orItem) { + if (this.or == null) { + this.or = new ArrayList<>(); + } + this.or.add(orItem); + return this; + } + + /** + * Get or + * @return or + */ + @javax.annotation.Nullable + public List getOr() { + return or; + } + + public void setOr(@javax.annotation.Nullable List or) { + this.or = or; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AppServiceOrFilter instance itself + */ + public AppServiceOrFilter putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AppServiceOrFilter appServiceOrFilter = (AppServiceOrFilter) o; + return Objects.equals(this.or, appServiceOrFilter.or)&& + Objects.equals(this.additionalProperties, appServiceOrFilter.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(or, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AppServiceOrFilter {\n"); + sb.append(" or: ").append(toIndentedString(or)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("or")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AppServiceOrFilter + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AppServiceOrFilter.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in AppServiceOrFilter is not found in the empty JSON string", AppServiceOrFilter.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("or") != null && !jsonObj.get("or").isJsonNull()) { + JsonArray jsonArrayor = jsonObj.getAsJsonArray("or"); + if (jsonArrayor != null) { + // ensure the json data is an array + if (!jsonObj.get("or").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `or` to be an array in the JSON string but got `%s`", jsonObj.get("or").toString())); + } + + // validate the optional field `or` (array) + for (int i = 0; i < jsonArrayor.size(); i++) { + AppServiceSimpleExpression.validateJsonElement(jsonArrayor.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AppServiceOrFilter.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AppServiceOrFilter' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AppServiceOrFilter.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AppServiceOrFilter value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AppServiceOrFilter read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + AppServiceOrFilter instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AppServiceOrFilter given an JSON string + * + * @param jsonString JSON string + * @return An instance of AppServiceOrFilter + * @throws IOException if the JSON string is invalid with respect to AppServiceOrFilter + */ + public static AppServiceOrFilter fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AppServiceOrFilter.class); + } + + /** + * Convert an instance of AppServiceOrFilter to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppServicePostRequest.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppServicePostRequest.java new file mode 100644 index 00000000..e7c2893a --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppServicePostRequest.java @@ -0,0 +1,449 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.AppServiceType; +import com.equinix.sdk.fabricv4.model.Project; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * Create App Service + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class AppServicePostRequest { + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nonnull + private AppServiceType type = AppServiceType.APP_SERVICE; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable + private String description; + + public static final String SERIALIZED_NAME_ENDPOINT = "endpoint"; + @SerializedName(SERIALIZED_NAME_ENDPOINT) + @javax.annotation.Nonnull + private String endpoint; + + public static final String SERIALIZED_NAME_SOURCE_DOMAINS = "sourceDomains"; + @SerializedName(SERIALIZED_NAME_SOURCE_DOMAINS) + @javax.annotation.Nullable + private List sourceDomains = new ArrayList<>(); + + public static final String SERIALIZED_NAME_PROJECT = "project"; + @SerializedName(SERIALIZED_NAME_PROJECT) + @javax.annotation.Nonnull + private Project project; + + public AppServicePostRequest() { + } + + public AppServicePostRequest type(@javax.annotation.Nonnull AppServiceType type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + */ + @javax.annotation.Nonnull + public AppServiceType getType() { + return type; + } + + public void setType(@javax.annotation.Nonnull AppServiceType type) { + this.type = type; + } + + + public AppServicePostRequest name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Customer-provided App Service name + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public AppServicePostRequest description(@javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * Customer-provided App Service description + * @return description + */ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + + + public AppServicePostRequest endpoint(@javax.annotation.Nonnull String endpoint) { + this.endpoint = endpoint; + return this; + } + + /** + * Accessible endpoint through this service + * @return endpoint + */ + @javax.annotation.Nonnull + public String getEndpoint() { + return endpoint; + } + + public void setEndpoint(@javax.annotation.Nonnull String endpoint) { + this.endpoint = endpoint; + } + + + public AppServicePostRequest sourceDomains(@javax.annotation.Nullable List sourceDomains) { + this.sourceDomains = sourceDomains; + return this; + } + + public AppServicePostRequest addSourceDomainsItem(String sourceDomainsItem) { + if (this.sourceDomains == null) { + this.sourceDomains = new ArrayList<>(); + } + this.sourceDomains.add(sourceDomainsItem); + return this; + } + + /** + * List of source domains from where traffic is allowed + * @return sourceDomains + */ + @javax.annotation.Nullable + public List getSourceDomains() { + return sourceDomains; + } + + public void setSourceDomains(@javax.annotation.Nullable List sourceDomains) { + this.sourceDomains = sourceDomains; + } + + + public AppServicePostRequest project(@javax.annotation.Nonnull Project project) { + this.project = project; + return this; + } + + /** + * Get project + * @return project + */ + @javax.annotation.Nonnull + public Project getProject() { + return project; + } + + public void setProject(@javax.annotation.Nonnull Project project) { + this.project = project; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AppServicePostRequest instance itself + */ + public AppServicePostRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AppServicePostRequest appServicePostRequest = (AppServicePostRequest) o; + return Objects.equals(this.type, appServicePostRequest.type) && + Objects.equals(this.name, appServicePostRequest.name) && + Objects.equals(this.description, appServicePostRequest.description) && + Objects.equals(this.endpoint, appServicePostRequest.endpoint) && + Objects.equals(this.sourceDomains, appServicePostRequest.sourceDomains) && + Objects.equals(this.project, appServicePostRequest.project)&& + Objects.equals(this.additionalProperties, appServicePostRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(type, name, description, endpoint, sourceDomains, project, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AppServicePostRequest {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" endpoint: ").append(toIndentedString(endpoint)).append("\n"); + sb.append(" sourceDomains: ").append(toIndentedString(sourceDomains)).append("\n"); + sb.append(" project: ").append(toIndentedString(project)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("type", "name", "description", "endpoint", "sourceDomains", "project")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("type", "name", "endpoint", "project")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AppServicePostRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AppServicePostRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in AppServicePostRequest is not found in the empty JSON string", AppServicePostRequest.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : AppServicePostRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the required field `type` + AppServiceType.validateJsonElement(jsonObj.get("type")); + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + } + if (!jsonObj.get("endpoint").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `endpoint` to be a primitive type in the JSON string but got `%s`", jsonObj.get("endpoint").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("sourceDomains") != null && !jsonObj.get("sourceDomains").isJsonNull() && !jsonObj.get("sourceDomains").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `sourceDomains` to be an array in the JSON string but got `%s`", jsonObj.get("sourceDomains").toString())); + } + // validate the required field `project` + Project.validateJsonElement(jsonObj.get("project")); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AppServicePostRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AppServicePostRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AppServicePostRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AppServicePostRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AppServicePostRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + AppServicePostRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AppServicePostRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of AppServicePostRequest + * @throws IOException if the JSON string is invalid with respect to AppServicePostRequest + */ + public static AppServicePostRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AppServicePostRequest.class); + } + + /** + * Convert an instance of AppServicePostRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppServiceSearchRequest.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppServiceSearchRequest.java new file mode 100644 index 00000000..817c31ed --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppServiceSearchRequest.java @@ -0,0 +1,370 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.AppServiceFilters; +import com.equinix.sdk.fabricv4.model.AppServiceSortCriteria; +import com.equinix.sdk.fabricv4.model.PaginationRequest; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * Search requests containing criteria + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class AppServiceSearchRequest { + public static final String SERIALIZED_NAME_FILTER = "filter"; + @SerializedName(SERIALIZED_NAME_FILTER) + @javax.annotation.Nullable + private AppServiceFilters filter; + + public static final String SERIALIZED_NAME_PAGINATION = "pagination"; + @SerializedName(SERIALIZED_NAME_PAGINATION) + @javax.annotation.Nullable + private PaginationRequest pagination; + + public static final String SERIALIZED_NAME_SORT = "sort"; + @SerializedName(SERIALIZED_NAME_SORT) + @javax.annotation.Nullable + private List sort = new ArrayList<>(); + + public AppServiceSearchRequest() { + } + + public AppServiceSearchRequest filter(@javax.annotation.Nullable AppServiceFilters filter) { + this.filter = filter; + return this; + } + + /** + * Get filter + * @return filter + */ + @javax.annotation.Nullable + public AppServiceFilters getFilter() { + return filter; + } + + public void setFilter(@javax.annotation.Nullable AppServiceFilters filter) { + this.filter = filter; + } + + + public AppServiceSearchRequest pagination(@javax.annotation.Nullable PaginationRequest pagination) { + this.pagination = pagination; + return this; + } + + /** + * Get pagination + * @return pagination + */ + @javax.annotation.Nullable + public PaginationRequest getPagination() { + return pagination; + } + + public void setPagination(@javax.annotation.Nullable PaginationRequest pagination) { + this.pagination = pagination; + } + + + public AppServiceSearchRequest sort(@javax.annotation.Nullable List sort) { + this.sort = sort; + return this; + } + + public AppServiceSearchRequest addSortItem(AppServiceSortCriteria sortItem) { + if (this.sort == null) { + this.sort = new ArrayList<>(); + } + this.sort.add(sortItem); + return this; + } + + /** + * Get sort + * @return sort + */ + @javax.annotation.Nullable + public List getSort() { + return sort; + } + + public void setSort(@javax.annotation.Nullable List sort) { + this.sort = sort; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AppServiceSearchRequest instance itself + */ + public AppServiceSearchRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AppServiceSearchRequest appServiceSearchRequest = (AppServiceSearchRequest) o; + return Objects.equals(this.filter, appServiceSearchRequest.filter) && + Objects.equals(this.pagination, appServiceSearchRequest.pagination) && + Objects.equals(this.sort, appServiceSearchRequest.sort)&& + Objects.equals(this.additionalProperties, appServiceSearchRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(filter, pagination, sort, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AppServiceSearchRequest {\n"); + sb.append(" filter: ").append(toIndentedString(filter)).append("\n"); + sb.append(" pagination: ").append(toIndentedString(pagination)).append("\n"); + sb.append(" sort: ").append(toIndentedString(sort)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("filter", "pagination", "sort")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AppServiceSearchRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AppServiceSearchRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in AppServiceSearchRequest is not found in the empty JSON string", AppServiceSearchRequest.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `filter` + if (jsonObj.get("filter") != null && !jsonObj.get("filter").isJsonNull()) { + AppServiceFilters.validateJsonElement(jsonObj.get("filter")); + } + // validate the optional field `pagination` + if (jsonObj.get("pagination") != null && !jsonObj.get("pagination").isJsonNull()) { + PaginationRequest.validateJsonElement(jsonObj.get("pagination")); + } + if (jsonObj.get("sort") != null && !jsonObj.get("sort").isJsonNull()) { + JsonArray jsonArraysort = jsonObj.getAsJsonArray("sort"); + if (jsonArraysort != null) { + // ensure the json data is an array + if (!jsonObj.get("sort").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `sort` to be an array in the JSON string but got `%s`", jsonObj.get("sort").toString())); + } + + // validate the optional field `sort` (array) + for (int i = 0; i < jsonArraysort.size(); i++) { + AppServiceSortCriteria.validateJsonElement(jsonArraysort.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AppServiceSearchRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AppServiceSearchRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AppServiceSearchRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AppServiceSearchRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AppServiceSearchRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + AppServiceSearchRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AppServiceSearchRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of AppServiceSearchRequest + * @throws IOException if the JSON string is invalid with respect to AppServiceSearchRequest + */ + public static AppServiceSearchRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AppServiceSearchRequest.class); + } + + /** + * Convert an instance of AppServiceSearchRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppServiceSearchResponse.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppServiceSearchResponse.java new file mode 100644 index 00000000..800557e9 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppServiceSearchResponse.java @@ -0,0 +1,339 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.AppService; +import com.equinix.sdk.fabricv4.model.Pagination; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * AppServiceSearchResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class AppServiceSearchResponse { + public static final String SERIALIZED_NAME_PAGINATION = "pagination"; + @SerializedName(SERIALIZED_NAME_PAGINATION) + @javax.annotation.Nullable + private Pagination pagination; + + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + @javax.annotation.Nullable + private List data = new ArrayList<>(); + + public AppServiceSearchResponse() { + } + + public AppServiceSearchResponse pagination(@javax.annotation.Nullable Pagination pagination) { + this.pagination = pagination; + return this; + } + + /** + * Get pagination + * @return pagination + */ + @javax.annotation.Nullable + public Pagination getPagination() { + return pagination; + } + + public void setPagination(@javax.annotation.Nullable Pagination pagination) { + this.pagination = pagination; + } + + + public AppServiceSearchResponse data(@javax.annotation.Nullable List data) { + this.data = data; + return this; + } + + public AppServiceSearchResponse addDataItem(AppService dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + return this; + } + + /** + * Data returned from the API call. + * @return data + */ + @javax.annotation.Nullable + public List getData() { + return data; + } + + public void setData(@javax.annotation.Nullable List data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AppServiceSearchResponse instance itself + */ + public AppServiceSearchResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AppServiceSearchResponse appServiceSearchResponse = (AppServiceSearchResponse) o; + return Objects.equals(this.pagination, appServiceSearchResponse.pagination) && + Objects.equals(this.data, appServiceSearchResponse.data)&& + Objects.equals(this.additionalProperties, appServiceSearchResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(pagination, data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AppServiceSearchResponse {\n"); + sb.append(" pagination: ").append(toIndentedString(pagination)).append("\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("pagination", "data")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AppServiceSearchResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AppServiceSearchResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in AppServiceSearchResponse is not found in the empty JSON string", AppServiceSearchResponse.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `pagination` + if (jsonObj.get("pagination") != null && !jsonObj.get("pagination").isJsonNull()) { + Pagination.validateJsonElement(jsonObj.get("pagination")); + } + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); + if (jsonArraydata != null) { + // ensure the json data is an array + if (!jsonObj.get("data").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + } + + // validate the optional field `data` (array) + for (int i = 0; i < jsonArraydata.size(); i++) { + AppService.validateJsonElement(jsonArraydata.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AppServiceSearchResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AppServiceSearchResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AppServiceSearchResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AppServiceSearchResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AppServiceSearchResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + AppServiceSearchResponse instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AppServiceSearchResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of AppServiceSearchResponse + * @throws IOException if the JSON string is invalid with respect to AppServiceSearchResponse + */ + public static AppServiceSearchResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AppServiceSearchResponse.class); + } + + /** + * Convert an instance of AppServiceSearchResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppServiceSimpleExpression.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppServiceSimpleExpression.java new file mode 100644 index 00000000..88b720e9 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppServiceSimpleExpression.java @@ -0,0 +1,355 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * AppServiceSimpleExpression + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class AppServiceSimpleExpression { + public static final String SERIALIZED_NAME_PROPERTY = "property"; + @SerializedName(SERIALIZED_NAME_PROPERTY) + @javax.annotation.Nullable + private String property; + + public static final String SERIALIZED_NAME_OPERATOR = "operator"; + @SerializedName(SERIALIZED_NAME_OPERATOR) + @javax.annotation.Nullable + private String operator; + + public static final String SERIALIZED_NAME_VALUES = "values"; + @SerializedName(SERIALIZED_NAME_VALUES) + @javax.annotation.Nullable + private List values = new ArrayList<>(); + + public AppServiceSimpleExpression() { + } + + public AppServiceSimpleExpression property(@javax.annotation.Nullable String property) { + this.property = property; + return this; + } + + /** + * Possible field names to use on filters: * `/project/projectId` - project id * `/uuid` - App Service uuid * `/name` - App Service name * `/description` - App Service description * `/state` - App Service status * `/endpoint` - App Service endpoint * `/sourceDomains` - App Service source domains * `/changeLog/createdDateTime` - App Service creation timestamp * `/changeLog/updatedDateTime` - App Service last updated timestamp * `/changeLog/deletedDateTime` - App Service deletion timestamp + * @return property + */ + @javax.annotation.Nullable + public String getProperty() { + return property; + } + + public void setProperty(@javax.annotation.Nullable String property) { + this.property = property; + } + + + public AppServiceSimpleExpression operator(@javax.annotation.Nullable String operator) { + this.operator = operator; + return this; + } + + /** + * Possible operators to use on filters: * `=` - equal * `!=` - not equal * `>` - greater than * `<` - less than * `IN` - in * `NOT IN` - not in * `LIKE` - like * `ILIKE` - case-insensitive like * `BETWEEN` - between * `NOT BETWEEN` - not between + * @return operator + */ + @javax.annotation.Nullable + public String getOperator() { + return operator; + } + + public void setOperator(@javax.annotation.Nullable String operator) { + this.operator = operator; + } + + + public AppServiceSimpleExpression values(@javax.annotation.Nullable List values) { + this.values = values; + return this; + } + + public AppServiceSimpleExpression addValuesItem(String valuesItem) { + if (this.values == null) { + this.values = new ArrayList<>(); + } + this.values.add(valuesItem); + return this; + } + + /** + * Get values + * @return values + */ + @javax.annotation.Nullable + public List getValues() { + return values; + } + + public void setValues(@javax.annotation.Nullable List values) { + this.values = values; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AppServiceSimpleExpression instance itself + */ + public AppServiceSimpleExpression putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AppServiceSimpleExpression appServiceSimpleExpression = (AppServiceSimpleExpression) o; + return Objects.equals(this.property, appServiceSimpleExpression.property) && + Objects.equals(this.operator, appServiceSimpleExpression.operator) && + Objects.equals(this.values, appServiceSimpleExpression.values)&& + Objects.equals(this.additionalProperties, appServiceSimpleExpression.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(property, operator, values, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AppServiceSimpleExpression {\n"); + sb.append(" property: ").append(toIndentedString(property)).append("\n"); + sb.append(" operator: ").append(toIndentedString(operator)).append("\n"); + sb.append(" values: ").append(toIndentedString(values)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("property", "operator", "values")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AppServiceSimpleExpression + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AppServiceSimpleExpression.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in AppServiceSimpleExpression is not found in the empty JSON string", AppServiceSimpleExpression.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("property") != null && !jsonObj.get("property").isJsonNull()) && !jsonObj.get("property").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `property` to be a primitive type in the JSON string but got `%s`", jsonObj.get("property").toString())); + } + if ((jsonObj.get("operator") != null && !jsonObj.get("operator").isJsonNull()) && !jsonObj.get("operator").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `operator` to be a primitive type in the JSON string but got `%s`", jsonObj.get("operator").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("values") != null && !jsonObj.get("values").isJsonNull() && !jsonObj.get("values").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `values` to be an array in the JSON string but got `%s`", jsonObj.get("values").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AppServiceSimpleExpression.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AppServiceSimpleExpression' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AppServiceSimpleExpression.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AppServiceSimpleExpression value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AppServiceSimpleExpression read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + AppServiceSimpleExpression instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AppServiceSimpleExpression given an JSON string + * + * @param jsonString JSON string + * @return An instance of AppServiceSimpleExpression + * @throws IOException if the JSON string is invalid with respect to AppServiceSimpleExpression + */ + public static AppServiceSimpleExpression fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AppServiceSimpleExpression.class); + } + + /** + * Convert an instance of AppServiceSimpleExpression to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppServiceSortCriteria.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppServiceSortCriteria.java new file mode 100644 index 00000000..75b0b9e6 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppServiceSortCriteria.java @@ -0,0 +1,317 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.AppServiceSortDirection; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * AppServiceSortCriteria + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class AppServiceSortCriteria { + public static final String SERIALIZED_NAME_DIRECTION = "direction"; + @SerializedName(SERIALIZED_NAME_DIRECTION) + @javax.annotation.Nullable + private AppServiceSortDirection direction = AppServiceSortDirection.DESC; + + public static final String SERIALIZED_NAME_PROPERTY = "property"; + @SerializedName(SERIALIZED_NAME_PROPERTY) + @javax.annotation.Nullable + private String property = "/changeLog/updatedDateTime"; + + public AppServiceSortCriteria() { + } + + public AppServiceSortCriteria direction(@javax.annotation.Nullable AppServiceSortDirection direction) { + this.direction = direction; + return this; + } + + /** + * Get direction + * @return direction + */ + @javax.annotation.Nullable + public AppServiceSortDirection getDirection() { + return direction; + } + + public void setDirection(@javax.annotation.Nullable AppServiceSortDirection direction) { + this.direction = direction; + } + + + public AppServiceSortCriteria property(@javax.annotation.Nullable String property) { + this.property = property; + return this; + } + + /** + * Possible field names to use on '400_InvalidSorting': * `/name` - App Service name * `/uuid` - App Service uuid * `/state` - App Service status * `/changeLog/createdDateTime` - Date and time when change flow starts * `/changeLog/updatedDateTime` - Date and time when change object is updated + * @return property + */ + @javax.annotation.Nullable + public String getProperty() { + return property; + } + + public void setProperty(@javax.annotation.Nullable String property) { + this.property = property; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AppServiceSortCriteria instance itself + */ + public AppServiceSortCriteria putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AppServiceSortCriteria appServiceSortCriteria = (AppServiceSortCriteria) o; + return Objects.equals(this.direction, appServiceSortCriteria.direction) && + Objects.equals(this.property, appServiceSortCriteria.property)&& + Objects.equals(this.additionalProperties, appServiceSortCriteria.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(direction, property, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AppServiceSortCriteria {\n"); + sb.append(" direction: ").append(toIndentedString(direction)).append("\n"); + sb.append(" property: ").append(toIndentedString(property)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("direction", "property")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AppServiceSortCriteria + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AppServiceSortCriteria.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in AppServiceSortCriteria is not found in the empty JSON string", AppServiceSortCriteria.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `direction` + if (jsonObj.get("direction") != null && !jsonObj.get("direction").isJsonNull()) { + AppServiceSortDirection.validateJsonElement(jsonObj.get("direction")); + } + if ((jsonObj.get("property") != null && !jsonObj.get("property").isJsonNull()) && !jsonObj.get("property").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `property` to be a primitive type in the JSON string but got `%s`", jsonObj.get("property").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AppServiceSortCriteria.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AppServiceSortCriteria' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AppServiceSortCriteria.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AppServiceSortCriteria value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AppServiceSortCriteria read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + AppServiceSortCriteria instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AppServiceSortCriteria given an JSON string + * + * @param jsonString JSON string + * @return An instance of AppServiceSortCriteria + * @throws IOException if the JSON string is invalid with respect to AppServiceSortCriteria + */ + public static AppServiceSortCriteria fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AppServiceSortCriteria.class); + } + + /** + * Convert an instance of AppServiceSortCriteria to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppServiceSortDirection.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppServiceSortDirection.java new file mode 100644 index 00000000..5ffd8382 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppServiceSortDirection.java @@ -0,0 +1,78 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.google.gson.annotations.SerializedName; + +import java.io.IOException; +import java.util.Locale; +import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; + +/** + * Sorting direction + */ +@JsonAdapter(AppServiceSortDirection.Adapter.class) +public enum AppServiceSortDirection { + + DESC("DESC"), + + ASC("ASC"); + + private String value; + + AppServiceSortDirection(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static AppServiceSortDirection fromValue(String value) { + for (AppServiceSortDirection b : AppServiceSortDirection.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final AppServiceSortDirection enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public AppServiceSortDirection read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return AppServiceSortDirection.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + AppServiceSortDirection.fromValue(value); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppServiceState.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppServiceState.java new file mode 100644 index 00000000..c67e7e0b --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppServiceState.java @@ -0,0 +1,84 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.google.gson.annotations.SerializedName; + +import java.io.IOException; +import java.util.Locale; +import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; + +/** + * App Service lifecycle state + */ +@JsonAdapter(AppServiceState.Adapter.class) +public enum AppServiceState { + + PROVISIONING("PROVISIONING"), + + PROVISIONED("PROVISIONED"), + + DEPROVISIONING("DEPROVISIONING"), + + DEPROVISIONED("DEPROVISIONED"), + + REPROVISIONING("REPROVISIONING"); + + private String value; + + AppServiceState(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static AppServiceState fromValue(String value) { + for (AppServiceState b : AppServiceState.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final AppServiceState enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public AppServiceState read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return AppServiceState.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + AppServiceState.fromValue(value); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppServiceType.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppServiceType.java new file mode 100644 index 00000000..3dec4b75 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppServiceType.java @@ -0,0 +1,76 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.google.gson.annotations.SerializedName; + +import java.io.IOException; +import java.util.Locale; +import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; + +/** + * App Service Type + */ +@JsonAdapter(AppServiceType.Adapter.class) +public enum AppServiceType { + + APP_SERVICE("APP_SERVICE"); + + private String value; + + AppServiceType(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static AppServiceType fromValue(String value) { + for (AppServiceType b : AppServiceType.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final AppServiceType enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public AppServiceType read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return AppServiceType.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + AppServiceType.fromValue(value); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppSubscription.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppSubscription.java new file mode 100644 index 00000000..eb5295b9 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppSubscription.java @@ -0,0 +1,532 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.AppSubscriptionChange; +import com.equinix.sdk.fabricv4.model.AppSubscriptionSource; +import com.equinix.sdk.fabricv4.model.AppSubscriptionState; +import com.equinix.sdk.fabricv4.model.AppSubscriptionTarget; +import com.equinix.sdk.fabricv4.model.AppSubscriptionType; +import com.equinix.sdk.fabricv4.model.Changelog; +import com.equinix.sdk.fabricv4.model.Project; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.net.URI; +import java.util.Arrays; +import java.util.UUID; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * App Subscription object + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class AppSubscription { + public static final String SERIALIZED_NAME_HREF = "href"; + @SerializedName(SERIALIZED_NAME_HREF) + @javax.annotation.Nullable + private URI href; + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nonnull + private AppSubscriptionType type = AppSubscriptionType.APP_SUBSCRIPTION; + + public static final String SERIALIZED_NAME_UUID = "uuid"; + @SerializedName(SERIALIZED_NAME_UUID) + @javax.annotation.Nullable + private UUID uuid; + + public static final String SERIALIZED_NAME_SOURCE = "source"; + @SerializedName(SERIALIZED_NAME_SOURCE) + @javax.annotation.Nonnull + private AppSubscriptionSource source; + + public static final String SERIALIZED_NAME_TARGET = "target"; + @SerializedName(SERIALIZED_NAME_TARGET) + @javax.annotation.Nonnull + private AppSubscriptionTarget target; + + public static final String SERIALIZED_NAME_STATE = "state"; + @SerializedName(SERIALIZED_NAME_STATE) + @javax.annotation.Nullable + private AppSubscriptionState state; + + public static final String SERIALIZED_NAME_PROJECT = "project"; + @SerializedName(SERIALIZED_NAME_PROJECT) + @javax.annotation.Nonnull + private Project project; + + public static final String SERIALIZED_NAME_CHANGE_LOG = "changeLog"; + @SerializedName(SERIALIZED_NAME_CHANGE_LOG) + @javax.annotation.Nullable + private Changelog changeLog; + + public static final String SERIALIZED_NAME_CHANGE = "change"; + @SerializedName(SERIALIZED_NAME_CHANGE) + @javax.annotation.Nullable + private AppSubscriptionChange change; + + public AppSubscription() { + } + + public AppSubscription( + URI href + ) { + this(); + this.href = href; + } + + /** + * Resource URI + * @return href + */ + @javax.annotation.Nullable + public URI getHref() { + return href; + } + + + + public AppSubscription type(@javax.annotation.Nonnull AppSubscriptionType type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + */ + @javax.annotation.Nonnull + public AppSubscriptionType getType() { + return type; + } + + public void setType(@javax.annotation.Nonnull AppSubscriptionType type) { + this.type = type; + } + + + public AppSubscription uuid(@javax.annotation.Nullable UUID uuid) { + this.uuid = uuid; + return this; + } + + /** + * Equinix-assigned access point identifier + * @return uuid + */ + @javax.annotation.Nullable + public UUID getUuid() { + return uuid; + } + + public void setUuid(@javax.annotation.Nullable UUID uuid) { + this.uuid = uuid; + } + + + public AppSubscription source(@javax.annotation.Nonnull AppSubscriptionSource source) { + this.source = source; + return this; + } + + /** + * Get source + * @return source + */ + @javax.annotation.Nonnull + public AppSubscriptionSource getSource() { + return source; + } + + public void setSource(@javax.annotation.Nonnull AppSubscriptionSource source) { + this.source = source; + } + + + public AppSubscription target(@javax.annotation.Nonnull AppSubscriptionTarget target) { + this.target = target; + return this; + } + + /** + * Get target + * @return target + */ + @javax.annotation.Nonnull + public AppSubscriptionTarget getTarget() { + return target; + } + + public void setTarget(@javax.annotation.Nonnull AppSubscriptionTarget target) { + this.target = target; + } + + + public AppSubscription state(@javax.annotation.Nullable AppSubscriptionState state) { + this.state = state; + return this; + } + + /** + * Get state + * @return state + */ + @javax.annotation.Nullable + public AppSubscriptionState getState() { + return state; + } + + public void setState(@javax.annotation.Nullable AppSubscriptionState state) { + this.state = state; + } + + + public AppSubscription project(@javax.annotation.Nonnull Project project) { + this.project = project; + return this; + } + + /** + * Get project + * @return project + */ + @javax.annotation.Nonnull + public Project getProject() { + return project; + } + + public void setProject(@javax.annotation.Nonnull Project project) { + this.project = project; + } + + + public AppSubscription changeLog(@javax.annotation.Nullable Changelog changeLog) { + this.changeLog = changeLog; + return this; + } + + /** + * Get changeLog + * @return changeLog + */ + @javax.annotation.Nullable + public Changelog getChangeLog() { + return changeLog; + } + + public void setChangeLog(@javax.annotation.Nullable Changelog changeLog) { + this.changeLog = changeLog; + } + + + public AppSubscription change(@javax.annotation.Nullable AppSubscriptionChange change) { + this.change = change; + return this; + } + + /** + * Get change + * @return change + */ + @javax.annotation.Nullable + public AppSubscriptionChange getChange() { + return change; + } + + public void setChange(@javax.annotation.Nullable AppSubscriptionChange change) { + this.change = change; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AppSubscription instance itself + */ + public AppSubscription putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AppSubscription appSubscription = (AppSubscription) o; + return Objects.equals(this.href, appSubscription.href) && + Objects.equals(this.type, appSubscription.type) && + Objects.equals(this.uuid, appSubscription.uuid) && + Objects.equals(this.source, appSubscription.source) && + Objects.equals(this.target, appSubscription.target) && + Objects.equals(this.state, appSubscription.state) && + Objects.equals(this.project, appSubscription.project) && + Objects.equals(this.changeLog, appSubscription.changeLog) && + Objects.equals(this.change, appSubscription.change)&& + Objects.equals(this.additionalProperties, appSubscription.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(href, type, uuid, source, target, state, project, changeLog, change, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AppSubscription {\n"); + sb.append(" href: ").append(toIndentedString(href)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); + sb.append(" source: ").append(toIndentedString(source)).append("\n"); + sb.append(" target: ").append(toIndentedString(target)).append("\n"); + sb.append(" state: ").append(toIndentedString(state)).append("\n"); + sb.append(" project: ").append(toIndentedString(project)).append("\n"); + sb.append(" changeLog: ").append(toIndentedString(changeLog)).append("\n"); + sb.append(" change: ").append(toIndentedString(change)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("href", "type", "uuid", "source", "target", "state", "project", "changeLog", "change")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("type", "source", "target", "project")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AppSubscription + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AppSubscription.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in AppSubscription is not found in the empty JSON string", AppSubscription.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : AppSubscription.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("href") != null && !jsonObj.get("href").isJsonNull()) && !jsonObj.get("href").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `href` to be a primitive type in the JSON string but got `%s`", jsonObj.get("href").toString())); + } + // validate the required field `type` + AppSubscriptionType.validateJsonElement(jsonObj.get("type")); + if ((jsonObj.get("uuid") != null && !jsonObj.get("uuid").isJsonNull()) && !jsonObj.get("uuid").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `uuid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("uuid").toString())); + } + // validate the required field `source` + AppSubscriptionSource.validateJsonElement(jsonObj.get("source")); + // validate the required field `target` + AppSubscriptionTarget.validateJsonElement(jsonObj.get("target")); + // validate the optional field `state` + if (jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) { + AppSubscriptionState.validateJsonElement(jsonObj.get("state")); + } + // validate the required field `project` + Project.validateJsonElement(jsonObj.get("project")); + // validate the optional field `changeLog` + if (jsonObj.get("changeLog") != null && !jsonObj.get("changeLog").isJsonNull()) { + Changelog.validateJsonElement(jsonObj.get("changeLog")); + } + // validate the optional field `change` + if (jsonObj.get("change") != null && !jsonObj.get("change").isJsonNull()) { + AppSubscriptionChange.validateJsonElement(jsonObj.get("change")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AppSubscription.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AppSubscription' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AppSubscription.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AppSubscription value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AppSubscription read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + AppSubscription instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AppSubscription given an JSON string + * + * @param jsonString JSON string + * @return An instance of AppSubscription + * @throws IOException if the JSON string is invalid with respect to AppSubscription + */ + public static AppSubscription fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AppSubscription.class); + } + + /** + * Convert an instance of AppSubscription to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppSubscriptionChange.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppSubscriptionChange.java new file mode 100644 index 00000000..8b1ca1f0 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppSubscriptionChange.java @@ -0,0 +1,565 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.AppSubscriptionChangeOperation; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * Current state of latest AppSubscription change + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class AppSubscriptionChange { + public static final String SERIALIZED_NAME_UUID = "uuid"; + @SerializedName(SERIALIZED_NAME_UUID) + @javax.annotation.Nullable + private String uuid; + + /** + * Type of change + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + APP_SUBSCRIPTION_UPDATE("APP_SUBSCRIPTION_UPDATE"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nonnull + private TypeEnum type; + + /** + * Current outcome of the change flow + */ + @JsonAdapter(StatusEnum.Adapter.class) + public enum StatusEnum { + COMPLETED("COMPLETED"), + + FAILED("FAILED"), + + REQUESTED("REQUESTED"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final StatusEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public StatusEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return StatusEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + StatusEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + @javax.annotation.Nullable + private StatusEnum status; + + public static final String SERIALIZED_NAME_CREATED_DATE_TIME = "createdDateTime"; + @SerializedName(SERIALIZED_NAME_CREATED_DATE_TIME) + @javax.annotation.Nullable + private OffsetDateTime createdDateTime; + + public static final String SERIALIZED_NAME_UPDATED_DATE_TIME = "updatedDateTime"; + @SerializedName(SERIALIZED_NAME_UPDATED_DATE_TIME) + @javax.annotation.Nonnull + private OffsetDateTime updatedDateTime; + + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + @javax.annotation.Nullable + private List data = new ArrayList<>(); + + public AppSubscriptionChange() { + } + + public AppSubscriptionChange uuid(@javax.annotation.Nullable String uuid) { + this.uuid = uuid; + return this; + } + + /** + * Uniquely identifies a change + * @return uuid + */ + @javax.annotation.Nullable + public String getUuid() { + return uuid; + } + + public void setUuid(@javax.annotation.Nullable String uuid) { + this.uuid = uuid; + } + + + public AppSubscriptionChange type(@javax.annotation.Nonnull TypeEnum type) { + this.type = type; + return this; + } + + /** + * Type of change + * @return type + */ + @javax.annotation.Nonnull + public TypeEnum getType() { + return type; + } + + public void setType(@javax.annotation.Nonnull TypeEnum type) { + this.type = type; + } + + + public AppSubscriptionChange status(@javax.annotation.Nullable StatusEnum status) { + this.status = status; + return this; + } + + /** + * Current outcome of the change flow + * @return status + */ + @javax.annotation.Nullable + public StatusEnum getStatus() { + return status; + } + + public void setStatus(@javax.annotation.Nullable StatusEnum status) { + this.status = status; + } + + + public AppSubscriptionChange createdDateTime(@javax.annotation.Nullable OffsetDateTime createdDateTime) { + this.createdDateTime = createdDateTime; + return this; + } + + /** + * Set when change flow starts + * @return createdDateTime + */ + @javax.annotation.Nullable + public OffsetDateTime getCreatedDateTime() { + return createdDateTime; + } + + public void setCreatedDateTime(@javax.annotation.Nullable OffsetDateTime createdDateTime) { + this.createdDateTime = createdDateTime; + } + + + public AppSubscriptionChange updatedDateTime(@javax.annotation.Nonnull OffsetDateTime updatedDateTime) { + this.updatedDateTime = updatedDateTime; + return this; + } + + /** + * Set when change object is updated + * @return updatedDateTime + */ + @javax.annotation.Nonnull + public OffsetDateTime getUpdatedDateTime() { + return updatedDateTime; + } + + public void setUpdatedDateTime(@javax.annotation.Nonnull OffsetDateTime updatedDateTime) { + this.updatedDateTime = updatedDateTime; + } + + + public AppSubscriptionChange data(@javax.annotation.Nullable List data) { + this.data = data; + return this; + } + + public AppSubscriptionChange addDataItem(AppSubscriptionChangeOperation dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + return this; + } + + /** + * Get data + * @return data + */ + @javax.annotation.Nullable + public List getData() { + return data; + } + + public void setData(@javax.annotation.Nullable List data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AppSubscriptionChange instance itself + */ + public AppSubscriptionChange putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AppSubscriptionChange appSubscriptionChange = (AppSubscriptionChange) o; + return Objects.equals(this.uuid, appSubscriptionChange.uuid) && + Objects.equals(this.type, appSubscriptionChange.type) && + Objects.equals(this.status, appSubscriptionChange.status) && + Objects.equals(this.createdDateTime, appSubscriptionChange.createdDateTime) && + Objects.equals(this.updatedDateTime, appSubscriptionChange.updatedDateTime) && + Objects.equals(this.data, appSubscriptionChange.data)&& + Objects.equals(this.additionalProperties, appSubscriptionChange.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(uuid, type, status, createdDateTime, updatedDateTime, data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AppSubscriptionChange {\n"); + sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" createdDateTime: ").append(toIndentedString(createdDateTime)).append("\n"); + sb.append(" updatedDateTime: ").append(toIndentedString(updatedDateTime)).append("\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("uuid", "type", "status", "createdDateTime", "updatedDateTime", "data")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("type", "updatedDateTime")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AppSubscriptionChange + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AppSubscriptionChange.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in AppSubscriptionChange is not found in the empty JSON string", AppSubscriptionChange.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : AppSubscriptionChange.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("uuid") != null && !jsonObj.get("uuid").isJsonNull()) && !jsonObj.get("uuid").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `uuid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("uuid").toString())); + } + if (!jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // validate the required field `type` + TypeEnum.validateJsonElement(jsonObj.get("type")); + if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); + } + // validate the optional field `status` + if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) { + StatusEnum.validateJsonElement(jsonObj.get("status")); + } + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); + if (jsonArraydata != null) { + // ensure the json data is an array + if (!jsonObj.get("data").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + } + + // validate the optional field `data` (array) + for (int i = 0; i < jsonArraydata.size(); i++) { + AppSubscriptionChangeOperation.validateJsonElement(jsonArraydata.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AppSubscriptionChange.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AppSubscriptionChange' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AppSubscriptionChange.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AppSubscriptionChange value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AppSubscriptionChange read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + AppSubscriptionChange instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AppSubscriptionChange given an JSON string + * + * @param jsonString JSON string + * @return An instance of AppSubscriptionChange + * @throws IOException if the JSON string is invalid with respect to AppSubscriptionChange + */ + public static AppSubscriptionChange fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AppSubscriptionChange.class); + } + + /** + * Convert an instance of AppSubscriptionChange to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppSubscriptionChangeOperation.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppSubscriptionChangeOperation.java new file mode 100644 index 00000000..2fcf7760 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppSubscriptionChangeOperation.java @@ -0,0 +1,404 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * App Subscription change operation data + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class AppSubscriptionChangeOperation { + /** + * Handy shortcut for operation name + */ + @JsonAdapter(OpEnum.Adapter.class) + public enum OpEnum { + REPLACE("replace"), + + ADD("add"), + + REMOVE("remove"); + + private String value; + + OpEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static OpEnum fromValue(String value) { + for (OpEnum b : OpEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final OpEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public OpEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return OpEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + OpEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_OP = "op"; + @SerializedName(SERIALIZED_NAME_OP) + @javax.annotation.Nonnull + private OpEnum op; + + public static final String SERIALIZED_NAME_PATH = "path"; + @SerializedName(SERIALIZED_NAME_PATH) + @javax.annotation.Nonnull + private String path; + + public static final String SERIALIZED_NAME_VALUE = "value"; + @SerializedName(SERIALIZED_NAME_VALUE) + @javax.annotation.Nonnull + private Object value; + + public AppSubscriptionChangeOperation() { + } + + public AppSubscriptionChangeOperation op(@javax.annotation.Nonnull OpEnum op) { + this.op = op; + return this; + } + + /** + * Handy shortcut for operation name + * @return op + */ + @javax.annotation.Nonnull + public OpEnum getOp() { + return op; + } + + public void setOp(@javax.annotation.Nonnull OpEnum op) { + this.op = op; + } + + + public AppSubscriptionChangeOperation path(@javax.annotation.Nonnull String path) { + this.path = path; + return this; + } + + /** + * path inside document leading to updated parameter + * @return path + */ + @javax.annotation.Nonnull + public String getPath() { + return path; + } + + public void setPath(@javax.annotation.Nonnull String path) { + this.path = path; + } + + + public AppSubscriptionChangeOperation value(@javax.annotation.Nonnull Object value) { + this.value = value; + return this; + } + + /** + * new value for updated parameter + * @return value + */ + @javax.annotation.Nonnull + public Object getValue() { + return value; + } + + public void setValue(@javax.annotation.Nonnull Object value) { + this.value = value; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AppSubscriptionChangeOperation instance itself + */ + public AppSubscriptionChangeOperation putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AppSubscriptionChangeOperation appSubscriptionChangeOperation = (AppSubscriptionChangeOperation) o; + return Objects.equals(this.op, appSubscriptionChangeOperation.op) && + Objects.equals(this.path, appSubscriptionChangeOperation.path) && + Objects.equals(this.value, appSubscriptionChangeOperation.value)&& + Objects.equals(this.additionalProperties, appSubscriptionChangeOperation.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(op, path, value, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AppSubscriptionChangeOperation {\n"); + sb.append(" op: ").append(toIndentedString(op)).append("\n"); + sb.append(" path: ").append(toIndentedString(path)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("op", "path", "value")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("op", "path", "value")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AppSubscriptionChangeOperation + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AppSubscriptionChangeOperation.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in AppSubscriptionChangeOperation is not found in the empty JSON string", AppSubscriptionChangeOperation.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : AppSubscriptionChangeOperation.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("op").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `op` to be a primitive type in the JSON string but got `%s`", jsonObj.get("op").toString())); + } + // validate the required field `op` + OpEnum.validateJsonElement(jsonObj.get("op")); + if (!jsonObj.get("path").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `path` to be a primitive type in the JSON string but got `%s`", jsonObj.get("path").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AppSubscriptionChangeOperation.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AppSubscriptionChangeOperation' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AppSubscriptionChangeOperation.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AppSubscriptionChangeOperation value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AppSubscriptionChangeOperation read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + AppSubscriptionChangeOperation instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AppSubscriptionChangeOperation given an JSON string + * + * @param jsonString JSON string + * @return An instance of AppSubscriptionChangeOperation + * @throws IOException if the JSON string is invalid with respect to AppSubscriptionChangeOperation + */ + public static AppSubscriptionChangeOperation fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AppSubscriptionChangeOperation.class); + } + + /** + * Convert an instance of AppSubscriptionChangeOperation to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppSubscriptionFilter.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppSubscriptionFilter.java new file mode 100644 index 00000000..bd19be98 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppSubscriptionFilter.java @@ -0,0 +1,269 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.AppSubscriptionOrFilter; +import com.equinix.sdk.fabricv4.model.AppSubscriptionSimpleExpression; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + + + +import java.io.IOException; +import java.lang.reflect.Type; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Locale; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.JsonPrimitive; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonSerializationContext; +import com.google.gson.JsonSerializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonArray; +import com.google.gson.JsonParseException; + +import com.equinix.sdk.fabricv4.JSON; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class AppSubscriptionFilter extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(AppSubscriptionFilter.class.getName()); + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AppSubscriptionFilter.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AppSubscriptionFilter' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter adapterAppSubscriptionSimpleExpression = gson.getDelegateAdapter(this, TypeToken.get(AppSubscriptionSimpleExpression.class)); + final TypeAdapter adapterAppSubscriptionOrFilter = gson.getDelegateAdapter(this, TypeToken.get(AppSubscriptionOrFilter.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AppSubscriptionFilter value) throws IOException { + if (value == null || value.getActualInstance() == null) { + elementAdapter.write(out, null); + return; + } + + // check if the actual instance is of the type `AppSubscriptionSimpleExpression` + if (value.getActualInstance() instanceof AppSubscriptionSimpleExpression) { + JsonElement element = adapterAppSubscriptionSimpleExpression.toJsonTree((AppSubscriptionSimpleExpression)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + // check if the actual instance is of the type `AppSubscriptionOrFilter` + if (value.getActualInstance() instanceof AppSubscriptionOrFilter) { + JsonElement element = adapterAppSubscriptionOrFilter.toJsonTree((AppSubscriptionOrFilter)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + throw new IOException("Failed to serialize as the type doesn't match anyOf schemas: AppSubscriptionOrFilter, AppSubscriptionSimpleExpression"); + } + + @Override + public AppSubscriptionFilter read(JsonReader in) throws IOException { + Object deserialized = null; + JsonElement jsonElement = elementAdapter.read(in); + + ArrayList errorMessages = new ArrayList<>(); + TypeAdapter actualAdapter = elementAdapter; + + // deserialize AppSubscriptionSimpleExpression + try { + // validate the JSON object to see if any exception is thrown + AppSubscriptionSimpleExpression.validateJsonElement(jsonElement); + actualAdapter = adapterAppSubscriptionSimpleExpression; + AppSubscriptionFilter ret = new AppSubscriptionFilter(); + ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); + return ret; + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format(Locale.ROOT, "Deserialization for AppSubscriptionSimpleExpression failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'AppSubscriptionSimpleExpression'", e); + } + // deserialize AppSubscriptionOrFilter + try { + // validate the JSON object to see if any exception is thrown + AppSubscriptionOrFilter.validateJsonElement(jsonElement); + actualAdapter = adapterAppSubscriptionOrFilter; + AppSubscriptionFilter ret = new AppSubscriptionFilter(); + ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); + return ret; + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format(Locale.ROOT, "Deserialization for AppSubscriptionOrFilter failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'AppSubscriptionOrFilter'", e); + } + + throw new IOException(String.format(Locale.ROOT, "Failed deserialization for AppSubscriptionFilter: no class matches result, expected at least 1. Detailed failure message for anyOf schemas: %s. JSON: %s", errorMessages, jsonElement.toString())); + } + }.nullSafe(); + } + } + + // store a list of schema names defined in anyOf + public static final Map> schemas = new HashMap>(); + + public AppSubscriptionFilter() { + super("anyOf", Boolean.FALSE); + } + + public AppSubscriptionFilter(Object o) { + super("anyOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("AppSubscriptionSimpleExpression", AppSubscriptionSimpleExpression.class); + schemas.put("AppSubscriptionOrFilter", AppSubscriptionOrFilter.class); + } + + @Override + public Map> getSchemas() { + return AppSubscriptionFilter.schemas; + } + + /** + * Set the instance that matches the anyOf child schema, check + * the instance parameter is valid against the anyOf child schemas: + * AppSubscriptionOrFilter, AppSubscriptionSimpleExpression + * + * It could be an instance of the 'anyOf' schemas. + */ + @Override + public void setActualInstance(Object instance) { + if (instance instanceof AppSubscriptionSimpleExpression) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof AppSubscriptionOrFilter) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException("Invalid instance type. Must be AppSubscriptionOrFilter, AppSubscriptionSimpleExpression"); + } + + /** + * Get the actual instance, which can be the following: + * AppSubscriptionOrFilter, AppSubscriptionSimpleExpression + * + * @return The actual instance (AppSubscriptionOrFilter, AppSubscriptionSimpleExpression) + */ + @SuppressWarnings("unchecked") + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `AppSubscriptionSimpleExpression`. If the actual instance is not `AppSubscriptionSimpleExpression`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `AppSubscriptionSimpleExpression` + * @throws ClassCastException if the instance is not `AppSubscriptionSimpleExpression` + */ + public AppSubscriptionSimpleExpression getAppSubscriptionSimpleExpression() throws ClassCastException { + return (AppSubscriptionSimpleExpression)super.getActualInstance(); + } + + /** + * Get the actual instance of `AppSubscriptionOrFilter`. If the actual instance is not `AppSubscriptionOrFilter`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `AppSubscriptionOrFilter` + * @throws ClassCastException if the instance is not `AppSubscriptionOrFilter` + */ + public AppSubscriptionOrFilter getAppSubscriptionOrFilter() throws ClassCastException { + return (AppSubscriptionOrFilter)super.getActualInstance(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AppSubscriptionFilter + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + // validate anyOf schemas one by one + ArrayList errorMessages = new ArrayList<>(); + // validate the json string with AppSubscriptionSimpleExpression + try { + AppSubscriptionSimpleExpression.validateJsonElement(jsonElement); + return; + } catch (Exception e) { + errorMessages.add(String.format(Locale.ROOT, "Deserialization for AppSubscriptionSimpleExpression failed with `%s`.", e.getMessage())); + // continue to the next one + } + // validate the json string with AppSubscriptionOrFilter + try { + AppSubscriptionOrFilter.validateJsonElement(jsonElement); + return; + } catch (Exception e) { + errorMessages.add(String.format(Locale.ROOT, "Deserialization for AppSubscriptionOrFilter failed with `%s`.", e.getMessage())); + // continue to the next one + } + throw new IOException(String.format(Locale.ROOT, "The JSON string is invalid for AppSubscriptionFilter with anyOf schemas: AppSubscriptionOrFilter, AppSubscriptionSimpleExpression. no class match the result, expected at least 1. Detailed failure message for anyOf schemas: %s. JSON: %s", errorMessages, jsonElement.toString())); + } + + /** + * Create an instance of AppSubscriptionFilter given an JSON string + * + * @param jsonString JSON string + * @return An instance of AppSubscriptionFilter + * @throws IOException if the JSON string is invalid with respect to AppSubscriptionFilter + */ + public static AppSubscriptionFilter fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AppSubscriptionFilter.class); + } + + /** + * Convert an instance of AppSubscriptionFilter to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppSubscriptionFilters.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppSubscriptionFilters.java new file mode 100644 index 00000000..c8719185 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppSubscriptionFilters.java @@ -0,0 +1,308 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.AppSubscriptionFilter; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * AppSubscriptionFilters + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class AppSubscriptionFilters { + public static final String SERIALIZED_NAME_AND = "and"; + @SerializedName(SERIALIZED_NAME_AND) + @javax.annotation.Nullable + private List and = new ArrayList<>(); + + public AppSubscriptionFilters() { + } + + public AppSubscriptionFilters and(@javax.annotation.Nullable List and) { + this.and = and; + return this; + } + + public AppSubscriptionFilters addAndItem(AppSubscriptionFilter andItem) { + if (this.and == null) { + this.and = new ArrayList<>(); + } + this.and.add(andItem); + return this; + } + + /** + * Get and + * @return and + */ + @javax.annotation.Nullable + public List getAnd() { + return and; + } + + public void setAnd(@javax.annotation.Nullable List and) { + this.and = and; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AppSubscriptionFilters instance itself + */ + public AppSubscriptionFilters putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AppSubscriptionFilters appSubscriptionFilters = (AppSubscriptionFilters) o; + return Objects.equals(this.and, appSubscriptionFilters.and)&& + Objects.equals(this.additionalProperties, appSubscriptionFilters.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(and, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AppSubscriptionFilters {\n"); + sb.append(" and: ").append(toIndentedString(and)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("and")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AppSubscriptionFilters + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AppSubscriptionFilters.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in AppSubscriptionFilters is not found in the empty JSON string", AppSubscriptionFilters.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("and") != null && !jsonObj.get("and").isJsonNull()) { + JsonArray jsonArrayand = jsonObj.getAsJsonArray("and"); + if (jsonArrayand != null) { + // ensure the json data is an array + if (!jsonObj.get("and").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `and` to be an array in the JSON string but got `%s`", jsonObj.get("and").toString())); + } + + // validate the optional field `and` (array) + for (int i = 0; i < jsonArrayand.size(); i++) { + AppSubscriptionFilter.validateJsonElement(jsonArrayand.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AppSubscriptionFilters.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AppSubscriptionFilters' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AppSubscriptionFilters.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AppSubscriptionFilters value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AppSubscriptionFilters read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + AppSubscriptionFilters instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AppSubscriptionFilters given an JSON string + * + * @param jsonString JSON string + * @return An instance of AppSubscriptionFilters + * @throws IOException if the JSON string is invalid with respect to AppSubscriptionFilters + */ + public static AppSubscriptionFilters fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AppSubscriptionFilters.class); + } + + /** + * Convert an instance of AppSubscriptionFilters to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppSubscriptionOrFilter.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppSubscriptionOrFilter.java new file mode 100644 index 00000000..a113372e --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppSubscriptionOrFilter.java @@ -0,0 +1,308 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.AppSubscriptionSimpleExpression; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * AppSubscriptionOrFilter + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class AppSubscriptionOrFilter { + public static final String SERIALIZED_NAME_OR = "or"; + @SerializedName(SERIALIZED_NAME_OR) + @javax.annotation.Nullable + private List or = new ArrayList<>(); + + public AppSubscriptionOrFilter() { + } + + public AppSubscriptionOrFilter or(@javax.annotation.Nullable List or) { + this.or = or; + return this; + } + + public AppSubscriptionOrFilter addOrItem(AppSubscriptionSimpleExpression orItem) { + if (this.or == null) { + this.or = new ArrayList<>(); + } + this.or.add(orItem); + return this; + } + + /** + * Get or + * @return or + */ + @javax.annotation.Nullable + public List getOr() { + return or; + } + + public void setOr(@javax.annotation.Nullable List or) { + this.or = or; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AppSubscriptionOrFilter instance itself + */ + public AppSubscriptionOrFilter putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AppSubscriptionOrFilter appSubscriptionOrFilter = (AppSubscriptionOrFilter) o; + return Objects.equals(this.or, appSubscriptionOrFilter.or)&& + Objects.equals(this.additionalProperties, appSubscriptionOrFilter.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(or, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AppSubscriptionOrFilter {\n"); + sb.append(" or: ").append(toIndentedString(or)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("or")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AppSubscriptionOrFilter + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AppSubscriptionOrFilter.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in AppSubscriptionOrFilter is not found in the empty JSON string", AppSubscriptionOrFilter.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("or") != null && !jsonObj.get("or").isJsonNull()) { + JsonArray jsonArrayor = jsonObj.getAsJsonArray("or"); + if (jsonArrayor != null) { + // ensure the json data is an array + if (!jsonObj.get("or").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `or` to be an array in the JSON string but got `%s`", jsonObj.get("or").toString())); + } + + // validate the optional field `or` (array) + for (int i = 0; i < jsonArrayor.size(); i++) { + AppSubscriptionSimpleExpression.validateJsonElement(jsonArrayor.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AppSubscriptionOrFilter.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AppSubscriptionOrFilter' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AppSubscriptionOrFilter.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AppSubscriptionOrFilter value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AppSubscriptionOrFilter read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + AppSubscriptionOrFilter instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AppSubscriptionOrFilter given an JSON string + * + * @param jsonString JSON string + * @return An instance of AppSubscriptionOrFilter + * @throws IOException if the JSON string is invalid with respect to AppSubscriptionOrFilter + */ + public static AppSubscriptionOrFilter fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AppSubscriptionOrFilter.class); + } + + /** + * Convert an instance of AppSubscriptionOrFilter to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppSubscriptionPostRequest.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppSubscriptionPostRequest.java new file mode 100644 index 00000000..fbe3df93 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppSubscriptionPostRequest.java @@ -0,0 +1,384 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.AppSubscriptionSourceRequest; +import com.equinix.sdk.fabricv4.model.AppSubscriptionTargetRequest; +import com.equinix.sdk.fabricv4.model.AppSubscriptionType; +import com.equinix.sdk.fabricv4.model.Project; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * Create App Subscription + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class AppSubscriptionPostRequest { + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nonnull + private AppSubscriptionType type = AppSubscriptionType.APP_SUBSCRIPTION; + + public static final String SERIALIZED_NAME_SOURCE = "source"; + @SerializedName(SERIALIZED_NAME_SOURCE) + @javax.annotation.Nullable + private AppSubscriptionSourceRequest source; + + public static final String SERIALIZED_NAME_TARGET = "target"; + @SerializedName(SERIALIZED_NAME_TARGET) + @javax.annotation.Nullable + private AppSubscriptionTargetRequest target; + + public static final String SERIALIZED_NAME_PROJECT = "project"; + @SerializedName(SERIALIZED_NAME_PROJECT) + @javax.annotation.Nonnull + private Project project; + + public AppSubscriptionPostRequest() { + } + + public AppSubscriptionPostRequest type(@javax.annotation.Nonnull AppSubscriptionType type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + */ + @javax.annotation.Nonnull + public AppSubscriptionType getType() { + return type; + } + + public void setType(@javax.annotation.Nonnull AppSubscriptionType type) { + this.type = type; + } + + + public AppSubscriptionPostRequest source(@javax.annotation.Nullable AppSubscriptionSourceRequest source) { + this.source = source; + return this; + } + + /** + * Get source + * @return source + */ + @javax.annotation.Nullable + public AppSubscriptionSourceRequest getSource() { + return source; + } + + public void setSource(@javax.annotation.Nullable AppSubscriptionSourceRequest source) { + this.source = source; + } + + + public AppSubscriptionPostRequest target(@javax.annotation.Nullable AppSubscriptionTargetRequest target) { + this.target = target; + return this; + } + + /** + * Get target + * @return target + */ + @javax.annotation.Nullable + public AppSubscriptionTargetRequest getTarget() { + return target; + } + + public void setTarget(@javax.annotation.Nullable AppSubscriptionTargetRequest target) { + this.target = target; + } + + + public AppSubscriptionPostRequest project(@javax.annotation.Nonnull Project project) { + this.project = project; + return this; + } + + /** + * Get project + * @return project + */ + @javax.annotation.Nonnull + public Project getProject() { + return project; + } + + public void setProject(@javax.annotation.Nonnull Project project) { + this.project = project; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AppSubscriptionPostRequest instance itself + */ + public AppSubscriptionPostRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AppSubscriptionPostRequest appSubscriptionPostRequest = (AppSubscriptionPostRequest) o; + return Objects.equals(this.type, appSubscriptionPostRequest.type) && + Objects.equals(this.source, appSubscriptionPostRequest.source) && + Objects.equals(this.target, appSubscriptionPostRequest.target) && + Objects.equals(this.project, appSubscriptionPostRequest.project)&& + Objects.equals(this.additionalProperties, appSubscriptionPostRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(type, source, target, project, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AppSubscriptionPostRequest {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" source: ").append(toIndentedString(source)).append("\n"); + sb.append(" target: ").append(toIndentedString(target)).append("\n"); + sb.append(" project: ").append(toIndentedString(project)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("type", "source", "target", "project")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("type", "project")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AppSubscriptionPostRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AppSubscriptionPostRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in AppSubscriptionPostRequest is not found in the empty JSON string", AppSubscriptionPostRequest.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : AppSubscriptionPostRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the required field `type` + AppSubscriptionType.validateJsonElement(jsonObj.get("type")); + // validate the optional field `source` + if (jsonObj.get("source") != null && !jsonObj.get("source").isJsonNull()) { + AppSubscriptionSourceRequest.validateJsonElement(jsonObj.get("source")); + } + // validate the optional field `target` + if (jsonObj.get("target") != null && !jsonObj.get("target").isJsonNull()) { + AppSubscriptionTargetRequest.validateJsonElement(jsonObj.get("target")); + } + // validate the required field `project` + Project.validateJsonElement(jsonObj.get("project")); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AppSubscriptionPostRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AppSubscriptionPostRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AppSubscriptionPostRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AppSubscriptionPostRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AppSubscriptionPostRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + AppSubscriptionPostRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AppSubscriptionPostRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of AppSubscriptionPostRequest + * @throws IOException if the JSON string is invalid with respect to AppSubscriptionPostRequest + */ + public static AppSubscriptionPostRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AppSubscriptionPostRequest.class); + } + + /** + * Convert an instance of AppSubscriptionPostRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppSubscriptionPrioritization.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppSubscriptionPrioritization.java new file mode 100644 index 00000000..def5eb17 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppSubscriptionPrioritization.java @@ -0,0 +1,84 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.google.gson.annotations.SerializedName; + +import java.io.IOException; +import java.util.Locale; +import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; + +/** + * Prioritization strategy for forwarding API requests + */ +@JsonAdapter(AppSubscriptionPrioritization.Adapter.class) +public enum AppSubscriptionPrioritization { + + LATENCY("LATENCY"), + + PERFORMANCE("PERFORMANCE"), + + UTILIZATION("UTILIZATION"), + + THRESHOLD("THRESHOLD"), + + ANY_TAG("ANY_TAG"); + + private String value; + + AppSubscriptionPrioritization(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static AppSubscriptionPrioritization fromValue(String value) { + for (AppSubscriptionPrioritization b : AppSubscriptionPrioritization.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final AppSubscriptionPrioritization enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public AppSubscriptionPrioritization read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return AppSubscriptionPrioritization.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + AppSubscriptionPrioritization.fromValue(value); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppSubscriptionSearchRequest.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppSubscriptionSearchRequest.java new file mode 100644 index 00000000..4034e7f2 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppSubscriptionSearchRequest.java @@ -0,0 +1,370 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.AppSubscriptionFilters; +import com.equinix.sdk.fabricv4.model.AppSubscriptionSortCriteria; +import com.equinix.sdk.fabricv4.model.PaginationRequest; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * Search requests containing criteria + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class AppSubscriptionSearchRequest { + public static final String SERIALIZED_NAME_FILTER = "filter"; + @SerializedName(SERIALIZED_NAME_FILTER) + @javax.annotation.Nullable + private AppSubscriptionFilters filter; + + public static final String SERIALIZED_NAME_PAGINATION = "pagination"; + @SerializedName(SERIALIZED_NAME_PAGINATION) + @javax.annotation.Nullable + private PaginationRequest pagination; + + public static final String SERIALIZED_NAME_SORT = "sort"; + @SerializedName(SERIALIZED_NAME_SORT) + @javax.annotation.Nullable + private List sort = new ArrayList<>(); + + public AppSubscriptionSearchRequest() { + } + + public AppSubscriptionSearchRequest filter(@javax.annotation.Nullable AppSubscriptionFilters filter) { + this.filter = filter; + return this; + } + + /** + * Get filter + * @return filter + */ + @javax.annotation.Nullable + public AppSubscriptionFilters getFilter() { + return filter; + } + + public void setFilter(@javax.annotation.Nullable AppSubscriptionFilters filter) { + this.filter = filter; + } + + + public AppSubscriptionSearchRequest pagination(@javax.annotation.Nullable PaginationRequest pagination) { + this.pagination = pagination; + return this; + } + + /** + * Get pagination + * @return pagination + */ + @javax.annotation.Nullable + public PaginationRequest getPagination() { + return pagination; + } + + public void setPagination(@javax.annotation.Nullable PaginationRequest pagination) { + this.pagination = pagination; + } + + + public AppSubscriptionSearchRequest sort(@javax.annotation.Nullable List sort) { + this.sort = sort; + return this; + } + + public AppSubscriptionSearchRequest addSortItem(AppSubscriptionSortCriteria sortItem) { + if (this.sort == null) { + this.sort = new ArrayList<>(); + } + this.sort.add(sortItem); + return this; + } + + /** + * Get sort + * @return sort + */ + @javax.annotation.Nullable + public List getSort() { + return sort; + } + + public void setSort(@javax.annotation.Nullable List sort) { + this.sort = sort; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AppSubscriptionSearchRequest instance itself + */ + public AppSubscriptionSearchRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AppSubscriptionSearchRequest appSubscriptionSearchRequest = (AppSubscriptionSearchRequest) o; + return Objects.equals(this.filter, appSubscriptionSearchRequest.filter) && + Objects.equals(this.pagination, appSubscriptionSearchRequest.pagination) && + Objects.equals(this.sort, appSubscriptionSearchRequest.sort)&& + Objects.equals(this.additionalProperties, appSubscriptionSearchRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(filter, pagination, sort, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AppSubscriptionSearchRequest {\n"); + sb.append(" filter: ").append(toIndentedString(filter)).append("\n"); + sb.append(" pagination: ").append(toIndentedString(pagination)).append("\n"); + sb.append(" sort: ").append(toIndentedString(sort)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("filter", "pagination", "sort")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AppSubscriptionSearchRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AppSubscriptionSearchRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in AppSubscriptionSearchRequest is not found in the empty JSON string", AppSubscriptionSearchRequest.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `filter` + if (jsonObj.get("filter") != null && !jsonObj.get("filter").isJsonNull()) { + AppSubscriptionFilters.validateJsonElement(jsonObj.get("filter")); + } + // validate the optional field `pagination` + if (jsonObj.get("pagination") != null && !jsonObj.get("pagination").isJsonNull()) { + PaginationRequest.validateJsonElement(jsonObj.get("pagination")); + } + if (jsonObj.get("sort") != null && !jsonObj.get("sort").isJsonNull()) { + JsonArray jsonArraysort = jsonObj.getAsJsonArray("sort"); + if (jsonArraysort != null) { + // ensure the json data is an array + if (!jsonObj.get("sort").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `sort` to be an array in the JSON string but got `%s`", jsonObj.get("sort").toString())); + } + + // validate the optional field `sort` (array) + for (int i = 0; i < jsonArraysort.size(); i++) { + AppSubscriptionSortCriteria.validateJsonElement(jsonArraysort.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AppSubscriptionSearchRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AppSubscriptionSearchRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AppSubscriptionSearchRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AppSubscriptionSearchRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AppSubscriptionSearchRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + AppSubscriptionSearchRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AppSubscriptionSearchRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of AppSubscriptionSearchRequest + * @throws IOException if the JSON string is invalid with respect to AppSubscriptionSearchRequest + */ + public static AppSubscriptionSearchRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AppSubscriptionSearchRequest.class); + } + + /** + * Convert an instance of AppSubscriptionSearchRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppSubscriptionSearchResponse.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppSubscriptionSearchResponse.java new file mode 100644 index 00000000..ea07421c --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppSubscriptionSearchResponse.java @@ -0,0 +1,339 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.AppSubscription; +import com.equinix.sdk.fabricv4.model.Pagination; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * AppSubscriptionSearchResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class AppSubscriptionSearchResponse { + public static final String SERIALIZED_NAME_PAGINATION = "pagination"; + @SerializedName(SERIALIZED_NAME_PAGINATION) + @javax.annotation.Nullable + private Pagination pagination; + + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + @javax.annotation.Nullable + private List data = new ArrayList<>(); + + public AppSubscriptionSearchResponse() { + } + + public AppSubscriptionSearchResponse pagination(@javax.annotation.Nullable Pagination pagination) { + this.pagination = pagination; + return this; + } + + /** + * Get pagination + * @return pagination + */ + @javax.annotation.Nullable + public Pagination getPagination() { + return pagination; + } + + public void setPagination(@javax.annotation.Nullable Pagination pagination) { + this.pagination = pagination; + } + + + public AppSubscriptionSearchResponse data(@javax.annotation.Nullable List data) { + this.data = data; + return this; + } + + public AppSubscriptionSearchResponse addDataItem(AppSubscription dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + return this; + } + + /** + * Data returned from the API call. + * @return data + */ + @javax.annotation.Nullable + public List getData() { + return data; + } + + public void setData(@javax.annotation.Nullable List data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AppSubscriptionSearchResponse instance itself + */ + public AppSubscriptionSearchResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AppSubscriptionSearchResponse appSubscriptionSearchResponse = (AppSubscriptionSearchResponse) o; + return Objects.equals(this.pagination, appSubscriptionSearchResponse.pagination) && + Objects.equals(this.data, appSubscriptionSearchResponse.data)&& + Objects.equals(this.additionalProperties, appSubscriptionSearchResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(pagination, data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AppSubscriptionSearchResponse {\n"); + sb.append(" pagination: ").append(toIndentedString(pagination)).append("\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("pagination", "data")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AppSubscriptionSearchResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AppSubscriptionSearchResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in AppSubscriptionSearchResponse is not found in the empty JSON string", AppSubscriptionSearchResponse.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `pagination` + if (jsonObj.get("pagination") != null && !jsonObj.get("pagination").isJsonNull()) { + Pagination.validateJsonElement(jsonObj.get("pagination")); + } + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); + if (jsonArraydata != null) { + // ensure the json data is an array + if (!jsonObj.get("data").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + } + + // validate the optional field `data` (array) + for (int i = 0; i < jsonArraydata.size(); i++) { + AppSubscription.validateJsonElement(jsonArraydata.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AppSubscriptionSearchResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AppSubscriptionSearchResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AppSubscriptionSearchResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AppSubscriptionSearchResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AppSubscriptionSearchResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + AppSubscriptionSearchResponse instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AppSubscriptionSearchResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of AppSubscriptionSearchResponse + * @throws IOException if the JSON string is invalid with respect to AppSubscriptionSearchResponse + */ + public static AppSubscriptionSearchResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AppSubscriptionSearchResponse.class); + } + + /** + * Convert an instance of AppSubscriptionSearchResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppSubscriptionSimpleExpression.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppSubscriptionSimpleExpression.java new file mode 100644 index 00000000..fc5b8bbe --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppSubscriptionSimpleExpression.java @@ -0,0 +1,355 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * AppSubscriptionSimpleExpression + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class AppSubscriptionSimpleExpression { + public static final String SERIALIZED_NAME_PROPERTY = "property"; + @SerializedName(SERIALIZED_NAME_PROPERTY) + @javax.annotation.Nullable + private String property; + + public static final String SERIALIZED_NAME_OPERATOR = "operator"; + @SerializedName(SERIALIZED_NAME_OPERATOR) + @javax.annotation.Nullable + private String operator; + + public static final String SERIALIZED_NAME_VALUES = "values"; + @SerializedName(SERIALIZED_NAME_VALUES) + @javax.annotation.Nullable + private List values = new ArrayList<>(); + + public AppSubscriptionSimpleExpression() { + } + + public AppSubscriptionSimpleExpression property(@javax.annotation.Nullable String property) { + this.property = property; + return this; + } + + /** + * Possible field names to use on filters: * `/project/projectId` - project id * `/uuid` - App Subscription uuid * `/state` - App Subscription status * `/source/appLink/uuid` - Source App Link uuid * `/source/ipSubnets` - Source App Link ip subnets * `/target/appService/uuid` - Target App Service uuid * `/target/geoScope` - Target App Service geo scope * `/target/prioritization` - Target App Service prioritization * `/changeLog/createdDateTime` - App Subscription creation timestamp * `/changeLog/updatedDateTime` - App Subscription last updated timestamp * `/changeLog/deletedDateTime` - App Subscription deletion timestamp + * @return property + */ + @javax.annotation.Nullable + public String getProperty() { + return property; + } + + public void setProperty(@javax.annotation.Nullable String property) { + this.property = property; + } + + + public AppSubscriptionSimpleExpression operator(@javax.annotation.Nullable String operator) { + this.operator = operator; + return this; + } + + /** + * Possible operators to use on filters: * `=` - equal * `!=` - not equal * `>` - greater than * `<` - less than * `IN` - in * `NOT IN` - not in * `LIKE` - like * `ILIKE` - case-insensitive like * `BETWEEN` - between * `NOT BETWEEN` - not between + * @return operator + */ + @javax.annotation.Nullable + public String getOperator() { + return operator; + } + + public void setOperator(@javax.annotation.Nullable String operator) { + this.operator = operator; + } + + + public AppSubscriptionSimpleExpression values(@javax.annotation.Nullable List values) { + this.values = values; + return this; + } + + public AppSubscriptionSimpleExpression addValuesItem(String valuesItem) { + if (this.values == null) { + this.values = new ArrayList<>(); + } + this.values.add(valuesItem); + return this; + } + + /** + * Get values + * @return values + */ + @javax.annotation.Nullable + public List getValues() { + return values; + } + + public void setValues(@javax.annotation.Nullable List values) { + this.values = values; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AppSubscriptionSimpleExpression instance itself + */ + public AppSubscriptionSimpleExpression putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AppSubscriptionSimpleExpression appSubscriptionSimpleExpression = (AppSubscriptionSimpleExpression) o; + return Objects.equals(this.property, appSubscriptionSimpleExpression.property) && + Objects.equals(this.operator, appSubscriptionSimpleExpression.operator) && + Objects.equals(this.values, appSubscriptionSimpleExpression.values)&& + Objects.equals(this.additionalProperties, appSubscriptionSimpleExpression.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(property, operator, values, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AppSubscriptionSimpleExpression {\n"); + sb.append(" property: ").append(toIndentedString(property)).append("\n"); + sb.append(" operator: ").append(toIndentedString(operator)).append("\n"); + sb.append(" values: ").append(toIndentedString(values)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("property", "operator", "values")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AppSubscriptionSimpleExpression + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AppSubscriptionSimpleExpression.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in AppSubscriptionSimpleExpression is not found in the empty JSON string", AppSubscriptionSimpleExpression.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("property") != null && !jsonObj.get("property").isJsonNull()) && !jsonObj.get("property").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `property` to be a primitive type in the JSON string but got `%s`", jsonObj.get("property").toString())); + } + if ((jsonObj.get("operator") != null && !jsonObj.get("operator").isJsonNull()) && !jsonObj.get("operator").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `operator` to be a primitive type in the JSON string but got `%s`", jsonObj.get("operator").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("values") != null && !jsonObj.get("values").isJsonNull() && !jsonObj.get("values").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `values` to be an array in the JSON string but got `%s`", jsonObj.get("values").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AppSubscriptionSimpleExpression.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AppSubscriptionSimpleExpression' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AppSubscriptionSimpleExpression.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AppSubscriptionSimpleExpression value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AppSubscriptionSimpleExpression read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + AppSubscriptionSimpleExpression instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AppSubscriptionSimpleExpression given an JSON string + * + * @param jsonString JSON string + * @return An instance of AppSubscriptionSimpleExpression + * @throws IOException if the JSON string is invalid with respect to AppSubscriptionSimpleExpression + */ + public static AppSubscriptionSimpleExpression fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AppSubscriptionSimpleExpression.class); + } + + /** + * Convert an instance of AppSubscriptionSimpleExpression to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppSubscriptionSortCriteria.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppSubscriptionSortCriteria.java new file mode 100644 index 00000000..fa9deeeb --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppSubscriptionSortCriteria.java @@ -0,0 +1,317 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.AppSubscriptionSortDirection; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * AppSubscriptionSortCriteria + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class AppSubscriptionSortCriteria { + public static final String SERIALIZED_NAME_DIRECTION = "direction"; + @SerializedName(SERIALIZED_NAME_DIRECTION) + @javax.annotation.Nullable + private AppSubscriptionSortDirection direction = AppSubscriptionSortDirection.DESC; + + public static final String SERIALIZED_NAME_PROPERTY = "property"; + @SerializedName(SERIALIZED_NAME_PROPERTY) + @javax.annotation.Nullable + private String property = "/changeLog/updatedDateTime"; + + public AppSubscriptionSortCriteria() { + } + + public AppSubscriptionSortCriteria direction(@javax.annotation.Nullable AppSubscriptionSortDirection direction) { + this.direction = direction; + return this; + } + + /** + * Get direction + * @return direction + */ + @javax.annotation.Nullable + public AppSubscriptionSortDirection getDirection() { + return direction; + } + + public void setDirection(@javax.annotation.Nullable AppSubscriptionSortDirection direction) { + this.direction = direction; + } + + + public AppSubscriptionSortCriteria property(@javax.annotation.Nullable String property) { + this.property = property; + return this; + } + + /** + * Possible field names to use on '400_InvalidSorting': * `/uuid` - App Subscription uuid * `/state` - App Subscription status * `/changeLog/createdDateTime` - Date and time when change flow starts * `/changeLog/updatedDateTime` - Date and time when change object is updated + * @return property + */ + @javax.annotation.Nullable + public String getProperty() { + return property; + } + + public void setProperty(@javax.annotation.Nullable String property) { + this.property = property; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AppSubscriptionSortCriteria instance itself + */ + public AppSubscriptionSortCriteria putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AppSubscriptionSortCriteria appSubscriptionSortCriteria = (AppSubscriptionSortCriteria) o; + return Objects.equals(this.direction, appSubscriptionSortCriteria.direction) && + Objects.equals(this.property, appSubscriptionSortCriteria.property)&& + Objects.equals(this.additionalProperties, appSubscriptionSortCriteria.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(direction, property, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AppSubscriptionSortCriteria {\n"); + sb.append(" direction: ").append(toIndentedString(direction)).append("\n"); + sb.append(" property: ").append(toIndentedString(property)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("direction", "property")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AppSubscriptionSortCriteria + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AppSubscriptionSortCriteria.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in AppSubscriptionSortCriteria is not found in the empty JSON string", AppSubscriptionSortCriteria.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `direction` + if (jsonObj.get("direction") != null && !jsonObj.get("direction").isJsonNull()) { + AppSubscriptionSortDirection.validateJsonElement(jsonObj.get("direction")); + } + if ((jsonObj.get("property") != null && !jsonObj.get("property").isJsonNull()) && !jsonObj.get("property").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `property` to be a primitive type in the JSON string but got `%s`", jsonObj.get("property").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AppSubscriptionSortCriteria.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AppSubscriptionSortCriteria' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AppSubscriptionSortCriteria.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AppSubscriptionSortCriteria value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AppSubscriptionSortCriteria read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + AppSubscriptionSortCriteria instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AppSubscriptionSortCriteria given an JSON string + * + * @param jsonString JSON string + * @return An instance of AppSubscriptionSortCriteria + * @throws IOException if the JSON string is invalid with respect to AppSubscriptionSortCriteria + */ + public static AppSubscriptionSortCriteria fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AppSubscriptionSortCriteria.class); + } + + /** + * Convert an instance of AppSubscriptionSortCriteria to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppSubscriptionSortDirection.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppSubscriptionSortDirection.java new file mode 100644 index 00000000..10b74b61 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppSubscriptionSortDirection.java @@ -0,0 +1,78 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.google.gson.annotations.SerializedName; + +import java.io.IOException; +import java.util.Locale; +import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; + +/** + * Sorting direction + */ +@JsonAdapter(AppSubscriptionSortDirection.Adapter.class) +public enum AppSubscriptionSortDirection { + + DESC("DESC"), + + ASC("ASC"); + + private String value; + + AppSubscriptionSortDirection(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static AppSubscriptionSortDirection fromValue(String value) { + for (AppSubscriptionSortDirection b : AppSubscriptionSortDirection.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final AppSubscriptionSortDirection enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public AppSubscriptionSortDirection read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return AppSubscriptionSortDirection.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + AppSubscriptionSortDirection.fromValue(value); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppSubscriptionSource.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppSubscriptionSource.java new file mode 100644 index 00000000..021b6fbe --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppSubscriptionSource.java @@ -0,0 +1,337 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.AppSubscriptionSourceAppLink; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * Source details for the Subscription + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class AppSubscriptionSource { + public static final String SERIALIZED_NAME_APP_LINK = "appLink"; + @SerializedName(SERIALIZED_NAME_APP_LINK) + @javax.annotation.Nullable + private AppSubscriptionSourceAppLink appLink; + + public static final String SERIALIZED_NAME_IP_SUBNETS = "ipSubnets"; + @SerializedName(SERIALIZED_NAME_IP_SUBNETS) + @javax.annotation.Nonnull + private List ipSubnets = new ArrayList<>(); + + public AppSubscriptionSource() { + } + + public AppSubscriptionSource appLink(@javax.annotation.Nullable AppSubscriptionSourceAppLink appLink) { + this.appLink = appLink; + return this; + } + + /** + * Get appLink + * @return appLink + */ + @javax.annotation.Nullable + public AppSubscriptionSourceAppLink getAppLink() { + return appLink; + } + + public void setAppLink(@javax.annotation.Nullable AppSubscriptionSourceAppLink appLink) { + this.appLink = appLink; + } + + + public AppSubscriptionSource ipSubnets(@javax.annotation.Nonnull List ipSubnets) { + this.ipSubnets = ipSubnets; + return this; + } + + public AppSubscriptionSource addIpSubnetsItem(String ipSubnetsItem) { + if (this.ipSubnets == null) { + this.ipSubnets = new ArrayList<>(); + } + this.ipSubnets.add(ipSubnetsItem); + return this; + } + + /** + * List of IP subnets in CIDR notation + * @return ipSubnets + */ + @javax.annotation.Nonnull + public List getIpSubnets() { + return ipSubnets; + } + + public void setIpSubnets(@javax.annotation.Nonnull List ipSubnets) { + this.ipSubnets = ipSubnets; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AppSubscriptionSource instance itself + */ + public AppSubscriptionSource putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AppSubscriptionSource appSubscriptionSource = (AppSubscriptionSource) o; + return Objects.equals(this.appLink, appSubscriptionSource.appLink) && + Objects.equals(this.ipSubnets, appSubscriptionSource.ipSubnets)&& + Objects.equals(this.additionalProperties, appSubscriptionSource.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(appLink, ipSubnets, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AppSubscriptionSource {\n"); + sb.append(" appLink: ").append(toIndentedString(appLink)).append("\n"); + sb.append(" ipSubnets: ").append(toIndentedString(ipSubnets)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("appLink", "ipSubnets")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("ipSubnets")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AppSubscriptionSource + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AppSubscriptionSource.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in AppSubscriptionSource is not found in the empty JSON string", AppSubscriptionSource.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : AppSubscriptionSource.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `appLink` + if (jsonObj.get("appLink") != null && !jsonObj.get("appLink").isJsonNull()) { + AppSubscriptionSourceAppLink.validateJsonElement(jsonObj.get("appLink")); + } + // ensure the required json array is present + if (jsonObj.get("ipSubnets") == null) { + throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); + } else if (!jsonObj.get("ipSubnets").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `ipSubnets` to be an array in the JSON string but got `%s`", jsonObj.get("ipSubnets").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AppSubscriptionSource.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AppSubscriptionSource' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AppSubscriptionSource.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AppSubscriptionSource value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AppSubscriptionSource read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + AppSubscriptionSource instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AppSubscriptionSource given an JSON string + * + * @param jsonString JSON string + * @return An instance of AppSubscriptionSource + * @throws IOException if the JSON string is invalid with respect to AppSubscriptionSource + */ + public static AppSubscriptionSource fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AppSubscriptionSource.class); + } + + /** + * Convert an instance of AppSubscriptionSource to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppSubscriptionSourceAppLink.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppSubscriptionSourceAppLink.java new file mode 100644 index 00000000..e950a4e2 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppSubscriptionSourceAppLink.java @@ -0,0 +1,352 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.net.URI; +import java.util.Arrays; +import java.util.UUID; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * App Link reference for App Subscription + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class AppSubscriptionSourceAppLink { + public static final String SERIALIZED_NAME_HREF = "href"; + @SerializedName(SERIALIZED_NAME_HREF) + @javax.annotation.Nullable + private URI href; + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nullable + private String type; + + public static final String SERIALIZED_NAME_UUID = "uuid"; + @SerializedName(SERIALIZED_NAME_UUID) + @javax.annotation.Nonnull + private UUID uuid; + + public AppSubscriptionSourceAppLink() { + } + + public AppSubscriptionSourceAppLink( + URI href + ) { + this(); + this.href = href; + } + + /** + * Resource URI + * @return href + */ + @javax.annotation.Nullable + public URI getHref() { + return href; + } + + + + public AppSubscriptionSourceAppLink type(@javax.annotation.Nullable String type) { + this.type = type; + return this; + } + + /** + * App Link Type + * @return type + */ + @javax.annotation.Nullable + public String getType() { + return type; + } + + public void setType(@javax.annotation.Nullable String type) { + this.type = type; + } + + + public AppSubscriptionSourceAppLink uuid(@javax.annotation.Nonnull UUID uuid) { + this.uuid = uuid; + return this; + } + + /** + * Equinix-assigned access point identifier + * @return uuid + */ + @javax.annotation.Nonnull + public UUID getUuid() { + return uuid; + } + + public void setUuid(@javax.annotation.Nonnull UUID uuid) { + this.uuid = uuid; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AppSubscriptionSourceAppLink instance itself + */ + public AppSubscriptionSourceAppLink putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AppSubscriptionSourceAppLink appSubscriptionSourceAppLink = (AppSubscriptionSourceAppLink) o; + return Objects.equals(this.href, appSubscriptionSourceAppLink.href) && + Objects.equals(this.type, appSubscriptionSourceAppLink.type) && + Objects.equals(this.uuid, appSubscriptionSourceAppLink.uuid)&& + Objects.equals(this.additionalProperties, appSubscriptionSourceAppLink.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(href, type, uuid, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AppSubscriptionSourceAppLink {\n"); + sb.append(" href: ").append(toIndentedString(href)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("href", "type", "uuid")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("uuid")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AppSubscriptionSourceAppLink + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AppSubscriptionSourceAppLink.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in AppSubscriptionSourceAppLink is not found in the empty JSON string", AppSubscriptionSourceAppLink.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : AppSubscriptionSourceAppLink.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("href") != null && !jsonObj.get("href").isJsonNull()) && !jsonObj.get("href").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `href` to be a primitive type in the JSON string but got `%s`", jsonObj.get("href").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + if (!jsonObj.get("uuid").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `uuid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("uuid").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AppSubscriptionSourceAppLink.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AppSubscriptionSourceAppLink' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AppSubscriptionSourceAppLink.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AppSubscriptionSourceAppLink value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AppSubscriptionSourceAppLink read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + AppSubscriptionSourceAppLink instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AppSubscriptionSourceAppLink given an JSON string + * + * @param jsonString JSON string + * @return An instance of AppSubscriptionSourceAppLink + * @throws IOException if the JSON string is invalid with respect to AppSubscriptionSourceAppLink + */ + public static AppSubscriptionSourceAppLink fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AppSubscriptionSourceAppLink.class); + } + + /** + * Convert an instance of AppSubscriptionSourceAppLink to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppSubscriptionSourceRequest.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppSubscriptionSourceRequest.java new file mode 100644 index 00000000..e4eceee4 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppSubscriptionSourceRequest.java @@ -0,0 +1,337 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.AppSubscriptionSourceRequestAppLink; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * Source details for the Subscription + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class AppSubscriptionSourceRequest { + public static final String SERIALIZED_NAME_APP_LINK = "appLink"; + @SerializedName(SERIALIZED_NAME_APP_LINK) + @javax.annotation.Nullable + private AppSubscriptionSourceRequestAppLink appLink; + + public static final String SERIALIZED_NAME_IP_SUBNETS = "ipSubnets"; + @SerializedName(SERIALIZED_NAME_IP_SUBNETS) + @javax.annotation.Nonnull + private List ipSubnets = new ArrayList<>(); + + public AppSubscriptionSourceRequest() { + } + + public AppSubscriptionSourceRequest appLink(@javax.annotation.Nullable AppSubscriptionSourceRequestAppLink appLink) { + this.appLink = appLink; + return this; + } + + /** + * Get appLink + * @return appLink + */ + @javax.annotation.Nullable + public AppSubscriptionSourceRequestAppLink getAppLink() { + return appLink; + } + + public void setAppLink(@javax.annotation.Nullable AppSubscriptionSourceRequestAppLink appLink) { + this.appLink = appLink; + } + + + public AppSubscriptionSourceRequest ipSubnets(@javax.annotation.Nonnull List ipSubnets) { + this.ipSubnets = ipSubnets; + return this; + } + + public AppSubscriptionSourceRequest addIpSubnetsItem(String ipSubnetsItem) { + if (this.ipSubnets == null) { + this.ipSubnets = new ArrayList<>(); + } + this.ipSubnets.add(ipSubnetsItem); + return this; + } + + /** + * List of IP subnets in CIDR notation + * @return ipSubnets + */ + @javax.annotation.Nonnull + public List getIpSubnets() { + return ipSubnets; + } + + public void setIpSubnets(@javax.annotation.Nonnull List ipSubnets) { + this.ipSubnets = ipSubnets; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AppSubscriptionSourceRequest instance itself + */ + public AppSubscriptionSourceRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AppSubscriptionSourceRequest appSubscriptionSourceRequest = (AppSubscriptionSourceRequest) o; + return Objects.equals(this.appLink, appSubscriptionSourceRequest.appLink) && + Objects.equals(this.ipSubnets, appSubscriptionSourceRequest.ipSubnets)&& + Objects.equals(this.additionalProperties, appSubscriptionSourceRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(appLink, ipSubnets, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AppSubscriptionSourceRequest {\n"); + sb.append(" appLink: ").append(toIndentedString(appLink)).append("\n"); + sb.append(" ipSubnets: ").append(toIndentedString(ipSubnets)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("appLink", "ipSubnets")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("ipSubnets")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AppSubscriptionSourceRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AppSubscriptionSourceRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in AppSubscriptionSourceRequest is not found in the empty JSON string", AppSubscriptionSourceRequest.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : AppSubscriptionSourceRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `appLink` + if (jsonObj.get("appLink") != null && !jsonObj.get("appLink").isJsonNull()) { + AppSubscriptionSourceRequestAppLink.validateJsonElement(jsonObj.get("appLink")); + } + // ensure the required json array is present + if (jsonObj.get("ipSubnets") == null) { + throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); + } else if (!jsonObj.get("ipSubnets").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `ipSubnets` to be an array in the JSON string but got `%s`", jsonObj.get("ipSubnets").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AppSubscriptionSourceRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AppSubscriptionSourceRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AppSubscriptionSourceRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AppSubscriptionSourceRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AppSubscriptionSourceRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + AppSubscriptionSourceRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AppSubscriptionSourceRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of AppSubscriptionSourceRequest + * @throws IOException if the JSON string is invalid with respect to AppSubscriptionSourceRequest + */ + public static AppSubscriptionSourceRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AppSubscriptionSourceRequest.class); + } + + /** + * Convert an instance of AppSubscriptionSourceRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppSubscriptionSourceRequestAppLink.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppSubscriptionSourceRequestAppLink.java new file mode 100644 index 00000000..95df2ab7 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppSubscriptionSourceRequestAppLink.java @@ -0,0 +1,294 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import java.util.UUID; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * App Link reference for App Subscription + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class AppSubscriptionSourceRequestAppLink { + public static final String SERIALIZED_NAME_UUID = "uuid"; + @SerializedName(SERIALIZED_NAME_UUID) + @javax.annotation.Nonnull + private UUID uuid; + + public AppSubscriptionSourceRequestAppLink() { + } + + public AppSubscriptionSourceRequestAppLink uuid(@javax.annotation.Nonnull UUID uuid) { + this.uuid = uuid; + return this; + } + + /** + * Equinix-assigned access point identifier + * @return uuid + */ + @javax.annotation.Nonnull + public UUID getUuid() { + return uuid; + } + + public void setUuid(@javax.annotation.Nonnull UUID uuid) { + this.uuid = uuid; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AppSubscriptionSourceRequestAppLink instance itself + */ + public AppSubscriptionSourceRequestAppLink putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AppSubscriptionSourceRequestAppLink appSubscriptionSourceRequestAppLink = (AppSubscriptionSourceRequestAppLink) o; + return Objects.equals(this.uuid, appSubscriptionSourceRequestAppLink.uuid)&& + Objects.equals(this.additionalProperties, appSubscriptionSourceRequestAppLink.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(uuid, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AppSubscriptionSourceRequestAppLink {\n"); + sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("uuid")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("uuid")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AppSubscriptionSourceRequestAppLink + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AppSubscriptionSourceRequestAppLink.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in AppSubscriptionSourceRequestAppLink is not found in the empty JSON string", AppSubscriptionSourceRequestAppLink.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : AppSubscriptionSourceRequestAppLink.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("uuid").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `uuid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("uuid").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AppSubscriptionSourceRequestAppLink.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AppSubscriptionSourceRequestAppLink' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AppSubscriptionSourceRequestAppLink.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AppSubscriptionSourceRequestAppLink value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AppSubscriptionSourceRequestAppLink read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + AppSubscriptionSourceRequestAppLink instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AppSubscriptionSourceRequestAppLink given an JSON string + * + * @param jsonString JSON string + * @return An instance of AppSubscriptionSourceRequestAppLink + * @throws IOException if the JSON string is invalid with respect to AppSubscriptionSourceRequestAppLink + */ + public static AppSubscriptionSourceRequestAppLink fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AppSubscriptionSourceRequestAppLink.class); + } + + /** + * Convert an instance of AppSubscriptionSourceRequestAppLink to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppSubscriptionState.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppSubscriptionState.java new file mode 100644 index 00000000..3639c609 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppSubscriptionState.java @@ -0,0 +1,88 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.google.gson.annotations.SerializedName; + +import java.io.IOException; +import java.util.Locale; +import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; + +/** + * App Subscription lifecycle state + */ +@JsonAdapter(AppSubscriptionState.Adapter.class) +public enum AppSubscriptionState { + + PROVISIONING("PROVISIONING"), + + PROVISIONING_FAILED("PROVISIONING_FAILED"), + + PROVISIONED("PROVISIONED"), + + DEPROVISIONING("DEPROVISIONING"), + + DEPROVISIONING_FAILED("DEPROVISIONING_FAILED"), + + DEPROVISIONED("DEPROVISIONED"), + + REPROVISIONING("REPROVISIONING"); + + private String value; + + AppSubscriptionState(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static AppSubscriptionState fromValue(String value) { + for (AppSubscriptionState b : AppSubscriptionState.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final AppSubscriptionState enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public AppSubscriptionState read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return AppSubscriptionState.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + AppSubscriptionState.fromValue(value); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppSubscriptionTarget.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppSubscriptionTarget.java new file mode 100644 index 00000000..0a017844 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppSubscriptionTarget.java @@ -0,0 +1,353 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.AppSubscriptionPrioritization; +import com.equinix.sdk.fabricv4.model.AppSubscriptionTargetAppService; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * Target details for the Subscription + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class AppSubscriptionTarget { + public static final String SERIALIZED_NAME_APP_SERVICE = "appService"; + @SerializedName(SERIALIZED_NAME_APP_SERVICE) + @javax.annotation.Nullable + private AppSubscriptionTargetAppService appService; + + public static final String SERIALIZED_NAME_GEO_SCOPE = "geoScope"; + @SerializedName(SERIALIZED_NAME_GEO_SCOPE) + @javax.annotation.Nonnull + private String geoScope; + + public static final String SERIALIZED_NAME_PRIORITIZATION = "prioritization"; + @SerializedName(SERIALIZED_NAME_PRIORITIZATION) + @javax.annotation.Nonnull + private AppSubscriptionPrioritization prioritization; + + public AppSubscriptionTarget() { + } + + public AppSubscriptionTarget appService(@javax.annotation.Nullable AppSubscriptionTargetAppService appService) { + this.appService = appService; + return this; + } + + /** + * Get appService + * @return appService + */ + @javax.annotation.Nullable + public AppSubscriptionTargetAppService getAppService() { + return appService; + } + + public void setAppService(@javax.annotation.Nullable AppSubscriptionTargetAppService appService) { + this.appService = appService; + } + + + public AppSubscriptionTarget geoScope(@javax.annotation.Nonnull String geoScope) { + this.geoScope = geoScope; + return this; + } + + /** + * Geo scope + * @return geoScope + */ + @javax.annotation.Nonnull + public String getGeoScope() { + return geoScope; + } + + public void setGeoScope(@javax.annotation.Nonnull String geoScope) { + this.geoScope = geoScope; + } + + + public AppSubscriptionTarget prioritization(@javax.annotation.Nonnull AppSubscriptionPrioritization prioritization) { + this.prioritization = prioritization; + return this; + } + + /** + * Get prioritization + * @return prioritization + */ + @javax.annotation.Nonnull + public AppSubscriptionPrioritization getPrioritization() { + return prioritization; + } + + public void setPrioritization(@javax.annotation.Nonnull AppSubscriptionPrioritization prioritization) { + this.prioritization = prioritization; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AppSubscriptionTarget instance itself + */ + public AppSubscriptionTarget putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AppSubscriptionTarget appSubscriptionTarget = (AppSubscriptionTarget) o; + return Objects.equals(this.appService, appSubscriptionTarget.appService) && + Objects.equals(this.geoScope, appSubscriptionTarget.geoScope) && + Objects.equals(this.prioritization, appSubscriptionTarget.prioritization)&& + Objects.equals(this.additionalProperties, appSubscriptionTarget.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(appService, geoScope, prioritization, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AppSubscriptionTarget {\n"); + sb.append(" appService: ").append(toIndentedString(appService)).append("\n"); + sb.append(" geoScope: ").append(toIndentedString(geoScope)).append("\n"); + sb.append(" prioritization: ").append(toIndentedString(prioritization)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("appService", "geoScope", "prioritization")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("geoScope", "prioritization")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AppSubscriptionTarget + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AppSubscriptionTarget.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in AppSubscriptionTarget is not found in the empty JSON string", AppSubscriptionTarget.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : AppSubscriptionTarget.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `appService` + if (jsonObj.get("appService") != null && !jsonObj.get("appService").isJsonNull()) { + AppSubscriptionTargetAppService.validateJsonElement(jsonObj.get("appService")); + } + if (!jsonObj.get("geoScope").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `geoScope` to be a primitive type in the JSON string but got `%s`", jsonObj.get("geoScope").toString())); + } + // validate the required field `prioritization` + AppSubscriptionPrioritization.validateJsonElement(jsonObj.get("prioritization")); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AppSubscriptionTarget.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AppSubscriptionTarget' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AppSubscriptionTarget.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AppSubscriptionTarget value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AppSubscriptionTarget read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + AppSubscriptionTarget instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AppSubscriptionTarget given an JSON string + * + * @param jsonString JSON string + * @return An instance of AppSubscriptionTarget + * @throws IOException if the JSON string is invalid with respect to AppSubscriptionTarget + */ + public static AppSubscriptionTarget fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AppSubscriptionTarget.class); + } + + /** + * Convert an instance of AppSubscriptionTarget to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppSubscriptionTargetAppService.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppSubscriptionTargetAppService.java new file mode 100644 index 00000000..0d03c194 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppSubscriptionTargetAppService.java @@ -0,0 +1,352 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.net.URI; +import java.util.Arrays; +import java.util.UUID; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * App Service reference for App Subscription + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class AppSubscriptionTargetAppService { + public static final String SERIALIZED_NAME_HREF = "href"; + @SerializedName(SERIALIZED_NAME_HREF) + @javax.annotation.Nullable + private URI href; + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nullable + private String type; + + public static final String SERIALIZED_NAME_UUID = "uuid"; + @SerializedName(SERIALIZED_NAME_UUID) + @javax.annotation.Nonnull + private UUID uuid; + + public AppSubscriptionTargetAppService() { + } + + public AppSubscriptionTargetAppService( + URI href + ) { + this(); + this.href = href; + } + + /** + * Resource URI + * @return href + */ + @javax.annotation.Nullable + public URI getHref() { + return href; + } + + + + public AppSubscriptionTargetAppService type(@javax.annotation.Nullable String type) { + this.type = type; + return this; + } + + /** + * App Service Type + * @return type + */ + @javax.annotation.Nullable + public String getType() { + return type; + } + + public void setType(@javax.annotation.Nullable String type) { + this.type = type; + } + + + public AppSubscriptionTargetAppService uuid(@javax.annotation.Nonnull UUID uuid) { + this.uuid = uuid; + return this; + } + + /** + * Equinix-assigned access point identifier + * @return uuid + */ + @javax.annotation.Nonnull + public UUID getUuid() { + return uuid; + } + + public void setUuid(@javax.annotation.Nonnull UUID uuid) { + this.uuid = uuid; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AppSubscriptionTargetAppService instance itself + */ + public AppSubscriptionTargetAppService putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AppSubscriptionTargetAppService appSubscriptionTargetAppService = (AppSubscriptionTargetAppService) o; + return Objects.equals(this.href, appSubscriptionTargetAppService.href) && + Objects.equals(this.type, appSubscriptionTargetAppService.type) && + Objects.equals(this.uuid, appSubscriptionTargetAppService.uuid)&& + Objects.equals(this.additionalProperties, appSubscriptionTargetAppService.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(href, type, uuid, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AppSubscriptionTargetAppService {\n"); + sb.append(" href: ").append(toIndentedString(href)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("href", "type", "uuid")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("uuid")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AppSubscriptionTargetAppService + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AppSubscriptionTargetAppService.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in AppSubscriptionTargetAppService is not found in the empty JSON string", AppSubscriptionTargetAppService.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : AppSubscriptionTargetAppService.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("href") != null && !jsonObj.get("href").isJsonNull()) && !jsonObj.get("href").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `href` to be a primitive type in the JSON string but got `%s`", jsonObj.get("href").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + if (!jsonObj.get("uuid").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `uuid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("uuid").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AppSubscriptionTargetAppService.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AppSubscriptionTargetAppService' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AppSubscriptionTargetAppService.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AppSubscriptionTargetAppService value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AppSubscriptionTargetAppService read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + AppSubscriptionTargetAppService instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AppSubscriptionTargetAppService given an JSON string + * + * @param jsonString JSON string + * @return An instance of AppSubscriptionTargetAppService + * @throws IOException if the JSON string is invalid with respect to AppSubscriptionTargetAppService + */ + public static AppSubscriptionTargetAppService fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AppSubscriptionTargetAppService.class); + } + + /** + * Convert an instance of AppSubscriptionTargetAppService to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppSubscriptionTargetRequest.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppSubscriptionTargetRequest.java new file mode 100644 index 00000000..59a03235 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppSubscriptionTargetRequest.java @@ -0,0 +1,353 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.AppSubscriptionPrioritization; +import com.equinix.sdk.fabricv4.model.AppSubscriptionTargetRequestAppService; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * Target details for the Subscription + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class AppSubscriptionTargetRequest { + public static final String SERIALIZED_NAME_APP_SERVICE = "appService"; + @SerializedName(SERIALIZED_NAME_APP_SERVICE) + @javax.annotation.Nullable + private AppSubscriptionTargetRequestAppService appService; + + public static final String SERIALIZED_NAME_GEO_SCOPE = "geoScope"; + @SerializedName(SERIALIZED_NAME_GEO_SCOPE) + @javax.annotation.Nonnull + private String geoScope; + + public static final String SERIALIZED_NAME_PRIORITIZATION = "prioritization"; + @SerializedName(SERIALIZED_NAME_PRIORITIZATION) + @javax.annotation.Nonnull + private AppSubscriptionPrioritization prioritization; + + public AppSubscriptionTargetRequest() { + } + + public AppSubscriptionTargetRequest appService(@javax.annotation.Nullable AppSubscriptionTargetRequestAppService appService) { + this.appService = appService; + return this; + } + + /** + * Get appService + * @return appService + */ + @javax.annotation.Nullable + public AppSubscriptionTargetRequestAppService getAppService() { + return appService; + } + + public void setAppService(@javax.annotation.Nullable AppSubscriptionTargetRequestAppService appService) { + this.appService = appService; + } + + + public AppSubscriptionTargetRequest geoScope(@javax.annotation.Nonnull String geoScope) { + this.geoScope = geoScope; + return this; + } + + /** + * Geo scope + * @return geoScope + */ + @javax.annotation.Nonnull + public String getGeoScope() { + return geoScope; + } + + public void setGeoScope(@javax.annotation.Nonnull String geoScope) { + this.geoScope = geoScope; + } + + + public AppSubscriptionTargetRequest prioritization(@javax.annotation.Nonnull AppSubscriptionPrioritization prioritization) { + this.prioritization = prioritization; + return this; + } + + /** + * Get prioritization + * @return prioritization + */ + @javax.annotation.Nonnull + public AppSubscriptionPrioritization getPrioritization() { + return prioritization; + } + + public void setPrioritization(@javax.annotation.Nonnull AppSubscriptionPrioritization prioritization) { + this.prioritization = prioritization; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AppSubscriptionTargetRequest instance itself + */ + public AppSubscriptionTargetRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AppSubscriptionTargetRequest appSubscriptionTargetRequest = (AppSubscriptionTargetRequest) o; + return Objects.equals(this.appService, appSubscriptionTargetRequest.appService) && + Objects.equals(this.geoScope, appSubscriptionTargetRequest.geoScope) && + Objects.equals(this.prioritization, appSubscriptionTargetRequest.prioritization)&& + Objects.equals(this.additionalProperties, appSubscriptionTargetRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(appService, geoScope, prioritization, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AppSubscriptionTargetRequest {\n"); + sb.append(" appService: ").append(toIndentedString(appService)).append("\n"); + sb.append(" geoScope: ").append(toIndentedString(geoScope)).append("\n"); + sb.append(" prioritization: ").append(toIndentedString(prioritization)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("appService", "geoScope", "prioritization")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("geoScope", "prioritization")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AppSubscriptionTargetRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AppSubscriptionTargetRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in AppSubscriptionTargetRequest is not found in the empty JSON string", AppSubscriptionTargetRequest.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : AppSubscriptionTargetRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `appService` + if (jsonObj.get("appService") != null && !jsonObj.get("appService").isJsonNull()) { + AppSubscriptionTargetRequestAppService.validateJsonElement(jsonObj.get("appService")); + } + if (!jsonObj.get("geoScope").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `geoScope` to be a primitive type in the JSON string but got `%s`", jsonObj.get("geoScope").toString())); + } + // validate the required field `prioritization` + AppSubscriptionPrioritization.validateJsonElement(jsonObj.get("prioritization")); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AppSubscriptionTargetRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AppSubscriptionTargetRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AppSubscriptionTargetRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AppSubscriptionTargetRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AppSubscriptionTargetRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + AppSubscriptionTargetRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AppSubscriptionTargetRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of AppSubscriptionTargetRequest + * @throws IOException if the JSON string is invalid with respect to AppSubscriptionTargetRequest + */ + public static AppSubscriptionTargetRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AppSubscriptionTargetRequest.class); + } + + /** + * Convert an instance of AppSubscriptionTargetRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppSubscriptionTargetRequestAppService.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppSubscriptionTargetRequestAppService.java new file mode 100644 index 00000000..5563fc95 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppSubscriptionTargetRequestAppService.java @@ -0,0 +1,294 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import java.util.UUID; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * App Service reference for App Subscription + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class AppSubscriptionTargetRequestAppService { + public static final String SERIALIZED_NAME_UUID = "uuid"; + @SerializedName(SERIALIZED_NAME_UUID) + @javax.annotation.Nonnull + private UUID uuid; + + public AppSubscriptionTargetRequestAppService() { + } + + public AppSubscriptionTargetRequestAppService uuid(@javax.annotation.Nonnull UUID uuid) { + this.uuid = uuid; + return this; + } + + /** + * Equinix-assigned access point identifier + * @return uuid + */ + @javax.annotation.Nonnull + public UUID getUuid() { + return uuid; + } + + public void setUuid(@javax.annotation.Nonnull UUID uuid) { + this.uuid = uuid; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AppSubscriptionTargetRequestAppService instance itself + */ + public AppSubscriptionTargetRequestAppService putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AppSubscriptionTargetRequestAppService appSubscriptionTargetRequestAppService = (AppSubscriptionTargetRequestAppService) o; + return Objects.equals(this.uuid, appSubscriptionTargetRequestAppService.uuid)&& + Objects.equals(this.additionalProperties, appSubscriptionTargetRequestAppService.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(uuid, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AppSubscriptionTargetRequestAppService {\n"); + sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("uuid")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("uuid")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AppSubscriptionTargetRequestAppService + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AppSubscriptionTargetRequestAppService.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in AppSubscriptionTargetRequestAppService is not found in the empty JSON string", AppSubscriptionTargetRequestAppService.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : AppSubscriptionTargetRequestAppService.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("uuid").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `uuid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("uuid").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AppSubscriptionTargetRequestAppService.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AppSubscriptionTargetRequestAppService' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AppSubscriptionTargetRequestAppService.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AppSubscriptionTargetRequestAppService value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AppSubscriptionTargetRequestAppService read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + AppSubscriptionTargetRequestAppService instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AppSubscriptionTargetRequestAppService given an JSON string + * + * @param jsonString JSON string + * @return An instance of AppSubscriptionTargetRequestAppService + * @throws IOException if the JSON string is invalid with respect to AppSubscriptionTargetRequestAppService + */ + public static AppSubscriptionTargetRequestAppService fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AppSubscriptionTargetRequestAppService.class); + } + + /** + * Convert an instance of AppSubscriptionTargetRequestAppService to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppSubscriptionType.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppSubscriptionType.java new file mode 100644 index 00000000..0ef84740 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AppSubscriptionType.java @@ -0,0 +1,76 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.google.gson.annotations.SerializedName; + +import java.io.IOException; +import java.util.Locale; +import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; + +/** + * App Subscription Type + */ +@JsonAdapter(AppSubscriptionType.Adapter.class) +public enum AppSubscriptionType { + + APP_SUBSCRIPTION("APP_SUBSCRIPTION"); + + private String value; + + AppSubscriptionType(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static AppSubscriptionType fromValue(String value) { + for (AppSubscriptionType b : AppSubscriptionType.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final AppSubscriptionType enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public AppSubscriptionType read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return AppSubscriptionType.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + AppSubscriptionType.fromValue(value); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AttachedAppDomainOrder.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AttachedAppDomainOrder.java new file mode 100644 index 00000000..c54e2ce2 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AttachedAppDomainOrder.java @@ -0,0 +1,78 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.google.gson.annotations.SerializedName; + +import java.io.IOException; +import java.util.Locale; +import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; + +/** + * Sort order for attached App Domains. + */ +@JsonAdapter(AttachedAppDomainOrder.Adapter.class) +public enum AttachedAppDomainOrder { + + DESC("DESC"), + + ASC("ASC"); + + private String value; + + AttachedAppDomainOrder(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static AttachedAppDomainOrder fromValue(String value) { + for (AttachedAppDomainOrder b : AttachedAppDomainOrder.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final AttachedAppDomainOrder enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public AttachedAppDomainOrder read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return AttachedAppDomainOrder.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + AttachedAppDomainOrder.fromValue(value); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AttachedAppLinkOrder.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AttachedAppLinkOrder.java new file mode 100644 index 00000000..e84d6100 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AttachedAppLinkOrder.java @@ -0,0 +1,78 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.google.gson.annotations.SerializedName; + +import java.io.IOException; +import java.util.Locale; +import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; + +/** + * Sort order for attached App Links. + */ +@JsonAdapter(AttachedAppLinkOrder.Adapter.class) +public enum AttachedAppLinkOrder { + + DESC("DESC"), + + ASC("ASC"); + + private String value; + + AttachedAppLinkOrder(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static AttachedAppLinkOrder fromValue(String value) { + for (AttachedAppLinkOrder b : AttachedAppLinkOrder.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final AttachedAppLinkOrder enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public AttachedAppLinkOrder read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return AttachedAppLinkOrder.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + AttachedAppLinkOrder.fromValue(value); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AttachedAppServiceOrder.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AttachedAppServiceOrder.java new file mode 100644 index 00000000..a0554a31 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AttachedAppServiceOrder.java @@ -0,0 +1,78 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.google.gson.annotations.SerializedName; + +import java.io.IOException; +import java.util.Locale; +import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; + +/** + * Sort order for attached App Services. + */ +@JsonAdapter(AttachedAppServiceOrder.Adapter.class) +public enum AttachedAppServiceOrder { + + DESC("DESC"), + + ASC("ASC"); + + private String value; + + AttachedAppServiceOrder(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static AttachedAppServiceOrder fromValue(String value) { + for (AttachedAppServiceOrder b : AttachedAppServiceOrder.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final AttachedAppServiceOrder enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public AttachedAppServiceOrder read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return AttachedAppServiceOrder.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + AttachedAppServiceOrder.fromValue(value); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AttachedAppSubscriptionOrder.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AttachedAppSubscriptionOrder.java new file mode 100644 index 00000000..5373c604 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AttachedAppSubscriptionOrder.java @@ -0,0 +1,78 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.google.gson.annotations.SerializedName; + +import java.io.IOException; +import java.util.Locale; +import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; + +/** + * Sort order for attached App Subscriptions. + */ +@JsonAdapter(AttachedAppSubscriptionOrder.Adapter.class) +public enum AttachedAppSubscriptionOrder { + + DESC("DESC"), + + ASC("ASC"); + + private String value; + + AttachedAppSubscriptionOrder(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static AttachedAppSubscriptionOrder fromValue(String value) { + for (AttachedAppSubscriptionOrder b : AttachedAppSubscriptionOrder.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final AttachedAppSubscriptionOrder enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public AttachedAppSubscriptionOrder read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return AttachedAppSubscriptionOrder.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + AttachedAppSubscriptionOrder.fromValue(value); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/BulkOpticalConnectRequest.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/BulkOpticalConnectRequest.java new file mode 100644 index 00000000..1828e650 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/BulkOpticalConnectRequest.java @@ -0,0 +1,308 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.OpticalConnectPostRequest; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * Request to create a dual diverse pair of Optical Connect connections. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class BulkOpticalConnectRequest { + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + @javax.annotation.Nullable + private List data = new ArrayList<>(); + + public BulkOpticalConnectRequest() { + } + + public BulkOpticalConnectRequest data(@javax.annotation.Nullable List data) { + this.data = data; + return this; + } + + public BulkOpticalConnectRequest addDataItem(OpticalConnectPostRequest dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + return this; + } + + /** + * The two connections forming the diverse pair — one PRIMARY and one SECONDARY. + * @return data + */ + @javax.annotation.Nullable + public List getData() { + return data; + } + + public void setData(@javax.annotation.Nullable List data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the BulkOpticalConnectRequest instance itself + */ + public BulkOpticalConnectRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BulkOpticalConnectRequest bulkOpticalConnectRequest = (BulkOpticalConnectRequest) o; + return Objects.equals(this.data, bulkOpticalConnectRequest.data)&& + Objects.equals(this.additionalProperties, bulkOpticalConnectRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BulkOpticalConnectRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("data")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to BulkOpticalConnectRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!BulkOpticalConnectRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in BulkOpticalConnectRequest is not found in the empty JSON string", BulkOpticalConnectRequest.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); + if (jsonArraydata != null) { + // ensure the json data is an array + if (!jsonObj.get("data").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + } + + // validate the optional field `data` (array) + for (int i = 0; i < jsonArraydata.size(); i++) { + OpticalConnectPostRequest.validateJsonElement(jsonArraydata.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!BulkOpticalConnectRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'BulkOpticalConnectRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(BulkOpticalConnectRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, BulkOpticalConnectRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public BulkOpticalConnectRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + BulkOpticalConnectRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of BulkOpticalConnectRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of BulkOpticalConnectRequest + * @throws IOException if the JSON string is invalid with respect to BulkOpticalConnectRequest + */ + public static BulkOpticalConnectRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, BulkOpticalConnectRequest.class); + } + + /** + * Convert an instance of BulkOpticalConnectRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/CloudEventSimpleExpression.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/CloudEventSimpleExpression.java index f22bff88..8a36c290 100644 --- a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/CloudEventSimpleExpression.java +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/CloudEventSimpleExpression.java @@ -95,7 +95,7 @@ public CloudEventSimpleExpression operator(@javax.annotation.Nullable String ope } /** - * Possible operators to use on filters: * `=` - equal * `!=` - not equal * `>` - greater than * `>=` - greater than or equal to * `<` - less than * `<=` - less than or equal to * `BETWEEN` - between * `IN` - in * `LIKE` - like * `ILIKE` - like case-insensitive * `NOT IN` - not in * `IS NULL` - is null * `IS NOT NULL` - is not null + * Possible operators to use on filters: * `=` - equal * `!=` - not equal * `>` - greater than * `>=` - greater than or equal to * `<` - less than * `<=` - less than or equal to * `BETWEEN` - between * `IN` - in * `LIKE` - like * `ILIKE` - like case-insensitive * `IS NULL` - is null * `IS NOT NULL` - is not null * @return operator */ @javax.annotation.Nullable diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/CloudRouterReadResponse.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/CloudRouterReadResponse.java new file mode 100644 index 00000000..d96d63b6 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/CloudRouterReadResponse.java @@ -0,0 +1,813 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.Changelog; +import com.equinix.sdk.fabricv4.model.CloudRouterAccessPointState; +import com.equinix.sdk.fabricv4.model.CloudRouterChange; +import com.equinix.sdk.fabricv4.model.CloudRouterPostRequestPackage; +import com.equinix.sdk.fabricv4.model.MarketplaceSubscription; +import com.equinix.sdk.fabricv4.model.Order; +import com.equinix.sdk.fabricv4.model.Project; +import com.equinix.sdk.fabricv4.model.SimplifiedAccount; +import com.equinix.sdk.fabricv4.model.SimplifiedLocationWithoutIBX; +import com.equinix.sdk.fabricv4.model.SimplifiedNotification; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.net.URI; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * Fabric Cloud Router read response object + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class CloudRouterReadResponse { + /** + * Gets or Sets type + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + IC_ROUTER("IC_ROUTER"), + + XF_ROUTER("XF_ROUTER"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nullable + private TypeEnum type; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable + private String name; + + public static final String SERIALIZED_NAME_LOCATION = "location"; + @SerializedName(SERIALIZED_NAME_LOCATION) + @javax.annotation.Nullable + private SimplifiedLocationWithoutIBX location; + + public static final String SERIALIZED_NAME_PACKAGE = "package"; + @SerializedName(SERIALIZED_NAME_PACKAGE) + @javax.annotation.Nullable + private CloudRouterPostRequestPackage _package; + + public static final String SERIALIZED_NAME_ORDER = "order"; + @SerializedName(SERIALIZED_NAME_ORDER) + @javax.annotation.Nullable + private Order order; + + public static final String SERIALIZED_NAME_PROJECT = "project"; + @SerializedName(SERIALIZED_NAME_PROJECT) + @javax.annotation.Nullable + private Project project; + + public static final String SERIALIZED_NAME_ACCOUNT = "account"; + @SerializedName(SERIALIZED_NAME_ACCOUNT) + @javax.annotation.Nullable + private SimplifiedAccount account; + + public static final String SERIALIZED_NAME_NOTIFICATIONS = "notifications"; + @SerializedName(SERIALIZED_NAME_NOTIFICATIONS) + @javax.annotation.Nullable + private List notifications = new ArrayList<>(); + + public static final String SERIALIZED_NAME_HREF = "href"; + @SerializedName(SERIALIZED_NAME_HREF) + @javax.annotation.Nullable + private URI href; + + public static final String SERIALIZED_NAME_UUID = "uuid"; + @SerializedName(SERIALIZED_NAME_UUID) + @javax.annotation.Nullable + private UUID uuid; + + public static final String SERIALIZED_NAME_STATE = "state"; + @SerializedName(SERIALIZED_NAME_STATE) + @javax.annotation.Nullable + private CloudRouterAccessPointState state; + + public static final String SERIALIZED_NAME_EQUINIX_ASN = "equinixAsn"; + @SerializedName(SERIALIZED_NAME_EQUINIX_ASN) + @javax.annotation.Nullable + private Long equinixAsn; + + public static final String SERIALIZED_NAME_CONNECTIONS_COUNT = "connectionsCount"; + @SerializedName(SERIALIZED_NAME_CONNECTIONS_COUNT) + @javax.annotation.Nullable + private Integer connectionsCount; + + public static final String SERIALIZED_NAME_MARKETPLACE_SUBSCRIPTION = "marketplaceSubscription"; + @SerializedName(SERIALIZED_NAME_MARKETPLACE_SUBSCRIPTION) + @javax.annotation.Nullable + private MarketplaceSubscription marketplaceSubscription; + + public static final String SERIALIZED_NAME_CHANGE_LOG = "changeLog"; + @SerializedName(SERIALIZED_NAME_CHANGE_LOG) + @javax.annotation.Nullable + private Changelog changeLog; + + public static final String SERIALIZED_NAME_CHANGE = "change"; + @SerializedName(SERIALIZED_NAME_CHANGE) + @javax.annotation.Nullable + private CloudRouterChange change; + + public CloudRouterReadResponse() { + } + + public CloudRouterReadResponse( + URI href + ) { + this(); + this.href = href; + } + + public CloudRouterReadResponse type(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + */ + @javax.annotation.Nullable + public TypeEnum getType() { + return type; + } + + public void setType(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + } + + + public CloudRouterReadResponse name(@javax.annotation.Nullable String name) { + this.name = name; + return this; + } + + /** + * Customer-provided Cloud Router name + * @return name + */ + @javax.annotation.Nullable + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nullable String name) { + this.name = name; + } + + + public CloudRouterReadResponse location(@javax.annotation.Nullable SimplifiedLocationWithoutIBX location) { + this.location = location; + return this; + } + + /** + * Get location + * @return location + */ + @javax.annotation.Nullable + public SimplifiedLocationWithoutIBX getLocation() { + return location; + } + + public void setLocation(@javax.annotation.Nullable SimplifiedLocationWithoutIBX location) { + this.location = location; + } + + + public CloudRouterReadResponse _package(@javax.annotation.Nullable CloudRouterPostRequestPackage _package) { + this._package = _package; + return this; + } + + /** + * Get _package + * @return _package + */ + @javax.annotation.Nullable + public CloudRouterPostRequestPackage getPackage() { + return _package; + } + + public void setPackage(@javax.annotation.Nullable CloudRouterPostRequestPackage _package) { + this._package = _package; + } + + + public CloudRouterReadResponse order(@javax.annotation.Nullable Order order) { + this.order = order; + return this; + } + + /** + * Get order + * @return order + */ + @javax.annotation.Nullable + public Order getOrder() { + return order; + } + + public void setOrder(@javax.annotation.Nullable Order order) { + this.order = order; + } + + + public CloudRouterReadResponse project(@javax.annotation.Nullable Project project) { + this.project = project; + return this; + } + + /** + * Get project + * @return project + */ + @javax.annotation.Nullable + public Project getProject() { + return project; + } + + public void setProject(@javax.annotation.Nullable Project project) { + this.project = project; + } + + + public CloudRouterReadResponse account(@javax.annotation.Nullable SimplifiedAccount account) { + this.account = account; + return this; + } + + /** + * Get account + * @return account + */ + @javax.annotation.Nullable + public SimplifiedAccount getAccount() { + return account; + } + + public void setAccount(@javax.annotation.Nullable SimplifiedAccount account) { + this.account = account; + } + + + public CloudRouterReadResponse notifications(@javax.annotation.Nullable List notifications) { + this.notifications = notifications; + return this; + } + + public CloudRouterReadResponse addNotificationsItem(SimplifiedNotification notificationsItem) { + if (this.notifications == null) { + this.notifications = new ArrayList<>(); + } + this.notifications.add(notificationsItem); + return this; + } + + /** + * Preferences for notifications on connection configuration or status changes + * @return notifications + */ + @javax.annotation.Nullable + public List getNotifications() { + return notifications; + } + + public void setNotifications(@javax.annotation.Nullable List notifications) { + this.notifications = notifications; + } + + + /** + * Cloud Routers URI + * @return href + */ + @javax.annotation.Nullable + public URI getHref() { + return href; + } + + + + public CloudRouterReadResponse uuid(@javax.annotation.Nullable UUID uuid) { + this.uuid = uuid; + return this; + } + + /** + * Equinix-assigned access point identifier + * @return uuid + */ + @javax.annotation.Nullable + public UUID getUuid() { + return uuid; + } + + public void setUuid(@javax.annotation.Nullable UUID uuid) { + this.uuid = uuid; + } + + + public CloudRouterReadResponse state(@javax.annotation.Nullable CloudRouterAccessPointState state) { + this.state = state; + return this; + } + + /** + * Get state + * @return state + */ + @javax.annotation.Nullable + public CloudRouterAccessPointState getState() { + return state; + } + + public void setState(@javax.annotation.Nullable CloudRouterAccessPointState state) { + this.state = state; + } + + + public CloudRouterReadResponse equinixAsn(@javax.annotation.Nullable Long equinixAsn) { + this.equinixAsn = equinixAsn; + return this; + } + + /** + * Equinix ASN + * @return equinixAsn + */ + @javax.annotation.Nullable + public Long getEquinixAsn() { + return equinixAsn; + } + + public void setEquinixAsn(@javax.annotation.Nullable Long equinixAsn) { + this.equinixAsn = equinixAsn; + } + + + public CloudRouterReadResponse connectionsCount(@javax.annotation.Nullable Integer connectionsCount) { + this.connectionsCount = connectionsCount; + return this; + } + + /** + * Number of connections associated with this Access point + * minimum: 0 + * @return connectionsCount + */ + @javax.annotation.Nullable + public Integer getConnectionsCount() { + return connectionsCount; + } + + public void setConnectionsCount(@javax.annotation.Nullable Integer connectionsCount) { + this.connectionsCount = connectionsCount; + } + + + public CloudRouterReadResponse marketplaceSubscription(@javax.annotation.Nullable MarketplaceSubscription marketplaceSubscription) { + this.marketplaceSubscription = marketplaceSubscription; + return this; + } + + /** + * Get marketplaceSubscription + * @return marketplaceSubscription + */ + @javax.annotation.Nullable + public MarketplaceSubscription getMarketplaceSubscription() { + return marketplaceSubscription; + } + + public void setMarketplaceSubscription(@javax.annotation.Nullable MarketplaceSubscription marketplaceSubscription) { + this.marketplaceSubscription = marketplaceSubscription; + } + + + public CloudRouterReadResponse changeLog(@javax.annotation.Nullable Changelog changeLog) { + this.changeLog = changeLog; + return this; + } + + /** + * Get changeLog + * @return changeLog + */ + @javax.annotation.Nullable + public Changelog getChangeLog() { + return changeLog; + } + + public void setChangeLog(@javax.annotation.Nullable Changelog changeLog) { + this.changeLog = changeLog; + } + + + public CloudRouterReadResponse change(@javax.annotation.Nullable CloudRouterChange change) { + this.change = change; + return this; + } + + /** + * Get change + * @return change + */ + @javax.annotation.Nullable + public CloudRouterChange getChange() { + return change; + } + + public void setChange(@javax.annotation.Nullable CloudRouterChange change) { + this.change = change; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the CloudRouterReadResponse instance itself + */ + public CloudRouterReadResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CloudRouterReadResponse cloudRouterReadResponse = (CloudRouterReadResponse) o; + return Objects.equals(this.type, cloudRouterReadResponse.type) && + Objects.equals(this.name, cloudRouterReadResponse.name) && + Objects.equals(this.location, cloudRouterReadResponse.location) && + Objects.equals(this._package, cloudRouterReadResponse._package) && + Objects.equals(this.order, cloudRouterReadResponse.order) && + Objects.equals(this.project, cloudRouterReadResponse.project) && + Objects.equals(this.account, cloudRouterReadResponse.account) && + Objects.equals(this.notifications, cloudRouterReadResponse.notifications) && + Objects.equals(this.href, cloudRouterReadResponse.href) && + Objects.equals(this.uuid, cloudRouterReadResponse.uuid) && + Objects.equals(this.state, cloudRouterReadResponse.state) && + Objects.equals(this.equinixAsn, cloudRouterReadResponse.equinixAsn) && + Objects.equals(this.connectionsCount, cloudRouterReadResponse.connectionsCount) && + Objects.equals(this.marketplaceSubscription, cloudRouterReadResponse.marketplaceSubscription) && + Objects.equals(this.changeLog, cloudRouterReadResponse.changeLog) && + Objects.equals(this.change, cloudRouterReadResponse.change)&& + Objects.equals(this.additionalProperties, cloudRouterReadResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(type, name, location, _package, order, project, account, notifications, href, uuid, state, equinixAsn, connectionsCount, marketplaceSubscription, changeLog, change, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CloudRouterReadResponse {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" location: ").append(toIndentedString(location)).append("\n"); + sb.append(" _package: ").append(toIndentedString(_package)).append("\n"); + sb.append(" order: ").append(toIndentedString(order)).append("\n"); + sb.append(" project: ").append(toIndentedString(project)).append("\n"); + sb.append(" account: ").append(toIndentedString(account)).append("\n"); + sb.append(" notifications: ").append(toIndentedString(notifications)).append("\n"); + sb.append(" href: ").append(toIndentedString(href)).append("\n"); + sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); + sb.append(" state: ").append(toIndentedString(state)).append("\n"); + sb.append(" equinixAsn: ").append(toIndentedString(equinixAsn)).append("\n"); + sb.append(" connectionsCount: ").append(toIndentedString(connectionsCount)).append("\n"); + sb.append(" marketplaceSubscription: ").append(toIndentedString(marketplaceSubscription)).append("\n"); + sb.append(" changeLog: ").append(toIndentedString(changeLog)).append("\n"); + sb.append(" change: ").append(toIndentedString(change)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("type", "name", "location", "package", "order", "project", "account", "notifications", "href", "uuid", "state", "equinixAsn", "connectionsCount", "marketplaceSubscription", "changeLog", "change")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CloudRouterReadResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CloudRouterReadResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in CloudRouterReadResponse is not found in the empty JSON string", CloudRouterReadResponse.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // validate the optional field `type` + if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { + TypeEnum.validateJsonElement(jsonObj.get("type")); + } + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + // validate the optional field `location` + if (jsonObj.get("location") != null && !jsonObj.get("location").isJsonNull()) { + SimplifiedLocationWithoutIBX.validateJsonElement(jsonObj.get("location")); + } + // validate the optional field `package` + if (jsonObj.get("package") != null && !jsonObj.get("package").isJsonNull()) { + CloudRouterPostRequestPackage.validateJsonElement(jsonObj.get("package")); + } + // validate the optional field `order` + if (jsonObj.get("order") != null && !jsonObj.get("order").isJsonNull()) { + Order.validateJsonElement(jsonObj.get("order")); + } + // validate the optional field `project` + if (jsonObj.get("project") != null && !jsonObj.get("project").isJsonNull()) { + Project.validateJsonElement(jsonObj.get("project")); + } + // validate the optional field `account` + if (jsonObj.get("account") != null && !jsonObj.get("account").isJsonNull()) { + SimplifiedAccount.validateJsonElement(jsonObj.get("account")); + } + if (jsonObj.get("notifications") != null && !jsonObj.get("notifications").isJsonNull()) { + JsonArray jsonArraynotifications = jsonObj.getAsJsonArray("notifications"); + if (jsonArraynotifications != null) { + // ensure the json data is an array + if (!jsonObj.get("notifications").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `notifications` to be an array in the JSON string but got `%s`", jsonObj.get("notifications").toString())); + } + + // validate the optional field `notifications` (array) + for (int i = 0; i < jsonArraynotifications.size(); i++) { + SimplifiedNotification.validateJsonElement(jsonArraynotifications.get(i)); + }; + } + } + if ((jsonObj.get("href") != null && !jsonObj.get("href").isJsonNull()) && !jsonObj.get("href").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `href` to be a primitive type in the JSON string but got `%s`", jsonObj.get("href").toString())); + } + if ((jsonObj.get("uuid") != null && !jsonObj.get("uuid").isJsonNull()) && !jsonObj.get("uuid").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `uuid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("uuid").toString())); + } + // validate the optional field `state` + if (jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) { + CloudRouterAccessPointState.validateJsonElement(jsonObj.get("state")); + } + // validate the optional field `marketplaceSubscription` + if (jsonObj.get("marketplaceSubscription") != null && !jsonObj.get("marketplaceSubscription").isJsonNull()) { + MarketplaceSubscription.validateJsonElement(jsonObj.get("marketplaceSubscription")); + } + // validate the optional field `changeLog` + if (jsonObj.get("changeLog") != null && !jsonObj.get("changeLog").isJsonNull()) { + Changelog.validateJsonElement(jsonObj.get("changeLog")); + } + // validate the optional field `change` + if (jsonObj.get("change") != null && !jsonObj.get("change").isJsonNull()) { + CloudRouterChange.validateJsonElement(jsonObj.get("change")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CloudRouterReadResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CloudRouterReadResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CloudRouterReadResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CloudRouterReadResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public CloudRouterReadResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + CloudRouterReadResponse instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of CloudRouterReadResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of CloudRouterReadResponse + * @throws IOException if the JSON string is invalid with respect to CloudRouterReadResponse + */ + public static CloudRouterReadResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CloudRouterReadResponse.class); + } + + /** + * Convert an instance of CloudRouterReadResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/CompanyProfileContact.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/CompanyProfileContact.java new file mode 100644 index 00000000..2b0d1464 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/CompanyProfileContact.java @@ -0,0 +1,391 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.CompanyProfileContactContacts; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * CompanyProfileContact + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class CompanyProfileContact { + /** + * Contact Type + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + SUPPORT("SUPPORT"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nullable + private TypeEnum type; + + public static final String SERIALIZED_NAME_CONTACTS = "contacts"; + @SerializedName(SERIALIZED_NAME_CONTACTS) + @javax.annotation.Nullable + private List contacts = new ArrayList<>(); + + public CompanyProfileContact() { + } + + public CompanyProfileContact type(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + return this; + } + + /** + * Contact Type + * @return type + */ + @javax.annotation.Nullable + public TypeEnum getType() { + return type; + } + + public void setType(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + } + + + public CompanyProfileContact contacts(@javax.annotation.Nullable List contacts) { + this.contacts = contacts; + return this; + } + + public CompanyProfileContact addContactsItem(CompanyProfileContactContacts contactsItem) { + if (this.contacts == null) { + this.contacts = new ArrayList<>(); + } + this.contacts.add(contactsItem); + return this; + } + + /** + * Get contacts + * @return contacts + */ + @javax.annotation.Nullable + public List getContacts() { + return contacts; + } + + public void setContacts(@javax.annotation.Nullable List contacts) { + this.contacts = contacts; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the CompanyProfileContact instance itself + */ + public CompanyProfileContact putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CompanyProfileContact companyProfileContact = (CompanyProfileContact) o; + return Objects.equals(this.type, companyProfileContact.type) && + Objects.equals(this.contacts, companyProfileContact.contacts)&& + Objects.equals(this.additionalProperties, companyProfileContact.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(type, contacts, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CompanyProfileContact {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" contacts: ").append(toIndentedString(contacts)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("type", "contacts")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CompanyProfileContact + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CompanyProfileContact.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in CompanyProfileContact is not found in the empty JSON string", CompanyProfileContact.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // validate the optional field `type` + if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { + TypeEnum.validateJsonElement(jsonObj.get("type")); + } + if (jsonObj.get("contacts") != null && !jsonObj.get("contacts").isJsonNull()) { + JsonArray jsonArraycontacts = jsonObj.getAsJsonArray("contacts"); + if (jsonArraycontacts != null) { + // ensure the json data is an array + if (!jsonObj.get("contacts").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `contacts` to be an array in the JSON string but got `%s`", jsonObj.get("contacts").toString())); + } + + // validate the optional field `contacts` (array) + for (int i = 0; i < jsonArraycontacts.size(); i++) { + CompanyProfileContactContacts.validateJsonElement(jsonArraycontacts.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CompanyProfileContact.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CompanyProfileContact' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CompanyProfileContact.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CompanyProfileContact value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public CompanyProfileContact read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + CompanyProfileContact instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of CompanyProfileContact given an JSON string + * + * @param jsonString JSON string + * @return An instance of CompanyProfileContact + * @throws IOException if the JSON string is invalid with respect to CompanyProfileContact + */ + public static CompanyProfileContact fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CompanyProfileContact.class); + } + + /** + * Convert an instance of CompanyProfileContact to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ToolCallInformationInner.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/CompanyProfileContactContacts.java similarity index 66% rename from services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ToolCallInformationInner.java rename to services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/CompanyProfileContactContacts.java index 13850c6b..d0daf4ee 100644 --- a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ToolCallInformationInner.java +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/CompanyProfileContactContacts.java @@ -46,35 +46,35 @@ import com.equinix.sdk.fabricv4.JSON; /** - * ToolCallInformationInner + * CompanyProfileContactContacts */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") -public class ToolCallInformationInner { +public class CompanyProfileContactContacts { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) @javax.annotation.Nullable private String name; - public static final String SERIALIZED_NAME_INPUT = "input"; - @SerializedName(SERIALIZED_NAME_INPUT) + public static final String SERIALIZED_NAME_ROLE = "role"; + @SerializedName(SERIALIZED_NAME_ROLE) @javax.annotation.Nullable - private String input; + private String role; - public static final String SERIALIZED_NAME_RESPONSE = "response"; - @SerializedName(SERIALIZED_NAME_RESPONSE) - @javax.annotation.Nullable - private String response; + public static final String SERIALIZED_NAME_EMAIL = "email"; + @SerializedName(SERIALIZED_NAME_EMAIL) + @javax.annotation.Nonnull + private String email; - public ToolCallInformationInner() { + public CompanyProfileContactContacts() { } - public ToolCallInformationInner name(@javax.annotation.Nullable String name) { + public CompanyProfileContactContacts name(@javax.annotation.Nullable String name) { this.name = name; return this; } /** - * Name of tools called + * Get name * @return name */ @javax.annotation.Nullable @@ -87,41 +87,41 @@ public void setName(@javax.annotation.Nullable String name) { } - public ToolCallInformationInner input(@javax.annotation.Nullable String input) { - this.input = input; + public CompanyProfileContactContacts role(@javax.annotation.Nullable String role) { + this.role = role; return this; } /** - * Content of the tool request - * @return input + * Get role + * @return role */ @javax.annotation.Nullable - public String getInput() { - return input; + public String getRole() { + return role; } - public void setInput(@javax.annotation.Nullable String input) { - this.input = input; + public void setRole(@javax.annotation.Nullable String role) { + this.role = role; } - public ToolCallInformationInner response(@javax.annotation.Nullable String response) { - this.response = response; + public CompanyProfileContactContacts email(@javax.annotation.Nonnull String email) { + this.email = email; return this; } /** - * Content of the tool response - * @return response + * Get email + * @return email */ - @javax.annotation.Nullable - public String getResponse() { - return response; + @javax.annotation.Nonnull + public String getEmail() { + return email; } - public void setResponse(@javax.annotation.Nullable String response) { - this.response = response; + public void setEmail(@javax.annotation.Nonnull String email) { + this.email = email; } /** @@ -137,9 +137,9 @@ public void setResponse(@javax.annotation.Nullable String response) { * * @param key name of the property * @param value value of the property - * @return the ToolCallInformationInner instance itself + * @return the CompanyProfileContactContacts instance itself */ - public ToolCallInformationInner putAdditionalProperty(String key, Object value) { + public CompanyProfileContactContacts putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -178,25 +178,25 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - ToolCallInformationInner toolCallInformationInner = (ToolCallInformationInner) o; - return Objects.equals(this.name, toolCallInformationInner.name) && - Objects.equals(this.input, toolCallInformationInner.input) && - Objects.equals(this.response, toolCallInformationInner.response)&& - Objects.equals(this.additionalProperties, toolCallInformationInner.additionalProperties); + CompanyProfileContactContacts companyProfileContactContacts = (CompanyProfileContactContacts) o; + return Objects.equals(this.name, companyProfileContactContacts.name) && + Objects.equals(this.role, companyProfileContactContacts.role) && + Objects.equals(this.email, companyProfileContactContacts.email)&& + Objects.equals(this.additionalProperties, companyProfileContactContacts.additionalProperties); } @Override public int hashCode() { - return Objects.hash(name, input, response, additionalProperties); + return Objects.hash(name, role, email, additionalProperties); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class ToolCallInformationInner {\n"); + sb.append("class CompanyProfileContactContacts {\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" input: ").append(toIndentedString(input)).append("\n"); - sb.append(" response: ").append(toIndentedString(response)).append("\n"); + sb.append(" role: ").append(toIndentedString(role)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); @@ -219,33 +219,40 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("name", "input", "response")); + openapiFields = new HashSet(Arrays.asList("name", "role", "email")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); + openapiRequiredFields = new HashSet(Arrays.asList("email")); } /** * Validates the JSON Element and throws an exception if issues found * * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ToolCallInformationInner + * @throws IOException if the JSON Element is invalid with respect to CompanyProfileContactContacts */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { - if (!ToolCallInformationInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in ToolCallInformationInner is not found in the empty JSON string", ToolCallInformationInner.openapiRequiredFields.toString())); + if (!CompanyProfileContactContacts.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in CompanyProfileContactContacts is not found in the empty JSON string", CompanyProfileContactContacts.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CompanyProfileContactContacts.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } - if ((jsonObj.get("input") != null && !jsonObj.get("input").isJsonNull()) && !jsonObj.get("input").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `input` to be a primitive type in the JSON string but got `%s`", jsonObj.get("input").toString())); + if ((jsonObj.get("role") != null && !jsonObj.get("role").isJsonNull()) && !jsonObj.get("role").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `role` to be a primitive type in the JSON string but got `%s`", jsonObj.get("role").toString())); } - if ((jsonObj.get("response") != null && !jsonObj.get("response").isJsonNull()) && !jsonObj.get("response").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `response` to be a primitive type in the JSON string but got `%s`", jsonObj.get("response").toString())); + if (!jsonObj.get("email").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); } } @@ -253,16 +260,16 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!ToolCallInformationInner.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ToolCallInformationInner' and its subtypes + if (!CompanyProfileContactContacts.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CompanyProfileContactContacts' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ToolCallInformationInner.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CompanyProfileContactContacts.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, ToolCallInformationInner value) throws IOException { + public void write(JsonWriter out, CompanyProfileContactContacts value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); // serialize additional properties @@ -290,12 +297,12 @@ else if (entry.getValue() instanceof Character) } @Override - public ToolCallInformationInner read(JsonReader in) throws IOException { + public CompanyProfileContactContacts read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); JsonObject jsonObj = jsonElement.getAsJsonObject(); // store additional fields in the deserialized instance - ToolCallInformationInner instance = thisAdapter.fromJsonTree(jsonObj); + CompanyProfileContactContacts instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { if (!openapiFields.contains(entry.getKey())) { if (entry.getValue().isJsonPrimitive()) { // primitive type @@ -322,18 +329,18 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } /** - * Create an instance of ToolCallInformationInner given an JSON string + * Create an instance of CompanyProfileContactContacts given an JSON string * * @param jsonString JSON string - * @return An instance of ToolCallInformationInner - * @throws IOException if the JSON string is invalid with respect to ToolCallInformationInner + * @return An instance of CompanyProfileContactContacts + * @throws IOException if the JSON string is invalid with respect to CompanyProfileContactContacts */ - public static ToolCallInformationInner fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ToolCallInformationInner.class); + public static CompanyProfileContactContacts fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CompanyProfileContactContacts.class); } /** - * Convert an instance of ToolCallInformationInner to an JSON string + * Convert an instance of CompanyProfileContactContacts to an JSON string * * @return JSON string */ diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/CompanyProfileRequest.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/CompanyProfileRequest.java index 8f87c945..8de7c2b7 100644 --- a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/CompanyProfileRequest.java +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/CompanyProfileRequest.java @@ -13,6 +13,8 @@ import java.util.Objects; import java.util.Locale; +import com.equinix.sdk.fabricv4.model.CompanyProfileContact; +import com.equinix.sdk.fabricv4.model.SimplifiedNotification; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -72,14 +74,24 @@ public class CompanyProfileRequest { @javax.annotation.Nonnull private String description; + public static final String SERIALIZED_NAME_POINT_OF_CONTACTS = "pointOfContacts"; + @SerializedName(SERIALIZED_NAME_POINT_OF_CONTACTS) + @javax.annotation.Nullable + private List pointOfContacts = new ArrayList<>(); + public static final String SERIALIZED_NAME_NOTIFICATIONS = "notifications"; @SerializedName(SERIALIZED_NAME_NOTIFICATIONS) @javax.annotation.Nullable - private List notifications = new ArrayList<>(); + private List notifications = new ArrayList<>(); + + public static final String SERIALIZED_NAME_OVERVIEW = "overview"; + @SerializedName(SERIALIZED_NAME_OVERVIEW) + @javax.annotation.Nullable + private String overview; public static final String SERIALIZED_NAME_WEB_URL = "webUrl"; @SerializedName(SERIALIZED_NAME_WEB_URL) - @javax.annotation.Nullable + @javax.annotation.Nonnull private String webUrl; public static final String SERIALIZED_NAME_CONTACT_URL = "contactUrl"; @@ -166,12 +178,39 @@ public void setDescription(@javax.annotation.Nonnull String description) { } - public CompanyProfileRequest notifications(@javax.annotation.Nullable List notifications) { + public CompanyProfileRequest pointOfContacts(@javax.annotation.Nullable List pointOfContacts) { + this.pointOfContacts = pointOfContacts; + return this; + } + + public CompanyProfileRequest addPointOfContactsItem(CompanyProfileContact pointOfContactsItem) { + if (this.pointOfContacts == null) { + this.pointOfContacts = new ArrayList<>(); + } + this.pointOfContacts.add(pointOfContactsItem); + return this; + } + + /** + * Get pointOfContacts + * @return pointOfContacts + */ + @javax.annotation.Nullable + public List getPointOfContacts() { + return pointOfContacts; + } + + public void setPointOfContacts(@javax.annotation.Nullable List pointOfContacts) { + this.pointOfContacts = pointOfContacts; + } + + + public CompanyProfileRequest notifications(@javax.annotation.Nullable List notifications) { this.notifications = notifications; return this; } - public CompanyProfileRequest addNotificationsItem(Object notificationsItem) { + public CompanyProfileRequest addNotificationsItem(SimplifiedNotification notificationsItem) { if (this.notifications == null) { this.notifications = new ArrayList<>(); } @@ -184,16 +223,35 @@ public CompanyProfileRequest addNotificationsItem(Object notificationsItem) { * @return notifications */ @javax.annotation.Nullable - public List getNotifications() { + public List getNotifications() { return notifications; } - public void setNotifications(@javax.annotation.Nullable List notifications) { + public void setNotifications(@javax.annotation.Nullable List notifications) { this.notifications = notifications; } - public CompanyProfileRequest webUrl(@javax.annotation.Nullable String webUrl) { + public CompanyProfileRequest overview(@javax.annotation.Nullable String overview) { + this.overview = overview; + return this; + } + + /** + * Get overview + * @return overview + */ + @javax.annotation.Nullable + public String getOverview() { + return overview; + } + + public void setOverview(@javax.annotation.Nullable String overview) { + this.overview = overview; + } + + + public CompanyProfileRequest webUrl(@javax.annotation.Nonnull String webUrl) { this.webUrl = webUrl; return this; } @@ -202,12 +260,12 @@ public CompanyProfileRequest webUrl(@javax.annotation.Nullable String webUrl) { * Get webUrl * @return webUrl */ - @javax.annotation.Nullable + @javax.annotation.Nonnull public String getWebUrl() { return webUrl; } - public void setWebUrl(@javax.annotation.Nullable String webUrl) { + public void setWebUrl(@javax.annotation.Nonnull String webUrl) { this.webUrl = webUrl; } @@ -289,7 +347,9 @@ public boolean equals(Object o) { Objects.equals(this.name, companyProfileRequest.name) && Objects.equals(this.summary, companyProfileRequest.summary) && Objects.equals(this.description, companyProfileRequest.description) && + Objects.equals(this.pointOfContacts, companyProfileRequest.pointOfContacts) && Objects.equals(this.notifications, companyProfileRequest.notifications) && + Objects.equals(this.overview, companyProfileRequest.overview) && Objects.equals(this.webUrl, companyProfileRequest.webUrl) && Objects.equals(this.contactUrl, companyProfileRequest.contactUrl)&& Objects.equals(this.additionalProperties, companyProfileRequest.additionalProperties); @@ -297,7 +357,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(type, name, summary, description, notifications, webUrl, contactUrl, additionalProperties); + return Objects.hash(type, name, summary, description, pointOfContacts, notifications, overview, webUrl, contactUrl, additionalProperties); } @Override @@ -308,7 +368,9 @@ public String toString() { sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" summary: ").append(toIndentedString(summary)).append("\n"); sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" pointOfContacts: ").append(toIndentedString(pointOfContacts)).append("\n"); sb.append(" notifications: ").append(toIndentedString(notifications)).append("\n"); + sb.append(" overview: ").append(toIndentedString(overview)).append("\n"); sb.append(" webUrl: ").append(toIndentedString(webUrl)).append("\n"); sb.append(" contactUrl: ").append(toIndentedString(contactUrl)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); @@ -333,10 +395,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("type", "name", "summary", "description", "notifications", "webUrl", "contactUrl")); + openapiFields = new HashSet(Arrays.asList("type", "name", "summary", "description", "pointOfContacts", "notifications", "overview", "webUrl", "contactUrl")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("type", "name", "summary", "description")); + openapiRequiredFields = new HashSet(Arrays.asList("type", "name", "summary", "description", "webUrl")); } /** @@ -371,11 +433,38 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (!jsonObj.get("description").isJsonPrimitive()) { throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } - // ensure the optional json data is an array if present - if (jsonObj.get("notifications") != null && !jsonObj.get("notifications").isJsonNull() && !jsonObj.get("notifications").isJsonArray()) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `notifications` to be an array in the JSON string but got `%s`", jsonObj.get("notifications").toString())); + if (jsonObj.get("pointOfContacts") != null && !jsonObj.get("pointOfContacts").isJsonNull()) { + JsonArray jsonArraypointOfContacts = jsonObj.getAsJsonArray("pointOfContacts"); + if (jsonArraypointOfContacts != null) { + // ensure the json data is an array + if (!jsonObj.get("pointOfContacts").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `pointOfContacts` to be an array in the JSON string but got `%s`", jsonObj.get("pointOfContacts").toString())); + } + + // validate the optional field `pointOfContacts` (array) + for (int i = 0; i < jsonArraypointOfContacts.size(); i++) { + CompanyProfileContact.validateJsonElement(jsonArraypointOfContacts.get(i)); + }; + } + } + if (jsonObj.get("notifications") != null && !jsonObj.get("notifications").isJsonNull()) { + JsonArray jsonArraynotifications = jsonObj.getAsJsonArray("notifications"); + if (jsonArraynotifications != null) { + // ensure the json data is an array + if (!jsonObj.get("notifications").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `notifications` to be an array in the JSON string but got `%s`", jsonObj.get("notifications").toString())); + } + + // validate the optional field `notifications` (array) + for (int i = 0; i < jsonArraynotifications.size(); i++) { + SimplifiedNotification.validateJsonElement(jsonArraynotifications.get(i)); + }; + } + } + if ((jsonObj.get("overview") != null && !jsonObj.get("overview").isJsonNull()) && !jsonObj.get("overview").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `overview` to be a primitive type in the JSON string but got `%s`", jsonObj.get("overview").toString())); } - if ((jsonObj.get("webUrl") != null && !jsonObj.get("webUrl").isJsonNull()) && !jsonObj.get("webUrl").isJsonPrimitive()) { + if (!jsonObj.get("webUrl").isJsonPrimitive()) { throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `webUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("webUrl").toString())); } if ((jsonObj.get("contactUrl") != null && !jsonObj.get("contactUrl").isJsonNull()) && !jsonObj.get("contactUrl").isJsonPrimitive()) { diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/CompanyProfileResponse.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/CompanyProfileResponse.java index 718037c1..e3efbaeb 100644 --- a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/CompanyProfileResponse.java +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/CompanyProfileResponse.java @@ -17,9 +17,11 @@ import com.equinix.sdk.fabricv4.model.CompanyLogo; import com.equinix.sdk.fabricv4.model.CompanyMetro; import com.equinix.sdk.fabricv4.model.CompanyProfileChange; +import com.equinix.sdk.fabricv4.model.CompanyProfileContact; import com.equinix.sdk.fabricv4.model.CompanyProfileResponseAccount; import com.equinix.sdk.fabricv4.model.CompanyServiceProfile; import com.equinix.sdk.fabricv4.model.PrivateService; +import com.equinix.sdk.fabricv4.model.SimplifiedNotification; import com.equinix.sdk.fabricv4.model.TagResponse; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -93,7 +95,7 @@ public class CompanyProfileResponse { public static final String SERIALIZED_NAME_STATE = "state"; @SerializedName(SERIALIZED_NAME_STATE) @javax.annotation.Nullable - private Object state; + private String state; public static final String SERIALIZED_NAME_ACCOUNT = "account"; @SerializedName(SERIALIZED_NAME_ACCOUNT) @@ -125,10 +127,20 @@ public class CompanyProfileResponse { @javax.annotation.Nullable private List privateServices = new ArrayList<>(); + public static final String SERIALIZED_NAME_POINT_OF_CONTACTS = "pointOfContacts"; + @SerializedName(SERIALIZED_NAME_POINT_OF_CONTACTS) + @javax.annotation.Nullable + private List pointOfContacts = new ArrayList<>(); + public static final String SERIALIZED_NAME_NOTIFICATIONS = "notifications"; @SerializedName(SERIALIZED_NAME_NOTIFICATIONS) @javax.annotation.Nullable - private List notifications = new ArrayList<>(); + private List notifications = new ArrayList<>(); + + public static final String SERIALIZED_NAME_OVERVIEW = "overview"; + @SerializedName(SERIALIZED_NAME_OVERVIEW) + @javax.annotation.Nullable + private String overview; public static final String SERIALIZED_NAME_WEB_URL = "webUrl"; @SerializedName(SERIALIZED_NAME_WEB_URL) @@ -267,21 +279,21 @@ public void setDescription(@javax.annotation.Nullable String description) { } - public CompanyProfileResponse state(@javax.annotation.Nullable Object state) { + public CompanyProfileResponse state(@javax.annotation.Nullable String state) { this.state = state; return this; } /** - * Get state + * Company Profile State * @return state */ @javax.annotation.Nullable - public Object getState() { + public String getState() { return state; } - public void setState(@javax.annotation.Nullable Object state) { + public void setState(@javax.annotation.Nullable String state) { this.state = state; } @@ -432,12 +444,39 @@ public void setPrivateServices(@javax.annotation.Nullable List p } - public CompanyProfileResponse notifications(@javax.annotation.Nullable List notifications) { + public CompanyProfileResponse pointOfContacts(@javax.annotation.Nullable List pointOfContacts) { + this.pointOfContacts = pointOfContacts; + return this; + } + + public CompanyProfileResponse addPointOfContactsItem(CompanyProfileContact pointOfContactsItem) { + if (this.pointOfContacts == null) { + this.pointOfContacts = new ArrayList<>(); + } + this.pointOfContacts.add(pointOfContactsItem); + return this; + } + + /** + * Get pointOfContacts + * @return pointOfContacts + */ + @javax.annotation.Nullable + public List getPointOfContacts() { + return pointOfContacts; + } + + public void setPointOfContacts(@javax.annotation.Nullable List pointOfContacts) { + this.pointOfContacts = pointOfContacts; + } + + + public CompanyProfileResponse notifications(@javax.annotation.Nullable List notifications) { this.notifications = notifications; return this; } - public CompanyProfileResponse addNotificationsItem(Object notificationsItem) { + public CompanyProfileResponse addNotificationsItem(SimplifiedNotification notificationsItem) { if (this.notifications == null) { this.notifications = new ArrayList<>(); } @@ -450,15 +489,34 @@ public CompanyProfileResponse addNotificationsItem(Object notificationsItem) { * @return notifications */ @javax.annotation.Nullable - public List getNotifications() { + public List getNotifications() { return notifications; } - public void setNotifications(@javax.annotation.Nullable List notifications) { + public void setNotifications(@javax.annotation.Nullable List notifications) { this.notifications = notifications; } + public CompanyProfileResponse overview(@javax.annotation.Nullable String overview) { + this.overview = overview; + return this; + } + + /** + * Get overview + * @return overview + */ + @javax.annotation.Nullable + public String getOverview() { + return overview; + } + + public void setOverview(@javax.annotation.Nullable String overview) { + this.overview = overview; + } + + public CompanyProfileResponse webUrl(@javax.annotation.Nullable String webUrl) { this.webUrl = webUrl; return this; @@ -602,7 +660,9 @@ public boolean equals(Object o) { Objects.equals(this.tags, companyProfileResponse.tags) && Objects.equals(this.serviceProfiles, companyProfileResponse.serviceProfiles) && Objects.equals(this.privateServices, companyProfileResponse.privateServices) && + Objects.equals(this.pointOfContacts, companyProfileResponse.pointOfContacts) && Objects.equals(this.notifications, companyProfileResponse.notifications) && + Objects.equals(this.overview, companyProfileResponse.overview) && Objects.equals(this.webUrl, companyProfileResponse.webUrl) && Objects.equals(this.contactUrl, companyProfileResponse.contactUrl) && Objects.equals(this.change, companyProfileResponse.change) && @@ -612,7 +672,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(href, uuid, type, name, summary, description, state, account, metros, logo, tags, serviceProfiles, privateServices, notifications, webUrl, contactUrl, change, changeLog, additionalProperties); + return Objects.hash(href, uuid, type, name, summary, description, state, account, metros, logo, tags, serviceProfiles, privateServices, pointOfContacts, notifications, overview, webUrl, contactUrl, change, changeLog, additionalProperties); } @Override @@ -632,7 +692,9 @@ public String toString() { sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); sb.append(" serviceProfiles: ").append(toIndentedString(serviceProfiles)).append("\n"); sb.append(" privateServices: ").append(toIndentedString(privateServices)).append("\n"); + sb.append(" pointOfContacts: ").append(toIndentedString(pointOfContacts)).append("\n"); sb.append(" notifications: ").append(toIndentedString(notifications)).append("\n"); + sb.append(" overview: ").append(toIndentedString(overview)).append("\n"); sb.append(" webUrl: ").append(toIndentedString(webUrl)).append("\n"); sb.append(" contactUrl: ").append(toIndentedString(contactUrl)).append("\n"); sb.append(" change: ").append(toIndentedString(change)).append("\n"); @@ -659,7 +721,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("href", "uuid", "type", "name", "summary", "description", "state", "account", "metros", "logo", "tags", "serviceProfiles", "privateServices", "notifications", "webUrl", "contactUrl", "change", "changeLog")); + openapiFields = new HashSet(Arrays.asList("href", "uuid", "type", "name", "summary", "description", "state", "account", "metros", "logo", "tags", "serviceProfiles", "privateServices", "pointOfContacts", "notifications", "overview", "webUrl", "contactUrl", "change", "changeLog")); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(0); @@ -696,6 +758,9 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } + if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); + } // validate the optional field `account` if (jsonObj.get("account") != null && !jsonObj.get("account").isJsonNull()) { CompanyProfileResponseAccount.validateJsonElement(jsonObj.get("account")); @@ -760,9 +825,36 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti }; } } - // ensure the optional json data is an array if present - if (jsonObj.get("notifications") != null && !jsonObj.get("notifications").isJsonNull() && !jsonObj.get("notifications").isJsonArray()) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `notifications` to be an array in the JSON string but got `%s`", jsonObj.get("notifications").toString())); + if (jsonObj.get("pointOfContacts") != null && !jsonObj.get("pointOfContacts").isJsonNull()) { + JsonArray jsonArraypointOfContacts = jsonObj.getAsJsonArray("pointOfContacts"); + if (jsonArraypointOfContacts != null) { + // ensure the json data is an array + if (!jsonObj.get("pointOfContacts").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `pointOfContacts` to be an array in the JSON string but got `%s`", jsonObj.get("pointOfContacts").toString())); + } + + // validate the optional field `pointOfContacts` (array) + for (int i = 0; i < jsonArraypointOfContacts.size(); i++) { + CompanyProfileContact.validateJsonElement(jsonArraypointOfContacts.get(i)); + }; + } + } + if (jsonObj.get("notifications") != null && !jsonObj.get("notifications").isJsonNull()) { + JsonArray jsonArraynotifications = jsonObj.getAsJsonArray("notifications"); + if (jsonArraynotifications != null) { + // ensure the json data is an array + if (!jsonObj.get("notifications").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `notifications` to be an array in the JSON string but got `%s`", jsonObj.get("notifications").toString())); + } + + // validate the optional field `notifications` (array) + for (int i = 0; i < jsonArraynotifications.size(); i++) { + SimplifiedNotification.validateJsonElement(jsonArraynotifications.get(i)); + }; + } + } + if ((jsonObj.get("overview") != null && !jsonObj.get("overview").isJsonNull()) && !jsonObj.get("overview").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `overview` to be a primitive type in the JSON string but got `%s`", jsonObj.get("overview").toString())); } if ((jsonObj.get("webUrl") != null && !jsonObj.get("webUrl").isJsonNull()) && !jsonObj.get("webUrl").isJsonPrimitive()) { throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `webUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("webUrl").toString())); diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/CompanyProfileSearchFieldName.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/CompanyProfileSearchFieldName.java new file mode 100644 index 00000000..ce51c4a9 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/CompanyProfileSearchFieldName.java @@ -0,0 +1,90 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.google.gson.annotations.SerializedName; + +import java.io.IOException; +import java.util.Locale; +import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; + +/** + * Searchable field names in company profile + */ +@JsonAdapter(CompanyProfileSearchFieldName.Adapter.class) +public enum CompanyProfileSearchFieldName { + + NAME("/name"), + + UUID("/uuid"), + + TAGS_NAME("/tags/name"), + + TAGS_UUID("/tags/uuid"), + + TAGS_DISPLAYNAME("/tags/displayName"), + + STATE("/state"), + + METROS_METROCODE("/metros/metroCode"), + + CHANGE_STATUS("/change/status"); + + private String value; + + CompanyProfileSearchFieldName(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static CompanyProfileSearchFieldName fromValue(String value) { + for (CompanyProfileSearchFieldName b : CompanyProfileSearchFieldName.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final CompanyProfileSearchFieldName enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public CompanyProfileSearchFieldName read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return CompanyProfileSearchFieldName.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + CompanyProfileSearchFieldName.fromValue(value); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/CompanyProfileSearchFilter.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/CompanyProfileSearchFilter.java index 23f60ccb..80602cdc 100644 --- a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/CompanyProfileSearchFilter.java +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/CompanyProfileSearchFilter.java @@ -13,6 +13,10 @@ import java.util.Objects; import java.util.Locale; +import com.equinix.sdk.fabricv4.model.CompanyProfileSearchFieldName; +import com.equinix.sdk.fabricv4.model.CompanyProfileSearchOrFilter; +import com.equinix.sdk.fabricv4.model.CompanyProfileSearchSimpleExpression; +import com.equinix.sdk.fabricv4.model.OperatorEnum; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,429 +27,253 @@ import java.util.Arrays; import java.util.List; + + +import java.io.IOException; +import java.lang.reflect.Type; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Locale; + import com.google.gson.Gson; import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapter; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonPrimitive; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.Locale; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonSerializationContext; +import com.google.gson.JsonSerializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonArray; +import com.google.gson.JsonParseException; import com.equinix.sdk.fabricv4.JSON; -/** - * CompanyProfileSearchFilter - */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") -public class CompanyProfileSearchFilter { - public static final String SERIALIZED_NAME_AND = "and"; - @SerializedName(SERIALIZED_NAME_AND) - @javax.annotation.Nullable - private List and = new ArrayList<>(); - - public static final String SERIALIZED_NAME_OR = "or"; - @SerializedName(SERIALIZED_NAME_OR) - @javax.annotation.Nullable - private List or = new ArrayList<>(); - - public static final String SERIALIZED_NAME_PROPERTY = "property"; - @SerializedName(SERIALIZED_NAME_PROPERTY) - @javax.annotation.Nullable - private String property; - - public static final String SERIALIZED_NAME_OPERATOR = "operator"; - @SerializedName(SERIALIZED_NAME_OPERATOR) - @javax.annotation.Nullable - private String operator; - - public static final String SERIALIZED_NAME_VALUES = "values"; - @SerializedName(SERIALIZED_NAME_VALUES) - @javax.annotation.Nullable - private List values = new ArrayList<>(); - - public CompanyProfileSearchFilter() { - } - - public CompanyProfileSearchFilter and(@javax.annotation.Nullable List and) { - this.and = and; - return this; - } - - public CompanyProfileSearchFilter addAndItem(CompanyProfileSearchFilter andItem) { - if (this.and == null) { - this.and = new ArrayList<>(); +public class CompanyProfileSearchFilter extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(CompanyProfileSearchFilter.class.getName()); + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CompanyProfileSearchFilter.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CompanyProfileSearchFilter' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter adapterCompanyProfileSearchSimpleExpression = gson.getDelegateAdapter(this, TypeToken.get(CompanyProfileSearchSimpleExpression.class)); + final TypeAdapter adapterCompanyProfileSearchOrFilter = gson.getDelegateAdapter(this, TypeToken.get(CompanyProfileSearchOrFilter.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CompanyProfileSearchFilter value) throws IOException { + if (value == null || value.getActualInstance() == null) { + elementAdapter.write(out, null); + return; + } + + // check if the actual instance is of the type `CompanyProfileSearchSimpleExpression` + if (value.getActualInstance() instanceof CompanyProfileSearchSimpleExpression) { + JsonElement element = adapterCompanyProfileSearchSimpleExpression.toJsonTree((CompanyProfileSearchSimpleExpression)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + // check if the actual instance is of the type `CompanyProfileSearchOrFilter` + if (value.getActualInstance() instanceof CompanyProfileSearchOrFilter) { + JsonElement element = adapterCompanyProfileSearchOrFilter.toJsonTree((CompanyProfileSearchOrFilter)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + throw new IOException("Failed to serialize as the type doesn't match oneOf schemas: CompanyProfileSearchOrFilter, CompanyProfileSearchSimpleExpression"); + } + + @Override + public CompanyProfileSearchFilter read(JsonReader in) throws IOException { + Object deserialized = null; + JsonElement jsonElement = elementAdapter.read(in); + + int match = 0; + ArrayList errorMessages = new ArrayList<>(); + TypeAdapter actualAdapter = elementAdapter; + + // deserialize CompanyProfileSearchSimpleExpression + try { + // validate the JSON object to see if any exception is thrown + CompanyProfileSearchSimpleExpression.validateJsonElement(jsonElement); + actualAdapter = adapterCompanyProfileSearchSimpleExpression; + match++; + log.log(Level.FINER, "Input data matches schema 'CompanyProfileSearchSimpleExpression'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format(Locale.ROOT, "Deserialization for CompanyProfileSearchSimpleExpression failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'CompanyProfileSearchSimpleExpression'", e); + } + // deserialize CompanyProfileSearchOrFilter + try { + // validate the JSON object to see if any exception is thrown + CompanyProfileSearchOrFilter.validateJsonElement(jsonElement); + actualAdapter = adapterCompanyProfileSearchOrFilter; + match++; + log.log(Level.FINER, "Input data matches schema 'CompanyProfileSearchOrFilter'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format(Locale.ROOT, "Deserialization for CompanyProfileSearchOrFilter failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'CompanyProfileSearchOrFilter'", e); + } + + if (match == 1) { + CompanyProfileSearchFilter ret = new CompanyProfileSearchFilter(); + ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); + return ret; + } + + throw new IOException(String.format(Locale.ROOT, "Failed deserialization for CompanyProfileSearchFilter: %d classes match result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", match, errorMessages, jsonElement.toString())); + } + }.nullSafe(); + } } - this.and.add(andItem); - return this; - } - - /** - * Get and - * @return and - */ - @javax.annotation.Nullable - public List getAnd() { - return and; - } - - public void setAnd(@javax.annotation.Nullable List and) { - this.and = and; - } - - - public CompanyProfileSearchFilter or(@javax.annotation.Nullable List or) { - this.or = or; - return this; - } - - public CompanyProfileSearchFilter addOrItem(CompanyProfileSearchFilter orItem) { - if (this.or == null) { - this.or = new ArrayList<>(); + + // store a list of schema names defined in oneOf + public static final Map> schemas = new HashMap>(); + + public CompanyProfileSearchFilter() { + super("oneOf", Boolean.FALSE); } - this.or.add(orItem); - return this; - } - - /** - * Get or - * @return or - */ - @javax.annotation.Nullable - public List getOr() { - return or; - } - - public void setOr(@javax.annotation.Nullable List or) { - this.or = or; - } - - - public CompanyProfileSearchFilter property(@javax.annotation.Nullable String property) { - this.property = property; - return this; - } - - /** - * Searchable field names in company profile - * @return property - */ - @javax.annotation.Nullable - public String getProperty() { - return property; - } - - public void setProperty(@javax.annotation.Nullable String property) { - this.property = property; - } - - - public CompanyProfileSearchFilter operator(@javax.annotation.Nullable String operator) { - this.operator = operator; - return this; - } - - /** - * Comparison operators for filtering - * @return operator - */ - @javax.annotation.Nullable - public String getOperator() { - return operator; - } - - public void setOperator(@javax.annotation.Nullable String operator) { - this.operator = operator; - } - - - public CompanyProfileSearchFilter values(@javax.annotation.Nullable List values) { - this.values = values; - return this; - } - - public CompanyProfileSearchFilter addValuesItem(String valuesItem) { - if (this.values == null) { - this.values = new ArrayList<>(); + + public CompanyProfileSearchFilter(Object o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); } - this.values.add(valuesItem); - return this; - } - - /** - * Values to compare against - * @return values - */ - @javax.annotation.Nullable - public List getValues() { - return values; - } - - public void setValues(@javax.annotation.Nullable List values) { - this.values = values; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the CompanyProfileSearchFilter instance itself - */ - public CompanyProfileSearchFilter putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); + + static { + schemas.put("CompanyProfileSearchSimpleExpression", CompanyProfileSearchSimpleExpression.class); + schemas.put("CompanyProfileSearchOrFilter", CompanyProfileSearchOrFilter.class); } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; + + @Override + public Map> getSchemas() { + return CompanyProfileSearchFilter.schemas; } - return this.additionalProperties.get(key); - } + /** + * Set the instance that matches the oneOf child schema, check + * the instance parameter is valid against the oneOf child schemas: + * CompanyProfileSearchOrFilter, CompanyProfileSearchSimpleExpression + * + * It could be an instance of the 'oneOf' schemas. + */ + @Override + public void setActualInstance(Object instance) { + if (instance instanceof CompanyProfileSearchSimpleExpression) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof CompanyProfileSearchOrFilter) { + super.setActualInstance(instance); + return; + } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; + throw new RuntimeException("Invalid instance type. Must be CompanyProfileSearchOrFilter, CompanyProfileSearchSimpleExpression"); } - if (o == null || getClass() != o.getClass()) { - return false; + + /** + * Get the actual instance, which can be the following: + * CompanyProfileSearchOrFilter, CompanyProfileSearchSimpleExpression + * + * @return The actual instance (CompanyProfileSearchOrFilter, CompanyProfileSearchSimpleExpression) + */ + @SuppressWarnings("unchecked") + @Override + public Object getActualInstance() { + return super.getActualInstance(); } - CompanyProfileSearchFilter companyProfileSearchFilter = (CompanyProfileSearchFilter) o; - return Objects.equals(this.and, companyProfileSearchFilter.and) && - Objects.equals(this.or, companyProfileSearchFilter.or) && - Objects.equals(this.property, companyProfileSearchFilter.property) && - Objects.equals(this.operator, companyProfileSearchFilter.operator) && - Objects.equals(this.values, companyProfileSearchFilter.values)&& - Objects.equals(this.additionalProperties, companyProfileSearchFilter.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(and, or, property, operator, values, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CompanyProfileSearchFilter {\n"); - sb.append(" and: ").append(toIndentedString(and)).append("\n"); - sb.append(" or: ").append(toIndentedString(or)).append("\n"); - sb.append(" property: ").append(toIndentedString(property)).append("\n"); - sb.append(" operator: ").append(toIndentedString(operator)).append("\n"); - sb.append(" values: ").append(toIndentedString(values)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + + /** + * Get the actual instance of `CompanyProfileSearchSimpleExpression`. If the actual instance is not `CompanyProfileSearchSimpleExpression`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `CompanyProfileSearchSimpleExpression` + * @throws ClassCastException if the instance is not `CompanyProfileSearchSimpleExpression` + */ + public CompanyProfileSearchSimpleExpression getCompanyProfileSearchSimpleExpression() throws ClassCastException { + return (CompanyProfileSearchSimpleExpression)super.getActualInstance(); + } + + /** + * Get the actual instance of `CompanyProfileSearchOrFilter`. If the actual instance is not `CompanyProfileSearchOrFilter`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `CompanyProfileSearchOrFilter` + * @throws ClassCastException if the instance is not `CompanyProfileSearchOrFilter` + */ + public CompanyProfileSearchOrFilter getCompanyProfileSearchOrFilter() throws ClassCastException { + return (CompanyProfileSearchOrFilter)super.getActualInstance(); } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("and", "or", "property", "operator", "values")); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CompanyProfileSearchFilter - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CompanyProfileSearchFilter.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in CompanyProfileSearchFilter is not found in the empty JSON string", CompanyProfileSearchFilter.openapiRequiredFields.toString())); + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CompanyProfileSearchFilter + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + // validate oneOf schemas one by one + int validCount = 0; + ArrayList errorMessages = new ArrayList<>(); + // validate the json string with CompanyProfileSearchSimpleExpression + try { + CompanyProfileSearchSimpleExpression.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add(String.format(Locale.ROOT, "Deserialization for CompanyProfileSearchSimpleExpression failed with `%s`.", e.getMessage())); + // continue to the next one } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("and") != null && !jsonObj.get("and").isJsonNull()) { - JsonArray jsonArrayand = jsonObj.getAsJsonArray("and"); - if (jsonArrayand != null) { - // ensure the json data is an array - if (!jsonObj.get("and").isJsonArray()) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `and` to be an array in the JSON string but got `%s`", jsonObj.get("and").toString())); - } - - // validate the optional field `and` (array) - for (int i = 0; i < jsonArrayand.size(); i++) { - CompanyProfileSearchFilter.validateJsonElement(jsonArrayand.get(i)); - }; + // validate the json string with CompanyProfileSearchOrFilter + try { + CompanyProfileSearchOrFilter.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add(String.format(Locale.ROOT, "Deserialization for CompanyProfileSearchOrFilter failed with `%s`.", e.getMessage())); + // continue to the next one } - } - if (jsonObj.get("or") != null && !jsonObj.get("or").isJsonNull()) { - JsonArray jsonArrayor = jsonObj.getAsJsonArray("or"); - if (jsonArrayor != null) { - // ensure the json data is an array - if (!jsonObj.get("or").isJsonArray()) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `or` to be an array in the JSON string but got `%s`", jsonObj.get("or").toString())); - } - - // validate the optional field `or` (array) - for (int i = 0; i < jsonArrayor.size(); i++) { - CompanyProfileSearchFilter.validateJsonElement(jsonArrayor.get(i)); - }; + if (validCount != 1) { + throw new IOException(String.format(Locale.ROOT, "The JSON string is invalid for CompanyProfileSearchFilter with oneOf schemas: CompanyProfileSearchOrFilter, CompanyProfileSearchSimpleExpression. %d class(es) match the result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", validCount, errorMessages, jsonElement.toString())); } - } - if ((jsonObj.get("property") != null && !jsonObj.get("property").isJsonNull()) && !jsonObj.get("property").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `property` to be a primitive type in the JSON string but got `%s`", jsonObj.get("property").toString())); - } - if ((jsonObj.get("operator") != null && !jsonObj.get("operator").isJsonNull()) && !jsonObj.get("operator").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `operator` to be a primitive type in the JSON string but got `%s`", jsonObj.get("operator").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("values") != null && !jsonObj.get("values").isJsonNull() && !jsonObj.get("values").isJsonArray()) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `values` to be an array in the JSON string but got `%s`", jsonObj.get("values").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CompanyProfileSearchFilter.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CompanyProfileSearchFilter' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CompanyProfileSearchFilter.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CompanyProfileSearchFilter value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - JsonElement jsonElement = gson.toJsonTree(entry.getValue()); - if (jsonElement.isJsonArray()) { - obj.add(entry.getKey(), jsonElement.getAsJsonArray()); - } else { - obj.add(entry.getKey(), jsonElement.getAsJsonObject()); - } - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public CompanyProfileSearchFilter read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - CompanyProfileSearchFilter instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); } - } - - /** - * Create an instance of CompanyProfileSearchFilter given an JSON string - * - * @param jsonString JSON string - * @return An instance of CompanyProfileSearchFilter - * @throws IOException if the JSON string is invalid with respect to CompanyProfileSearchFilter - */ - public static CompanyProfileSearchFilter fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CompanyProfileSearchFilter.class); - } - - /** - * Convert an instance of CompanyProfileSearchFilter to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } + + /** + * Create an instance of CompanyProfileSearchFilter given an JSON string + * + * @param jsonString JSON string + * @return An instance of CompanyProfileSearchFilter + * @throws IOException if the JSON string is invalid with respect to CompanyProfileSearchFilter + */ + public static CompanyProfileSearchFilter fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CompanyProfileSearchFilter.class); + } + + /** + * Convert an instance of CompanyProfileSearchFilter to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/CompanyProfileSearchFilters.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/CompanyProfileSearchFilters.java new file mode 100644 index 00000000..fa0a8f39 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/CompanyProfileSearchFilters.java @@ -0,0 +1,308 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.CompanyProfileSearchFilter; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * Filter criteria for company profile search. The `and` array combines conditions where all must match. Each item in `and` is either a simple expression (property/operator/values) or an `or` group. At most one `or` group is allowed per request. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class CompanyProfileSearchFilters { + public static final String SERIALIZED_NAME_AND = "and"; + @SerializedName(SERIALIZED_NAME_AND) + @javax.annotation.Nullable + private List and = new ArrayList<>(); + + public CompanyProfileSearchFilters() { + } + + public CompanyProfileSearchFilters and(@javax.annotation.Nullable List and) { + this.and = and; + return this; + } + + public CompanyProfileSearchFilters addAndItem(CompanyProfileSearchFilter andItem) { + if (this.and == null) { + this.and = new ArrayList<>(); + } + this.and.add(andItem); + return this; + } + + /** + * Get and + * @return and + */ + @javax.annotation.Nullable + public List getAnd() { + return and; + } + + public void setAnd(@javax.annotation.Nullable List and) { + this.and = and; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the CompanyProfileSearchFilters instance itself + */ + public CompanyProfileSearchFilters putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CompanyProfileSearchFilters companyProfileSearchFilters = (CompanyProfileSearchFilters) o; + return Objects.equals(this.and, companyProfileSearchFilters.and)&& + Objects.equals(this.additionalProperties, companyProfileSearchFilters.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(and, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CompanyProfileSearchFilters {\n"); + sb.append(" and: ").append(toIndentedString(and)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("and")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CompanyProfileSearchFilters + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CompanyProfileSearchFilters.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in CompanyProfileSearchFilters is not found in the empty JSON string", CompanyProfileSearchFilters.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("and") != null && !jsonObj.get("and").isJsonNull()) { + JsonArray jsonArrayand = jsonObj.getAsJsonArray("and"); + if (jsonArrayand != null) { + // ensure the json data is an array + if (!jsonObj.get("and").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `and` to be an array in the JSON string but got `%s`", jsonObj.get("and").toString())); + } + + // validate the optional field `and` (array) + for (int i = 0; i < jsonArrayand.size(); i++) { + CompanyProfileSearchFilter.validateJsonElement(jsonArrayand.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CompanyProfileSearchFilters.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CompanyProfileSearchFilters' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CompanyProfileSearchFilters.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CompanyProfileSearchFilters value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public CompanyProfileSearchFilters read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + CompanyProfileSearchFilters instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of CompanyProfileSearchFilters given an JSON string + * + * @param jsonString JSON string + * @return An instance of CompanyProfileSearchFilters + * @throws IOException if the JSON string is invalid with respect to CompanyProfileSearchFilters + */ + public static CompanyProfileSearchFilters fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CompanyProfileSearchFilters.class); + } + + /** + * Convert an instance of CompanyProfileSearchFilters to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/CompanyProfileSearchOrFilter.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/CompanyProfileSearchOrFilter.java new file mode 100644 index 00000000..975362a5 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/CompanyProfileSearchOrFilter.java @@ -0,0 +1,311 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.CompanyProfileSearchSimpleExpression; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * Groups multiple simple expressions with OR logic. At most one `or` group is allowed within the top-level `and` array. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class CompanyProfileSearchOrFilter { + public static final String SERIALIZED_NAME_OR = "or"; + @SerializedName(SERIALIZED_NAME_OR) + @javax.annotation.Nonnull + private List or = new ArrayList<>(); + + public CompanyProfileSearchOrFilter() { + } + + public CompanyProfileSearchOrFilter or(@javax.annotation.Nonnull List or) { + this.or = or; + return this; + } + + public CompanyProfileSearchOrFilter addOrItem(CompanyProfileSearchSimpleExpression orItem) { + if (this.or == null) { + this.or = new ArrayList<>(); + } + this.or.add(orItem); + return this; + } + + /** + * Get or + * @return or + */ + @javax.annotation.Nonnull + public List getOr() { + return or; + } + + public void setOr(@javax.annotation.Nonnull List or) { + this.or = or; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the CompanyProfileSearchOrFilter instance itself + */ + public CompanyProfileSearchOrFilter putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CompanyProfileSearchOrFilter companyProfileSearchOrFilter = (CompanyProfileSearchOrFilter) o; + return Objects.equals(this.or, companyProfileSearchOrFilter.or)&& + Objects.equals(this.additionalProperties, companyProfileSearchOrFilter.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(or, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CompanyProfileSearchOrFilter {\n"); + sb.append(" or: ").append(toIndentedString(or)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("or")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("or")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CompanyProfileSearchOrFilter + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CompanyProfileSearchOrFilter.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in CompanyProfileSearchOrFilter is not found in the empty JSON string", CompanyProfileSearchOrFilter.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CompanyProfileSearchOrFilter.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the json data is an array + if (!jsonObj.get("or").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `or` to be an array in the JSON string but got `%s`", jsonObj.get("or").toString())); + } + + JsonArray jsonArrayor = jsonObj.getAsJsonArray("or"); + // validate the required field `or` (array) + for (int i = 0; i < jsonArrayor.size(); i++) { + CompanyProfileSearchSimpleExpression.validateJsonElement(jsonArrayor.get(i)); + }; + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CompanyProfileSearchOrFilter.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CompanyProfileSearchOrFilter' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CompanyProfileSearchOrFilter.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CompanyProfileSearchOrFilter value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public CompanyProfileSearchOrFilter read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + CompanyProfileSearchOrFilter instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of CompanyProfileSearchOrFilter given an JSON string + * + * @param jsonString JSON string + * @return An instance of CompanyProfileSearchOrFilter + * @throws IOException if the JSON string is invalid with respect to CompanyProfileSearchOrFilter + */ + public static CompanyProfileSearchOrFilter fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CompanyProfileSearchOrFilter.class); + } + + /** + * Convert an instance of CompanyProfileSearchOrFilter to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/CompanyProfileSearchRequest.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/CompanyProfileSearchRequest.java index ebb96589..8bdeb429 100644 --- a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/CompanyProfileSearchRequest.java +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/CompanyProfileSearchRequest.java @@ -13,7 +13,7 @@ import java.util.Objects; import java.util.Locale; -import com.equinix.sdk.fabricv4.model.CompanyProfileSearchFilter; +import com.equinix.sdk.fabricv4.model.CompanyProfileSearchFilters; import com.equinix.sdk.fabricv4.model.Pagination; import com.equinix.sdk.fabricv4.model.Sort; import com.google.gson.TypeAdapter; @@ -56,7 +56,7 @@ public class CompanyProfileSearchRequest { public static final String SERIALIZED_NAME_FILTER = "filter"; @SerializedName(SERIALIZED_NAME_FILTER) @javax.annotation.Nullable - private CompanyProfileSearchFilter filter; + private CompanyProfileSearchFilters filter; public static final String SERIALIZED_NAME_PAGINATION = "pagination"; @SerializedName(SERIALIZED_NAME_PAGINATION) @@ -71,7 +71,7 @@ public class CompanyProfileSearchRequest { public CompanyProfileSearchRequest() { } - public CompanyProfileSearchRequest filter(@javax.annotation.Nullable CompanyProfileSearchFilter filter) { + public CompanyProfileSearchRequest filter(@javax.annotation.Nullable CompanyProfileSearchFilters filter) { this.filter = filter; return this; } @@ -81,11 +81,11 @@ public CompanyProfileSearchRequest filter(@javax.annotation.Nullable CompanyProf * @return filter */ @javax.annotation.Nullable - public CompanyProfileSearchFilter getFilter() { + public CompanyProfileSearchFilters getFilter() { return filter; } - public void setFilter(@javax.annotation.Nullable CompanyProfileSearchFilter filter) { + public void setFilter(@javax.annotation.Nullable CompanyProfileSearchFilters filter) { this.filter = filter; } @@ -243,7 +243,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the optional field `filter` if (jsonObj.get("filter") != null && !jsonObj.get("filter").isJsonNull()) { - CompanyProfileSearchFilter.validateJsonElement(jsonObj.get("filter")); + CompanyProfileSearchFilters.validateJsonElement(jsonObj.get("filter")); } // validate the optional field `pagination` if (jsonObj.get("pagination") != null && !jsonObj.get("pagination").isJsonNull()) { diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/CompanyProfileSearchSimpleExpression.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/CompanyProfileSearchSimpleExpression.java new file mode 100644 index 00000000..e3c6a6bb --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/CompanyProfileSearchSimpleExpression.java @@ -0,0 +1,364 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.CompanyProfileSearchFieldName; +import com.equinix.sdk.fabricv4.model.OperatorEnum; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * CompanyProfileSearchSimpleExpression + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class CompanyProfileSearchSimpleExpression { + public static final String SERIALIZED_NAME_PROPERTY = "property"; + @SerializedName(SERIALIZED_NAME_PROPERTY) + @javax.annotation.Nonnull + private CompanyProfileSearchFieldName property; + + public static final String SERIALIZED_NAME_OPERATOR = "operator"; + @SerializedName(SERIALIZED_NAME_OPERATOR) + @javax.annotation.Nonnull + private OperatorEnum operator; + + public static final String SERIALIZED_NAME_VALUES = "values"; + @SerializedName(SERIALIZED_NAME_VALUES) + @javax.annotation.Nonnull + private List values = new ArrayList<>(); + + public CompanyProfileSearchSimpleExpression() { + } + + public CompanyProfileSearchSimpleExpression property(@javax.annotation.Nonnull CompanyProfileSearchFieldName property) { + this.property = property; + return this; + } + + /** + * Searchable field name. Properties are grouped by their supported operators: String properties (support all operators): * `/name` - Company profile name * `/uuid` - Company profile UUID * `/tags/name` - Tag name * `/tags/uuid` - Tag UUID * `/tags/displayName` - Tag display name Discrete value properties (only support `=`, `!=`, `IN`, `NOT IN`): * `/state` - Company profile state (`PENDING`, `PROVISIONED`, `DEPROVISIONED`, `REJECTED`) * `/metros/metroCode` - Metro code (e.g. `SV`, `NY`, `DC`) * `/change/status` - Change status (`PENDING`, `COMPLETED`, `REJECTED`) — seller and admin users only + * @return property + */ + @javax.annotation.Nonnull + public CompanyProfileSearchFieldName getProperty() { + return property; + } + + public void setProperty(@javax.annotation.Nonnull CompanyProfileSearchFieldName property) { + this.property = property; + } + + + public CompanyProfileSearchSimpleExpression operator(@javax.annotation.Nonnull OperatorEnum operator) { + this.operator = operator; + return this; + } + + /** + * Comparison operator. `LIKE`, `NOT LIKE`, `ILIKE`, and `NOT ILIKE` require exactly one value. All other operators accept one or more values. * `=` - equal; equivalent to `IN` when multiple values are provided * `!=` - not equal; equivalent to `NOT IN` when multiple values are provided * `LIKE` - case-sensitive partial match (single value) * `NOT LIKE` - case-sensitive partial non-match (single value) * `ILIKE` - case-insensitive partial match (single value) * `NOT ILIKE` - case-insensitive partial non-match (single value) * `IN` - matches any of the provided values * `NOT IN` - does not match any of the provided values + * @return operator + */ + @javax.annotation.Nonnull + public OperatorEnum getOperator() { + return operator; + } + + public void setOperator(@javax.annotation.Nonnull OperatorEnum operator) { + this.operator = operator; + } + + + public CompanyProfileSearchSimpleExpression values(@javax.annotation.Nonnull List values) { + this.values = values; + return this; + } + + public CompanyProfileSearchSimpleExpression addValuesItem(String valuesItem) { + if (this.values == null) { + this.values = new ArrayList<>(); + } + this.values.add(valuesItem); + return this; + } + + /** + * Get values + * @return values + */ + @javax.annotation.Nonnull + public List getValues() { + return values; + } + + public void setValues(@javax.annotation.Nonnull List values) { + this.values = values; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the CompanyProfileSearchSimpleExpression instance itself + */ + public CompanyProfileSearchSimpleExpression putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CompanyProfileSearchSimpleExpression companyProfileSearchSimpleExpression = (CompanyProfileSearchSimpleExpression) o; + return Objects.equals(this.property, companyProfileSearchSimpleExpression.property) && + Objects.equals(this.operator, companyProfileSearchSimpleExpression.operator) && + Objects.equals(this.values, companyProfileSearchSimpleExpression.values)&& + Objects.equals(this.additionalProperties, companyProfileSearchSimpleExpression.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(property, operator, values, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CompanyProfileSearchSimpleExpression {\n"); + sb.append(" property: ").append(toIndentedString(property)).append("\n"); + sb.append(" operator: ").append(toIndentedString(operator)).append("\n"); + sb.append(" values: ").append(toIndentedString(values)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("property", "operator", "values")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("property", "operator", "values")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CompanyProfileSearchSimpleExpression + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CompanyProfileSearchSimpleExpression.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in CompanyProfileSearchSimpleExpression is not found in the empty JSON string", CompanyProfileSearchSimpleExpression.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CompanyProfileSearchSimpleExpression.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the required field `property` + CompanyProfileSearchFieldName.validateJsonElement(jsonObj.get("property")); + // validate the required field `operator` + OperatorEnum.validateJsonElement(jsonObj.get("operator")); + // ensure the required json array is present + if (jsonObj.get("values") == null) { + throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); + } else if (!jsonObj.get("values").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `values` to be an array in the JSON string but got `%s`", jsonObj.get("values").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CompanyProfileSearchSimpleExpression.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CompanyProfileSearchSimpleExpression' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CompanyProfileSearchSimpleExpression.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CompanyProfileSearchSimpleExpression value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public CompanyProfileSearchSimpleExpression read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + CompanyProfileSearchSimpleExpression instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of CompanyProfileSearchSimpleExpression given an JSON string + * + * @param jsonString JSON string + * @return An instance of CompanyProfileSearchSimpleExpression + * @throws IOException if the JSON string is invalid with respect to CompanyProfileSearchSimpleExpression + */ + public static CompanyProfileSearchSimpleExpression fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CompanyProfileSearchSimpleExpression.class); + } + + /** + * Convert an instance of CompanyProfileSearchSimpleExpression to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ConnectionOperation.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ConnectionOperation.java index df2fc295..8c9983ff 100644 --- a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ConnectionOperation.java +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ConnectionOperation.java @@ -15,6 +15,7 @@ import java.util.Locale; import com.equinix.sdk.fabricv4.model.EquinixStatus; import com.equinix.sdk.fabricv4.model.Error; +import com.equinix.sdk.fabricv4.model.MaintenanceState; import com.equinix.sdk.fabricv4.model.ProviderStatus; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -133,6 +134,11 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @javax.annotation.Nullable private OffsetDateTime opStatusChangedAt; + public static final String SERIALIZED_NAME_MAINTENANCE_STATUS = "maintenanceStatus"; + @SerializedName(SERIALIZED_NAME_MAINTENANCE_STATUS) + @javax.annotation.Nullable + private MaintenanceState maintenanceStatus; + public ConnectionOperation() { } @@ -238,6 +244,25 @@ public void setOpStatusChangedAt(@javax.annotation.Nullable OffsetDateTime opSta this.opStatusChangedAt = opStatusChangedAt; } + + public ConnectionOperation maintenanceStatus(@javax.annotation.Nullable MaintenanceState maintenanceStatus) { + this.maintenanceStatus = maintenanceStatus; + return this; + } + + /** + * Get maintenanceStatus + * @return maintenanceStatus + */ + @javax.annotation.Nullable + public MaintenanceState getMaintenanceStatus() { + return maintenanceStatus; + } + + public void setMaintenanceStatus(@javax.annotation.Nullable MaintenanceState maintenanceStatus) { + this.maintenanceStatus = maintenanceStatus; + } + /** * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with @@ -297,13 +322,14 @@ public boolean equals(Object o) { Objects.equals(this.equinixStatus, connectionOperation.equinixStatus) && Objects.equals(this.operationalStatus, connectionOperation.operationalStatus) && Objects.equals(this.errors, connectionOperation.errors) && - Objects.equals(this.opStatusChangedAt, connectionOperation.opStatusChangedAt)&& + Objects.equals(this.opStatusChangedAt, connectionOperation.opStatusChangedAt) && + Objects.equals(this.maintenanceStatus, connectionOperation.maintenanceStatus)&& Objects.equals(this.additionalProperties, connectionOperation.additionalProperties); } @Override public int hashCode() { - return Objects.hash(providerStatus, equinixStatus, operationalStatus, errors, opStatusChangedAt, additionalProperties); + return Objects.hash(providerStatus, equinixStatus, operationalStatus, errors, opStatusChangedAt, maintenanceStatus, additionalProperties); } @Override @@ -315,6 +341,7 @@ public String toString() { sb.append(" operationalStatus: ").append(toIndentedString(operationalStatus)).append("\n"); sb.append(" errors: ").append(toIndentedString(errors)).append("\n"); sb.append(" opStatusChangedAt: ").append(toIndentedString(opStatusChangedAt)).append("\n"); + sb.append(" maintenanceStatus: ").append(toIndentedString(maintenanceStatus)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); @@ -337,7 +364,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("providerStatus", "equinixStatus", "operationalStatus", "errors", "opStatusChangedAt")); + openapiFields = new HashSet(Arrays.asList("providerStatus", "equinixStatus", "operationalStatus", "errors", "opStatusChangedAt", "maintenanceStatus")); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(0); @@ -385,6 +412,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti }; } } + // validate the optional field `maintenanceStatus` + if (jsonObj.get("maintenanceStatus") != null && !jsonObj.get("maintenanceStatus").isJsonNull()) { + MaintenanceState.validateJsonElement(jsonObj.get("maintenanceStatus")); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ConnectionType.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ConnectionType.java index 4a7afd8e..cda62b30 100644 --- a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ConnectionType.java +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ConnectionType.java @@ -57,7 +57,9 @@ public enum ConnectionType { IX_VC("IX_VC"), - IC_VC("IC_VC"); + GW_VC("GW_VC"), + + IPX_VC("IPX_VC"); private String value; diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ContactPreference.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ContactPreference.java new file mode 100644 index 00000000..607b9002 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ContactPreference.java @@ -0,0 +1,371 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * Contact preference for the phone number + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class ContactPreference { + public static final String SERIALIZED_NAME_TIMEZONE = "timezone"; + @SerializedName(SERIALIZED_NAME_TIMEZONE) + @javax.annotation.Nullable + private String timezone; + + /** + * Availability of the contact preference + */ + @JsonAdapter(AvailabilityEnum.Adapter.class) + public enum AvailabilityEnum { + WORK_HOURS("WORK_HOURS"), + + ANYTIME("ANYTIME"); + + private String value; + + AvailabilityEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static AvailabilityEnum fromValue(String value) { + for (AvailabilityEnum b : AvailabilityEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final AvailabilityEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public AvailabilityEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return AvailabilityEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + AvailabilityEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_AVAILABILITY = "availability"; + @SerializedName(SERIALIZED_NAME_AVAILABILITY) + @javax.annotation.Nullable + private AvailabilityEnum availability; + + public ContactPreference() { + } + + public ContactPreference timezone(@javax.annotation.Nullable String timezone) { + this.timezone = timezone; + return this; + } + + /** + * Timezone of the contact preference + * @return timezone + */ + @javax.annotation.Nullable + public String getTimezone() { + return timezone; + } + + public void setTimezone(@javax.annotation.Nullable String timezone) { + this.timezone = timezone; + } + + + public ContactPreference availability(@javax.annotation.Nullable AvailabilityEnum availability) { + this.availability = availability; + return this; + } + + /** + * Availability of the contact preference + * @return availability + */ + @javax.annotation.Nullable + public AvailabilityEnum getAvailability() { + return availability; + } + + public void setAvailability(@javax.annotation.Nullable AvailabilityEnum availability) { + this.availability = availability; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ContactPreference instance itself + */ + public ContactPreference putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ContactPreference contactPreference = (ContactPreference) o; + return Objects.equals(this.timezone, contactPreference.timezone) && + Objects.equals(this.availability, contactPreference.availability)&& + Objects.equals(this.additionalProperties, contactPreference.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(timezone, availability, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ContactPreference {\n"); + sb.append(" timezone: ").append(toIndentedString(timezone)).append("\n"); + sb.append(" availability: ").append(toIndentedString(availability)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("timezone", "availability")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ContactPreference + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ContactPreference.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in ContactPreference is not found in the empty JSON string", ContactPreference.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("timezone") != null && !jsonObj.get("timezone").isJsonNull()) && !jsonObj.get("timezone").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `timezone` to be a primitive type in the JSON string but got `%s`", jsonObj.get("timezone").toString())); + } + if ((jsonObj.get("availability") != null && !jsonObj.get("availability").isJsonNull()) && !jsonObj.get("availability").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `availability` to be a primitive type in the JSON string but got `%s`", jsonObj.get("availability").toString())); + } + // validate the optional field `availability` + if (jsonObj.get("availability") != null && !jsonObj.get("availability").isJsonNull()) { + AvailabilityEnum.validateJsonElement(jsonObj.get("availability")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ContactPreference.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ContactPreference' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ContactPreference.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ContactPreference value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ContactPreference read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ContactPreference instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ContactPreference given an JSON string + * + * @param jsonString JSON string + * @return An instance of ContactPreference + * @throws IOException if the JSON string is invalid with respect to ContactPreference + */ + public static ContactPreference fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ContactPreference.class); + } + + /** + * Convert an instance of ContactPreference to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/CreateLoa.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/CreateLoa.java new file mode 100644 index 00000000..e68b7adc --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/CreateLoa.java @@ -0,0 +1,282 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.IssueLoa; +import com.equinix.sdk.fabricv4.model.LoaDemarcationPoint; +import com.equinix.sdk.fabricv4.model.LoaIssuer; +import com.equinix.sdk.fabricv4.model.LoaLocation; +import com.equinix.sdk.fabricv4.model.LoaProductType; +import com.equinix.sdk.fabricv4.model.LoaRequestor; +import com.equinix.sdk.fabricv4.model.LoaType; +import com.equinix.sdk.fabricv4.model.RequestLoa; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.util.Arrays; + + + +import java.io.IOException; +import java.lang.reflect.Type; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Locale; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.JsonPrimitive; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonSerializationContext; +import com.google.gson.JsonSerializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonArray; +import com.google.gson.JsonParseException; + +import com.equinix.sdk.fabricv4.JSON; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class CreateLoa extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(CreateLoa.class.getName()); + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateLoa.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateLoa' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter adapterIssueLoa = gson.getDelegateAdapter(this, TypeToken.get(IssueLoa.class)); + final TypeAdapter adapterRequestLoa = gson.getDelegateAdapter(this, TypeToken.get(RequestLoa.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateLoa value) throws IOException { + if (value == null || value.getActualInstance() == null) { + elementAdapter.write(out, null); + return; + } + + // check if the actual instance is of the type `IssueLoa` + if (value.getActualInstance() instanceof IssueLoa) { + JsonElement element = adapterIssueLoa.toJsonTree((IssueLoa)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + // check if the actual instance is of the type `RequestLoa` + if (value.getActualInstance() instanceof RequestLoa) { + JsonElement element = adapterRequestLoa.toJsonTree((RequestLoa)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + throw new IOException("Failed to serialize as the type doesn't match oneOf schemas: IssueLoa, RequestLoa"); + } + + @Override + public CreateLoa read(JsonReader in) throws IOException { + Object deserialized = null; + JsonElement jsonElement = elementAdapter.read(in); + + int match = 0; + ArrayList errorMessages = new ArrayList<>(); + TypeAdapter actualAdapter = elementAdapter; + + // deserialize IssueLoa + try { + // validate the JSON object to see if any exception is thrown + IssueLoa.validateJsonElement(jsonElement); + actualAdapter = adapterIssueLoa; + match++; + log.log(Level.FINER, "Input data matches schema 'IssueLoa'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format(Locale.ROOT, "Deserialization for IssueLoa failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'IssueLoa'", e); + } + // deserialize RequestLoa + try { + // validate the JSON object to see if any exception is thrown + RequestLoa.validateJsonElement(jsonElement); + actualAdapter = adapterRequestLoa; + match++; + log.log(Level.FINER, "Input data matches schema 'RequestLoa'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format(Locale.ROOT, "Deserialization for RequestLoa failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'RequestLoa'", e); + } + + if (match == 1) { + CreateLoa ret = new CreateLoa(); + ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); + return ret; + } + + throw new IOException(String.format(Locale.ROOT, "Failed deserialization for CreateLoa: %d classes match result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", match, errorMessages, jsonElement.toString())); + } + }.nullSafe(); + } + } + + // store a list of schema names defined in oneOf + public static final Map> schemas = new HashMap>(); + + public CreateLoa() { + super("oneOf", Boolean.FALSE); + } + + public CreateLoa(Object o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("IssueLoa", IssueLoa.class); + schemas.put("RequestLoa", RequestLoa.class); + } + + @Override + public Map> getSchemas() { + return CreateLoa.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check + * the instance parameter is valid against the oneOf child schemas: + * IssueLoa, RequestLoa + * + * It could be an instance of the 'oneOf' schemas. + */ + @Override + public void setActualInstance(Object instance) { + if (instance instanceof IssueLoa) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof RequestLoa) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException("Invalid instance type. Must be IssueLoa, RequestLoa"); + } + + /** + * Get the actual instance, which can be the following: + * IssueLoa, RequestLoa + * + * @return The actual instance (IssueLoa, RequestLoa) + */ + @SuppressWarnings("unchecked") + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `IssueLoa`. If the actual instance is not `IssueLoa`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `IssueLoa` + * @throws ClassCastException if the instance is not `IssueLoa` + */ + public IssueLoa getIssueLoa() throws ClassCastException { + return (IssueLoa)super.getActualInstance(); + } + + /** + * Get the actual instance of `RequestLoa`. If the actual instance is not `RequestLoa`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `RequestLoa` + * @throws ClassCastException if the instance is not `RequestLoa` + */ + public RequestLoa getRequestLoa() throws ClassCastException { + return (RequestLoa)super.getActualInstance(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CreateLoa + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + // validate oneOf schemas one by one + int validCount = 0; + ArrayList errorMessages = new ArrayList<>(); + // validate the json string with IssueLoa + try { + IssueLoa.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add(String.format(Locale.ROOT, "Deserialization for IssueLoa failed with `%s`.", e.getMessage())); + // continue to the next one + } + // validate the json string with RequestLoa + try { + RequestLoa.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add(String.format(Locale.ROOT, "Deserialization for RequestLoa failed with `%s`.", e.getMessage())); + // continue to the next one + } + if (validCount != 1) { + throw new IOException(String.format(Locale.ROOT, "The JSON string is invalid for CreateLoa with oneOf schemas: IssueLoa, RequestLoa. %d class(es) match the result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", validCount, errorMessages, jsonElement.toString())); + } + } + + /** + * Create an instance of CreateLoa given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateLoa + * @throws IOException if the JSON string is invalid with respect to CreateLoa + */ + public static CreateLoa fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateLoa.class); + } + + /** + * Convert an instance of CreateLoa to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/CompanyProfileActionRequest.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/CreateLoaNote.java similarity index 71% rename from services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/CompanyProfileActionRequest.java rename to services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/CreateLoaNote.java index 0c279a91..d25fbe10 100644 --- a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/CompanyProfileActionRequest.java +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/CreateLoaNote.java @@ -46,57 +46,33 @@ import com.equinix.sdk.fabricv4.JSON; /** - * CompanyProfileActionRequest + * Create Loa Note */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") -public class CompanyProfileActionRequest { - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - @javax.annotation.Nonnull - private String type; - +public class CreateLoaNote { public static final String SERIALIZED_NAME_COMMENTS = "comments"; @SerializedName(SERIALIZED_NAME_COMMENTS) - @javax.annotation.Nullable - private String comments; - - public CompanyProfileActionRequest() { - } - - public CompanyProfileActionRequest type(@javax.annotation.Nonnull String type) { - this.type = type; - return this; - } - - /** - * CompanyProfile Action Type - * @return type - */ @javax.annotation.Nonnull - public String getType() { - return type; - } + private String comments; - public void setType(@javax.annotation.Nonnull String type) { - this.type = type; + public CreateLoaNote() { } - - public CompanyProfileActionRequest comments(@javax.annotation.Nullable String comments) { + public CreateLoaNote comments(@javax.annotation.Nonnull String comments) { this.comments = comments; return this; } /** - * Optional comments for the action + * The note content to add to this LOA. Notes are visible to both the issuer and requestor organizations. Use notes to communicate updates, clarifications, or additional context about the LOA. * @return comments */ - @javax.annotation.Nullable + @javax.annotation.Nonnull public String getComments() { return comments; } - public void setComments(@javax.annotation.Nullable String comments) { + public void setComments(@javax.annotation.Nonnull String comments) { this.comments = comments; } @@ -113,9 +89,9 @@ public void setComments(@javax.annotation.Nullable String comments) { * * @param key name of the property * @param value value of the property - * @return the CompanyProfileActionRequest instance itself + * @return the CreateLoaNote instance itself */ - public CompanyProfileActionRequest putAdditionalProperty(String key, Object value) { + public CreateLoaNote putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -154,22 +130,20 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - CompanyProfileActionRequest companyProfileActionRequest = (CompanyProfileActionRequest) o; - return Objects.equals(this.type, companyProfileActionRequest.type) && - Objects.equals(this.comments, companyProfileActionRequest.comments)&& - Objects.equals(this.additionalProperties, companyProfileActionRequest.additionalProperties); + CreateLoaNote createLoaNote = (CreateLoaNote) o; + return Objects.equals(this.comments, createLoaNote.comments)&& + Objects.equals(this.additionalProperties, createLoaNote.additionalProperties); } @Override public int hashCode() { - return Objects.hash(type, comments, additionalProperties); + return Objects.hash(comments, additionalProperties); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class CompanyProfileActionRequest {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append("class CreateLoaNote {\n"); sb.append(" comments: ").append(toIndentedString(comments)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); @@ -193,36 +167,33 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("type", "comments")); + openapiFields = new HashSet(Arrays.asList("comments")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("type")); + openapiRequiredFields = new HashSet(Arrays.asList("comments")); } /** * Validates the JSON Element and throws an exception if issues found * * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CompanyProfileActionRequest + * @throws IOException if the JSON Element is invalid with respect to CreateLoaNote */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { - if (!CompanyProfileActionRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in CompanyProfileActionRequest is not found in the empty JSON string", CompanyProfileActionRequest.openapiRequiredFields.toString())); + if (!CreateLoaNote.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in CreateLoaNote is not found in the empty JSON string", CreateLoaNote.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CompanyProfileActionRequest.openapiRequiredFields) { + for (String requiredField : CreateLoaNote.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - if ((jsonObj.get("comments") != null && !jsonObj.get("comments").isJsonNull()) && !jsonObj.get("comments").isJsonPrimitive()) { + if (!jsonObj.get("comments").isJsonPrimitive()) { throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `comments` to be a primitive type in the JSON string but got `%s`", jsonObj.get("comments").toString())); } } @@ -231,16 +202,16 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!CompanyProfileActionRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CompanyProfileActionRequest' and its subtypes + if (!CreateLoaNote.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateLoaNote' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CompanyProfileActionRequest.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreateLoaNote.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, CompanyProfileActionRequest value) throws IOException { + public void write(JsonWriter out, CreateLoaNote value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); // serialize additional properties @@ -268,12 +239,12 @@ else if (entry.getValue() instanceof Character) } @Override - public CompanyProfileActionRequest read(JsonReader in) throws IOException { + public CreateLoaNote read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); JsonObject jsonObj = jsonElement.getAsJsonObject(); // store additional fields in the deserialized instance - CompanyProfileActionRequest instance = thisAdapter.fromJsonTree(jsonObj); + CreateLoaNote instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { if (!openapiFields.contains(entry.getKey())) { if (entry.getValue().isJsonPrimitive()) { // primitive type @@ -300,18 +271,18 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } /** - * Create an instance of CompanyProfileActionRequest given an JSON string + * Create an instance of CreateLoaNote given an JSON string * * @param jsonString JSON string - * @return An instance of CompanyProfileActionRequest - * @throws IOException if the JSON string is invalid with respect to CompanyProfileActionRequest + * @return An instance of CreateLoaNote + * @throws IOException if the JSON string is invalid with respect to CreateLoaNote */ - public static CompanyProfileActionRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CompanyProfileActionRequest.class); + public static CreateLoaNote fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateLoaNote.class); } /** - * Convert an instance of CompanyProfileActionRequest to an JSON string + * Convert an instance of CreateLoaNote to an JSON string * * @return JSON string */ diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/EnvironmentActionRequest.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/EnvironmentActionRequest.java new file mode 100644 index 00000000..ed1d7e39 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/EnvironmentActionRequest.java @@ -0,0 +1,322 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.ActivationKeyDetails; +import com.equinix.sdk.fabricv4.model.EnvironmentActionTypeEnum; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * Request payload for environment action + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class EnvironmentActionRequest { + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nonnull + private EnvironmentActionTypeEnum type; + + public static final String SERIALIZED_NAME_KEY_DETAILS = "keyDetails"; + @SerializedName(SERIALIZED_NAME_KEY_DETAILS) + @javax.annotation.Nonnull + private ActivationKeyDetails keyDetails; + + public EnvironmentActionRequest() { + } + + public EnvironmentActionRequest type(@javax.annotation.Nonnull EnvironmentActionTypeEnum type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + */ + @javax.annotation.Nonnull + public EnvironmentActionTypeEnum getType() { + return type; + } + + public void setType(@javax.annotation.Nonnull EnvironmentActionTypeEnum type) { + this.type = type; + } + + + public EnvironmentActionRequest keyDetails(@javax.annotation.Nonnull ActivationKeyDetails keyDetails) { + this.keyDetails = keyDetails; + return this; + } + + /** + * Get keyDetails + * @return keyDetails + */ + @javax.annotation.Nonnull + public ActivationKeyDetails getKeyDetails() { + return keyDetails; + } + + public void setKeyDetails(@javax.annotation.Nonnull ActivationKeyDetails keyDetails) { + this.keyDetails = keyDetails; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the EnvironmentActionRequest instance itself + */ + public EnvironmentActionRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EnvironmentActionRequest environmentActionRequest = (EnvironmentActionRequest) o; + return Objects.equals(this.type, environmentActionRequest.type) && + Objects.equals(this.keyDetails, environmentActionRequest.keyDetails)&& + Objects.equals(this.additionalProperties, environmentActionRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(type, keyDetails, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EnvironmentActionRequest {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" keyDetails: ").append(toIndentedString(keyDetails)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("type", "keyDetails")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("type", "keyDetails")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to EnvironmentActionRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!EnvironmentActionRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in EnvironmentActionRequest is not found in the empty JSON string", EnvironmentActionRequest.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : EnvironmentActionRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the required field `type` + EnvironmentActionTypeEnum.validateJsonElement(jsonObj.get("type")); + // validate the required field `keyDetails` + ActivationKeyDetails.validateJsonElement(jsonObj.get("keyDetails")); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!EnvironmentActionRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'EnvironmentActionRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(EnvironmentActionRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, EnvironmentActionRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public EnvironmentActionRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + EnvironmentActionRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of EnvironmentActionRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of EnvironmentActionRequest + * @throws IOException if the JSON string is invalid with respect to EnvironmentActionRequest + */ + public static EnvironmentActionRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, EnvironmentActionRequest.class); + } + + /** + * Convert an instance of EnvironmentActionRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AgentActivities.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/EnvironmentActionResponse.java similarity index 65% rename from services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AgentActivities.java rename to services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/EnvironmentActionResponse.java index 2d186dae..1466d9ee 100644 --- a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AgentActivities.java +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/EnvironmentActionResponse.java @@ -13,15 +13,17 @@ import java.util.Objects; import java.util.Locale; -import com.equinix.sdk.fabricv4.model.Agent; -import com.equinix.sdk.fabricv4.model.AgentActivitiesMetadata; +import com.equinix.sdk.fabricv4.model.ActivationKeyDetails; import com.equinix.sdk.fabricv4.model.Changelog; +import com.equinix.sdk.fabricv4.model.EnvironmentActionStateEnum; +import com.equinix.sdk.fabricv4.model.EnvironmentActionTypeEnum; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.net.URI; import java.util.Arrays; import java.util.UUID; @@ -50,162 +52,138 @@ import com.equinix.sdk.fabricv4.JSON; /** - * Agent Activities object + * Response from environment action <sup color='red'>Beta</sup></font> */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") -public class AgentActivities { +public class EnvironmentActionResponse { public static final String SERIALIZED_NAME_HREF = "href"; @SerializedName(SERIALIZED_NAME_HREF) @javax.annotation.Nullable - private UUID href; + private URI href; public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) @javax.annotation.Nullable - private String type; + private EnvironmentActionTypeEnum type; public static final String SERIALIZED_NAME_UUID = "uuid"; @SerializedName(SERIALIZED_NAME_UUID) @javax.annotation.Nullable private UUID uuid; - public static final String SERIALIZED_NAME_AGENT = "agent"; - @SerializedName(SERIALIZED_NAME_AGENT) + public static final String SERIALIZED_NAME_STATE = "state"; + @SerializedName(SERIALIZED_NAME_STATE) @javax.annotation.Nullable - private Agent agent; + private EnvironmentActionStateEnum state; - public static final String SERIALIZED_NAME_STATUS = "status"; - @SerializedName(SERIALIZED_NAME_STATUS) + public static final String SERIALIZED_NAME_KEY_DETAILS = "keyDetails"; + @SerializedName(SERIALIZED_NAME_KEY_DETAILS) @javax.annotation.Nullable - private String status; - - public static final String SERIALIZED_NAME_METADATA = "metadata"; - @SerializedName(SERIALIZED_NAME_METADATA) - @javax.annotation.Nullable - private AgentActivitiesMetadata metadata; + private ActivationKeyDetails keyDetails; public static final String SERIALIZED_NAME_CHANGE_LOG = "changeLog"; @SerializedName(SERIALIZED_NAME_CHANGE_LOG) @javax.annotation.Nullable private Changelog changeLog; - public AgentActivities() { + public EnvironmentActionResponse() { } - public AgentActivities( - UUID uuid + public EnvironmentActionResponse( + URI href ) { this(); - this.uuid = uuid; - } - - public AgentActivities href(@javax.annotation.Nullable UUID href) { this.href = href; - return this; } /** - * Agent Activities URI + * Environment action URI * @return href */ @javax.annotation.Nullable - public UUID getHref() { + public URI getHref() { return href; } - public void setHref(@javax.annotation.Nullable UUID href) { - this.href = href; - } - public AgentActivities type(@javax.annotation.Nullable String type) { + public EnvironmentActionResponse type(@javax.annotation.Nullable EnvironmentActionTypeEnum type) { this.type = type; return this; } /** - * type + * Get type * @return type */ @javax.annotation.Nullable - public String getType() { + public EnvironmentActionTypeEnum getType() { return type; } - public void setType(@javax.annotation.Nullable String type) { + public void setType(@javax.annotation.Nullable EnvironmentActionTypeEnum type) { this.type = type; } - /** - * Equinix-assigned agent operation identifier - * @return uuid - */ - @javax.annotation.Nullable - public UUID getUuid() { - return uuid; - } - - - - public AgentActivities agent(@javax.annotation.Nullable Agent agent) { - this.agent = agent; + public EnvironmentActionResponse uuid(@javax.annotation.Nullable UUID uuid) { + this.uuid = uuid; return this; } /** - * Get agent - * @return agent + * Equinix-assigned action identifier + * @return uuid */ @javax.annotation.Nullable - public Agent getAgent() { - return agent; + public UUID getUuid() { + return uuid; } - public void setAgent(@javax.annotation.Nullable Agent agent) { - this.agent = agent; + public void setUuid(@javax.annotation.Nullable UUID uuid) { + this.uuid = uuid; } - public AgentActivities status(@javax.annotation.Nullable String status) { - this.status = status; + public EnvironmentActionResponse state(@javax.annotation.Nullable EnvironmentActionStateEnum state) { + this.state = state; return this; } /** - * Agent activities state COMPLETED, PENDING, PENDING_USER_INPUT, FAILED - * @return status + * Get state + * @return state */ @javax.annotation.Nullable - public String getStatus() { - return status; + public EnvironmentActionStateEnum getState() { + return state; } - public void setStatus(@javax.annotation.Nullable String status) { - this.status = status; + public void setState(@javax.annotation.Nullable EnvironmentActionStateEnum state) { + this.state = state; } - public AgentActivities metadata(@javax.annotation.Nullable AgentActivitiesMetadata metadata) { - this.metadata = metadata; + public EnvironmentActionResponse keyDetails(@javax.annotation.Nullable ActivationKeyDetails keyDetails) { + this.keyDetails = keyDetails; return this; } /** - * Get metadata - * @return metadata + * Get keyDetails + * @return keyDetails */ @javax.annotation.Nullable - public AgentActivitiesMetadata getMetadata() { - return metadata; + public ActivationKeyDetails getKeyDetails() { + return keyDetails; } - public void setMetadata(@javax.annotation.Nullable AgentActivitiesMetadata metadata) { - this.metadata = metadata; + public void setKeyDetails(@javax.annotation.Nullable ActivationKeyDetails keyDetails) { + this.keyDetails = keyDetails; } - public AgentActivities changeLog(@javax.annotation.Nullable Changelog changeLog) { + public EnvironmentActionResponse changeLog(@javax.annotation.Nullable Changelog changeLog) { this.changeLog = changeLog; return this; } @@ -236,9 +214,9 @@ public void setChangeLog(@javax.annotation.Nullable Changelog changeLog) { * * @param key name of the property * @param value value of the property - * @return the AgentActivities instance itself + * @return the EnvironmentActionResponse instance itself */ - public AgentActivities putAdditionalProperty(String key, Object value) { + public EnvironmentActionResponse putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -277,32 +255,30 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - AgentActivities agentActivities = (AgentActivities) o; - return Objects.equals(this.href, agentActivities.href) && - Objects.equals(this.type, agentActivities.type) && - Objects.equals(this.uuid, agentActivities.uuid) && - Objects.equals(this.agent, agentActivities.agent) && - Objects.equals(this.status, agentActivities.status) && - Objects.equals(this.metadata, agentActivities.metadata) && - Objects.equals(this.changeLog, agentActivities.changeLog)&& - Objects.equals(this.additionalProperties, agentActivities.additionalProperties); + EnvironmentActionResponse environmentActionResponse = (EnvironmentActionResponse) o; + return Objects.equals(this.href, environmentActionResponse.href) && + Objects.equals(this.type, environmentActionResponse.type) && + Objects.equals(this.uuid, environmentActionResponse.uuid) && + Objects.equals(this.state, environmentActionResponse.state) && + Objects.equals(this.keyDetails, environmentActionResponse.keyDetails) && + Objects.equals(this.changeLog, environmentActionResponse.changeLog)&& + Objects.equals(this.additionalProperties, environmentActionResponse.additionalProperties); } @Override public int hashCode() { - return Objects.hash(href, type, uuid, agent, status, metadata, changeLog, additionalProperties); + return Objects.hash(href, type, uuid, state, keyDetails, changeLog, additionalProperties); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class AgentActivities {\n"); + sb.append("class EnvironmentActionResponse {\n"); sb.append(" href: ").append(toIndentedString(href)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); - sb.append(" agent: ").append(toIndentedString(agent)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); + sb.append(" state: ").append(toIndentedString(state)).append("\n"); + sb.append(" keyDetails: ").append(toIndentedString(keyDetails)).append("\n"); sb.append(" changeLog: ").append(toIndentedString(changeLog)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); @@ -326,7 +302,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("href", "type", "uuid", "agent", "status", "metadata", "changeLog")); + openapiFields = new HashSet(Arrays.asList("href", "type", "uuid", "state", "keyDetails", "changeLog")); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(0); @@ -336,34 +312,32 @@ private String toIndentedString(Object o) { * Validates the JSON Element and throws an exception if issues found * * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to AgentActivities + * @throws IOException if the JSON Element is invalid with respect to EnvironmentActionResponse */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { - if (!AgentActivities.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in AgentActivities is not found in the empty JSON string", AgentActivities.openapiRequiredFields.toString())); + if (!EnvironmentActionResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in EnvironmentActionResponse is not found in the empty JSON string", EnvironmentActionResponse.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("href") != null && !jsonObj.get("href").isJsonNull()) && !jsonObj.get("href").isJsonPrimitive()) { throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `href` to be a primitive type in the JSON string but got `%s`", jsonObj.get("href").toString())); } - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + // validate the optional field `type` + if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { + EnvironmentActionTypeEnum.validateJsonElement(jsonObj.get("type")); } if ((jsonObj.get("uuid") != null && !jsonObj.get("uuid").isJsonNull()) && !jsonObj.get("uuid").isJsonPrimitive()) { throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `uuid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("uuid").toString())); } - // validate the optional field `agent` - if (jsonObj.get("agent") != null && !jsonObj.get("agent").isJsonNull()) { - Agent.validateJsonElement(jsonObj.get("agent")); - } - if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); + // validate the optional field `state` + if (jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) { + EnvironmentActionStateEnum.validateJsonElement(jsonObj.get("state")); } - // validate the optional field `metadata` - if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - AgentActivitiesMetadata.validateJsonElement(jsonObj.get("metadata")); + // validate the optional field `keyDetails` + if (jsonObj.get("keyDetails") != null && !jsonObj.get("keyDetails").isJsonNull()) { + ActivationKeyDetails.validateJsonElement(jsonObj.get("keyDetails")); } // validate the optional field `changeLog` if (jsonObj.get("changeLog") != null && !jsonObj.get("changeLog").isJsonNull()) { @@ -375,16 +349,16 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!AgentActivities.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'AgentActivities' and its subtypes + if (!EnvironmentActionResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'EnvironmentActionResponse' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(AgentActivities.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(EnvironmentActionResponse.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, AgentActivities value) throws IOException { + public void write(JsonWriter out, EnvironmentActionResponse value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); // serialize additional properties @@ -412,12 +386,12 @@ else if (entry.getValue() instanceof Character) } @Override - public AgentActivities read(JsonReader in) throws IOException { + public EnvironmentActionResponse read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); JsonObject jsonObj = jsonElement.getAsJsonObject(); // store additional fields in the deserialized instance - AgentActivities instance = thisAdapter.fromJsonTree(jsonObj); + EnvironmentActionResponse instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { if (!openapiFields.contains(entry.getKey())) { if (entry.getValue().isJsonPrimitive()) { // primitive type @@ -444,18 +418,18 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } /** - * Create an instance of AgentActivities given an JSON string + * Create an instance of EnvironmentActionResponse given an JSON string * * @param jsonString JSON string - * @return An instance of AgentActivities - * @throws IOException if the JSON string is invalid with respect to AgentActivities + * @return An instance of EnvironmentActionResponse + * @throws IOException if the JSON string is invalid with respect to EnvironmentActionResponse */ - public static AgentActivities fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, AgentActivities.class); + public static EnvironmentActionResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, EnvironmentActionResponse.class); } /** - * Convert an instance of AgentActivities to an JSON string + * Convert an instance of EnvironmentActionResponse to an JSON string * * @return JSON string */ diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/EnvironmentActionStateEnum.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/EnvironmentActionStateEnum.java new file mode 100644 index 00000000..70c879fb --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/EnvironmentActionStateEnum.java @@ -0,0 +1,78 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.google.gson.annotations.SerializedName; + +import java.io.IOException; +import java.util.Locale; +import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; + +/** + * Environment action state. ACTIVE - already used , INACTIVE - not used + */ +@JsonAdapter(EnvironmentActionStateEnum.Adapter.class) +public enum EnvironmentActionStateEnum { + + ACTIVE("ACTIVE"), + + INACTIVE("INACTIVE"); + + private String value; + + EnvironmentActionStateEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static EnvironmentActionStateEnum fromValue(String value) { + for (EnvironmentActionStateEnum b : EnvironmentActionStateEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final EnvironmentActionStateEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public EnvironmentActionStateEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return EnvironmentActionStateEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + EnvironmentActionStateEnum.fromValue(value); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/EnvironmentActionTypeEnum.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/EnvironmentActionTypeEnum.java new file mode 100644 index 00000000..66878ce3 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/EnvironmentActionTypeEnum.java @@ -0,0 +1,76 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.google.gson.annotations.SerializedName; + +import java.io.IOException; +import java.util.Locale; +import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; + +/** + * Environment action type + */ +@JsonAdapter(EnvironmentActionTypeEnum.Adapter.class) +public enum EnvironmentActionTypeEnum { + + VALIDATE_ACTIVATION_KEY("VALIDATE_ACTIVATION_KEY"); + + private String value; + + EnvironmentActionTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static EnvironmentActionTypeEnum fromValue(String value) { + for (EnvironmentActionTypeEnum b : EnvironmentActionTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final EnvironmentActionTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public EnvironmentActionTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return EnvironmentActionTypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + EnvironmentActionTypeEnum.fromValue(value); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ExchangeServiceAndExpression.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ExchangeServiceAndExpression.java new file mode 100644 index 00000000..5d6581dd --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ExchangeServiceAndExpression.java @@ -0,0 +1,311 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.ExchangeServiceSearchExpression; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * ExchangeServiceAndExpression + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class ExchangeServiceAndExpression { + public static final String SERIALIZED_NAME_AND = "and"; + @SerializedName(SERIALIZED_NAME_AND) + @javax.annotation.Nonnull + private List and = new ArrayList<>(); + + public ExchangeServiceAndExpression() { + } + + public ExchangeServiceAndExpression and(@javax.annotation.Nonnull List and) { + this.and = and; + return this; + } + + public ExchangeServiceAndExpression addAndItem(ExchangeServiceSearchExpression andItem) { + if (this.and == null) { + this.and = new ArrayList<>(); + } + this.and.add(andItem); + return this; + } + + /** + * Get and + * @return and + */ + @javax.annotation.Nonnull + public List getAnd() { + return and; + } + + public void setAnd(@javax.annotation.Nonnull List and) { + this.and = and; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ExchangeServiceAndExpression instance itself + */ + public ExchangeServiceAndExpression putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExchangeServiceAndExpression exchangeServiceAndExpression = (ExchangeServiceAndExpression) o; + return Objects.equals(this.and, exchangeServiceAndExpression.and)&& + Objects.equals(this.additionalProperties, exchangeServiceAndExpression.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(and, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExchangeServiceAndExpression {\n"); + sb.append(" and: ").append(toIndentedString(and)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("and")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("and")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ExchangeServiceAndExpression + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ExchangeServiceAndExpression.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in ExchangeServiceAndExpression is not found in the empty JSON string", ExchangeServiceAndExpression.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ExchangeServiceAndExpression.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the json data is an array + if (!jsonObj.get("and").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `and` to be an array in the JSON string but got `%s`", jsonObj.get("and").toString())); + } + + JsonArray jsonArrayand = jsonObj.getAsJsonArray("and"); + // validate the required field `and` (array) + for (int i = 0; i < jsonArrayand.size(); i++) { + ExchangeServiceSearchExpression.validateJsonElement(jsonArrayand.get(i)); + }; + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ExchangeServiceAndExpression.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ExchangeServiceAndExpression' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ExchangeServiceAndExpression.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ExchangeServiceAndExpression value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ExchangeServiceAndExpression read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ExchangeServiceAndExpression instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ExchangeServiceAndExpression given an JSON string + * + * @param jsonString JSON string + * @return An instance of ExchangeServiceAndExpression + * @throws IOException if the JSON string is invalid with respect to ExchangeServiceAndExpression + */ + public static ExchangeServiceAndExpression fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ExchangeServiceAndExpression.class); + } + + /** + * Convert an instance of ExchangeServiceAndExpression to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ExchangeServiceNotification.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ExchangeServiceNotification.java new file mode 100644 index 00000000..6ac4a34f --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ExchangeServiceNotification.java @@ -0,0 +1,395 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * ExchangeServiceNotification + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class ExchangeServiceNotification { + /** + * Internet Exchange Service Notification Type + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + NOTIFICATION("NOTIFICATION"), + + TECHNICAL("TECHNICAL"), + + PEERING("PEERING"), + + ESCALATION("ESCALATION"), + + ORDERING("ORDERING"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nonnull + private TypeEnum type; + + public static final String SERIALIZED_NAME_REGISTERED_USERS = "registeredUsers"; + @SerializedName(SERIALIZED_NAME_REGISTERED_USERS) + @javax.annotation.Nonnull + private List registeredUsers = new ArrayList<>(); + + public ExchangeServiceNotification() { + } + + public ExchangeServiceNotification type(@javax.annotation.Nonnull TypeEnum type) { + this.type = type; + return this; + } + + /** + * Internet Exchange Service Notification Type + * @return type + */ + @javax.annotation.Nonnull + public TypeEnum getType() { + return type; + } + + public void setType(@javax.annotation.Nonnull TypeEnum type) { + this.type = type; + } + + + public ExchangeServiceNotification registeredUsers(@javax.annotation.Nonnull List registeredUsers) { + this.registeredUsers = registeredUsers; + return this; + } + + public ExchangeServiceNotification addRegisteredUsersItem(String registeredUsersItem) { + if (this.registeredUsers == null) { + this.registeredUsers = new ArrayList<>(); + } + this.registeredUsers.add(registeredUsersItem); + return this; + } + + /** + * Array of registered users + * @return registeredUsers + */ + @javax.annotation.Nonnull + public List getRegisteredUsers() { + return registeredUsers; + } + + public void setRegisteredUsers(@javax.annotation.Nonnull List registeredUsers) { + this.registeredUsers = registeredUsers; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ExchangeServiceNotification instance itself + */ + public ExchangeServiceNotification putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExchangeServiceNotification exchangeServiceNotification = (ExchangeServiceNotification) o; + return Objects.equals(this.type, exchangeServiceNotification.type) && + Objects.equals(this.registeredUsers, exchangeServiceNotification.registeredUsers)&& + Objects.equals(this.additionalProperties, exchangeServiceNotification.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(type, registeredUsers, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExchangeServiceNotification {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" registeredUsers: ").append(toIndentedString(registeredUsers)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("type", "registeredUsers")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("type", "registeredUsers")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ExchangeServiceNotification + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ExchangeServiceNotification.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in ExchangeServiceNotification is not found in the empty JSON string", ExchangeServiceNotification.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ExchangeServiceNotification.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // validate the required field `type` + TypeEnum.validateJsonElement(jsonObj.get("type")); + // ensure the required json array is present + if (jsonObj.get("registeredUsers") == null) { + throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); + } else if (!jsonObj.get("registeredUsers").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `registeredUsers` to be an array in the JSON string but got `%s`", jsonObj.get("registeredUsers").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ExchangeServiceNotification.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ExchangeServiceNotification' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ExchangeServiceNotification.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ExchangeServiceNotification value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ExchangeServiceNotification read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ExchangeServiceNotification instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ExchangeServiceNotification given an JSON string + * + * @param jsonString JSON string + * @return An instance of ExchangeServiceNotification + * @throws IOException if the JSON string is invalid with respect to ExchangeServiceNotification + */ + public static ExchangeServiceNotification fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ExchangeServiceNotification.class); + } + + /** + * Convert an instance of ExchangeServiceNotification to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ExchangeServiceOrExpression.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ExchangeServiceOrExpression.java new file mode 100644 index 00000000..4a1bc9c4 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ExchangeServiceOrExpression.java @@ -0,0 +1,311 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.ExchangeServiceSearchExpression; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * ExchangeServiceOrExpression + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class ExchangeServiceOrExpression { + public static final String SERIALIZED_NAME_OR = "or"; + @SerializedName(SERIALIZED_NAME_OR) + @javax.annotation.Nonnull + private List or = new ArrayList<>(); + + public ExchangeServiceOrExpression() { + } + + public ExchangeServiceOrExpression or(@javax.annotation.Nonnull List or) { + this.or = or; + return this; + } + + public ExchangeServiceOrExpression addOrItem(ExchangeServiceSearchExpression orItem) { + if (this.or == null) { + this.or = new ArrayList<>(); + } + this.or.add(orItem); + return this; + } + + /** + * Get or + * @return or + */ + @javax.annotation.Nonnull + public List getOr() { + return or; + } + + public void setOr(@javax.annotation.Nonnull List or) { + this.or = or; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ExchangeServiceOrExpression instance itself + */ + public ExchangeServiceOrExpression putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExchangeServiceOrExpression exchangeServiceOrExpression = (ExchangeServiceOrExpression) o; + return Objects.equals(this.or, exchangeServiceOrExpression.or)&& + Objects.equals(this.additionalProperties, exchangeServiceOrExpression.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(or, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExchangeServiceOrExpression {\n"); + sb.append(" or: ").append(toIndentedString(or)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("or")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("or")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ExchangeServiceOrExpression + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ExchangeServiceOrExpression.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in ExchangeServiceOrExpression is not found in the empty JSON string", ExchangeServiceOrExpression.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ExchangeServiceOrExpression.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the json data is an array + if (!jsonObj.get("or").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `or` to be an array in the JSON string but got `%s`", jsonObj.get("or").toString())); + } + + JsonArray jsonArrayor = jsonObj.getAsJsonArray("or"); + // validate the required field `or` (array) + for (int i = 0; i < jsonArrayor.size(); i++) { + ExchangeServiceSearchExpression.validateJsonElement(jsonArrayor.get(i)); + }; + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ExchangeServiceOrExpression.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ExchangeServiceOrExpression' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ExchangeServiceOrExpression.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ExchangeServiceOrExpression value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ExchangeServiceOrExpression read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ExchangeServiceOrExpression instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ExchangeServiceOrExpression given an JSON string + * + * @param jsonString JSON string + * @return An instance of ExchangeServiceOrExpression + * @throws IOException if the JSON string is invalid with respect to ExchangeServiceOrExpression + */ + public static ExchangeServiceOrExpression fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ExchangeServiceOrExpression.class); + } + + /** + * Convert an instance of ExchangeServiceOrExpression to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ExchangeServicePropertyExpression.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ExchangeServicePropertyExpression.java new file mode 100644 index 00000000..3191bfd3 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ExchangeServicePropertyExpression.java @@ -0,0 +1,468 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * ExchangeServicePropertyExpression + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class ExchangeServicePropertyExpression { + /** + * Possible field names to use on filters + */ + @JsonAdapter(PropertyEnum.Adapter.class) + public enum PropertyEnum { + _PROJECT_PROJECTID("/project/projectId"); + + private String value; + + PropertyEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static PropertyEnum fromValue(String value) { + for (PropertyEnum b : PropertyEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final PropertyEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public PropertyEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return PropertyEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + PropertyEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_PROPERTY = "property"; + @SerializedName(SERIALIZED_NAME_PROPERTY) + @javax.annotation.Nonnull + private PropertyEnum property; + + /** + * Gets or Sets operator + */ + @JsonAdapter(OperatorEnum.Adapter.class) + public enum OperatorEnum { + EQUAL("="); + + private String value; + + OperatorEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static OperatorEnum fromValue(String value) { + for (OperatorEnum b : OperatorEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final OperatorEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public OperatorEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return OperatorEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + OperatorEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_OPERATOR = "operator"; + @SerializedName(SERIALIZED_NAME_OPERATOR) + @javax.annotation.Nonnull + private OperatorEnum operator; + + public static final String SERIALIZED_NAME_VALUES = "values"; + @SerializedName(SERIALIZED_NAME_VALUES) + @javax.annotation.Nonnull + private List values = new ArrayList<>(); + + public ExchangeServicePropertyExpression() { + } + + public ExchangeServicePropertyExpression property(@javax.annotation.Nonnull PropertyEnum property) { + this.property = property; + return this; + } + + /** + * Possible field names to use on filters + * @return property + */ + @javax.annotation.Nonnull + public PropertyEnum getProperty() { + return property; + } + + public void setProperty(@javax.annotation.Nonnull PropertyEnum property) { + this.property = property; + } + + + public ExchangeServicePropertyExpression operator(@javax.annotation.Nonnull OperatorEnum operator) { + this.operator = operator; + return this; + } + + /** + * Get operator + * @return operator + */ + @javax.annotation.Nonnull + public OperatorEnum getOperator() { + return operator; + } + + public void setOperator(@javax.annotation.Nonnull OperatorEnum operator) { + this.operator = operator; + } + + + public ExchangeServicePropertyExpression values(@javax.annotation.Nonnull List values) { + this.values = values; + return this; + } + + public ExchangeServicePropertyExpression addValuesItem(String valuesItem) { + if (this.values == null) { + this.values = new ArrayList<>(); + } + this.values.add(valuesItem); + return this; + } + + /** + * Get values + * @return values + */ + @javax.annotation.Nonnull + public List getValues() { + return values; + } + + public void setValues(@javax.annotation.Nonnull List values) { + this.values = values; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ExchangeServicePropertyExpression instance itself + */ + public ExchangeServicePropertyExpression putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExchangeServicePropertyExpression exchangeServicePropertyExpression = (ExchangeServicePropertyExpression) o; + return Objects.equals(this.property, exchangeServicePropertyExpression.property) && + Objects.equals(this.operator, exchangeServicePropertyExpression.operator) && + Objects.equals(this.values, exchangeServicePropertyExpression.values)&& + Objects.equals(this.additionalProperties, exchangeServicePropertyExpression.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(property, operator, values, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExchangeServicePropertyExpression {\n"); + sb.append(" property: ").append(toIndentedString(property)).append("\n"); + sb.append(" operator: ").append(toIndentedString(operator)).append("\n"); + sb.append(" values: ").append(toIndentedString(values)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("property", "operator", "values")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("property", "operator", "values")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ExchangeServicePropertyExpression + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ExchangeServicePropertyExpression.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in ExchangeServicePropertyExpression is not found in the empty JSON string", ExchangeServicePropertyExpression.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ExchangeServicePropertyExpression.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("property").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `property` to be a primitive type in the JSON string but got `%s`", jsonObj.get("property").toString())); + } + // validate the required field `property` + PropertyEnum.validateJsonElement(jsonObj.get("property")); + if (!jsonObj.get("operator").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `operator` to be a primitive type in the JSON string but got `%s`", jsonObj.get("operator").toString())); + } + // validate the required field `operator` + OperatorEnum.validateJsonElement(jsonObj.get("operator")); + // ensure the required json array is present + if (jsonObj.get("values") == null) { + throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); + } else if (!jsonObj.get("values").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `values` to be an array in the JSON string but got `%s`", jsonObj.get("values").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ExchangeServicePropertyExpression.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ExchangeServicePropertyExpression' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ExchangeServicePropertyExpression.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ExchangeServicePropertyExpression value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ExchangeServicePropertyExpression read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ExchangeServicePropertyExpression instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ExchangeServicePropertyExpression given an JSON string + * + * @param jsonString JSON string + * @return An instance of ExchangeServicePropertyExpression + * @throws IOException if the JSON string is invalid with respect to ExchangeServicePropertyExpression + */ + public static ExchangeServicePropertyExpression fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ExchangeServicePropertyExpression.class); + } + + /** + * Convert an instance of ExchangeServicePropertyExpression to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ExchangeServiceResponse.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ExchangeServiceResponse.java new file mode 100644 index 00000000..b5b7b78c --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ExchangeServiceResponse.java @@ -0,0 +1,854 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.ExchangeServiceNotification; +import com.equinix.sdk.fabricv4.model.Order; +import com.equinix.sdk.fabricv4.model.PlatformChangelog; +import com.equinix.sdk.fabricv4.model.Project; +import com.equinix.sdk.fabricv4.model.PublicPeeringConnectionResponse; +import com.equinix.sdk.fabricv4.model.RoutingProtocolResponse; +import com.equinix.sdk.fabricv4.model.SimplifiedAccount; +import com.equinix.sdk.fabricv4.model.SimplifiedLocation; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * ExchangeServiceResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class ExchangeServiceResponse { + public static final String SERIALIZED_NAME_HREF = "href"; + @SerializedName(SERIALIZED_NAME_HREF) + @javax.annotation.Nullable + private String href; + + public static final String SERIALIZED_NAME_UUID = "uuid"; + @SerializedName(SERIALIZED_NAME_UUID) + @javax.annotation.Nullable + private UUID uuid; + + /** + * Internet Exchange Service Type + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + IX("IX"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nullable + private TypeEnum type = TypeEnum.IX; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable + private String name; + + public static final String SERIALIZED_NAME_BANDWIDTH = "bandwidth"; + @SerializedName(SERIALIZED_NAME_BANDWIDTH) + @javax.annotation.Nullable + private Integer bandwidth; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable + private String description; + + /** + * State + */ + @JsonAdapter(StateEnum.Adapter.class) + public enum StateEnum { + PROVISIONING("PROVISIONING"), + + PROVISIONING_FAILED("PROVISIONING_FAILED"), + + PENDING_ACTIVATION("PENDING_ACTIVATION"), + + ACTIVATING("ACTIVATING"), + + ACTIVATING_FAILED("ACTIVATING_FAILED"), + + PROVISIONED("PROVISIONED"), + + REPROVISIONING("REPROVISIONING"), + + REPROVISIONING_FAILED("REPROVISIONING_FAILED"), + + DEPROVISIONING("DEPROVISIONING"), + + DEPROVISIONED("DEPROVISIONED"), + + DEPROVISIONING_FAILED("DEPROVISIONING_FAILED"); + + private String value; + + StateEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static StateEnum fromValue(String value) { + for (StateEnum b : StateEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final StateEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public StateEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return StateEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + StateEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_STATE = "state"; + @SerializedName(SERIALIZED_NAME_STATE) + @javax.annotation.Nullable + private StateEnum state; + + public static final String SERIALIZED_NAME_LOCATION = "location"; + @SerializedName(SERIALIZED_NAME_LOCATION) + @javax.annotation.Nullable + private SimplifiedLocation location; + + public static final String SERIALIZED_NAME_PUBLIC_PEERING_CONNECTION = "publicPeeringConnection"; + @SerializedName(SERIALIZED_NAME_PUBLIC_PEERING_CONNECTION) + @javax.annotation.Nullable + private PublicPeeringConnectionResponse publicPeeringConnection; + + public static final String SERIALIZED_NAME_ROUTING_PROTOCOL = "routingProtocol"; + @SerializedName(SERIALIZED_NAME_ROUTING_PROTOCOL) + @javax.annotation.Nullable + private RoutingProtocolResponse routingProtocol; + + public static final String SERIALIZED_NAME_ORDER = "order"; + @SerializedName(SERIALIZED_NAME_ORDER) + @javax.annotation.Nullable + private Order order; + + public static final String SERIALIZED_NAME_PROJECT = "project"; + @SerializedName(SERIALIZED_NAME_PROJECT) + @javax.annotation.Nullable + private Project project; + + public static final String SERIALIZED_NAME_ACCOUNT = "account"; + @SerializedName(SERIALIZED_NAME_ACCOUNT) + @javax.annotation.Nullable + private SimplifiedAccount account; + + public static final String SERIALIZED_NAME_NOTIFICATIONS = "notifications"; + @SerializedName(SERIALIZED_NAME_NOTIFICATIONS) + @javax.annotation.Nullable + private List notifications = new ArrayList<>(); + + public static final String SERIALIZED_NAME_CHANGELOG = "changelog"; + @SerializedName(SERIALIZED_NAME_CHANGELOG) + @javax.annotation.Nullable + private PlatformChangelog changelog; + + public ExchangeServiceResponse() { + } + + public ExchangeServiceResponse href(@javax.annotation.Nullable String href) { + this.href = href; + return this; + } + + /** + * Internet Exchange Service URI + * @return href + */ + @javax.annotation.Nullable + public String getHref() { + return href; + } + + public void setHref(@javax.annotation.Nullable String href) { + this.href = href; + } + + + public ExchangeServiceResponse uuid(@javax.annotation.Nullable UUID uuid) { + this.uuid = uuid; + return this; + } + + /** + * Internet Exchange Service identifier + * @return uuid + */ + @javax.annotation.Nullable + public UUID getUuid() { + return uuid; + } + + public void setUuid(@javax.annotation.Nullable UUID uuid) { + this.uuid = uuid; + } + + + public ExchangeServiceResponse type(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + return this; + } + + /** + * Internet Exchange Service Type + * @return type + */ + @javax.annotation.Nullable + public TypeEnum getType() { + return type; + } + + public void setType(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + } + + + public ExchangeServiceResponse name(@javax.annotation.Nullable String name) { + this.name = name; + return this; + } + + /** + * Name + * @return name + */ + @javax.annotation.Nullable + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nullable String name) { + this.name = name; + } + + + public ExchangeServiceResponse bandwidth(@javax.annotation.Nullable Integer bandwidth) { + this.bandwidth = bandwidth; + return this; + } + + /** + * bandwidth in Mbps + * @return bandwidth + */ + @javax.annotation.Nullable + public Integer getBandwidth() { + return bandwidth; + } + + public void setBandwidth(@javax.annotation.Nullable Integer bandwidth) { + this.bandwidth = bandwidth; + } + + + public ExchangeServiceResponse description(@javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * Description + * @return description + */ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + + + public ExchangeServiceResponse state(@javax.annotation.Nullable StateEnum state) { + this.state = state; + return this; + } + + /** + * State + * @return state + */ + @javax.annotation.Nullable + public StateEnum getState() { + return state; + } + + public void setState(@javax.annotation.Nullable StateEnum state) { + this.state = state; + } + + + public ExchangeServiceResponse location(@javax.annotation.Nullable SimplifiedLocation location) { + this.location = location; + return this; + } + + /** + * Get location + * @return location + */ + @javax.annotation.Nullable + public SimplifiedLocation getLocation() { + return location; + } + + public void setLocation(@javax.annotation.Nullable SimplifiedLocation location) { + this.location = location; + } + + + public ExchangeServiceResponse publicPeeringConnection(@javax.annotation.Nullable PublicPeeringConnectionResponse publicPeeringConnection) { + this.publicPeeringConnection = publicPeeringConnection; + return this; + } + + /** + * Get publicPeeringConnection + * @return publicPeeringConnection + */ + @javax.annotation.Nullable + public PublicPeeringConnectionResponse getPublicPeeringConnection() { + return publicPeeringConnection; + } + + public void setPublicPeeringConnection(@javax.annotation.Nullable PublicPeeringConnectionResponse publicPeeringConnection) { + this.publicPeeringConnection = publicPeeringConnection; + } + + + public ExchangeServiceResponse routingProtocol(@javax.annotation.Nullable RoutingProtocolResponse routingProtocol) { + this.routingProtocol = routingProtocol; + return this; + } + + /** + * Get routingProtocol + * @return routingProtocol + */ + @javax.annotation.Nullable + public RoutingProtocolResponse getRoutingProtocol() { + return routingProtocol; + } + + public void setRoutingProtocol(@javax.annotation.Nullable RoutingProtocolResponse routingProtocol) { + this.routingProtocol = routingProtocol; + } + + + public ExchangeServiceResponse order(@javax.annotation.Nullable Order order) { + this.order = order; + return this; + } + + /** + * Get order + * @return order + */ + @javax.annotation.Nullable + public Order getOrder() { + return order; + } + + public void setOrder(@javax.annotation.Nullable Order order) { + this.order = order; + } + + + public ExchangeServiceResponse project(@javax.annotation.Nullable Project project) { + this.project = project; + return this; + } + + /** + * Get project + * @return project + */ + @javax.annotation.Nullable + public Project getProject() { + return project; + } + + public void setProject(@javax.annotation.Nullable Project project) { + this.project = project; + } + + + public ExchangeServiceResponse account(@javax.annotation.Nullable SimplifiedAccount account) { + this.account = account; + return this; + } + + /** + * Get account + * @return account + */ + @javax.annotation.Nullable + public SimplifiedAccount getAccount() { + return account; + } + + public void setAccount(@javax.annotation.Nullable SimplifiedAccount account) { + this.account = account; + } + + + public ExchangeServiceResponse notifications(@javax.annotation.Nullable List notifications) { + this.notifications = notifications; + return this; + } + + public ExchangeServiceResponse addNotificationsItem(ExchangeServiceNotification notificationsItem) { + if (this.notifications == null) { + this.notifications = new ArrayList<>(); + } + this.notifications.add(notificationsItem); + return this; + } + + /** + * Preferences for notifications on Internet Exchange Service configuration or status changes + * @return notifications + */ + @javax.annotation.Nullable + public List getNotifications() { + return notifications; + } + + public void setNotifications(@javax.annotation.Nullable List notifications) { + this.notifications = notifications; + } + + + public ExchangeServiceResponse changelog(@javax.annotation.Nullable PlatformChangelog changelog) { + this.changelog = changelog; + return this; + } + + /** + * Get changelog + * @return changelog + */ + @javax.annotation.Nullable + public PlatformChangelog getChangelog() { + return changelog; + } + + public void setChangelog(@javax.annotation.Nullable PlatformChangelog changelog) { + this.changelog = changelog; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ExchangeServiceResponse instance itself + */ + public ExchangeServiceResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExchangeServiceResponse exchangeServiceResponse = (ExchangeServiceResponse) o; + return Objects.equals(this.href, exchangeServiceResponse.href) && + Objects.equals(this.uuid, exchangeServiceResponse.uuid) && + Objects.equals(this.type, exchangeServiceResponse.type) && + Objects.equals(this.name, exchangeServiceResponse.name) && + Objects.equals(this.bandwidth, exchangeServiceResponse.bandwidth) && + Objects.equals(this.description, exchangeServiceResponse.description) && + Objects.equals(this.state, exchangeServiceResponse.state) && + Objects.equals(this.location, exchangeServiceResponse.location) && + Objects.equals(this.publicPeeringConnection, exchangeServiceResponse.publicPeeringConnection) && + Objects.equals(this.routingProtocol, exchangeServiceResponse.routingProtocol) && + Objects.equals(this.order, exchangeServiceResponse.order) && + Objects.equals(this.project, exchangeServiceResponse.project) && + Objects.equals(this.account, exchangeServiceResponse.account) && + Objects.equals(this.notifications, exchangeServiceResponse.notifications) && + Objects.equals(this.changelog, exchangeServiceResponse.changelog)&& + Objects.equals(this.additionalProperties, exchangeServiceResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(href, uuid, type, name, bandwidth, description, state, location, publicPeeringConnection, routingProtocol, order, project, account, notifications, changelog, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExchangeServiceResponse {\n"); + sb.append(" href: ").append(toIndentedString(href)).append("\n"); + sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" bandwidth: ").append(toIndentedString(bandwidth)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" state: ").append(toIndentedString(state)).append("\n"); + sb.append(" location: ").append(toIndentedString(location)).append("\n"); + sb.append(" publicPeeringConnection: ").append(toIndentedString(publicPeeringConnection)).append("\n"); + sb.append(" routingProtocol: ").append(toIndentedString(routingProtocol)).append("\n"); + sb.append(" order: ").append(toIndentedString(order)).append("\n"); + sb.append(" project: ").append(toIndentedString(project)).append("\n"); + sb.append(" account: ").append(toIndentedString(account)).append("\n"); + sb.append(" notifications: ").append(toIndentedString(notifications)).append("\n"); + sb.append(" changelog: ").append(toIndentedString(changelog)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("href", "uuid", "type", "name", "bandwidth", "description", "state", "location", "publicPeeringConnection", "routingProtocol", "order", "project", "account", "notifications", "changelog")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ExchangeServiceResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ExchangeServiceResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in ExchangeServiceResponse is not found in the empty JSON string", ExchangeServiceResponse.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("href") != null && !jsonObj.get("href").isJsonNull()) && !jsonObj.get("href").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `href` to be a primitive type in the JSON string but got `%s`", jsonObj.get("href").toString())); + } + if ((jsonObj.get("uuid") != null && !jsonObj.get("uuid").isJsonNull()) && !jsonObj.get("uuid").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `uuid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("uuid").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // validate the optional field `type` + if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { + TypeEnum.validateJsonElement(jsonObj.get("type")); + } + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + } + if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); + } + // validate the optional field `state` + if (jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) { + StateEnum.validateJsonElement(jsonObj.get("state")); + } + // validate the optional field `location` + if (jsonObj.get("location") != null && !jsonObj.get("location").isJsonNull()) { + SimplifiedLocation.validateJsonElement(jsonObj.get("location")); + } + // validate the optional field `publicPeeringConnection` + if (jsonObj.get("publicPeeringConnection") != null && !jsonObj.get("publicPeeringConnection").isJsonNull()) { + PublicPeeringConnectionResponse.validateJsonElement(jsonObj.get("publicPeeringConnection")); + } + // validate the optional field `routingProtocol` + if (jsonObj.get("routingProtocol") != null && !jsonObj.get("routingProtocol").isJsonNull()) { + RoutingProtocolResponse.validateJsonElement(jsonObj.get("routingProtocol")); + } + // validate the optional field `order` + if (jsonObj.get("order") != null && !jsonObj.get("order").isJsonNull()) { + Order.validateJsonElement(jsonObj.get("order")); + } + // validate the optional field `project` + if (jsonObj.get("project") != null && !jsonObj.get("project").isJsonNull()) { + Project.validateJsonElement(jsonObj.get("project")); + } + // validate the optional field `account` + if (jsonObj.get("account") != null && !jsonObj.get("account").isJsonNull()) { + SimplifiedAccount.validateJsonElement(jsonObj.get("account")); + } + if (jsonObj.get("notifications") != null && !jsonObj.get("notifications").isJsonNull()) { + JsonArray jsonArraynotifications = jsonObj.getAsJsonArray("notifications"); + if (jsonArraynotifications != null) { + // ensure the json data is an array + if (!jsonObj.get("notifications").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `notifications` to be an array in the JSON string but got `%s`", jsonObj.get("notifications").toString())); + } + + // validate the optional field `notifications` (array) + for (int i = 0; i < jsonArraynotifications.size(); i++) { + ExchangeServiceNotification.validateJsonElement(jsonArraynotifications.get(i)); + }; + } + } + // validate the optional field `changelog` + if (jsonObj.get("changelog") != null && !jsonObj.get("changelog").isJsonNull()) { + PlatformChangelog.validateJsonElement(jsonObj.get("changelog")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ExchangeServiceResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ExchangeServiceResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ExchangeServiceResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ExchangeServiceResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ExchangeServiceResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ExchangeServiceResponse instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ExchangeServiceResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of ExchangeServiceResponse + * @throws IOException if the JSON string is invalid with respect to ExchangeServiceResponse + */ + public static ExchangeServiceResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ExchangeServiceResponse.class); + } + + /** + * Convert an instance of ExchangeServiceResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ExchangeServiceResponseBgp.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ExchangeServiceResponseBgp.java new file mode 100644 index 00000000..fc0b6fbf --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ExchangeServiceResponseBgp.java @@ -0,0 +1,578 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * ExchangeServiceResponseBgp + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class ExchangeServiceResponseBgp { + public static final String SERIALIZED_NAME_CUSTOMER_PEER_IP = "customerPeerIp"; + @SerializedName(SERIALIZED_NAME_CUSTOMER_PEER_IP) + @javax.annotation.Nullable + private String customerPeerIp; + + public static final String SERIALIZED_NAME_DOMAIN_NAME = "domainName"; + @SerializedName(SERIALIZED_NAME_DOMAIN_NAME) + @javax.annotation.Nullable + private String domainName; + + public static final String SERIALIZED_NAME_PRIMARY_ROUTE_SERVER_IP = "primaryRouteServerIp"; + @SerializedName(SERIALIZED_NAME_PRIMARY_ROUTE_SERVER_IP) + @javax.annotation.Nullable + private String primaryRouteServerIp; + + public static final String SERIALIZED_NAME_SECONDARY_ROUTE_SERVER_IP = "secondaryRouteServerIp"; + @SerializedName(SERIALIZED_NAME_SECONDARY_ROUTE_SERVER_IP) + @javax.annotation.Nullable + private String secondaryRouteServerIp; + + public static final String SERIALIZED_NAME_AS_SET = "asSet"; + @SerializedName(SERIALIZED_NAME_AS_SET) + @javax.annotation.Nullable + private String asSet; + + public static final String SERIALIZED_NAME_MLPE_ENABLED = "mlpeEnabled"; + @SerializedName(SERIALIZED_NAME_MLPE_ENABLED) + @javax.annotation.Nullable + private Boolean mlpeEnabled; + + public static final String SERIALIZED_NAME_MD5_AUTH_KEY = "md5AuthKey"; + @SerializedName(SERIALIZED_NAME_MD5_AUTH_KEY) + @javax.annotation.Nullable + private String md5AuthKey; + + public static final String SERIALIZED_NAME_RC_MD5_AUTH_KEY = "rcMd5AuthKey"; + @SerializedName(SERIALIZED_NAME_RC_MD5_AUTH_KEY) + @javax.annotation.Nullable + private String rcMd5AuthKey; + + public static final String SERIALIZED_NAME_PREFIXES = "prefixes"; + @SerializedName(SERIALIZED_NAME_PREFIXES) + @javax.annotation.Nullable + private List prefixes = new ArrayList<>(); + + public static final String SERIALIZED_NAME_MAX_PREFIX_LIMIT = "maxPrefixLimit"; + @SerializedName(SERIALIZED_NAME_MAX_PREFIX_LIMIT) + @javax.annotation.Nullable + private Long maxPrefixLimit; + + public static final String SERIALIZED_NAME_PREPEND_SELF_ENABLED = "prependSelfEnabled"; + @SerializedName(SERIALIZED_NAME_PREPEND_SELF_ENABLED) + @javax.annotation.Nullable + private Boolean prependSelfEnabled; + + public ExchangeServiceResponseBgp() { + } + + public ExchangeServiceResponseBgp customerPeerIp(@javax.annotation.Nullable String customerPeerIp) { + this.customerPeerIp = customerPeerIp; + return this; + } + + /** + * Get customerPeerIp + * @return customerPeerIp + */ + @javax.annotation.Nullable + public String getCustomerPeerIp() { + return customerPeerIp; + } + + public void setCustomerPeerIp(@javax.annotation.Nullable String customerPeerIp) { + this.customerPeerIp = customerPeerIp; + } + + + public ExchangeServiceResponseBgp domainName(@javax.annotation.Nullable String domainName) { + this.domainName = domainName; + return this; + } + + /** + * Get domainName + * @return domainName + */ + @javax.annotation.Nullable + public String getDomainName() { + return domainName; + } + + public void setDomainName(@javax.annotation.Nullable String domainName) { + this.domainName = domainName; + } + + + public ExchangeServiceResponseBgp primaryRouteServerIp(@javax.annotation.Nullable String primaryRouteServerIp) { + this.primaryRouteServerIp = primaryRouteServerIp; + return this; + } + + /** + * Get primaryRouteServerIp + * @return primaryRouteServerIp + */ + @javax.annotation.Nullable + public String getPrimaryRouteServerIp() { + return primaryRouteServerIp; + } + + public void setPrimaryRouteServerIp(@javax.annotation.Nullable String primaryRouteServerIp) { + this.primaryRouteServerIp = primaryRouteServerIp; + } + + + public ExchangeServiceResponseBgp secondaryRouteServerIp(@javax.annotation.Nullable String secondaryRouteServerIp) { + this.secondaryRouteServerIp = secondaryRouteServerIp; + return this; + } + + /** + * Get secondaryRouteServerIp + * @return secondaryRouteServerIp + */ + @javax.annotation.Nullable + public String getSecondaryRouteServerIp() { + return secondaryRouteServerIp; + } + + public void setSecondaryRouteServerIp(@javax.annotation.Nullable String secondaryRouteServerIp) { + this.secondaryRouteServerIp = secondaryRouteServerIp; + } + + + public ExchangeServiceResponseBgp asSet(@javax.annotation.Nullable String asSet) { + this.asSet = asSet; + return this; + } + + /** + * Get asSet + * @return asSet + */ + @javax.annotation.Nullable + public String getAsSet() { + return asSet; + } + + public void setAsSet(@javax.annotation.Nullable String asSet) { + this.asSet = asSet; + } + + + public ExchangeServiceResponseBgp mlpeEnabled(@javax.annotation.Nullable Boolean mlpeEnabled) { + this.mlpeEnabled = mlpeEnabled; + return this; + } + + /** + * Get mlpeEnabled + * @return mlpeEnabled + */ + @javax.annotation.Nullable + public Boolean getMlpeEnabled() { + return mlpeEnabled; + } + + public void setMlpeEnabled(@javax.annotation.Nullable Boolean mlpeEnabled) { + this.mlpeEnabled = mlpeEnabled; + } + + + public ExchangeServiceResponseBgp md5AuthKey(@javax.annotation.Nullable String md5AuthKey) { + this.md5AuthKey = md5AuthKey; + return this; + } + + /** + * Get md5AuthKey + * @return md5AuthKey + */ + @javax.annotation.Nullable + public String getMd5AuthKey() { + return md5AuthKey; + } + + public void setMd5AuthKey(@javax.annotation.Nullable String md5AuthKey) { + this.md5AuthKey = md5AuthKey; + } + + + public ExchangeServiceResponseBgp rcMd5AuthKey(@javax.annotation.Nullable String rcMd5AuthKey) { + this.rcMd5AuthKey = rcMd5AuthKey; + return this; + } + + /** + * Get rcMd5AuthKey + * @return rcMd5AuthKey + */ + @javax.annotation.Nullable + public String getRcMd5AuthKey() { + return rcMd5AuthKey; + } + + public void setRcMd5AuthKey(@javax.annotation.Nullable String rcMd5AuthKey) { + this.rcMd5AuthKey = rcMd5AuthKey; + } + + + public ExchangeServiceResponseBgp prefixes(@javax.annotation.Nullable List prefixes) { + this.prefixes = prefixes; + return this; + } + + public ExchangeServiceResponseBgp addPrefixesItem(String prefixesItem) { + if (this.prefixes == null) { + this.prefixes = new ArrayList<>(); + } + this.prefixes.add(prefixesItem); + return this; + } + + /** + * List of IP prefix + * @return prefixes + */ + @javax.annotation.Nullable + public List getPrefixes() { + return prefixes; + } + + public void setPrefixes(@javax.annotation.Nullable List prefixes) { + this.prefixes = prefixes; + } + + + public ExchangeServiceResponseBgp maxPrefixLimit(@javax.annotation.Nullable Long maxPrefixLimit) { + this.maxPrefixLimit = maxPrefixLimit; + return this; + } + + /** + * Get maxPrefixLimit + * @return maxPrefixLimit + */ + @javax.annotation.Nullable + public Long getMaxPrefixLimit() { + return maxPrefixLimit; + } + + public void setMaxPrefixLimit(@javax.annotation.Nullable Long maxPrefixLimit) { + this.maxPrefixLimit = maxPrefixLimit; + } + + + public ExchangeServiceResponseBgp prependSelfEnabled(@javax.annotation.Nullable Boolean prependSelfEnabled) { + this.prependSelfEnabled = prependSelfEnabled; + return this; + } + + /** + * Get prependSelfEnabled + * @return prependSelfEnabled + */ + @javax.annotation.Nullable + public Boolean getPrependSelfEnabled() { + return prependSelfEnabled; + } + + public void setPrependSelfEnabled(@javax.annotation.Nullable Boolean prependSelfEnabled) { + this.prependSelfEnabled = prependSelfEnabled; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ExchangeServiceResponseBgp instance itself + */ + public ExchangeServiceResponseBgp putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExchangeServiceResponseBgp exchangeServiceResponseBgp = (ExchangeServiceResponseBgp) o; + return Objects.equals(this.customerPeerIp, exchangeServiceResponseBgp.customerPeerIp) && + Objects.equals(this.domainName, exchangeServiceResponseBgp.domainName) && + Objects.equals(this.primaryRouteServerIp, exchangeServiceResponseBgp.primaryRouteServerIp) && + Objects.equals(this.secondaryRouteServerIp, exchangeServiceResponseBgp.secondaryRouteServerIp) && + Objects.equals(this.asSet, exchangeServiceResponseBgp.asSet) && + Objects.equals(this.mlpeEnabled, exchangeServiceResponseBgp.mlpeEnabled) && + Objects.equals(this.md5AuthKey, exchangeServiceResponseBgp.md5AuthKey) && + Objects.equals(this.rcMd5AuthKey, exchangeServiceResponseBgp.rcMd5AuthKey) && + Objects.equals(this.prefixes, exchangeServiceResponseBgp.prefixes) && + Objects.equals(this.maxPrefixLimit, exchangeServiceResponseBgp.maxPrefixLimit) && + Objects.equals(this.prependSelfEnabled, exchangeServiceResponseBgp.prependSelfEnabled)&& + Objects.equals(this.additionalProperties, exchangeServiceResponseBgp.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(customerPeerIp, domainName, primaryRouteServerIp, secondaryRouteServerIp, asSet, mlpeEnabled, md5AuthKey, rcMd5AuthKey, prefixes, maxPrefixLimit, prependSelfEnabled, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExchangeServiceResponseBgp {\n"); + sb.append(" customerPeerIp: ").append(toIndentedString(customerPeerIp)).append("\n"); + sb.append(" domainName: ").append(toIndentedString(domainName)).append("\n"); + sb.append(" primaryRouteServerIp: ").append(toIndentedString(primaryRouteServerIp)).append("\n"); + sb.append(" secondaryRouteServerIp: ").append(toIndentedString(secondaryRouteServerIp)).append("\n"); + sb.append(" asSet: ").append(toIndentedString(asSet)).append("\n"); + sb.append(" mlpeEnabled: ").append(toIndentedString(mlpeEnabled)).append("\n"); + sb.append(" md5AuthKey: ").append(toIndentedString(md5AuthKey)).append("\n"); + sb.append(" rcMd5AuthKey: ").append(toIndentedString(rcMd5AuthKey)).append("\n"); + sb.append(" prefixes: ").append(toIndentedString(prefixes)).append("\n"); + sb.append(" maxPrefixLimit: ").append(toIndentedString(maxPrefixLimit)).append("\n"); + sb.append(" prependSelfEnabled: ").append(toIndentedString(prependSelfEnabled)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("customerPeerIp", "domainName", "primaryRouteServerIp", "secondaryRouteServerIp", "asSet", "mlpeEnabled", "md5AuthKey", "rcMd5AuthKey", "prefixes", "maxPrefixLimit", "prependSelfEnabled")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ExchangeServiceResponseBgp + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ExchangeServiceResponseBgp.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in ExchangeServiceResponseBgp is not found in the empty JSON string", ExchangeServiceResponseBgp.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("customerPeerIp") != null && !jsonObj.get("customerPeerIp").isJsonNull()) && !jsonObj.get("customerPeerIp").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `customerPeerIp` to be a primitive type in the JSON string but got `%s`", jsonObj.get("customerPeerIp").toString())); + } + if ((jsonObj.get("domainName") != null && !jsonObj.get("domainName").isJsonNull()) && !jsonObj.get("domainName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `domainName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("domainName").toString())); + } + if ((jsonObj.get("primaryRouteServerIp") != null && !jsonObj.get("primaryRouteServerIp").isJsonNull()) && !jsonObj.get("primaryRouteServerIp").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `primaryRouteServerIp` to be a primitive type in the JSON string but got `%s`", jsonObj.get("primaryRouteServerIp").toString())); + } + if ((jsonObj.get("secondaryRouteServerIp") != null && !jsonObj.get("secondaryRouteServerIp").isJsonNull()) && !jsonObj.get("secondaryRouteServerIp").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `secondaryRouteServerIp` to be a primitive type in the JSON string but got `%s`", jsonObj.get("secondaryRouteServerIp").toString())); + } + if ((jsonObj.get("asSet") != null && !jsonObj.get("asSet").isJsonNull()) && !jsonObj.get("asSet").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `asSet` to be a primitive type in the JSON string but got `%s`", jsonObj.get("asSet").toString())); + } + if ((jsonObj.get("md5AuthKey") != null && !jsonObj.get("md5AuthKey").isJsonNull()) && !jsonObj.get("md5AuthKey").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `md5AuthKey` to be a primitive type in the JSON string but got `%s`", jsonObj.get("md5AuthKey").toString())); + } + if ((jsonObj.get("rcMd5AuthKey") != null && !jsonObj.get("rcMd5AuthKey").isJsonNull()) && !jsonObj.get("rcMd5AuthKey").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `rcMd5AuthKey` to be a primitive type in the JSON string but got `%s`", jsonObj.get("rcMd5AuthKey").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("prefixes") != null && !jsonObj.get("prefixes").isJsonNull() && !jsonObj.get("prefixes").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `prefixes` to be an array in the JSON string but got `%s`", jsonObj.get("prefixes").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ExchangeServiceResponseBgp.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ExchangeServiceResponseBgp' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ExchangeServiceResponseBgp.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ExchangeServiceResponseBgp value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ExchangeServiceResponseBgp read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ExchangeServiceResponseBgp instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ExchangeServiceResponseBgp given an JSON string + * + * @param jsonString JSON string + * @return An instance of ExchangeServiceResponseBgp + * @throws IOException if the JSON string is invalid with respect to ExchangeServiceResponseBgp + */ + public static ExchangeServiceResponseBgp fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ExchangeServiceResponseBgp.class); + } + + /** + * Convert an instance of ExchangeServiceResponseBgp to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ExchangeServiceSearchExpression.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ExchangeServiceSearchExpression.java new file mode 100644 index 00000000..5a1e6210 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ExchangeServiceSearchExpression.java @@ -0,0 +1,322 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.ExchangeServiceAndExpression; +import com.equinix.sdk.fabricv4.model.ExchangeServiceOrExpression; +import com.equinix.sdk.fabricv4.model.ExchangeServicePropertyExpression; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + + + +import java.io.IOException; +import java.lang.reflect.Type; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Locale; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.JsonPrimitive; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonSerializationContext; +import com.google.gson.JsonSerializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonArray; +import com.google.gson.JsonParseException; + +import com.equinix.sdk.fabricv4.JSON; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class ExchangeServiceSearchExpression extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(ExchangeServiceSearchExpression.class.getName()); + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ExchangeServiceSearchExpression.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ExchangeServiceSearchExpression' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter adapterExchangeServiceAndExpression = gson.getDelegateAdapter(this, TypeToken.get(ExchangeServiceAndExpression.class)); + final TypeAdapter adapterExchangeServiceOrExpression = gson.getDelegateAdapter(this, TypeToken.get(ExchangeServiceOrExpression.class)); + final TypeAdapter adapterExchangeServicePropertyExpression = gson.getDelegateAdapter(this, TypeToken.get(ExchangeServicePropertyExpression.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ExchangeServiceSearchExpression value) throws IOException { + if (value == null || value.getActualInstance() == null) { + elementAdapter.write(out, null); + return; + } + + // check if the actual instance is of the type `ExchangeServiceAndExpression` + if (value.getActualInstance() instanceof ExchangeServiceAndExpression) { + JsonElement element = adapterExchangeServiceAndExpression.toJsonTree((ExchangeServiceAndExpression)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + // check if the actual instance is of the type `ExchangeServiceOrExpression` + if (value.getActualInstance() instanceof ExchangeServiceOrExpression) { + JsonElement element = adapterExchangeServiceOrExpression.toJsonTree((ExchangeServiceOrExpression)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + // check if the actual instance is of the type `ExchangeServicePropertyExpression` + if (value.getActualInstance() instanceof ExchangeServicePropertyExpression) { + JsonElement element = adapterExchangeServicePropertyExpression.toJsonTree((ExchangeServicePropertyExpression)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + throw new IOException("Failed to serialize as the type doesn't match oneOf schemas: ExchangeServiceAndExpression, ExchangeServiceOrExpression, ExchangeServicePropertyExpression"); + } + + @Override + public ExchangeServiceSearchExpression read(JsonReader in) throws IOException { + Object deserialized = null; + JsonElement jsonElement = elementAdapter.read(in); + + int match = 0; + ArrayList errorMessages = new ArrayList<>(); + TypeAdapter actualAdapter = elementAdapter; + + // deserialize ExchangeServiceAndExpression + try { + // validate the JSON object to see if any exception is thrown + ExchangeServiceAndExpression.validateJsonElement(jsonElement); + actualAdapter = adapterExchangeServiceAndExpression; + match++; + log.log(Level.FINER, "Input data matches schema 'ExchangeServiceAndExpression'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format(Locale.ROOT, "Deserialization for ExchangeServiceAndExpression failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'ExchangeServiceAndExpression'", e); + } + // deserialize ExchangeServiceOrExpression + try { + // validate the JSON object to see if any exception is thrown + ExchangeServiceOrExpression.validateJsonElement(jsonElement); + actualAdapter = adapterExchangeServiceOrExpression; + match++; + log.log(Level.FINER, "Input data matches schema 'ExchangeServiceOrExpression'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format(Locale.ROOT, "Deserialization for ExchangeServiceOrExpression failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'ExchangeServiceOrExpression'", e); + } + // deserialize ExchangeServicePropertyExpression + try { + // validate the JSON object to see if any exception is thrown + ExchangeServicePropertyExpression.validateJsonElement(jsonElement); + actualAdapter = adapterExchangeServicePropertyExpression; + match++; + log.log(Level.FINER, "Input data matches schema 'ExchangeServicePropertyExpression'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format(Locale.ROOT, "Deserialization for ExchangeServicePropertyExpression failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'ExchangeServicePropertyExpression'", e); + } + + if (match == 1) { + ExchangeServiceSearchExpression ret = new ExchangeServiceSearchExpression(); + ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); + return ret; + } + + throw new IOException(String.format(Locale.ROOT, "Failed deserialization for ExchangeServiceSearchExpression: %d classes match result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", match, errorMessages, jsonElement.toString())); + } + }.nullSafe(); + } + } + + // store a list of schema names defined in oneOf + public static final Map> schemas = new HashMap>(); + + public ExchangeServiceSearchExpression() { + super("oneOf", Boolean.FALSE); + } + + public ExchangeServiceSearchExpression(Object o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("ExchangeServiceAndExpression", ExchangeServiceAndExpression.class); + schemas.put("ExchangeServiceOrExpression", ExchangeServiceOrExpression.class); + schemas.put("ExchangeServicePropertyExpression", ExchangeServicePropertyExpression.class); + } + + @Override + public Map> getSchemas() { + return ExchangeServiceSearchExpression.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check + * the instance parameter is valid against the oneOf child schemas: + * ExchangeServiceAndExpression, ExchangeServiceOrExpression, ExchangeServicePropertyExpression + * + * It could be an instance of the 'oneOf' schemas. + */ + @Override + public void setActualInstance(Object instance) { + if (instance instanceof ExchangeServiceAndExpression) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof ExchangeServiceOrExpression) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof ExchangeServicePropertyExpression) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException("Invalid instance type. Must be ExchangeServiceAndExpression, ExchangeServiceOrExpression, ExchangeServicePropertyExpression"); + } + + /** + * Get the actual instance, which can be the following: + * ExchangeServiceAndExpression, ExchangeServiceOrExpression, ExchangeServicePropertyExpression + * + * @return The actual instance (ExchangeServiceAndExpression, ExchangeServiceOrExpression, ExchangeServicePropertyExpression) + */ + @SuppressWarnings("unchecked") + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `ExchangeServiceAndExpression`. If the actual instance is not `ExchangeServiceAndExpression`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `ExchangeServiceAndExpression` + * @throws ClassCastException if the instance is not `ExchangeServiceAndExpression` + */ + public ExchangeServiceAndExpression getExchangeServiceAndExpression() throws ClassCastException { + return (ExchangeServiceAndExpression)super.getActualInstance(); + } + + /** + * Get the actual instance of `ExchangeServiceOrExpression`. If the actual instance is not `ExchangeServiceOrExpression`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `ExchangeServiceOrExpression` + * @throws ClassCastException if the instance is not `ExchangeServiceOrExpression` + */ + public ExchangeServiceOrExpression getExchangeServiceOrExpression() throws ClassCastException { + return (ExchangeServiceOrExpression)super.getActualInstance(); + } + + /** + * Get the actual instance of `ExchangeServicePropertyExpression`. If the actual instance is not `ExchangeServicePropertyExpression`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `ExchangeServicePropertyExpression` + * @throws ClassCastException if the instance is not `ExchangeServicePropertyExpression` + */ + public ExchangeServicePropertyExpression getExchangeServicePropertyExpression() throws ClassCastException { + return (ExchangeServicePropertyExpression)super.getActualInstance(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ExchangeServiceSearchExpression + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + // validate oneOf schemas one by one + int validCount = 0; + ArrayList errorMessages = new ArrayList<>(); + // validate the json string with ExchangeServiceAndExpression + try { + ExchangeServiceAndExpression.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add(String.format(Locale.ROOT, "Deserialization for ExchangeServiceAndExpression failed with `%s`.", e.getMessage())); + // continue to the next one + } + // validate the json string with ExchangeServiceOrExpression + try { + ExchangeServiceOrExpression.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add(String.format(Locale.ROOT, "Deserialization for ExchangeServiceOrExpression failed with `%s`.", e.getMessage())); + // continue to the next one + } + // validate the json string with ExchangeServicePropertyExpression + try { + ExchangeServicePropertyExpression.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add(String.format(Locale.ROOT, "Deserialization for ExchangeServicePropertyExpression failed with `%s`.", e.getMessage())); + // continue to the next one + } + if (validCount != 1) { + throw new IOException(String.format(Locale.ROOT, "The JSON string is invalid for ExchangeServiceSearchExpression with oneOf schemas: ExchangeServiceAndExpression, ExchangeServiceOrExpression, ExchangeServicePropertyExpression. %d class(es) match the result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", validCount, errorMessages, jsonElement.toString())); + } + } + + /** + * Create an instance of ExchangeServiceSearchExpression given an JSON string + * + * @param jsonString JSON string + * @return An instance of ExchangeServiceSearchExpression + * @throws IOException if the JSON string is invalid with respect to ExchangeServiceSearchExpression + */ + public static ExchangeServiceSearchExpression fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ExchangeServiceSearchExpression.class); + } + + /** + * Convert an instance of ExchangeServiceSearchExpression to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ExchangeServiceSearchRequest.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ExchangeServiceSearchRequest.java new file mode 100644 index 00000000..9fb1a9c3 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ExchangeServiceSearchRequest.java @@ -0,0 +1,370 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.ExchangeServiceSearchExpression; +import com.equinix.sdk.fabricv4.model.ExchangeServiceSearchSortCriteria; +import com.equinix.sdk.fabricv4.model.PaginationRequest; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * Search requests containing criteria + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class ExchangeServiceSearchRequest { + public static final String SERIALIZED_NAME_FILTER = "filter"; + @SerializedName(SERIALIZED_NAME_FILTER) + @javax.annotation.Nullable + private ExchangeServiceSearchExpression filter; + + public static final String SERIALIZED_NAME_PAGINATION = "pagination"; + @SerializedName(SERIALIZED_NAME_PAGINATION) + @javax.annotation.Nullable + private PaginationRequest pagination; + + public static final String SERIALIZED_NAME_SORT = "sort"; + @SerializedName(SERIALIZED_NAME_SORT) + @javax.annotation.Nullable + private List sort = new ArrayList<>(); + + public ExchangeServiceSearchRequest() { + } + + public ExchangeServiceSearchRequest filter(@javax.annotation.Nullable ExchangeServiceSearchExpression filter) { + this.filter = filter; + return this; + } + + /** + * Get filter + * @return filter + */ + @javax.annotation.Nullable + public ExchangeServiceSearchExpression getFilter() { + return filter; + } + + public void setFilter(@javax.annotation.Nullable ExchangeServiceSearchExpression filter) { + this.filter = filter; + } + + + public ExchangeServiceSearchRequest pagination(@javax.annotation.Nullable PaginationRequest pagination) { + this.pagination = pagination; + return this; + } + + /** + * Get pagination + * @return pagination + */ + @javax.annotation.Nullable + public PaginationRequest getPagination() { + return pagination; + } + + public void setPagination(@javax.annotation.Nullable PaginationRequest pagination) { + this.pagination = pagination; + } + + + public ExchangeServiceSearchRequest sort(@javax.annotation.Nullable List sort) { + this.sort = sort; + return this; + } + + public ExchangeServiceSearchRequest addSortItem(ExchangeServiceSearchSortCriteria sortItem) { + if (this.sort == null) { + this.sort = new ArrayList<>(); + } + this.sort.add(sortItem); + return this; + } + + /** + * Get sort + * @return sort + */ + @javax.annotation.Nullable + public List getSort() { + return sort; + } + + public void setSort(@javax.annotation.Nullable List sort) { + this.sort = sort; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ExchangeServiceSearchRequest instance itself + */ + public ExchangeServiceSearchRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExchangeServiceSearchRequest exchangeServiceSearchRequest = (ExchangeServiceSearchRequest) o; + return Objects.equals(this.filter, exchangeServiceSearchRequest.filter) && + Objects.equals(this.pagination, exchangeServiceSearchRequest.pagination) && + Objects.equals(this.sort, exchangeServiceSearchRequest.sort)&& + Objects.equals(this.additionalProperties, exchangeServiceSearchRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(filter, pagination, sort, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExchangeServiceSearchRequest {\n"); + sb.append(" filter: ").append(toIndentedString(filter)).append("\n"); + sb.append(" pagination: ").append(toIndentedString(pagination)).append("\n"); + sb.append(" sort: ").append(toIndentedString(sort)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("filter", "pagination", "sort")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ExchangeServiceSearchRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ExchangeServiceSearchRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in ExchangeServiceSearchRequest is not found in the empty JSON string", ExchangeServiceSearchRequest.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `filter` + if (jsonObj.get("filter") != null && !jsonObj.get("filter").isJsonNull()) { + ExchangeServiceSearchExpression.validateJsonElement(jsonObj.get("filter")); + } + // validate the optional field `pagination` + if (jsonObj.get("pagination") != null && !jsonObj.get("pagination").isJsonNull()) { + PaginationRequest.validateJsonElement(jsonObj.get("pagination")); + } + if (jsonObj.get("sort") != null && !jsonObj.get("sort").isJsonNull()) { + JsonArray jsonArraysort = jsonObj.getAsJsonArray("sort"); + if (jsonArraysort != null) { + // ensure the json data is an array + if (!jsonObj.get("sort").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `sort` to be an array in the JSON string but got `%s`", jsonObj.get("sort").toString())); + } + + // validate the optional field `sort` (array) + for (int i = 0; i < jsonArraysort.size(); i++) { + ExchangeServiceSearchSortCriteria.validateJsonElement(jsonArraysort.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ExchangeServiceSearchRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ExchangeServiceSearchRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ExchangeServiceSearchRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ExchangeServiceSearchRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ExchangeServiceSearchRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ExchangeServiceSearchRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ExchangeServiceSearchRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of ExchangeServiceSearchRequest + * @throws IOException if the JSON string is invalid with respect to ExchangeServiceSearchRequest + */ + public static ExchangeServiceSearchRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ExchangeServiceSearchRequest.class); + } + + /** + * Convert an instance of ExchangeServiceSearchRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ExchangeServiceSearchResponse.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ExchangeServiceSearchResponse.java new file mode 100644 index 00000000..46b6409a --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ExchangeServiceSearchResponse.java @@ -0,0 +1,388 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.ExchangeServiceResponse; +import com.equinix.sdk.fabricv4.model.ExchangeServiceSearchSortCriteria; +import com.equinix.sdk.fabricv4.model.Pagination; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * List of Internet Exchange Service + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class ExchangeServiceSearchResponse { + public static final String SERIALIZED_NAME_PAGINATION = "pagination"; + @SerializedName(SERIALIZED_NAME_PAGINATION) + @javax.annotation.Nullable + private Pagination pagination; + + public static final String SERIALIZED_NAME_SORT = "sort"; + @SerializedName(SERIALIZED_NAME_SORT) + @javax.annotation.Nullable + private List sort = new ArrayList<>(); + + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + @javax.annotation.Nullable + private List data = new ArrayList<>(); + + public ExchangeServiceSearchResponse() { + } + + public ExchangeServiceSearchResponse pagination(@javax.annotation.Nullable Pagination pagination) { + this.pagination = pagination; + return this; + } + + /** + * Get pagination + * @return pagination + */ + @javax.annotation.Nullable + public Pagination getPagination() { + return pagination; + } + + public void setPagination(@javax.annotation.Nullable Pagination pagination) { + this.pagination = pagination; + } + + + public ExchangeServiceSearchResponse sort(@javax.annotation.Nullable List sort) { + this.sort = sort; + return this; + } + + public ExchangeServiceSearchResponse addSortItem(ExchangeServiceSearchSortCriteria sortItem) { + if (this.sort == null) { + this.sort = new ArrayList<>(); + } + this.sort.add(sortItem); + return this; + } + + /** + * Get sort + * @return sort + */ + @javax.annotation.Nullable + public List getSort() { + return sort; + } + + public void setSort(@javax.annotation.Nullable List sort) { + this.sort = sort; + } + + + public ExchangeServiceSearchResponse data(@javax.annotation.Nullable List data) { + this.data = data; + return this; + } + + public ExchangeServiceSearchResponse addDataItem(ExchangeServiceResponse dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + return this; + } + + /** + * Get data + * @return data + */ + @javax.annotation.Nullable + public List getData() { + return data; + } + + public void setData(@javax.annotation.Nullable List data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ExchangeServiceSearchResponse instance itself + */ + public ExchangeServiceSearchResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExchangeServiceSearchResponse exchangeServiceSearchResponse = (ExchangeServiceSearchResponse) o; + return Objects.equals(this.pagination, exchangeServiceSearchResponse.pagination) && + Objects.equals(this.sort, exchangeServiceSearchResponse.sort) && + Objects.equals(this.data, exchangeServiceSearchResponse.data)&& + Objects.equals(this.additionalProperties, exchangeServiceSearchResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(pagination, sort, data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExchangeServiceSearchResponse {\n"); + sb.append(" pagination: ").append(toIndentedString(pagination)).append("\n"); + sb.append(" sort: ").append(toIndentedString(sort)).append("\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("pagination", "sort", "data")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ExchangeServiceSearchResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ExchangeServiceSearchResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in ExchangeServiceSearchResponse is not found in the empty JSON string", ExchangeServiceSearchResponse.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `pagination` + if (jsonObj.get("pagination") != null && !jsonObj.get("pagination").isJsonNull()) { + Pagination.validateJsonElement(jsonObj.get("pagination")); + } + if (jsonObj.get("sort") != null && !jsonObj.get("sort").isJsonNull()) { + JsonArray jsonArraysort = jsonObj.getAsJsonArray("sort"); + if (jsonArraysort != null) { + // ensure the json data is an array + if (!jsonObj.get("sort").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `sort` to be an array in the JSON string but got `%s`", jsonObj.get("sort").toString())); + } + + // validate the optional field `sort` (array) + for (int i = 0; i < jsonArraysort.size(); i++) { + ExchangeServiceSearchSortCriteria.validateJsonElement(jsonArraysort.get(i)); + }; + } + } + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); + if (jsonArraydata != null) { + // ensure the json data is an array + if (!jsonObj.get("data").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + } + + // validate the optional field `data` (array) + for (int i = 0; i < jsonArraydata.size(); i++) { + ExchangeServiceResponse.validateJsonElement(jsonArraydata.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ExchangeServiceSearchResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ExchangeServiceSearchResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ExchangeServiceSearchResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ExchangeServiceSearchResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ExchangeServiceSearchResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ExchangeServiceSearchResponse instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ExchangeServiceSearchResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of ExchangeServiceSearchResponse + * @throws IOException if the JSON string is invalid with respect to ExchangeServiceSearchResponse + */ + public static ExchangeServiceSearchResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ExchangeServiceSearchResponse.class); + } + + /** + * Convert an instance of ExchangeServiceSearchResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ExchangeServiceSearchSortCriteria.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ExchangeServiceSearchSortCriteria.java new file mode 100644 index 00000000..1635a964 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ExchangeServiceSearchSortCriteria.java @@ -0,0 +1,429 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * ExchangeServiceSearchSortCriteria + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class ExchangeServiceSearchSortCriteria { + /** + * Sorting direction + */ + @JsonAdapter(DirectionEnum.Adapter.class) + public enum DirectionEnum { + DESC("DESC"), + + ASC("ASC"); + + private String value; + + DirectionEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static DirectionEnum fromValue(String value) { + for (DirectionEnum b : DirectionEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final DirectionEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public DirectionEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return DirectionEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + DirectionEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_DIRECTION = "direction"; + @SerializedName(SERIALIZED_NAME_DIRECTION) + @javax.annotation.Nullable + private DirectionEnum direction = DirectionEnum.DESC; + + /** + * Possible field names to use on sorting + */ + @JsonAdapter(PropertyEnum.Adapter.class) + public enum PropertyEnum { + NAME("/name"), + + CHANGELOG_CREATEDDATETIME("/changeLog/createdDateTime"), + + CHANGELOG_UPDATEDDATETIME("/changeLog/updatedDateTime"); + + private String value; + + PropertyEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static PropertyEnum fromValue(String value) { + for (PropertyEnum b : PropertyEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final PropertyEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public PropertyEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return PropertyEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + PropertyEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_PROPERTY = "property"; + @SerializedName(SERIALIZED_NAME_PROPERTY) + @javax.annotation.Nullable + private PropertyEnum property = PropertyEnum.CHANGELOG_UPDATEDDATETIME; + + public ExchangeServiceSearchSortCriteria() { + } + + public ExchangeServiceSearchSortCriteria direction(@javax.annotation.Nullable DirectionEnum direction) { + this.direction = direction; + return this; + } + + /** + * Sorting direction + * @return direction + */ + @javax.annotation.Nullable + public DirectionEnum getDirection() { + return direction; + } + + public void setDirection(@javax.annotation.Nullable DirectionEnum direction) { + this.direction = direction; + } + + + public ExchangeServiceSearchSortCriteria property(@javax.annotation.Nullable PropertyEnum property) { + this.property = property; + return this; + } + + /** + * Possible field names to use on sorting + * @return property + */ + @javax.annotation.Nullable + public PropertyEnum getProperty() { + return property; + } + + public void setProperty(@javax.annotation.Nullable PropertyEnum property) { + this.property = property; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ExchangeServiceSearchSortCriteria instance itself + */ + public ExchangeServiceSearchSortCriteria putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExchangeServiceSearchSortCriteria exchangeServiceSearchSortCriteria = (ExchangeServiceSearchSortCriteria) o; + return Objects.equals(this.direction, exchangeServiceSearchSortCriteria.direction) && + Objects.equals(this.property, exchangeServiceSearchSortCriteria.property)&& + Objects.equals(this.additionalProperties, exchangeServiceSearchSortCriteria.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(direction, property, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExchangeServiceSearchSortCriteria {\n"); + sb.append(" direction: ").append(toIndentedString(direction)).append("\n"); + sb.append(" property: ").append(toIndentedString(property)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("direction", "property")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ExchangeServiceSearchSortCriteria + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ExchangeServiceSearchSortCriteria.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in ExchangeServiceSearchSortCriteria is not found in the empty JSON string", ExchangeServiceSearchSortCriteria.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("direction") != null && !jsonObj.get("direction").isJsonNull()) && !jsonObj.get("direction").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `direction` to be a primitive type in the JSON string but got `%s`", jsonObj.get("direction").toString())); + } + // validate the optional field `direction` + if (jsonObj.get("direction") != null && !jsonObj.get("direction").isJsonNull()) { + DirectionEnum.validateJsonElement(jsonObj.get("direction")); + } + if ((jsonObj.get("property") != null && !jsonObj.get("property").isJsonNull()) && !jsonObj.get("property").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `property` to be a primitive type in the JSON string but got `%s`", jsonObj.get("property").toString())); + } + // validate the optional field `property` + if (jsonObj.get("property") != null && !jsonObj.get("property").isJsonNull()) { + PropertyEnum.validateJsonElement(jsonObj.get("property")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ExchangeServiceSearchSortCriteria.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ExchangeServiceSearchSortCriteria' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ExchangeServiceSearchSortCriteria.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ExchangeServiceSearchSortCriteria value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ExchangeServiceSearchSortCriteria read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ExchangeServiceSearchSortCriteria instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ExchangeServiceSearchSortCriteria given an JSON string + * + * @param jsonString JSON string + * @return An instance of ExchangeServiceSearchSortCriteria + * @throws IOException if the JSON string is invalid with respect to ExchangeServiceSearchSortCriteria + */ + public static ExchangeServiceSearchSortCriteria fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ExchangeServiceSearchSortCriteria.class); + } + + /** + * Convert an instance of ExchangeServiceSearchSortCriteria to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/Agents.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/Gateway.java similarity index 64% rename from services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/Agents.java rename to services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/Gateway.java index 848e1503..0703c234 100644 --- a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/Agents.java +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/Gateway.java @@ -13,10 +13,14 @@ import java.util.Objects; import java.util.Locale; -import com.equinix.sdk.fabricv4.model.AgentTemplate; +import com.equinix.sdk.fabricv4.model.Account; import com.equinix.sdk.fabricv4.model.Changelog; -import com.equinix.sdk.fabricv4.model.ModelConfiguration; +import com.equinix.sdk.fabricv4.model.GatewayIpv4; +import com.equinix.sdk.fabricv4.model.GatewayState; +import com.equinix.sdk.fabricv4.model.GatewayType; +import com.equinix.sdk.fabricv4.model.Order; import com.equinix.sdk.fabricv4.model.Project; +import com.equinix.sdk.fabricv4.model.Router; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -52,10 +56,10 @@ import com.equinix.sdk.fabricv4.JSON; /** - * Agent object + * Gateway object */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") -public class Agents { +public class Gateway { public static final String SERIALIZED_NAME_HREF = "href"; @SerializedName(SERIALIZED_NAME_HREF) @javax.annotation.Nullable @@ -64,7 +68,7 @@ public class Agents { public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) @javax.annotation.Nullable - private String type; + private GatewayType type; public static final String SERIALIZED_NAME_UUID = "uuid"; @SerializedName(SERIALIZED_NAME_UUID) @@ -81,100 +85,55 @@ public class Agents { @javax.annotation.Nullable private String description; - /** - * Agent state - */ - @JsonAdapter(StateEnum.Adapter.class) - public enum StateEnum { - PROVISIONING("PROVISIONING"), - - PROVISIONED("PROVISIONED"), - - REPROVISIONING("REPROVISIONING"), - - DEPROVISIONING("DEPROVISIONING"), - - DEPROVISIONED("DEPROVISIONED"), - - FAILED("FAILED"); - - private String value; - - StateEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static StateEnum fromValue(String value) { - for (StateEnum b : StateEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final StateEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } + public static final String SERIALIZED_NAME_STATE = "state"; + @SerializedName(SERIALIZED_NAME_STATE) + @javax.annotation.Nullable + private GatewayState state; - @Override - public StateEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return StateEnum.fromValue(value); - } - } + public static final String SERIALIZED_NAME_BANDWIDTH = "bandwidth"; + @SerializedName(SERIALIZED_NAME_BANDWIDTH) + @javax.annotation.Nullable + private Integer bandwidth; - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - StateEnum.fromValue(value); - } - } + public static final String SERIALIZED_NAME_LOCAL_ASN = "localAsn"; + @SerializedName(SERIALIZED_NAME_LOCAL_ASN) + @javax.annotation.Nullable + private Integer localAsn; - public static final String SERIALIZED_NAME_STATE = "state"; - @SerializedName(SERIALIZED_NAME_STATE) + public static final String SERIALIZED_NAME_ROUTER = "router"; + @SerializedName(SERIALIZED_NAME_ROUTER) @javax.annotation.Nullable - private StateEnum state; + private Router router; - public static final String SERIALIZED_NAME_ENABLED = "enabled"; - @SerializedName(SERIALIZED_NAME_ENABLED) + public static final String SERIALIZED_NAME_IPV4 = "ipv4"; + @SerializedName(SERIALIZED_NAME_IPV4) @javax.annotation.Nullable - private Boolean enabled; + private GatewayIpv4 ipv4; public static final String SERIALIZED_NAME_PROJECT = "project"; @SerializedName(SERIALIZED_NAME_PROJECT) @javax.annotation.Nullable private Project project; - public static final String SERIALIZED_NAME_AGENT_TEMPLATE = "agentTemplate"; - @SerializedName(SERIALIZED_NAME_AGENT_TEMPLATE) + public static final String SERIALIZED_NAME_ACCOUNT = "account"; + @SerializedName(SERIALIZED_NAME_ACCOUNT) @javax.annotation.Nullable - private AgentTemplate agentTemplate; + private Account account; - public static final String SERIALIZED_NAME_CONFIGURATION = "configuration"; - @SerializedName(SERIALIZED_NAME_CONFIGURATION) + public static final String SERIALIZED_NAME_ORDER = "order"; + @SerializedName(SERIALIZED_NAME_ORDER) @javax.annotation.Nullable - private ModelConfiguration _configuration; + private Order order; public static final String SERIALIZED_NAME_CHANGE_LOG = "changeLog"; @SerializedName(SERIALIZED_NAME_CHANGE_LOG) @javax.annotation.Nullable private Changelog changeLog; - public Agents() { + public Gateway() { } - public Agents( + public Gateway( URI href ) { this(); @@ -182,7 +141,7 @@ public Agents( } /** - * Agent URI + * Gateways URI * @return href */ @javax.annotation.Nullable @@ -192,26 +151,26 @@ public URI getHref() { - public Agents type(@javax.annotation.Nullable String type) { + public Gateway type(@javax.annotation.Nullable GatewayType type) { this.type = type; return this; } /** - * type + * Get type * @return type */ @javax.annotation.Nullable - public String getType() { + public GatewayType getType() { return type; } - public void setType(@javax.annotation.Nullable String type) { + public void setType(@javax.annotation.Nullable GatewayType type) { this.type = type; } - public Agents uuid(@javax.annotation.Nullable UUID uuid) { + public Gateway uuid(@javax.annotation.Nullable UUID uuid) { this.uuid = uuid; return this; } @@ -230,13 +189,13 @@ public void setUuid(@javax.annotation.Nullable UUID uuid) { } - public Agents name(@javax.annotation.Nullable String name) { + public Gateway name(@javax.annotation.Nullable String name) { this.name = name; return this; } /** - * Customer-provided agent name + * Customer-provided Gateway name * @return name */ @javax.annotation.Nullable @@ -249,13 +208,13 @@ public void setName(@javax.annotation.Nullable String name) { } - public Agents description(@javax.annotation.Nullable String description) { + public Gateway description(@javax.annotation.Nullable String description) { this.description = description; return this; } /** - * Customer-provided agent description + * Customer-provided Gateway description * @return description */ @javax.annotation.Nullable @@ -268,45 +227,104 @@ public void setDescription(@javax.annotation.Nullable String description) { } - public Agents state(@javax.annotation.Nullable StateEnum state) { + public Gateway state(@javax.annotation.Nullable GatewayState state) { this.state = state; return this; } /** - * Agent state + * Get state * @return state */ @javax.annotation.Nullable - public StateEnum getState() { + public GatewayState getState() { return state; } - public void setState(@javax.annotation.Nullable StateEnum state) { + public void setState(@javax.annotation.Nullable GatewayState state) { this.state = state; } - public Agents enabled(@javax.annotation.Nullable Boolean enabled) { - this.enabled = enabled; + public Gateway bandwidth(@javax.annotation.Nullable Integer bandwidth) { + this.bandwidth = bandwidth; return this; } /** - * Customer-provided agent enabled status - * @return enabled + * Gateway bandwidth in Mbps + * minimum: 0 + * maximum: 100000 + * @return bandwidth */ @javax.annotation.Nullable - public Boolean getEnabled() { - return enabled; + public Integer getBandwidth() { + return bandwidth; } - public void setEnabled(@javax.annotation.Nullable Boolean enabled) { - this.enabled = enabled; + public void setBandwidth(@javax.annotation.Nullable Integer bandwidth) { + this.bandwidth = bandwidth; } - public Agents project(@javax.annotation.Nullable Project project) { + public Gateway localAsn(@javax.annotation.Nullable Integer localAsn) { + this.localAsn = localAsn; + return this; + } + + /** + * Gateway local Autonomous System Number + * @return localAsn + */ + @javax.annotation.Nullable + public Integer getLocalAsn() { + return localAsn; + } + + public void setLocalAsn(@javax.annotation.Nullable Integer localAsn) { + this.localAsn = localAsn; + } + + + public Gateway router(@javax.annotation.Nullable Router router) { + this.router = router; + return this; + } + + /** + * Get router + * @return router + */ + @javax.annotation.Nullable + public Router getRouter() { + return router; + } + + public void setRouter(@javax.annotation.Nullable Router router) { + this.router = router; + } + + + public Gateway ipv4(@javax.annotation.Nullable GatewayIpv4 ipv4) { + this.ipv4 = ipv4; + return this; + } + + /** + * Get ipv4 + * @return ipv4 + */ + @javax.annotation.Nullable + public GatewayIpv4 getIpv4() { + return ipv4; + } + + public void setIpv4(@javax.annotation.Nullable GatewayIpv4 ipv4) { + this.ipv4 = ipv4; + } + + + public Gateway project(@javax.annotation.Nullable Project project) { this.project = project; return this; } @@ -325,45 +343,45 @@ public void setProject(@javax.annotation.Nullable Project project) { } - public Agents agentTemplate(@javax.annotation.Nullable AgentTemplate agentTemplate) { - this.agentTemplate = agentTemplate; + public Gateway account(@javax.annotation.Nullable Account account) { + this.account = account; return this; } /** - * Get agentTemplate - * @return agentTemplate + * Get account + * @return account */ @javax.annotation.Nullable - public AgentTemplate getAgentTemplate() { - return agentTemplate; + public Account getAccount() { + return account; } - public void setAgentTemplate(@javax.annotation.Nullable AgentTemplate agentTemplate) { - this.agentTemplate = agentTemplate; + public void setAccount(@javax.annotation.Nullable Account account) { + this.account = account; } - public Agents _configuration(@javax.annotation.Nullable ModelConfiguration _configuration) { - this._configuration = _configuration; + public Gateway order(@javax.annotation.Nullable Order order) { + this.order = order; return this; } /** - * Get _configuration - * @return _configuration + * Get order + * @return order */ @javax.annotation.Nullable - public ModelConfiguration getConfiguration() { - return _configuration; + public Order getOrder() { + return order; } - public void setConfiguration(@javax.annotation.Nullable ModelConfiguration _configuration) { - this._configuration = _configuration; + public void setOrder(@javax.annotation.Nullable Order order) { + this.order = order; } - public Agents changeLog(@javax.annotation.Nullable Changelog changeLog) { + public Gateway changeLog(@javax.annotation.Nullable Changelog changeLog) { this.changeLog = changeLog; return this; } @@ -394,9 +412,9 @@ public void setChangeLog(@javax.annotation.Nullable Changelog changeLog) { * * @param key name of the property * @param value value of the property - * @return the Agents instance itself + * @return the Gateway instance itself */ - public Agents putAdditionalProperty(String key, Object value) { + public Gateway putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -435,40 +453,46 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - Agents agents = (Agents) o; - return Objects.equals(this.href, agents.href) && - Objects.equals(this.type, agents.type) && - Objects.equals(this.uuid, agents.uuid) && - Objects.equals(this.name, agents.name) && - Objects.equals(this.description, agents.description) && - Objects.equals(this.state, agents.state) && - Objects.equals(this.enabled, agents.enabled) && - Objects.equals(this.project, agents.project) && - Objects.equals(this.agentTemplate, agents.agentTemplate) && - Objects.equals(this._configuration, agents._configuration) && - Objects.equals(this.changeLog, agents.changeLog)&& - Objects.equals(this.additionalProperties, agents.additionalProperties); + Gateway gateway = (Gateway) o; + return Objects.equals(this.href, gateway.href) && + Objects.equals(this.type, gateway.type) && + Objects.equals(this.uuid, gateway.uuid) && + Objects.equals(this.name, gateway.name) && + Objects.equals(this.description, gateway.description) && + Objects.equals(this.state, gateway.state) && + Objects.equals(this.bandwidth, gateway.bandwidth) && + Objects.equals(this.localAsn, gateway.localAsn) && + Objects.equals(this.router, gateway.router) && + Objects.equals(this.ipv4, gateway.ipv4) && + Objects.equals(this.project, gateway.project) && + Objects.equals(this.account, gateway.account) && + Objects.equals(this.order, gateway.order) && + Objects.equals(this.changeLog, gateway.changeLog)&& + Objects.equals(this.additionalProperties, gateway.additionalProperties); } @Override public int hashCode() { - return Objects.hash(href, type, uuid, name, description, state, enabled, project, agentTemplate, _configuration, changeLog, additionalProperties); + return Objects.hash(href, type, uuid, name, description, state, bandwidth, localAsn, router, ipv4, project, account, order, changeLog, additionalProperties); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class Agents {\n"); + sb.append("class Gateway {\n"); sb.append(" href: ").append(toIndentedString(href)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" description: ").append(toIndentedString(description)).append("\n"); sb.append(" state: ").append(toIndentedString(state)).append("\n"); - sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); + sb.append(" bandwidth: ").append(toIndentedString(bandwidth)).append("\n"); + sb.append(" localAsn: ").append(toIndentedString(localAsn)).append("\n"); + sb.append(" router: ").append(toIndentedString(router)).append("\n"); + sb.append(" ipv4: ").append(toIndentedString(ipv4)).append("\n"); sb.append(" project: ").append(toIndentedString(project)).append("\n"); - sb.append(" agentTemplate: ").append(toIndentedString(agentTemplate)).append("\n"); - sb.append(" _configuration: ").append(toIndentedString(_configuration)).append("\n"); + sb.append(" account: ").append(toIndentedString(account)).append("\n"); + sb.append(" order: ").append(toIndentedString(order)).append("\n"); sb.append(" changeLog: ").append(toIndentedString(changeLog)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); @@ -492,7 +516,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("href", "type", "uuid", "name", "description", "state", "enabled", "project", "agentTemplate", "configuration", "changeLog")); + openapiFields = new HashSet(Arrays.asList("href", "type", "uuid", "name", "description", "state", "bandwidth", "localAsn", "router", "ipv4", "project", "account", "order", "changeLog")); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(0); @@ -502,20 +526,21 @@ private String toIndentedString(Object o) { * Validates the JSON Element and throws an exception if issues found * * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Agents + * @throws IOException if the JSON Element is invalid with respect to Gateway */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { - if (!Agents.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in Agents is not found in the empty JSON string", Agents.openapiRequiredFields.toString())); + if (!Gateway.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in Gateway is not found in the empty JSON string", Gateway.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("href") != null && !jsonObj.get("href").isJsonNull()) && !jsonObj.get("href").isJsonPrimitive()) { throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `href` to be a primitive type in the JSON string but got `%s`", jsonObj.get("href").toString())); } - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + // validate the optional field `type` + if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { + GatewayType.validateJsonElement(jsonObj.get("type")); } if ((jsonObj.get("uuid") != null && !jsonObj.get("uuid").isJsonNull()) && !jsonObj.get("uuid").isJsonPrimitive()) { throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `uuid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("uuid").toString())); @@ -526,24 +551,29 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } - if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); - } // validate the optional field `state` if (jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) { - StateEnum.validateJsonElement(jsonObj.get("state")); + GatewayState.validateJsonElement(jsonObj.get("state")); + } + // validate the optional field `router` + if (jsonObj.get("router") != null && !jsonObj.get("router").isJsonNull()) { + Router.validateJsonElement(jsonObj.get("router")); + } + // validate the optional field `ipv4` + if (jsonObj.get("ipv4") != null && !jsonObj.get("ipv4").isJsonNull()) { + GatewayIpv4.validateJsonElement(jsonObj.get("ipv4")); } // validate the optional field `project` if (jsonObj.get("project") != null && !jsonObj.get("project").isJsonNull()) { Project.validateJsonElement(jsonObj.get("project")); } - // validate the optional field `agentTemplate` - if (jsonObj.get("agentTemplate") != null && !jsonObj.get("agentTemplate").isJsonNull()) { - AgentTemplate.validateJsonElement(jsonObj.get("agentTemplate")); + // validate the optional field `account` + if (jsonObj.get("account") != null && !jsonObj.get("account").isJsonNull()) { + Account.validateJsonElement(jsonObj.get("account")); } - // validate the optional field `configuration` - if (jsonObj.get("configuration") != null && !jsonObj.get("configuration").isJsonNull()) { - ModelConfiguration.validateJsonElement(jsonObj.get("configuration")); + // validate the optional field `order` + if (jsonObj.get("order") != null && !jsonObj.get("order").isJsonNull()) { + Order.validateJsonElement(jsonObj.get("order")); } // validate the optional field `changeLog` if (jsonObj.get("changeLog") != null && !jsonObj.get("changeLog").isJsonNull()) { @@ -555,16 +585,16 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!Agents.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Agents' and its subtypes + if (!Gateway.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Gateway' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Agents.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Gateway.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, Agents value) throws IOException { + public void write(JsonWriter out, Gateway value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); // serialize additional properties @@ -592,12 +622,12 @@ else if (entry.getValue() instanceof Character) } @Override - public Agents read(JsonReader in) throws IOException { + public Gateway read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); JsonObject jsonObj = jsonElement.getAsJsonObject(); // store additional fields in the deserialized instance - Agents instance = thisAdapter.fromJsonTree(jsonObj); + Gateway instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { if (!openapiFields.contains(entry.getKey())) { if (entry.getValue().isJsonPrimitive()) { // primitive type @@ -624,18 +654,18 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } /** - * Create an instance of Agents given an JSON string + * Create an instance of Gateway given an JSON string * * @param jsonString JSON string - * @return An instance of Agents - * @throws IOException if the JSON string is invalid with respect to Agents + * @return An instance of Gateway + * @throws IOException if the JSON string is invalid with respect to Gateway */ - public static Agents fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Agents.class); + public static Gateway fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, Gateway.class); } /** - * Convert an instance of Agents to an JSON string + * Convert an instance of Gateway to an JSON string * * @return JSON string */ diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/PatchOperation.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/GatewayChangeOperation.java similarity index 82% rename from services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/PatchOperation.java rename to services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/GatewayChangeOperation.java index 3304d7fd..4cb1bb01 100644 --- a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/PatchOperation.java +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/GatewayChangeOperation.java @@ -46,12 +46,12 @@ import com.equinix.sdk.fabricv4.JSON; /** - * PatchOperation + * GatewayChangeOperation */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") -public class PatchOperation { +public class GatewayChangeOperation { /** - * The operation to perform + * Handy shortcut for operation name */ @JsonAdapter(OpEnum.Adapter.class) public enum OpEnum { @@ -119,16 +119,16 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @javax.annotation.Nonnull private Object value; - public PatchOperation() { + public GatewayChangeOperation() { } - public PatchOperation op(@javax.annotation.Nonnull OpEnum op) { + public GatewayChangeOperation op(@javax.annotation.Nonnull OpEnum op) { this.op = op; return this; } /** - * The operation to perform + * Handy shortcut for operation name * @return op */ @javax.annotation.Nonnull @@ -141,13 +141,13 @@ public void setOp(@javax.annotation.Nonnull OpEnum op) { } - public PatchOperation path(@javax.annotation.Nonnull String path) { + public GatewayChangeOperation path(@javax.annotation.Nonnull String path) { this.path = path; return this; } /** - * JSON Pointer path to the field to modify (e.g., /name, /description, /summary, /webUrl, /notifications) + * path inside document leading to updated parameter * @return path */ @javax.annotation.Nonnull @@ -160,13 +160,13 @@ public void setPath(@javax.annotation.Nonnull String path) { } - public PatchOperation value(@javax.annotation.Nonnull Object value) { + public GatewayChangeOperation value(@javax.annotation.Nonnull Object value) { this.value = value; return this; } /** - * The value to update the field to + * new value for updated parameter * @return value */ @javax.annotation.Nonnull @@ -191,9 +191,9 @@ public void setValue(@javax.annotation.Nonnull Object value) { * * @param key name of the property * @param value value of the property - * @return the PatchOperation instance itself + * @return the GatewayChangeOperation instance itself */ - public PatchOperation putAdditionalProperty(String key, Object value) { + public GatewayChangeOperation putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -232,11 +232,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - PatchOperation patchOperation = (PatchOperation) o; - return Objects.equals(this.op, patchOperation.op) && - Objects.equals(this.path, patchOperation.path) && - Objects.equals(this.value, patchOperation.value)&& - Objects.equals(this.additionalProperties, patchOperation.additionalProperties); + GatewayChangeOperation gatewayChangeOperation = (GatewayChangeOperation) o; + return Objects.equals(this.op, gatewayChangeOperation.op) && + Objects.equals(this.path, gatewayChangeOperation.path) && + Objects.equals(this.value, gatewayChangeOperation.value)&& + Objects.equals(this.additionalProperties, gatewayChangeOperation.additionalProperties); } @Override @@ -247,7 +247,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class PatchOperation {\n"); + sb.append("class GatewayChangeOperation {\n"); sb.append(" op: ").append(toIndentedString(op)).append("\n"); sb.append(" path: ").append(toIndentedString(path)).append("\n"); sb.append(" value: ").append(toIndentedString(value)).append("\n"); @@ -283,17 +283,17 @@ private String toIndentedString(Object o) { * Validates the JSON Element and throws an exception if issues found * * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to PatchOperation + * @throws IOException if the JSON Element is invalid with respect to GatewayChangeOperation */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { - if (!PatchOperation.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in PatchOperation is not found in the empty JSON string", PatchOperation.openapiRequiredFields.toString())); + if (!GatewayChangeOperation.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in GatewayChangeOperation is not found in the empty JSON string", GatewayChangeOperation.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : PatchOperation.openapiRequiredFields) { + for (String requiredField : GatewayChangeOperation.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } @@ -313,16 +313,16 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!PatchOperation.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PatchOperation' and its subtypes + if (!GatewayChangeOperation.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'GatewayChangeOperation' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(PatchOperation.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(GatewayChangeOperation.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, PatchOperation value) throws IOException { + public void write(JsonWriter out, GatewayChangeOperation value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); // serialize additional properties @@ -350,12 +350,12 @@ else if (entry.getValue() instanceof Character) } @Override - public PatchOperation read(JsonReader in) throws IOException { + public GatewayChangeOperation read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); JsonObject jsonObj = jsonElement.getAsJsonObject(); // store additional fields in the deserialized instance - PatchOperation instance = thisAdapter.fromJsonTree(jsonObj); + GatewayChangeOperation instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { if (!openapiFields.contains(entry.getKey())) { if (entry.getValue().isJsonPrimitive()) { // primitive type @@ -382,18 +382,18 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } /** - * Create an instance of PatchOperation given an JSON string + * Create an instance of GatewayChangeOperation given an JSON string * * @param jsonString JSON string - * @return An instance of PatchOperation - * @throws IOException if the JSON string is invalid with respect to PatchOperation + * @return An instance of GatewayChangeOperation + * @throws IOException if the JSON string is invalid with respect to GatewayChangeOperation */ - public static PatchOperation fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PatchOperation.class); + public static GatewayChangeOperation fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, GatewayChangeOperation.class); } /** - * Convert an instance of PatchOperation to an JSON string + * Convert an instance of GatewayChangeOperation to an JSON string * * @return JSON string */ diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/MessagesInner.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/GatewayIpv4.java similarity index 70% rename from services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/MessagesInner.java rename to services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/GatewayIpv4.java index 2d479d2c..da83a81a 100644 --- a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/MessagesInner.java +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/GatewayIpv4.java @@ -46,58 +46,58 @@ import com.equinix.sdk.fabricv4.JSON; /** - * MessagesInner + * Gateway IPv4 address */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") -public class MessagesInner { - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) +public class GatewayIpv4 { + public static final String SERIALIZED_NAME_PRIMARY_IP = "primaryIp"; + @SerializedName(SERIALIZED_NAME_PRIMARY_IP) @javax.annotation.Nullable - private String type; + private String primaryIp; - public static final String SERIALIZED_NAME_CONTENT = "content"; - @SerializedName(SERIALIZED_NAME_CONTENT) + public static final String SERIALIZED_NAME_SECONDARY_IP = "secondaryIp"; + @SerializedName(SERIALIZED_NAME_SECONDARY_IP) @javax.annotation.Nullable - private String content; + private String secondaryIp; - public MessagesInner() { + public GatewayIpv4() { } - public MessagesInner type(@javax.annotation.Nullable String type) { - this.type = type; + public GatewayIpv4 primaryIp(@javax.annotation.Nullable String primaryIp) { + this.primaryIp = primaryIp; return this; } /** - * Role of the message sender user or assistant - * @return type + * Get primaryIp + * @return primaryIp */ @javax.annotation.Nullable - public String getType() { - return type; + public String getPrimaryIp() { + return primaryIp; } - public void setType(@javax.annotation.Nullable String type) { - this.type = type; + public void setPrimaryIp(@javax.annotation.Nullable String primaryIp) { + this.primaryIp = primaryIp; } - public MessagesInner content(@javax.annotation.Nullable String content) { - this.content = content; + public GatewayIpv4 secondaryIp(@javax.annotation.Nullable String secondaryIp) { + this.secondaryIp = secondaryIp; return this; } /** - * Content of the chat message - * @return content + * Get secondaryIp + * @return secondaryIp */ @javax.annotation.Nullable - public String getContent() { - return content; + public String getSecondaryIp() { + return secondaryIp; } - public void setContent(@javax.annotation.Nullable String content) { - this.content = content; + public void setSecondaryIp(@javax.annotation.Nullable String secondaryIp) { + this.secondaryIp = secondaryIp; } /** @@ -113,9 +113,9 @@ public void setContent(@javax.annotation.Nullable String content) { * * @param key name of the property * @param value value of the property - * @return the MessagesInner instance itself + * @return the GatewayIpv4 instance itself */ - public MessagesInner putAdditionalProperty(String key, Object value) { + public GatewayIpv4 putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -154,23 +154,23 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - MessagesInner messagesInner = (MessagesInner) o; - return Objects.equals(this.type, messagesInner.type) && - Objects.equals(this.content, messagesInner.content)&& - Objects.equals(this.additionalProperties, messagesInner.additionalProperties); + GatewayIpv4 gatewayIpv4 = (GatewayIpv4) o; + return Objects.equals(this.primaryIp, gatewayIpv4.primaryIp) && + Objects.equals(this.secondaryIp, gatewayIpv4.secondaryIp)&& + Objects.equals(this.additionalProperties, gatewayIpv4.additionalProperties); } @Override public int hashCode() { - return Objects.hash(type, content, additionalProperties); + return Objects.hash(primaryIp, secondaryIp, additionalProperties); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class MessagesInner {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" content: ").append(toIndentedString(content)).append("\n"); + sb.append("class GatewayIpv4 {\n"); + sb.append(" primaryIp: ").append(toIndentedString(primaryIp)).append("\n"); + sb.append(" secondaryIp: ").append(toIndentedString(secondaryIp)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); @@ -193,7 +193,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("type", "content")); + openapiFields = new HashSet(Arrays.asList("primaryIp", "secondaryIp")); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(0); @@ -203,20 +203,20 @@ private String toIndentedString(Object o) { * Validates the JSON Element and throws an exception if issues found * * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to MessagesInner + * @throws IOException if the JSON Element is invalid with respect to GatewayIpv4 */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { - if (!MessagesInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in MessagesInner is not found in the empty JSON string", MessagesInner.openapiRequiredFields.toString())); + if (!GatewayIpv4.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in GatewayIpv4 is not found in the empty JSON string", GatewayIpv4.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + if ((jsonObj.get("primaryIp") != null && !jsonObj.get("primaryIp").isJsonNull()) && !jsonObj.get("primaryIp").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `primaryIp` to be a primitive type in the JSON string but got `%s`", jsonObj.get("primaryIp").toString())); } - if ((jsonObj.get("content") != null && !jsonObj.get("content").isJsonNull()) && !jsonObj.get("content").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `content` to be a primitive type in the JSON string but got `%s`", jsonObj.get("content").toString())); + if ((jsonObj.get("secondaryIp") != null && !jsonObj.get("secondaryIp").isJsonNull()) && !jsonObj.get("secondaryIp").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `secondaryIp` to be a primitive type in the JSON string but got `%s`", jsonObj.get("secondaryIp").toString())); } } @@ -224,16 +224,16 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!MessagesInner.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'MessagesInner' and its subtypes + if (!GatewayIpv4.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'GatewayIpv4' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(MessagesInner.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(GatewayIpv4.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, MessagesInner value) throws IOException { + public void write(JsonWriter out, GatewayIpv4 value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); // serialize additional properties @@ -261,12 +261,12 @@ else if (entry.getValue() instanceof Character) } @Override - public MessagesInner read(JsonReader in) throws IOException { + public GatewayIpv4 read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); JsonObject jsonObj = jsonElement.getAsJsonObject(); // store additional fields in the deserialized instance - MessagesInner instance = thisAdapter.fromJsonTree(jsonObj); + GatewayIpv4 instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { if (!openapiFields.contains(entry.getKey())) { if (entry.getValue().isJsonPrimitive()) { // primitive type @@ -293,18 +293,18 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } /** - * Create an instance of MessagesInner given an JSON string + * Create an instance of GatewayIpv4 given an JSON string * * @param jsonString JSON string - * @return An instance of MessagesInner - * @throws IOException if the JSON string is invalid with respect to MessagesInner + * @return An instance of GatewayIpv4 + * @throws IOException if the JSON string is invalid with respect to GatewayIpv4 */ - public static MessagesInner fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, MessagesInner.class); + public static GatewayIpv4 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, GatewayIpv4.class); } /** - * Convert an instance of MessagesInner to an JSON string + * Convert an instance of GatewayIpv4 to an JSON string * * @return JSON string */ diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/GatewayPostRequest.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/GatewayPostRequest.java new file mode 100644 index 00000000..d043751d --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/GatewayPostRequest.java @@ -0,0 +1,549 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.GatewayType; +import com.equinix.sdk.fabricv4.model.Order; +import com.equinix.sdk.fabricv4.model.Project; +import com.equinix.sdk.fabricv4.model.Router; +import com.equinix.sdk.fabricv4.model.SimplifiedAccount; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * Create Gateway + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class GatewayPostRequest { + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nonnull + private GatewayType type; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable + private String description; + + public static final String SERIALIZED_NAME_BANDWIDTH = "bandwidth"; + @SerializedName(SERIALIZED_NAME_BANDWIDTH) + @javax.annotation.Nonnull + private Integer bandwidth; + + public static final String SERIALIZED_NAME_LOCAL_ASN = "localAsn"; + @SerializedName(SERIALIZED_NAME_LOCAL_ASN) + @javax.annotation.Nonnull + private Integer localAsn; + + public static final String SERIALIZED_NAME_ROUTER = "router"; + @SerializedName(SERIALIZED_NAME_ROUTER) + @javax.annotation.Nonnull + private Router router; + + public static final String SERIALIZED_NAME_HA_ENABLED = "haEnabled"; + @SerializedName(SERIALIZED_NAME_HA_ENABLED) + @javax.annotation.Nullable + private Boolean haEnabled = false; + + public static final String SERIALIZED_NAME_ACCOUNT = "account"; + @SerializedName(SERIALIZED_NAME_ACCOUNT) + @javax.annotation.Nonnull + private SimplifiedAccount account; + + public static final String SERIALIZED_NAME_PROJECT = "project"; + @SerializedName(SERIALIZED_NAME_PROJECT) + @javax.annotation.Nonnull + private Project project; + + public static final String SERIALIZED_NAME_ORDER = "order"; + @SerializedName(SERIALIZED_NAME_ORDER) + @javax.annotation.Nullable + private Order order; + + public GatewayPostRequest() { + } + + public GatewayPostRequest type(@javax.annotation.Nonnull GatewayType type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + */ + @javax.annotation.Nonnull + public GatewayType getType() { + return type; + } + + public void setType(@javax.annotation.Nonnull GatewayType type) { + this.type = type; + } + + + public GatewayPostRequest name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Customer-provided Gateway name + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public GatewayPostRequest description(@javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * Customer-provided Gateway description + * @return description + */ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + + + public GatewayPostRequest bandwidth(@javax.annotation.Nonnull Integer bandwidth) { + this.bandwidth = bandwidth; + return this; + } + + /** + * Gateway bandwidth in Mbps + * minimum: 0 + * maximum: 10000 + * @return bandwidth + */ + @javax.annotation.Nonnull + public Integer getBandwidth() { + return bandwidth; + } + + public void setBandwidth(@javax.annotation.Nonnull Integer bandwidth) { + this.bandwidth = bandwidth; + } + + + public GatewayPostRequest localAsn(@javax.annotation.Nonnull Integer localAsn) { + this.localAsn = localAsn; + return this; + } + + /** + * Gateway local Autonomous System Number + * @return localAsn + */ + @javax.annotation.Nonnull + public Integer getLocalAsn() { + return localAsn; + } + + public void setLocalAsn(@javax.annotation.Nonnull Integer localAsn) { + this.localAsn = localAsn; + } + + + public GatewayPostRequest router(@javax.annotation.Nonnull Router router) { + this.router = router; + return this; + } + + /** + * Get router + * @return router + */ + @javax.annotation.Nonnull + public Router getRouter() { + return router; + } + + public void setRouter(@javax.annotation.Nonnull Router router) { + this.router = router; + } + + + public GatewayPostRequest haEnabled(@javax.annotation.Nullable Boolean haEnabled) { + this.haEnabled = haEnabled; + return this; + } + + /** + * High availability enabled + * @return haEnabled + */ + @javax.annotation.Nullable + public Boolean getHaEnabled() { + return haEnabled; + } + + public void setHaEnabled(@javax.annotation.Nullable Boolean haEnabled) { + this.haEnabled = haEnabled; + } + + + public GatewayPostRequest account(@javax.annotation.Nonnull SimplifiedAccount account) { + this.account = account; + return this; + } + + /** + * Get account + * @return account + */ + @javax.annotation.Nonnull + public SimplifiedAccount getAccount() { + return account; + } + + public void setAccount(@javax.annotation.Nonnull SimplifiedAccount account) { + this.account = account; + } + + + public GatewayPostRequest project(@javax.annotation.Nonnull Project project) { + this.project = project; + return this; + } + + /** + * Get project + * @return project + */ + @javax.annotation.Nonnull + public Project getProject() { + return project; + } + + public void setProject(@javax.annotation.Nonnull Project project) { + this.project = project; + } + + + public GatewayPostRequest order(@javax.annotation.Nullable Order order) { + this.order = order; + return this; + } + + /** + * Get order + * @return order + */ + @javax.annotation.Nullable + public Order getOrder() { + return order; + } + + public void setOrder(@javax.annotation.Nullable Order order) { + this.order = order; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the GatewayPostRequest instance itself + */ + public GatewayPostRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GatewayPostRequest gatewayPostRequest = (GatewayPostRequest) o; + return Objects.equals(this.type, gatewayPostRequest.type) && + Objects.equals(this.name, gatewayPostRequest.name) && + Objects.equals(this.description, gatewayPostRequest.description) && + Objects.equals(this.bandwidth, gatewayPostRequest.bandwidth) && + Objects.equals(this.localAsn, gatewayPostRequest.localAsn) && + Objects.equals(this.router, gatewayPostRequest.router) && + Objects.equals(this.haEnabled, gatewayPostRequest.haEnabled) && + Objects.equals(this.account, gatewayPostRequest.account) && + Objects.equals(this.project, gatewayPostRequest.project) && + Objects.equals(this.order, gatewayPostRequest.order)&& + Objects.equals(this.additionalProperties, gatewayPostRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(type, name, description, bandwidth, localAsn, router, haEnabled, account, project, order, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GatewayPostRequest {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" bandwidth: ").append(toIndentedString(bandwidth)).append("\n"); + sb.append(" localAsn: ").append(toIndentedString(localAsn)).append("\n"); + sb.append(" router: ").append(toIndentedString(router)).append("\n"); + sb.append(" haEnabled: ").append(toIndentedString(haEnabled)).append("\n"); + sb.append(" account: ").append(toIndentedString(account)).append("\n"); + sb.append(" project: ").append(toIndentedString(project)).append("\n"); + sb.append(" order: ").append(toIndentedString(order)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("type", "name", "description", "bandwidth", "localAsn", "router", "haEnabled", "account", "project", "order")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("type", "name", "bandwidth", "localAsn", "router", "account", "project")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to GatewayPostRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!GatewayPostRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in GatewayPostRequest is not found in the empty JSON string", GatewayPostRequest.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : GatewayPostRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the required field `type` + GatewayType.validateJsonElement(jsonObj.get("type")); + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + } + // validate the required field `router` + Router.validateJsonElement(jsonObj.get("router")); + // validate the required field `account` + SimplifiedAccount.validateJsonElement(jsonObj.get("account")); + // validate the required field `project` + Project.validateJsonElement(jsonObj.get("project")); + // validate the optional field `order` + if (jsonObj.get("order") != null && !jsonObj.get("order").isJsonNull()) { + Order.validateJsonElement(jsonObj.get("order")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!GatewayPostRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'GatewayPostRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(GatewayPostRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, GatewayPostRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public GatewayPostRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + GatewayPostRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of GatewayPostRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of GatewayPostRequest + * @throws IOException if the JSON string is invalid with respect to GatewayPostRequest + */ + public static GatewayPostRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, GatewayPostRequest.class); + } + + /** + * Convert an instance of GatewayPostRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/GatewayState.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/GatewayState.java new file mode 100644 index 00000000..fbd89670 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/GatewayState.java @@ -0,0 +1,88 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.google.gson.annotations.SerializedName; + +import java.io.IOException; +import java.util.Locale; +import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; + +/** + * Gateway lifecycle state + */ +@JsonAdapter(GatewayState.Adapter.class) +public enum GatewayState { + + PROVISIONING("PROVISIONING"), + + PROVISIONED("PROVISIONED"), + + REPROVISIONING("REPROVISIONING"), + + DEPROVISIONING("DEPROVISIONING"), + + DEPROVISIONED("DEPROVISIONED"), + + NOT_PROVISIONED("NOT_PROVISIONED"), + + NOT_DEPROVISIONED("NOT_DEPROVISIONED"); + + private String value; + + GatewayState(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static GatewayState fromValue(String value) { + for (GatewayState b : GatewayState.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final GatewayState enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public GatewayState read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return GatewayState.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + GatewayState.fromValue(value); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/GatewayType.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/GatewayType.java new file mode 100644 index 00000000..3bfbef9a --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/GatewayType.java @@ -0,0 +1,76 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.google.gson.annotations.SerializedName; + +import java.io.IOException; +import java.util.Locale; +import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; + +/** + * Gateway type + */ +@JsonAdapter(GatewayType.Adapter.class) +public enum GatewayType { + + VPN_GW("VPN_GW"); + + private String value; + + GatewayType(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static GatewayType fromValue(String value) { + for (GatewayType b : GatewayType.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final GatewayType enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public GatewayType read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return GatewayType.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + GatewayType.fromValue(value); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/Interconnect.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/Interconnect.java new file mode 100644 index 00000000..b2fc570a --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/Interconnect.java @@ -0,0 +1,783 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.Changelog; +import com.equinix.sdk.fabricv4.model.InterconnectLocation; +import com.equinix.sdk.fabricv4.model.InterconnectNotification; +import com.equinix.sdk.fabricv4.model.InterconnectPackage; +import com.equinix.sdk.fabricv4.model.InterconnectRouter; +import com.equinix.sdk.fabricv4.model.InterconnectState; +import com.equinix.sdk.fabricv4.model.Order; +import com.equinix.sdk.fabricv4.model.Project; +import com.equinix.sdk.fabricv4.model.SimplifiedAccount; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * Interconnect specification <font color=\"red\"> <sup color='red'>Beta</sup></font> + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class Interconnect { + public static final String SERIALIZED_NAME_HREF = "href"; + @SerializedName(SERIALIZED_NAME_HREF) + @javax.annotation.Nullable + private String href; + + public static final String SERIALIZED_NAME_UUID = "uuid"; + @SerializedName(SERIALIZED_NAME_UUID) + @javax.annotation.Nullable + private UUID uuid; + + /** + * Interconnect type + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + XF_IC("XF_IC"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nullable + private TypeEnum type; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable + private String name; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable + private String description; + + public static final String SERIALIZED_NAME_STATE = "state"; + @SerializedName(SERIALIZED_NAME_STATE) + @javax.annotation.Nullable + private InterconnectState state; + + public static final String SERIALIZED_NAME_LOCATION = "location"; + @SerializedName(SERIALIZED_NAME_LOCATION) + @javax.annotation.Nullable + private InterconnectLocation location; + + public static final String SERIALIZED_NAME_USED_BANDWIDTH = "usedBandwidth"; + @SerializedName(SERIALIZED_NAME_USED_BANDWIDTH) + @javax.annotation.Nullable + private Integer usedBandwidth; + + public static final String SERIALIZED_NAME_PACKAGE = "package"; + @SerializedName(SERIALIZED_NAME_PACKAGE) + @javax.annotation.Nullable + private InterconnectPackage _package; + + public static final String SERIALIZED_NAME_ROUTER = "router"; + @SerializedName(SERIALIZED_NAME_ROUTER) + @javax.annotation.Nullable + private InterconnectRouter router; + + public static final String SERIALIZED_NAME_ORDER = "order"; + @SerializedName(SERIALIZED_NAME_ORDER) + @javax.annotation.Nullable + private Order order; + + public static final String SERIALIZED_NAME_ACCOUNT = "account"; + @SerializedName(SERIALIZED_NAME_ACCOUNT) + @javax.annotation.Nullable + private SimplifiedAccount account; + + public static final String SERIALIZED_NAME_PROJECT = "project"; + @SerializedName(SERIALIZED_NAME_PROJECT) + @javax.annotation.Nullable + private Project project; + + public static final String SERIALIZED_NAME_NOTIFICATIONS = "notifications"; + @SerializedName(SERIALIZED_NAME_NOTIFICATIONS) + @javax.annotation.Nullable + private List notifications = new ArrayList<>(); + + public static final String SERIALIZED_NAME_CHANGE_LOG = "changeLog"; + @SerializedName(SERIALIZED_NAME_CHANGE_LOG) + @javax.annotation.Nullable + private Changelog changeLog; + + public Interconnect() { + } + + public Interconnect href(@javax.annotation.Nullable String href) { + this.href = href; + return this; + } + + /** + * Interconnect URI + * @return href + */ + @javax.annotation.Nullable + public String getHref() { + return href; + } + + public void setHref(@javax.annotation.Nullable String href) { + this.href = href; + } + + + public Interconnect uuid(@javax.annotation.Nullable UUID uuid) { + this.uuid = uuid; + return this; + } + + /** + * Equinix-assigned interconnect identifier + * @return uuid + */ + @javax.annotation.Nullable + public UUID getUuid() { + return uuid; + } + + public void setUuid(@javax.annotation.Nullable UUID uuid) { + this.uuid = uuid; + } + + + public Interconnect type(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + return this; + } + + /** + * Interconnect type + * @return type + */ + @javax.annotation.Nullable + public TypeEnum getType() { + return type; + } + + public void setType(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + } + + + public Interconnect name(@javax.annotation.Nullable String name) { + this.name = name; + return this; + } + + /** + * Interconnect name + * @return name + */ + @javax.annotation.Nullable + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nullable String name) { + this.name = name; + } + + + public Interconnect description(@javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * Interconnect description + * @return description + */ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + + + public Interconnect state(@javax.annotation.Nullable InterconnectState state) { + this.state = state; + return this; + } + + /** + * Get state + * @return state + */ + @javax.annotation.Nullable + public InterconnectState getState() { + return state; + } + + public void setState(@javax.annotation.Nullable InterconnectState state) { + this.state = state; + } + + + public Interconnect location(@javax.annotation.Nullable InterconnectLocation location) { + this.location = location; + return this; + } + + /** + * Get location + * @return location + */ + @javax.annotation.Nullable + public InterconnectLocation getLocation() { + return location; + } + + public void setLocation(@javax.annotation.Nullable InterconnectLocation location) { + this.location = location; + } + + + public Interconnect usedBandwidth(@javax.annotation.Nullable Integer usedBandwidth) { + this.usedBandwidth = usedBandwidth; + return this; + } + + /** + * Interconnect used bandwidth in Mbps + * minimum: 0 + * @return usedBandwidth + */ + @javax.annotation.Nullable + public Integer getUsedBandwidth() { + return usedBandwidth; + } + + public void setUsedBandwidth(@javax.annotation.Nullable Integer usedBandwidth) { + this.usedBandwidth = usedBandwidth; + } + + + public Interconnect _package(@javax.annotation.Nullable InterconnectPackage _package) { + this._package = _package; + return this; + } + + /** + * Get _package + * @return _package + */ + @javax.annotation.Nullable + public InterconnectPackage getPackage() { + return _package; + } + + public void setPackage(@javax.annotation.Nullable InterconnectPackage _package) { + this._package = _package; + } + + + public Interconnect router(@javax.annotation.Nullable InterconnectRouter router) { + this.router = router; + return this; + } + + /** + * Get router + * @return router + */ + @javax.annotation.Nullable + public InterconnectRouter getRouter() { + return router; + } + + public void setRouter(@javax.annotation.Nullable InterconnectRouter router) { + this.router = router; + } + + + public Interconnect order(@javax.annotation.Nullable Order order) { + this.order = order; + return this; + } + + /** + * Get order + * @return order + */ + @javax.annotation.Nullable + public Order getOrder() { + return order; + } + + public void setOrder(@javax.annotation.Nullable Order order) { + this.order = order; + } + + + public Interconnect account(@javax.annotation.Nullable SimplifiedAccount account) { + this.account = account; + return this; + } + + /** + * Get account + * @return account + */ + @javax.annotation.Nullable + public SimplifiedAccount getAccount() { + return account; + } + + public void setAccount(@javax.annotation.Nullable SimplifiedAccount account) { + this.account = account; + } + + + public Interconnect project(@javax.annotation.Nullable Project project) { + this.project = project; + return this; + } + + /** + * Get project + * @return project + */ + @javax.annotation.Nullable + public Project getProject() { + return project; + } + + public void setProject(@javax.annotation.Nullable Project project) { + this.project = project; + } + + + public Interconnect notifications(@javax.annotation.Nullable List notifications) { + this.notifications = notifications; + return this; + } + + public Interconnect addNotificationsItem(InterconnectNotification notificationsItem) { + if (this.notifications == null) { + this.notifications = new ArrayList<>(); + } + this.notifications.add(notificationsItem); + return this; + } + + /** + * Interconnect notification preferences + * @return notifications + */ + @javax.annotation.Nullable + public List getNotifications() { + return notifications; + } + + public void setNotifications(@javax.annotation.Nullable List notifications) { + this.notifications = notifications; + } + + + public Interconnect changeLog(@javax.annotation.Nullable Changelog changeLog) { + this.changeLog = changeLog; + return this; + } + + /** + * Get changeLog + * @return changeLog + */ + @javax.annotation.Nullable + public Changelog getChangeLog() { + return changeLog; + } + + public void setChangeLog(@javax.annotation.Nullable Changelog changeLog) { + this.changeLog = changeLog; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the Interconnect instance itself + */ + public Interconnect putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Interconnect interconnect = (Interconnect) o; + return Objects.equals(this.href, interconnect.href) && + Objects.equals(this.uuid, interconnect.uuid) && + Objects.equals(this.type, interconnect.type) && + Objects.equals(this.name, interconnect.name) && + Objects.equals(this.description, interconnect.description) && + Objects.equals(this.state, interconnect.state) && + Objects.equals(this.location, interconnect.location) && + Objects.equals(this.usedBandwidth, interconnect.usedBandwidth) && + Objects.equals(this._package, interconnect._package) && + Objects.equals(this.router, interconnect.router) && + Objects.equals(this.order, interconnect.order) && + Objects.equals(this.account, interconnect.account) && + Objects.equals(this.project, interconnect.project) && + Objects.equals(this.notifications, interconnect.notifications) && + Objects.equals(this.changeLog, interconnect.changeLog)&& + Objects.equals(this.additionalProperties, interconnect.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(href, uuid, type, name, description, state, location, usedBandwidth, _package, router, order, account, project, notifications, changeLog, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Interconnect {\n"); + sb.append(" href: ").append(toIndentedString(href)).append("\n"); + sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" state: ").append(toIndentedString(state)).append("\n"); + sb.append(" location: ").append(toIndentedString(location)).append("\n"); + sb.append(" usedBandwidth: ").append(toIndentedString(usedBandwidth)).append("\n"); + sb.append(" _package: ").append(toIndentedString(_package)).append("\n"); + sb.append(" router: ").append(toIndentedString(router)).append("\n"); + sb.append(" order: ").append(toIndentedString(order)).append("\n"); + sb.append(" account: ").append(toIndentedString(account)).append("\n"); + sb.append(" project: ").append(toIndentedString(project)).append("\n"); + sb.append(" notifications: ").append(toIndentedString(notifications)).append("\n"); + sb.append(" changeLog: ").append(toIndentedString(changeLog)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("href", "uuid", "type", "name", "description", "state", "location", "usedBandwidth", "package", "router", "order", "account", "project", "notifications", "changeLog")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to Interconnect + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Interconnect.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in Interconnect is not found in the empty JSON string", Interconnect.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("href") != null && !jsonObj.get("href").isJsonNull()) && !jsonObj.get("href").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `href` to be a primitive type in the JSON string but got `%s`", jsonObj.get("href").toString())); + } + if ((jsonObj.get("uuid") != null && !jsonObj.get("uuid").isJsonNull()) && !jsonObj.get("uuid").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `uuid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("uuid").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // validate the optional field `type` + if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { + TypeEnum.validateJsonElement(jsonObj.get("type")); + } + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + } + // validate the optional field `state` + if (jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) { + InterconnectState.validateJsonElement(jsonObj.get("state")); + } + // validate the optional field `location` + if (jsonObj.get("location") != null && !jsonObj.get("location").isJsonNull()) { + InterconnectLocation.validateJsonElement(jsonObj.get("location")); + } + // validate the optional field `package` + if (jsonObj.get("package") != null && !jsonObj.get("package").isJsonNull()) { + InterconnectPackage.validateJsonElement(jsonObj.get("package")); + } + // validate the optional field `router` + if (jsonObj.get("router") != null && !jsonObj.get("router").isJsonNull()) { + InterconnectRouter.validateJsonElement(jsonObj.get("router")); + } + // validate the optional field `order` + if (jsonObj.get("order") != null && !jsonObj.get("order").isJsonNull()) { + Order.validateJsonElement(jsonObj.get("order")); + } + // validate the optional field `account` + if (jsonObj.get("account") != null && !jsonObj.get("account").isJsonNull()) { + SimplifiedAccount.validateJsonElement(jsonObj.get("account")); + } + // validate the optional field `project` + if (jsonObj.get("project") != null && !jsonObj.get("project").isJsonNull()) { + Project.validateJsonElement(jsonObj.get("project")); + } + if (jsonObj.get("notifications") != null && !jsonObj.get("notifications").isJsonNull()) { + JsonArray jsonArraynotifications = jsonObj.getAsJsonArray("notifications"); + if (jsonArraynotifications != null) { + // ensure the json data is an array + if (!jsonObj.get("notifications").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `notifications` to be an array in the JSON string but got `%s`", jsonObj.get("notifications").toString())); + } + + // validate the optional field `notifications` (array) + for (int i = 0; i < jsonArraynotifications.size(); i++) { + InterconnectNotification.validateJsonElement(jsonArraynotifications.get(i)); + }; + } + } + // validate the optional field `changeLog` + if (jsonObj.get("changeLog") != null && !jsonObj.get("changeLog").isJsonNull()) { + Changelog.validateJsonElement(jsonObj.get("changeLog")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!Interconnect.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Interconnect' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Interconnect.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, Interconnect value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public Interconnect read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + Interconnect instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of Interconnect given an JSON string + * + * @param jsonString JSON string + * @return An instance of Interconnect + * @throws IOException if the JSON string is invalid with respect to Interconnect + */ + public static Interconnect fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, Interconnect.class); + } + + /** + * Convert an instance of Interconnect to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/InterconnectFilter.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/InterconnectFilter.java new file mode 100644 index 00000000..acd086c7 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/InterconnectFilter.java @@ -0,0 +1,533 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.InterconnectSearchFieldName; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * InterconnectFilter + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class InterconnectFilter { + public static final String SERIALIZED_NAME_AND = "and"; + @SerializedName(SERIALIZED_NAME_AND) + @javax.annotation.Nullable + private List and = new ArrayList<>(); + + public static final String SERIALIZED_NAME_OR = "or"; + @SerializedName(SERIALIZED_NAME_OR) + @javax.annotation.Nullable + private List or = new ArrayList<>(); + + public static final String SERIALIZED_NAME_PROPERTY = "property"; + @SerializedName(SERIALIZED_NAME_PROPERTY) + @javax.annotation.Nullable + private InterconnectSearchFieldName property; + + /** + * Gets or Sets operator + */ + @JsonAdapter(OperatorEnum.Adapter.class) + public enum OperatorEnum { + EQUAL("="), + + NOT_EQUAL("!="), + + GREATER_THAN(">"), + + GREATER_THAN_OR_EQUAL_TO(">="), + + LESS_THAN("<"), + + LESS_THAN_OR_EQUAL_TO("<="), + + BETWEEN("BETWEEN"), + + NOT_BETWEEN("NOT BETWEEN"), + + LIKE("LIKE"), + + NOT_LIKE("NOT LIKE"), + + ILIKE("ILIKE"), + + NOT_ILIKE("NOT ILIKE"), + + IN("IN"), + + NOT_IN("NOT IN"); + + private String value; + + OperatorEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static OperatorEnum fromValue(String value) { + for (OperatorEnum b : OperatorEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final OperatorEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public OperatorEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return OperatorEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + OperatorEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_OPERATOR = "operator"; + @SerializedName(SERIALIZED_NAME_OPERATOR) + @javax.annotation.Nullable + private OperatorEnum operator; + + public static final String SERIALIZED_NAME_VALUES = "values"; + @SerializedName(SERIALIZED_NAME_VALUES) + @javax.annotation.Nullable + private List values = new ArrayList<>(); + + public InterconnectFilter() { + } + + public InterconnectFilter and(@javax.annotation.Nullable List and) { + this.and = and; + return this; + } + + public InterconnectFilter addAndItem(InterconnectFilter andItem) { + if (this.and == null) { + this.and = new ArrayList<>(); + } + this.and.add(andItem); + return this; + } + + /** + * Get and + * @return and + */ + @javax.annotation.Nullable + public List getAnd() { + return and; + } + + public void setAnd(@javax.annotation.Nullable List and) { + this.and = and; + } + + + public InterconnectFilter or(@javax.annotation.Nullable List or) { + this.or = or; + return this; + } + + public InterconnectFilter addOrItem(InterconnectFilter orItem) { + if (this.or == null) { + this.or = new ArrayList<>(); + } + this.or.add(orItem); + return this; + } + + /** + * Get or + * @return or + */ + @javax.annotation.Nullable + public List getOr() { + return or; + } + + public void setOr(@javax.annotation.Nullable List or) { + this.or = or; + } + + + public InterconnectFilter property(@javax.annotation.Nullable InterconnectSearchFieldName property) { + this.property = property; + return this; + } + + /** + * Get property + * @return property + */ + @javax.annotation.Nullable + public InterconnectSearchFieldName getProperty() { + return property; + } + + public void setProperty(@javax.annotation.Nullable InterconnectSearchFieldName property) { + this.property = property; + } + + + public InterconnectFilter operator(@javax.annotation.Nullable OperatorEnum operator) { + this.operator = operator; + return this; + } + + /** + * Get operator + * @return operator + */ + @javax.annotation.Nullable + public OperatorEnum getOperator() { + return operator; + } + + public void setOperator(@javax.annotation.Nullable OperatorEnum operator) { + this.operator = operator; + } + + + public InterconnectFilter values(@javax.annotation.Nullable List values) { + this.values = values; + return this; + } + + public InterconnectFilter addValuesItem(String valuesItem) { + if (this.values == null) { + this.values = new ArrayList<>(); + } + this.values.add(valuesItem); + return this; + } + + /** + * Get values + * @return values + */ + @javax.annotation.Nullable + public List getValues() { + return values; + } + + public void setValues(@javax.annotation.Nullable List values) { + this.values = values; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the InterconnectFilter instance itself + */ + public InterconnectFilter putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InterconnectFilter interconnectFilter = (InterconnectFilter) o; + return Objects.equals(this.and, interconnectFilter.and) && + Objects.equals(this.or, interconnectFilter.or) && + Objects.equals(this.property, interconnectFilter.property) && + Objects.equals(this.operator, interconnectFilter.operator) && + Objects.equals(this.values, interconnectFilter.values)&& + Objects.equals(this.additionalProperties, interconnectFilter.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(and, or, property, operator, values, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class InterconnectFilter {\n"); + sb.append(" and: ").append(toIndentedString(and)).append("\n"); + sb.append(" or: ").append(toIndentedString(or)).append("\n"); + sb.append(" property: ").append(toIndentedString(property)).append("\n"); + sb.append(" operator: ").append(toIndentedString(operator)).append("\n"); + sb.append(" values: ").append(toIndentedString(values)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("and", "or", "property", "operator", "values")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to InterconnectFilter + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!InterconnectFilter.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in InterconnectFilter is not found in the empty JSON string", InterconnectFilter.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("and") != null && !jsonObj.get("and").isJsonNull()) { + JsonArray jsonArrayand = jsonObj.getAsJsonArray("and"); + if (jsonArrayand != null) { + // ensure the json data is an array + if (!jsonObj.get("and").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `and` to be an array in the JSON string but got `%s`", jsonObj.get("and").toString())); + } + + // validate the optional field `and` (array) + for (int i = 0; i < jsonArrayand.size(); i++) { + InterconnectFilter.validateJsonElement(jsonArrayand.get(i)); + }; + } + } + if (jsonObj.get("or") != null && !jsonObj.get("or").isJsonNull()) { + JsonArray jsonArrayor = jsonObj.getAsJsonArray("or"); + if (jsonArrayor != null) { + // ensure the json data is an array + if (!jsonObj.get("or").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `or` to be an array in the JSON string but got `%s`", jsonObj.get("or").toString())); + } + + // validate the optional field `or` (array) + for (int i = 0; i < jsonArrayor.size(); i++) { + InterconnectFilter.validateJsonElement(jsonArrayor.get(i)); + }; + } + } + // validate the optional field `property` + if (jsonObj.get("property") != null && !jsonObj.get("property").isJsonNull()) { + InterconnectSearchFieldName.validateJsonElement(jsonObj.get("property")); + } + if ((jsonObj.get("operator") != null && !jsonObj.get("operator").isJsonNull()) && !jsonObj.get("operator").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `operator` to be a primitive type in the JSON string but got `%s`", jsonObj.get("operator").toString())); + } + // validate the optional field `operator` + if (jsonObj.get("operator") != null && !jsonObj.get("operator").isJsonNull()) { + OperatorEnum.validateJsonElement(jsonObj.get("operator")); + } + // ensure the optional json data is an array if present + if (jsonObj.get("values") != null && !jsonObj.get("values").isJsonNull() && !jsonObj.get("values").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `values` to be an array in the JSON string but got `%s`", jsonObj.get("values").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!InterconnectFilter.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'InterconnectFilter' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(InterconnectFilter.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, InterconnectFilter value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public InterconnectFilter read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + InterconnectFilter instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of InterconnectFilter given an JSON string + * + * @param jsonString JSON string + * @return An instance of InterconnectFilter + * @throws IOException if the JSON string is invalid with respect to InterconnectFilter + */ + public static InterconnectFilter fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, InterconnectFilter.class); + } + + /** + * Convert an instance of InterconnectFilter to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LastMileNotificationInfo.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/InterconnectLocation.java similarity index 69% rename from services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LastMileNotificationInfo.java rename to services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/InterconnectLocation.java index ad4591cd..c1519151 100644 --- a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LastMileNotificationInfo.java +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/InterconnectLocation.java @@ -46,58 +46,58 @@ import com.equinix.sdk.fabricv4.JSON; /** - * Last mile notification contact information + * Interconnect metro location */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") -public class LastMileNotificationInfo { - public static final String SERIALIZED_NAME_KEY = "key"; - @SerializedName(SERIALIZED_NAME_KEY) +public class InterconnectLocation { + public static final String SERIALIZED_NAME_HREF = "href"; + @SerializedName(SERIALIZED_NAME_HREF) @javax.annotation.Nullable - private String key; + private String href; - public static final String SERIALIZED_NAME_VALUE = "value"; - @SerializedName(SERIALIZED_NAME_VALUE) + public static final String SERIALIZED_NAME_METRO_CODE = "metroCode"; + @SerializedName(SERIALIZED_NAME_METRO_CODE) @javax.annotation.Nullable - private String value; + private String metroCode; - public LastMileNotificationInfo() { + public InterconnectLocation() { } - public LastMileNotificationInfo key(@javax.annotation.Nullable String key) { - this.key = key; + public InterconnectLocation href(@javax.annotation.Nullable String href) { + this.href = href; return this; } /** - * Key - * @return key + * Metro URI + * @return href */ @javax.annotation.Nullable - public String getKey() { - return key; + public String getHref() { + return href; } - public void setKey(@javax.annotation.Nullable String key) { - this.key = key; + public void setHref(@javax.annotation.Nullable String href) { + this.href = href; } - public LastMileNotificationInfo value(@javax.annotation.Nullable String value) { - this.value = value; + public InterconnectLocation metroCode(@javax.annotation.Nullable String metroCode) { + this.metroCode = metroCode; return this; } /** - * Value - * @return value + * Metro code where the interconnect is created + * @return metroCode */ @javax.annotation.Nullable - public String getValue() { - return value; + public String getMetroCode() { + return metroCode; } - public void setValue(@javax.annotation.Nullable String value) { - this.value = value; + public void setMetroCode(@javax.annotation.Nullable String metroCode) { + this.metroCode = metroCode; } /** @@ -113,9 +113,9 @@ public void setValue(@javax.annotation.Nullable String value) { * * @param key name of the property * @param value value of the property - * @return the LastMileNotificationInfo instance itself + * @return the InterconnectLocation instance itself */ - public LastMileNotificationInfo putAdditionalProperty(String key, Object value) { + public InterconnectLocation putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -154,23 +154,23 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - LastMileNotificationInfo lastMileNotificationInfo = (LastMileNotificationInfo) o; - return Objects.equals(this.key, lastMileNotificationInfo.key) && - Objects.equals(this.value, lastMileNotificationInfo.value)&& - Objects.equals(this.additionalProperties, lastMileNotificationInfo.additionalProperties); + InterconnectLocation interconnectLocation = (InterconnectLocation) o; + return Objects.equals(this.href, interconnectLocation.href) && + Objects.equals(this.metroCode, interconnectLocation.metroCode)&& + Objects.equals(this.additionalProperties, interconnectLocation.additionalProperties); } @Override public int hashCode() { - return Objects.hash(key, value, additionalProperties); + return Objects.hash(href, metroCode, additionalProperties); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class LastMileNotificationInfo {\n"); - sb.append(" key: ").append(toIndentedString(key)).append("\n"); - sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append("class InterconnectLocation {\n"); + sb.append(" href: ").append(toIndentedString(href)).append("\n"); + sb.append(" metroCode: ").append(toIndentedString(metroCode)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); @@ -193,7 +193,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("key", "value")); + openapiFields = new HashSet(Arrays.asList("href", "metroCode")); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(0); @@ -203,20 +203,20 @@ private String toIndentedString(Object o) { * Validates the JSON Element and throws an exception if issues found * * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to LastMileNotificationInfo + * @throws IOException if the JSON Element is invalid with respect to InterconnectLocation */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { - if (!LastMileNotificationInfo.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in LastMileNotificationInfo is not found in the empty JSON string", LastMileNotificationInfo.openapiRequiredFields.toString())); + if (!InterconnectLocation.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in InterconnectLocation is not found in the empty JSON string", InterconnectLocation.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("key") != null && !jsonObj.get("key").isJsonNull()) && !jsonObj.get("key").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `key` to be a primitive type in the JSON string but got `%s`", jsonObj.get("key").toString())); + if ((jsonObj.get("href") != null && !jsonObj.get("href").isJsonNull()) && !jsonObj.get("href").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `href` to be a primitive type in the JSON string but got `%s`", jsonObj.get("href").toString())); } - if ((jsonObj.get("value") != null && !jsonObj.get("value").isJsonNull()) && !jsonObj.get("value").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `value` to be a primitive type in the JSON string but got `%s`", jsonObj.get("value").toString())); + if ((jsonObj.get("metroCode") != null && !jsonObj.get("metroCode").isJsonNull()) && !jsonObj.get("metroCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `metroCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("metroCode").toString())); } } @@ -224,16 +224,16 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!LastMileNotificationInfo.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'LastMileNotificationInfo' and its subtypes + if (!InterconnectLocation.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'InterconnectLocation' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(LastMileNotificationInfo.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(InterconnectLocation.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, LastMileNotificationInfo value) throws IOException { + public void write(JsonWriter out, InterconnectLocation value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); // serialize additional properties @@ -261,12 +261,12 @@ else if (entry.getValue() instanceof Character) } @Override - public LastMileNotificationInfo read(JsonReader in) throws IOException { + public InterconnectLocation read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); JsonObject jsonObj = jsonElement.getAsJsonObject(); // store additional fields in the deserialized instance - LastMileNotificationInfo instance = thisAdapter.fromJsonTree(jsonObj); + InterconnectLocation instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { if (!openapiFields.contains(entry.getKey())) { if (entry.getValue().isJsonPrimitive()) { // primitive type @@ -293,18 +293,18 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } /** - * Create an instance of LastMileNotificationInfo given an JSON string + * Create an instance of InterconnectLocation given an JSON string * * @param jsonString JSON string - * @return An instance of LastMileNotificationInfo - * @throws IOException if the JSON string is invalid with respect to LastMileNotificationInfo + * @return An instance of InterconnectLocation + * @throws IOException if the JSON string is invalid with respect to InterconnectLocation */ - public static LastMileNotificationInfo fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, LastMileNotificationInfo.class); + public static InterconnectLocation fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, InterconnectLocation.class); } /** - * Convert an instance of LastMileNotificationInfo to an JSON string + * Convert an instance of InterconnectLocation to an JSON string * * @return JSON string */ diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/InterconnectLocationRequest.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/InterconnectLocationRequest.java new file mode 100644 index 00000000..fc91d0a8 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/InterconnectLocationRequest.java @@ -0,0 +1,286 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * Interconnect location for create request + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class InterconnectLocationRequest { + public static final String SERIALIZED_NAME_METRO_CODE = "metroCode"; + @SerializedName(SERIALIZED_NAME_METRO_CODE) + @javax.annotation.Nullable + private String metroCode; + + public InterconnectLocationRequest() { + } + + public InterconnectLocationRequest metroCode(@javax.annotation.Nullable String metroCode) { + this.metroCode = metroCode; + return this; + } + + /** + * Metro code where the interconnect is created + * @return metroCode + */ + @javax.annotation.Nullable + public String getMetroCode() { + return metroCode; + } + + public void setMetroCode(@javax.annotation.Nullable String metroCode) { + this.metroCode = metroCode; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the InterconnectLocationRequest instance itself + */ + public InterconnectLocationRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InterconnectLocationRequest interconnectLocationRequest = (InterconnectLocationRequest) o; + return Objects.equals(this.metroCode, interconnectLocationRequest.metroCode)&& + Objects.equals(this.additionalProperties, interconnectLocationRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(metroCode, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class InterconnectLocationRequest {\n"); + sb.append(" metroCode: ").append(toIndentedString(metroCode)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("metroCode")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to InterconnectLocationRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!InterconnectLocationRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in InterconnectLocationRequest is not found in the empty JSON string", InterconnectLocationRequest.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("metroCode") != null && !jsonObj.get("metroCode").isJsonNull()) && !jsonObj.get("metroCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `metroCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("metroCode").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!InterconnectLocationRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'InterconnectLocationRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(InterconnectLocationRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, InterconnectLocationRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public InterconnectLocationRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + InterconnectLocationRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of InterconnectLocationRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of InterconnectLocationRequest + * @throws IOException if the JSON string is invalid with respect to InterconnectLocationRequest + */ + public static InterconnectLocationRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, InterconnectLocationRequest.class); + } + + /** + * Convert an instance of InterconnectLocationRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/InterconnectNotification.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/InterconnectNotification.java new file mode 100644 index 00000000..e68a54d7 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/InterconnectNotification.java @@ -0,0 +1,380 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * Interconnect notification preference + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class InterconnectNotification { + /** + * Notification type + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + NOTIFICATIONS("NOTIFICATIONS"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nullable + private TypeEnum type; + + public static final String SERIALIZED_NAME_EMAILS = "emails"; + @SerializedName(SERIALIZED_NAME_EMAILS) + @javax.annotation.Nullable + private List emails = new ArrayList<>(); + + public InterconnectNotification() { + } + + public InterconnectNotification type(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + return this; + } + + /** + * Notification type + * @return type + */ + @javax.annotation.Nullable + public TypeEnum getType() { + return type; + } + + public void setType(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + } + + + public InterconnectNotification emails(@javax.annotation.Nullable List emails) { + this.emails = emails; + return this; + } + + public InterconnectNotification addEmailsItem(String emailsItem) { + if (this.emails == null) { + this.emails = new ArrayList<>(); + } + this.emails.add(emailsItem); + return this; + } + + /** + * Array of contact emails + * @return emails + */ + @javax.annotation.Nullable + public List getEmails() { + return emails; + } + + public void setEmails(@javax.annotation.Nullable List emails) { + this.emails = emails; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the InterconnectNotification instance itself + */ + public InterconnectNotification putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InterconnectNotification interconnectNotification = (InterconnectNotification) o; + return Objects.equals(this.type, interconnectNotification.type) && + Objects.equals(this.emails, interconnectNotification.emails)&& + Objects.equals(this.additionalProperties, interconnectNotification.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(type, emails, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class InterconnectNotification {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" emails: ").append(toIndentedString(emails)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("type", "emails")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to InterconnectNotification + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!InterconnectNotification.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in InterconnectNotification is not found in the empty JSON string", InterconnectNotification.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // validate the optional field `type` + if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { + TypeEnum.validateJsonElement(jsonObj.get("type")); + } + // ensure the optional json data is an array if present + if (jsonObj.get("emails") != null && !jsonObj.get("emails").isJsonNull() && !jsonObj.get("emails").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `emails` to be an array in the JSON string but got `%s`", jsonObj.get("emails").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!InterconnectNotification.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'InterconnectNotification' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(InterconnectNotification.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, InterconnectNotification value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public InterconnectNotification read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + InterconnectNotification instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of InterconnectNotification given an JSON string + * + * @param jsonString JSON string + * @return An instance of InterconnectNotification + * @throws IOException if the JSON string is invalid with respect to InterconnectNotification + */ + public static InterconnectNotification fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, InterconnectNotification.class); + } + + /** + * Convert an instance of InterconnectNotification to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/InterconnectPackage.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/InterconnectPackage.java new file mode 100644 index 00000000..7c3c7bf3 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/InterconnectPackage.java @@ -0,0 +1,486 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * Interconnect Package details <font color=\"red\"> <sup color='red'>Beta</sup></font> + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class InterconnectPackage { + public static final String SERIALIZED_NAME_HREF = "href"; + @SerializedName(SERIALIZED_NAME_HREF) + @javax.annotation.Nullable + private String href; + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nonnull + private String type; + + public static final String SERIALIZED_NAME_UUID = "uuid"; + @SerializedName(SERIALIZED_NAME_UUID) + @javax.annotation.Nullable + private String uuid; + + public static final String SERIALIZED_NAME_CODE = "code"; + @SerializedName(SERIALIZED_NAME_CODE) + @javax.annotation.Nonnull + private String code; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable + private String description; + + public static final String SERIALIZED_NAME_ROUTES_MAX = "routesMax"; + @SerializedName(SERIALIZED_NAME_ROUTES_MAX) + @javax.annotation.Nullable + private Integer routesMax; + + public static final String SERIALIZED_NAME_BANDWIDTH_MAX = "bandwidthMax"; + @SerializedName(SERIALIZED_NAME_BANDWIDTH_MAX) + @javax.annotation.Nullable + private Integer bandwidthMax; + + public static final String SERIALIZED_NAME_IS_REMOTE = "isRemote"; + @SerializedName(SERIALIZED_NAME_IS_REMOTE) + @javax.annotation.Nullable + private Boolean isRemote; + + public InterconnectPackage() { + } + + public InterconnectPackage( + String href + ) { + this(); + this.href = href; + } + + /** + * Interconnect Package URI + * @return href + */ + @javax.annotation.Nullable + public String getHref() { + return href; + } + + + + public InterconnectPackage type(@javax.annotation.Nonnull String type) { + this.type = type; + return this; + } + + /** + * Interconnect Package Type + * @return type + */ + @javax.annotation.Nonnull + public String getType() { + return type; + } + + public void setType(@javax.annotation.Nonnull String type) { + this.type = type; + } + + + public InterconnectPackage uuid(@javax.annotation.Nullable String uuid) { + this.uuid = uuid; + return this; + } + + /** + * Equinix-assigned Interconnect Package identifier + * @return uuid + */ + @javax.annotation.Nullable + public String getUuid() { + return uuid; + } + + public void setUuid(@javax.annotation.Nullable String uuid) { + this.uuid = uuid; + } + + + public InterconnectPackage code(@javax.annotation.Nonnull String code) { + this.code = code; + return this; + } + + /** + * Interconnect Package code (e.g. LAB, BASIC, STANDARD, PREMIUM) + * @return code + */ + @javax.annotation.Nonnull + public String getCode() { + return code; + } + + public void setCode(@javax.annotation.Nonnull String code) { + this.code = code; + } + + + public InterconnectPackage description(@javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * Interconnect Package description + * @return description + */ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + + + public InterconnectPackage routesMax(@javax.annotation.Nullable Integer routesMax) { + this.routesMax = routesMax; + return this; + } + + /** + * Maximum number of routes + * @return routesMax + */ + @javax.annotation.Nullable + public Integer getRoutesMax() { + return routesMax; + } + + public void setRoutesMax(@javax.annotation.Nullable Integer routesMax) { + this.routesMax = routesMax; + } + + + public InterconnectPackage bandwidthMax(@javax.annotation.Nullable Integer bandwidthMax) { + this.bandwidthMax = bandwidthMax; + return this; + } + + /** + * Maximum bandwidth in Mbps + * @return bandwidthMax + */ + @javax.annotation.Nullable + public Integer getBandwidthMax() { + return bandwidthMax; + } + + public void setBandwidthMax(@javax.annotation.Nullable Integer bandwidthMax) { + this.bandwidthMax = bandwidthMax; + } + + + public InterconnectPackage isRemote(@javax.annotation.Nullable Boolean isRemote) { + this.isRemote = isRemote; + return this; + } + + /** + * Authorization to connect remotely + * @return isRemote + */ + @javax.annotation.Nullable + public Boolean getIsRemote() { + return isRemote; + } + + public void setIsRemote(@javax.annotation.Nullable Boolean isRemote) { + this.isRemote = isRemote; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the InterconnectPackage instance itself + */ + public InterconnectPackage putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InterconnectPackage interconnectPackage = (InterconnectPackage) o; + return Objects.equals(this.href, interconnectPackage.href) && + Objects.equals(this.type, interconnectPackage.type) && + Objects.equals(this.uuid, interconnectPackage.uuid) && + Objects.equals(this.code, interconnectPackage.code) && + Objects.equals(this.description, interconnectPackage.description) && + Objects.equals(this.routesMax, interconnectPackage.routesMax) && + Objects.equals(this.bandwidthMax, interconnectPackage.bandwidthMax) && + Objects.equals(this.isRemote, interconnectPackage.isRemote)&& + Objects.equals(this.additionalProperties, interconnectPackage.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(href, type, uuid, code, description, routesMax, bandwidthMax, isRemote, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class InterconnectPackage {\n"); + sb.append(" href: ").append(toIndentedString(href)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" routesMax: ").append(toIndentedString(routesMax)).append("\n"); + sb.append(" bandwidthMax: ").append(toIndentedString(bandwidthMax)).append("\n"); + sb.append(" isRemote: ").append(toIndentedString(isRemote)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("href", "type", "uuid", "code", "description", "routesMax", "bandwidthMax", "isRemote")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("type", "code")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to InterconnectPackage + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!InterconnectPackage.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in InterconnectPackage is not found in the empty JSON string", InterconnectPackage.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : InterconnectPackage.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("href") != null && !jsonObj.get("href").isJsonNull()) && !jsonObj.get("href").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `href` to be a primitive type in the JSON string but got `%s`", jsonObj.get("href").toString())); + } + if (!jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + if ((jsonObj.get("uuid") != null && !jsonObj.get("uuid").isJsonNull()) && !jsonObj.get("uuid").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `uuid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("uuid").toString())); + } + if (!jsonObj.get("code").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("code").toString())); + } + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!InterconnectPackage.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'InterconnectPackage' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(InterconnectPackage.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, InterconnectPackage value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public InterconnectPackage read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + InterconnectPackage instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of InterconnectPackage given an JSON string + * + * @param jsonString JSON string + * @return An instance of InterconnectPackage + * @throws IOException if the JSON string is invalid with respect to InterconnectPackage + */ + public static InterconnectPackage fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, InterconnectPackage.class); + } + + /** + * Convert an instance of InterconnectPackage to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/InterconnectPostRequest.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/InterconnectPostRequest.java new file mode 100644 index 00000000..c63edf3e --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/InterconnectPostRequest.java @@ -0,0 +1,597 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.InterconnectLocationRequest; +import com.equinix.sdk.fabricv4.model.InterconnectNotification; +import com.equinix.sdk.fabricv4.model.InterconnectPackage; +import com.equinix.sdk.fabricv4.model.Order; +import com.equinix.sdk.fabricv4.model.Project; +import com.equinix.sdk.fabricv4.model.SimplifiedAccount; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * Create Interconnect request + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class InterconnectPostRequest { + /** + * Interconnect type + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + XF_IC("XF_IC"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nonnull + private TypeEnum type; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable + private String description; + + public static final String SERIALIZED_NAME_LOCATION = "location"; + @SerializedName(SERIALIZED_NAME_LOCATION) + @javax.annotation.Nonnull + private InterconnectLocationRequest location; + + public static final String SERIALIZED_NAME_PACKAGE = "package"; + @SerializedName(SERIALIZED_NAME_PACKAGE) + @javax.annotation.Nonnull + private InterconnectPackage _package; + + public static final String SERIALIZED_NAME_ORDER = "order"; + @SerializedName(SERIALIZED_NAME_ORDER) + @javax.annotation.Nullable + private Order order; + + public static final String SERIALIZED_NAME_ACCOUNT = "account"; + @SerializedName(SERIALIZED_NAME_ACCOUNT) + @javax.annotation.Nonnull + private SimplifiedAccount account; + + public static final String SERIALIZED_NAME_PROJECT = "project"; + @SerializedName(SERIALIZED_NAME_PROJECT) + @javax.annotation.Nonnull + private Project project; + + public static final String SERIALIZED_NAME_NOTIFICATIONS = "notifications"; + @SerializedName(SERIALIZED_NAME_NOTIFICATIONS) + @javax.annotation.Nonnull + private List notifications = new ArrayList<>(); + + public InterconnectPostRequest() { + } + + public InterconnectPostRequest type(@javax.annotation.Nonnull TypeEnum type) { + this.type = type; + return this; + } + + /** + * Interconnect type + * @return type + */ + @javax.annotation.Nonnull + public TypeEnum getType() { + return type; + } + + public void setType(@javax.annotation.Nonnull TypeEnum type) { + this.type = type; + } + + + public InterconnectPostRequest name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Customer-provided interconnect name + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public InterconnectPostRequest description(@javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * Customer-provided interconnect description + * @return description + */ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + + + public InterconnectPostRequest location(@javax.annotation.Nonnull InterconnectLocationRequest location) { + this.location = location; + return this; + } + + /** + * Get location + * @return location + */ + @javax.annotation.Nonnull + public InterconnectLocationRequest getLocation() { + return location; + } + + public void setLocation(@javax.annotation.Nonnull InterconnectLocationRequest location) { + this.location = location; + } + + + public InterconnectPostRequest _package(@javax.annotation.Nonnull InterconnectPackage _package) { + this._package = _package; + return this; + } + + /** + * Get _package + * @return _package + */ + @javax.annotation.Nonnull + public InterconnectPackage getPackage() { + return _package; + } + + public void setPackage(@javax.annotation.Nonnull InterconnectPackage _package) { + this._package = _package; + } + + + public InterconnectPostRequest order(@javax.annotation.Nullable Order order) { + this.order = order; + return this; + } + + /** + * Get order + * @return order + */ + @javax.annotation.Nullable + public Order getOrder() { + return order; + } + + public void setOrder(@javax.annotation.Nullable Order order) { + this.order = order; + } + + + public InterconnectPostRequest account(@javax.annotation.Nonnull SimplifiedAccount account) { + this.account = account; + return this; + } + + /** + * Get account + * @return account + */ + @javax.annotation.Nonnull + public SimplifiedAccount getAccount() { + return account; + } + + public void setAccount(@javax.annotation.Nonnull SimplifiedAccount account) { + this.account = account; + } + + + public InterconnectPostRequest project(@javax.annotation.Nonnull Project project) { + this.project = project; + return this; + } + + /** + * Get project + * @return project + */ + @javax.annotation.Nonnull + public Project getProject() { + return project; + } + + public void setProject(@javax.annotation.Nonnull Project project) { + this.project = project; + } + + + public InterconnectPostRequest notifications(@javax.annotation.Nonnull List notifications) { + this.notifications = notifications; + return this; + } + + public InterconnectPostRequest addNotificationsItem(InterconnectNotification notificationsItem) { + if (this.notifications == null) { + this.notifications = new ArrayList<>(); + } + this.notifications.add(notificationsItem); + return this; + } + + /** + * Preferences for notifications on interconnect configuration or status changes + * @return notifications + */ + @javax.annotation.Nonnull + public List getNotifications() { + return notifications; + } + + public void setNotifications(@javax.annotation.Nonnull List notifications) { + this.notifications = notifications; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the InterconnectPostRequest instance itself + */ + public InterconnectPostRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InterconnectPostRequest interconnectPostRequest = (InterconnectPostRequest) o; + return Objects.equals(this.type, interconnectPostRequest.type) && + Objects.equals(this.name, interconnectPostRequest.name) && + Objects.equals(this.description, interconnectPostRequest.description) && + Objects.equals(this.location, interconnectPostRequest.location) && + Objects.equals(this._package, interconnectPostRequest._package) && + Objects.equals(this.order, interconnectPostRequest.order) && + Objects.equals(this.account, interconnectPostRequest.account) && + Objects.equals(this.project, interconnectPostRequest.project) && + Objects.equals(this.notifications, interconnectPostRequest.notifications)&& + Objects.equals(this.additionalProperties, interconnectPostRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(type, name, description, location, _package, order, account, project, notifications, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class InterconnectPostRequest {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" location: ").append(toIndentedString(location)).append("\n"); + sb.append(" _package: ").append(toIndentedString(_package)).append("\n"); + sb.append(" order: ").append(toIndentedString(order)).append("\n"); + sb.append(" account: ").append(toIndentedString(account)).append("\n"); + sb.append(" project: ").append(toIndentedString(project)).append("\n"); + sb.append(" notifications: ").append(toIndentedString(notifications)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("type", "name", "description", "location", "package", "order", "account", "project", "notifications")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("type", "name", "location", "package", "account", "project", "notifications")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to InterconnectPostRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!InterconnectPostRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in InterconnectPostRequest is not found in the empty JSON string", InterconnectPostRequest.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : InterconnectPostRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // validate the required field `type` + TypeEnum.validateJsonElement(jsonObj.get("type")); + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + } + // validate the required field `location` + InterconnectLocationRequest.validateJsonElement(jsonObj.get("location")); + // validate the required field `package` + InterconnectPackage.validateJsonElement(jsonObj.get("package")); + // validate the optional field `order` + if (jsonObj.get("order") != null && !jsonObj.get("order").isJsonNull()) { + Order.validateJsonElement(jsonObj.get("order")); + } + // validate the required field `account` + SimplifiedAccount.validateJsonElement(jsonObj.get("account")); + // validate the required field `project` + Project.validateJsonElement(jsonObj.get("project")); + // ensure the json data is an array + if (!jsonObj.get("notifications").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `notifications` to be an array in the JSON string but got `%s`", jsonObj.get("notifications").toString())); + } + + JsonArray jsonArraynotifications = jsonObj.getAsJsonArray("notifications"); + // validate the required field `notifications` (array) + for (int i = 0; i < jsonArraynotifications.size(); i++) { + InterconnectNotification.validateJsonElement(jsonArraynotifications.get(i)); + }; + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!InterconnectPostRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'InterconnectPostRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(InterconnectPostRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, InterconnectPostRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public InterconnectPostRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + InterconnectPostRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of InterconnectPostRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of InterconnectPostRequest + * @throws IOException if the JSON string is invalid with respect to InterconnectPostRequest + */ + public static InterconnectPostRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, InterconnectPostRequest.class); + } + + /** + * Convert an instance of InterconnectPostRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/InterconnectRouter.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/InterconnectRouter.java new file mode 100644 index 00000000..f0afc192 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/InterconnectRouter.java @@ -0,0 +1,399 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import java.util.UUID; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * Router associated with the interconnect <font color=\"red\"> <sup color='red'>Beta</sup></font> + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class InterconnectRouter { + public static final String SERIALIZED_NAME_HREF = "href"; + @SerializedName(SERIALIZED_NAME_HREF) + @javax.annotation.Nullable + private String href; + + /** + * Router type + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + IC_ROUTER("IC_ROUTER"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nullable + private TypeEnum type; + + public static final String SERIALIZED_NAME_UUID = "uuid"; + @SerializedName(SERIALIZED_NAME_UUID) + @javax.annotation.Nullable + private UUID uuid; + + public InterconnectRouter() { + } + + public InterconnectRouter href(@javax.annotation.Nullable String href) { + this.href = href; + return this; + } + + /** + * Router URI + * @return href + */ + @javax.annotation.Nullable + public String getHref() { + return href; + } + + public void setHref(@javax.annotation.Nullable String href) { + this.href = href; + } + + + public InterconnectRouter type(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + return this; + } + + /** + * Router type + * @return type + */ + @javax.annotation.Nullable + public TypeEnum getType() { + return type; + } + + public void setType(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + } + + + public InterconnectRouter uuid(@javax.annotation.Nullable UUID uuid) { + this.uuid = uuid; + return this; + } + + /** + * Router identifier + * @return uuid + */ + @javax.annotation.Nullable + public UUID getUuid() { + return uuid; + } + + public void setUuid(@javax.annotation.Nullable UUID uuid) { + this.uuid = uuid; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the InterconnectRouter instance itself + */ + public InterconnectRouter putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InterconnectRouter interconnectRouter = (InterconnectRouter) o; + return Objects.equals(this.href, interconnectRouter.href) && + Objects.equals(this.type, interconnectRouter.type) && + Objects.equals(this.uuid, interconnectRouter.uuid)&& + Objects.equals(this.additionalProperties, interconnectRouter.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(href, type, uuid, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class InterconnectRouter {\n"); + sb.append(" href: ").append(toIndentedString(href)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("href", "type", "uuid")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to InterconnectRouter + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!InterconnectRouter.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in InterconnectRouter is not found in the empty JSON string", InterconnectRouter.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("href") != null && !jsonObj.get("href").isJsonNull()) && !jsonObj.get("href").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `href` to be a primitive type in the JSON string but got `%s`", jsonObj.get("href").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // validate the optional field `type` + if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { + TypeEnum.validateJsonElement(jsonObj.get("type")); + } + if ((jsonObj.get("uuid") != null && !jsonObj.get("uuid").isJsonNull()) && !jsonObj.get("uuid").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `uuid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("uuid").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!InterconnectRouter.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'InterconnectRouter' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(InterconnectRouter.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, InterconnectRouter value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public InterconnectRouter read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + InterconnectRouter instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of InterconnectRouter given an JSON string + * + * @param jsonString JSON string + * @return An instance of InterconnectRouter + * @throws IOException if the JSON string is invalid with respect to InterconnectRouter + */ + public static InterconnectRouter fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, InterconnectRouter.class); + } + + /** + * Convert an instance of InterconnectRouter to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/InterconnectSearchFieldName.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/InterconnectSearchFieldName.java new file mode 100644 index 00000000..0eaa437f --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/InterconnectSearchFieldName.java @@ -0,0 +1,100 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.google.gson.annotations.SerializedName; + +import java.io.IOException; +import java.util.Locale; +import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; + +/** + * Possible field names to use on filters + */ +@JsonAdapter(InterconnectSearchFieldName.Adapter.class) +public enum InterconnectSearchFieldName { + + UUID("/uuid"), + + TYPE("/type"), + + NAME("/name"), + + STATE("/state"), + + DESCRIPTION("/description"), + + LOCATION_METROCODE("/location/metroCode"), + + PACKAGE_CODE("/package/code"), + + PROJECT_PROJECTID("/project/projectId"), + + CHANGELOG_CREATEDDATETIME("/changeLog/createdDateTime"), + + CHANGELOG_UPDATEDDATETIME("/changeLog/updatedDateTime"), + + CHANGELOG_DELETEDDATETIME("/changeLog/deletedDateTime"), + + ROUTER_UUID("/router/uuid"), + + STAR("/_*"); + + private String value; + + InterconnectSearchFieldName(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static InterconnectSearchFieldName fromValue(String value) { + for (InterconnectSearchFieldName b : InterconnectSearchFieldName.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final InterconnectSearchFieldName enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public InterconnectSearchFieldName read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return InterconnectSearchFieldName.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + InterconnectSearchFieldName.fromValue(value); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/InterconnectSearchRequest.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/InterconnectSearchRequest.java new file mode 100644 index 00000000..b7d49b91 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/InterconnectSearchRequest.java @@ -0,0 +1,370 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.InterconnectFilter; +import com.equinix.sdk.fabricv4.model.InterconnectSortCriteria; +import com.equinix.sdk.fabricv4.model.PaginationRequest; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * Search requests containing criteria + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class InterconnectSearchRequest { + public static final String SERIALIZED_NAME_FILTER = "filter"; + @SerializedName(SERIALIZED_NAME_FILTER) + @javax.annotation.Nullable + private InterconnectFilter filter; + + public static final String SERIALIZED_NAME_PAGINATION = "pagination"; + @SerializedName(SERIALIZED_NAME_PAGINATION) + @javax.annotation.Nullable + private PaginationRequest pagination; + + public static final String SERIALIZED_NAME_SORT = "sort"; + @SerializedName(SERIALIZED_NAME_SORT) + @javax.annotation.Nullable + private List sort = new ArrayList<>(); + + public InterconnectSearchRequest() { + } + + public InterconnectSearchRequest filter(@javax.annotation.Nullable InterconnectFilter filter) { + this.filter = filter; + return this; + } + + /** + * Get filter + * @return filter + */ + @javax.annotation.Nullable + public InterconnectFilter getFilter() { + return filter; + } + + public void setFilter(@javax.annotation.Nullable InterconnectFilter filter) { + this.filter = filter; + } + + + public InterconnectSearchRequest pagination(@javax.annotation.Nullable PaginationRequest pagination) { + this.pagination = pagination; + return this; + } + + /** + * Get pagination + * @return pagination + */ + @javax.annotation.Nullable + public PaginationRequest getPagination() { + return pagination; + } + + public void setPagination(@javax.annotation.Nullable PaginationRequest pagination) { + this.pagination = pagination; + } + + + public InterconnectSearchRequest sort(@javax.annotation.Nullable List sort) { + this.sort = sort; + return this; + } + + public InterconnectSearchRequest addSortItem(InterconnectSortCriteria sortItem) { + if (this.sort == null) { + this.sort = new ArrayList<>(); + } + this.sort.add(sortItem); + return this; + } + + /** + * Get sort + * @return sort + */ + @javax.annotation.Nullable + public List getSort() { + return sort; + } + + public void setSort(@javax.annotation.Nullable List sort) { + this.sort = sort; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the InterconnectSearchRequest instance itself + */ + public InterconnectSearchRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InterconnectSearchRequest interconnectSearchRequest = (InterconnectSearchRequest) o; + return Objects.equals(this.filter, interconnectSearchRequest.filter) && + Objects.equals(this.pagination, interconnectSearchRequest.pagination) && + Objects.equals(this.sort, interconnectSearchRequest.sort)&& + Objects.equals(this.additionalProperties, interconnectSearchRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(filter, pagination, sort, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class InterconnectSearchRequest {\n"); + sb.append(" filter: ").append(toIndentedString(filter)).append("\n"); + sb.append(" pagination: ").append(toIndentedString(pagination)).append("\n"); + sb.append(" sort: ").append(toIndentedString(sort)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("filter", "pagination", "sort")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to InterconnectSearchRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!InterconnectSearchRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in InterconnectSearchRequest is not found in the empty JSON string", InterconnectSearchRequest.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `filter` + if (jsonObj.get("filter") != null && !jsonObj.get("filter").isJsonNull()) { + InterconnectFilter.validateJsonElement(jsonObj.get("filter")); + } + // validate the optional field `pagination` + if (jsonObj.get("pagination") != null && !jsonObj.get("pagination").isJsonNull()) { + PaginationRequest.validateJsonElement(jsonObj.get("pagination")); + } + if (jsonObj.get("sort") != null && !jsonObj.get("sort").isJsonNull()) { + JsonArray jsonArraysort = jsonObj.getAsJsonArray("sort"); + if (jsonArraysort != null) { + // ensure the json data is an array + if (!jsonObj.get("sort").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `sort` to be an array in the JSON string but got `%s`", jsonObj.get("sort").toString())); + } + + // validate the optional field `sort` (array) + for (int i = 0; i < jsonArraysort.size(); i++) { + InterconnectSortCriteria.validateJsonElement(jsonArraysort.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!InterconnectSearchRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'InterconnectSearchRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(InterconnectSearchRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, InterconnectSearchRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public InterconnectSearchRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + InterconnectSearchRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of InterconnectSearchRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of InterconnectSearchRequest + * @throws IOException if the JSON string is invalid with respect to InterconnectSearchRequest + */ + public static InterconnectSearchRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, InterconnectSearchRequest.class); + } + + /** + * Convert an instance of InterconnectSearchRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/InterconnectSearchResponse.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/InterconnectSearchResponse.java new file mode 100644 index 00000000..ac4d3a5c --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/InterconnectSearchResponse.java @@ -0,0 +1,388 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.Interconnect; +import com.equinix.sdk.fabricv4.model.InterconnectSortCriteriaResponse; +import com.equinix.sdk.fabricv4.model.Pagination; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * List of interconnects + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class InterconnectSearchResponse { + public static final String SERIALIZED_NAME_PAGINATION = "pagination"; + @SerializedName(SERIALIZED_NAME_PAGINATION) + @javax.annotation.Nullable + private Pagination pagination; + + public static final String SERIALIZED_NAME_SORT = "sort"; + @SerializedName(SERIALIZED_NAME_SORT) + @javax.annotation.Nullable + private List sort = new ArrayList<>(); + + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + @javax.annotation.Nullable + private List data = new ArrayList<>(); + + public InterconnectSearchResponse() { + } + + public InterconnectSearchResponse pagination(@javax.annotation.Nullable Pagination pagination) { + this.pagination = pagination; + return this; + } + + /** + * Get pagination + * @return pagination + */ + @javax.annotation.Nullable + public Pagination getPagination() { + return pagination; + } + + public void setPagination(@javax.annotation.Nullable Pagination pagination) { + this.pagination = pagination; + } + + + public InterconnectSearchResponse sort(@javax.annotation.Nullable List sort) { + this.sort = sort; + return this; + } + + public InterconnectSearchResponse addSortItem(InterconnectSortCriteriaResponse sortItem) { + if (this.sort == null) { + this.sort = new ArrayList<>(); + } + this.sort.add(sortItem); + return this; + } + + /** + * Get sort + * @return sort + */ + @javax.annotation.Nullable + public List getSort() { + return sort; + } + + public void setSort(@javax.annotation.Nullable List sort) { + this.sort = sort; + } + + + public InterconnectSearchResponse data(@javax.annotation.Nullable List data) { + this.data = data; + return this; + } + + public InterconnectSearchResponse addDataItem(Interconnect dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + return this; + } + + /** + * Get data + * @return data + */ + @javax.annotation.Nullable + public List getData() { + return data; + } + + public void setData(@javax.annotation.Nullable List data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the InterconnectSearchResponse instance itself + */ + public InterconnectSearchResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InterconnectSearchResponse interconnectSearchResponse = (InterconnectSearchResponse) o; + return Objects.equals(this.pagination, interconnectSearchResponse.pagination) && + Objects.equals(this.sort, interconnectSearchResponse.sort) && + Objects.equals(this.data, interconnectSearchResponse.data)&& + Objects.equals(this.additionalProperties, interconnectSearchResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(pagination, sort, data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class InterconnectSearchResponse {\n"); + sb.append(" pagination: ").append(toIndentedString(pagination)).append("\n"); + sb.append(" sort: ").append(toIndentedString(sort)).append("\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("pagination", "sort", "data")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to InterconnectSearchResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!InterconnectSearchResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in InterconnectSearchResponse is not found in the empty JSON string", InterconnectSearchResponse.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `pagination` + if (jsonObj.get("pagination") != null && !jsonObj.get("pagination").isJsonNull()) { + Pagination.validateJsonElement(jsonObj.get("pagination")); + } + if (jsonObj.get("sort") != null && !jsonObj.get("sort").isJsonNull()) { + JsonArray jsonArraysort = jsonObj.getAsJsonArray("sort"); + if (jsonArraysort != null) { + // ensure the json data is an array + if (!jsonObj.get("sort").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `sort` to be an array in the JSON string but got `%s`", jsonObj.get("sort").toString())); + } + + // validate the optional field `sort` (array) + for (int i = 0; i < jsonArraysort.size(); i++) { + InterconnectSortCriteriaResponse.validateJsonElement(jsonArraysort.get(i)); + }; + } + } + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); + if (jsonArraydata != null) { + // ensure the json data is an array + if (!jsonObj.get("data").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + } + + // validate the optional field `data` (array) + for (int i = 0; i < jsonArraydata.size(); i++) { + Interconnect.validateJsonElement(jsonArraydata.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!InterconnectSearchResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'InterconnectSearchResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(InterconnectSearchResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, InterconnectSearchResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public InterconnectSearchResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + InterconnectSearchResponse instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of InterconnectSearchResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of InterconnectSearchResponse + * @throws IOException if the JSON string is invalid with respect to InterconnectSearchResponse + */ + public static InterconnectSearchResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, InterconnectSearchResponse.class); + } + + /** + * Convert an instance of InterconnectSearchResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/InterconnectSortBy.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/InterconnectSortBy.java new file mode 100644 index 00000000..98188ecc --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/InterconnectSortBy.java @@ -0,0 +1,82 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.google.gson.annotations.SerializedName; + +import java.io.IOException; +import java.util.Locale; +import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; + +/** + * Possible field names to use on sorting + */ +@JsonAdapter(InterconnectSortBy.Adapter.class) +public enum InterconnectSortBy { + + CHANGELOG_CREATEDDATETIME("/changeLog/createdDateTime"), + + CHANGELOG_UPDATEDDATETIME("/changeLog/updatedDateTime"), + + NAME("/name"), + + STATE("/state"); + + private String value; + + InterconnectSortBy(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static InterconnectSortBy fromValue(String value) { + for (InterconnectSortBy b : InterconnectSortBy.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final InterconnectSortBy enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public InterconnectSortBy read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return InterconnectSortBy.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + InterconnectSortBy.fromValue(value); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/InterconnectSortByResponse.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/InterconnectSortByResponse.java new file mode 100644 index 00000000..903e7428 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/InterconnectSortByResponse.java @@ -0,0 +1,82 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.google.gson.annotations.SerializedName; + +import java.io.IOException; +import java.util.Locale; +import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; + +/** + * Possible field names to use on sorting + */ +@JsonAdapter(InterconnectSortByResponse.Adapter.class) +public enum InterconnectSortByResponse { + + CHANGELOG_CREATEDDATETIME("/changeLog/createdDateTime"), + + CHANGELOG_UPDATEDDATETIME("/changeLog/updatedDateTime"), + + NAME("/name"), + + STATE("/state"); + + private String value; + + InterconnectSortByResponse(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static InterconnectSortByResponse fromValue(String value) { + for (InterconnectSortByResponse b : InterconnectSortByResponse.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final InterconnectSortByResponse enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public InterconnectSortByResponse read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return InterconnectSortByResponse.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + InterconnectSortByResponse.fromValue(value); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/InterconnectSortCriteria.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/InterconnectSortCriteria.java new file mode 100644 index 00000000..e20b99fa --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/InterconnectSortCriteria.java @@ -0,0 +1,319 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.InterconnectSortBy; +import com.equinix.sdk.fabricv4.model.InterconnectSortDirection; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * InterconnectSortCriteria + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class InterconnectSortCriteria { + public static final String SERIALIZED_NAME_DIRECTION = "direction"; + @SerializedName(SERIALIZED_NAME_DIRECTION) + @javax.annotation.Nullable + private InterconnectSortDirection direction = InterconnectSortDirection.DESC; + + public static final String SERIALIZED_NAME_PROPERTY = "property"; + @SerializedName(SERIALIZED_NAME_PROPERTY) + @javax.annotation.Nullable + private InterconnectSortBy property = InterconnectSortBy.CHANGELOG_UPDATEDDATETIME; + + public InterconnectSortCriteria() { + } + + public InterconnectSortCriteria direction(@javax.annotation.Nullable InterconnectSortDirection direction) { + this.direction = direction; + return this; + } + + /** + * Get direction + * @return direction + */ + @javax.annotation.Nullable + public InterconnectSortDirection getDirection() { + return direction; + } + + public void setDirection(@javax.annotation.Nullable InterconnectSortDirection direction) { + this.direction = direction; + } + + + public InterconnectSortCriteria property(@javax.annotation.Nullable InterconnectSortBy property) { + this.property = property; + return this; + } + + /** + * Get property + * @return property + */ + @javax.annotation.Nullable + public InterconnectSortBy getProperty() { + return property; + } + + public void setProperty(@javax.annotation.Nullable InterconnectSortBy property) { + this.property = property; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the InterconnectSortCriteria instance itself + */ + public InterconnectSortCriteria putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InterconnectSortCriteria interconnectSortCriteria = (InterconnectSortCriteria) o; + return Objects.equals(this.direction, interconnectSortCriteria.direction) && + Objects.equals(this.property, interconnectSortCriteria.property)&& + Objects.equals(this.additionalProperties, interconnectSortCriteria.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(direction, property, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class InterconnectSortCriteria {\n"); + sb.append(" direction: ").append(toIndentedString(direction)).append("\n"); + sb.append(" property: ").append(toIndentedString(property)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("direction", "property")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to InterconnectSortCriteria + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!InterconnectSortCriteria.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in InterconnectSortCriteria is not found in the empty JSON string", InterconnectSortCriteria.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `direction` + if (jsonObj.get("direction") != null && !jsonObj.get("direction").isJsonNull()) { + InterconnectSortDirection.validateJsonElement(jsonObj.get("direction")); + } + // validate the optional field `property` + if (jsonObj.get("property") != null && !jsonObj.get("property").isJsonNull()) { + InterconnectSortBy.validateJsonElement(jsonObj.get("property")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!InterconnectSortCriteria.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'InterconnectSortCriteria' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(InterconnectSortCriteria.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, InterconnectSortCriteria value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public InterconnectSortCriteria read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + InterconnectSortCriteria instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of InterconnectSortCriteria given an JSON string + * + * @param jsonString JSON string + * @return An instance of InterconnectSortCriteria + * @throws IOException if the JSON string is invalid with respect to InterconnectSortCriteria + */ + public static InterconnectSortCriteria fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, InterconnectSortCriteria.class); + } + + /** + * Convert an instance of InterconnectSortCriteria to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/InterconnectSortCriteriaResponse.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/InterconnectSortCriteriaResponse.java new file mode 100644 index 00000000..dbc1625f --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/InterconnectSortCriteriaResponse.java @@ -0,0 +1,319 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.InterconnectSortByResponse; +import com.equinix.sdk.fabricv4.model.InterconnectSortDirectionResponse; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * InterconnectSortCriteriaResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class InterconnectSortCriteriaResponse { + public static final String SERIALIZED_NAME_DIRECTION = "direction"; + @SerializedName(SERIALIZED_NAME_DIRECTION) + @javax.annotation.Nullable + private InterconnectSortDirectionResponse direction = InterconnectSortDirectionResponse.DESC; + + public static final String SERIALIZED_NAME_PROPERTY = "property"; + @SerializedName(SERIALIZED_NAME_PROPERTY) + @javax.annotation.Nullable + private InterconnectSortByResponse property = InterconnectSortByResponse.CHANGELOG_UPDATEDDATETIME; + + public InterconnectSortCriteriaResponse() { + } + + public InterconnectSortCriteriaResponse direction(@javax.annotation.Nullable InterconnectSortDirectionResponse direction) { + this.direction = direction; + return this; + } + + /** + * Get direction + * @return direction + */ + @javax.annotation.Nullable + public InterconnectSortDirectionResponse getDirection() { + return direction; + } + + public void setDirection(@javax.annotation.Nullable InterconnectSortDirectionResponse direction) { + this.direction = direction; + } + + + public InterconnectSortCriteriaResponse property(@javax.annotation.Nullable InterconnectSortByResponse property) { + this.property = property; + return this; + } + + /** + * Get property + * @return property + */ + @javax.annotation.Nullable + public InterconnectSortByResponse getProperty() { + return property; + } + + public void setProperty(@javax.annotation.Nullable InterconnectSortByResponse property) { + this.property = property; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the InterconnectSortCriteriaResponse instance itself + */ + public InterconnectSortCriteriaResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InterconnectSortCriteriaResponse interconnectSortCriteriaResponse = (InterconnectSortCriteriaResponse) o; + return Objects.equals(this.direction, interconnectSortCriteriaResponse.direction) && + Objects.equals(this.property, interconnectSortCriteriaResponse.property)&& + Objects.equals(this.additionalProperties, interconnectSortCriteriaResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(direction, property, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class InterconnectSortCriteriaResponse {\n"); + sb.append(" direction: ").append(toIndentedString(direction)).append("\n"); + sb.append(" property: ").append(toIndentedString(property)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("direction", "property")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to InterconnectSortCriteriaResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!InterconnectSortCriteriaResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in InterconnectSortCriteriaResponse is not found in the empty JSON string", InterconnectSortCriteriaResponse.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `direction` + if (jsonObj.get("direction") != null && !jsonObj.get("direction").isJsonNull()) { + InterconnectSortDirectionResponse.validateJsonElement(jsonObj.get("direction")); + } + // validate the optional field `property` + if (jsonObj.get("property") != null && !jsonObj.get("property").isJsonNull()) { + InterconnectSortByResponse.validateJsonElement(jsonObj.get("property")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!InterconnectSortCriteriaResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'InterconnectSortCriteriaResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(InterconnectSortCriteriaResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, InterconnectSortCriteriaResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public InterconnectSortCriteriaResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + InterconnectSortCriteriaResponse instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of InterconnectSortCriteriaResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of InterconnectSortCriteriaResponse + * @throws IOException if the JSON string is invalid with respect to InterconnectSortCriteriaResponse + */ + public static InterconnectSortCriteriaResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, InterconnectSortCriteriaResponse.class); + } + + /** + * Convert an instance of InterconnectSortCriteriaResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/InterconnectSortDirection.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/InterconnectSortDirection.java new file mode 100644 index 00000000..a927b19e --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/InterconnectSortDirection.java @@ -0,0 +1,78 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.google.gson.annotations.SerializedName; + +import java.io.IOException; +import java.util.Locale; +import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; + +/** + * Sorting direction + */ +@JsonAdapter(InterconnectSortDirection.Adapter.class) +public enum InterconnectSortDirection { + + DESC("DESC"), + + ASC("ASC"); + + private String value; + + InterconnectSortDirection(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static InterconnectSortDirection fromValue(String value) { + for (InterconnectSortDirection b : InterconnectSortDirection.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final InterconnectSortDirection enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public InterconnectSortDirection read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return InterconnectSortDirection.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + InterconnectSortDirection.fromValue(value); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/InterconnectSortDirectionResponse.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/InterconnectSortDirectionResponse.java new file mode 100644 index 00000000..eeec7604 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/InterconnectSortDirectionResponse.java @@ -0,0 +1,78 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.google.gson.annotations.SerializedName; + +import java.io.IOException; +import java.util.Locale; +import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; + +/** + * Sorting direction + */ +@JsonAdapter(InterconnectSortDirectionResponse.Adapter.class) +public enum InterconnectSortDirectionResponse { + + DESC("DESC"), + + ASC("ASC"); + + private String value; + + InterconnectSortDirectionResponse(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static InterconnectSortDirectionResponse fromValue(String value) { + for (InterconnectSortDirectionResponse b : InterconnectSortDirectionResponse.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final InterconnectSortDirectionResponse enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public InterconnectSortDirectionResponse read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return InterconnectSortDirectionResponse.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + InterconnectSortDirectionResponse.fromValue(value); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/InterconnectState.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/InterconnectState.java new file mode 100644 index 00000000..ae8f63e6 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/InterconnectState.java @@ -0,0 +1,82 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.google.gson.annotations.SerializedName; + +import java.io.IOException; +import java.util.Locale; +import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; + +/** + * Interconnect lifecycle state + */ +@JsonAdapter(InterconnectState.Adapter.class) +public enum InterconnectState { + + PROVISIONING("PROVISIONING"), + + PROVISIONED("PROVISIONED"), + + DEPROVISIONING("DEPROVISIONING"), + + DEPROVISIONED("DEPROVISIONED"); + + private String value; + + InterconnectState(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static InterconnectState fromValue(String value) { + for (InterconnectState b : InterconnectState.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final InterconnectState enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public InterconnectState read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return InterconnectState.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + InterconnectState.fromValue(value); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/InternetAccessRoutingProtocolBgp.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/InternetAccessRoutingProtocolBgp.java index 4d597a91..a5dc5bd2 100644 --- a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/InternetAccessRoutingProtocolBgp.java +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/InternetAccessRoutingProtocolBgp.java @@ -18,6 +18,7 @@ import com.equinix.sdk.fabricv4.model.InternetAccessCustomerRoute; import com.equinix.sdk.fabricv4.model.InternetAccessExportPolicy; import com.equinix.sdk.fabricv4.model.InternetAccessRoutingProtocol; +import com.equinix.sdk.fabricv4.model.InternetAccessRoutingProtocolBgpAsn; import com.equinix.sdk.fabricv4.model.InternetAccessRoutingProtocolType; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -63,7 +64,13 @@ public class InternetAccessRoutingProtocolBgp extends InternetAccessRoutingProto @javax.annotation.Nonnull private InternetAccessExportPolicy exportPolicy; + public static final String SERIALIZED_NAME_ASN = "asn"; + @SerializedName(SERIALIZED_NAME_ASN) + @javax.annotation.Nullable + private InternetAccessRoutingProtocolBgpAsn asn; + public static final String SERIALIZED_NAME_CUSTOMER_ASN = "customerAsn"; + @Deprecated @SerializedName(SERIALIZED_NAME_CUSTOMER_ASN) @javax.annotation.Nullable private Long customerAsn; @@ -100,6 +107,26 @@ public void setExportPolicy(@javax.annotation.Nonnull InternetAccessExportPolicy } + public InternetAccessRoutingProtocolBgp asn(@javax.annotation.Nullable InternetAccessRoutingProtocolBgpAsn asn) { + this.asn = asn; + return this; + } + + /** + * Get asn + * @return asn + */ + @javax.annotation.Nullable + public InternetAccessRoutingProtocolBgpAsn getAsn() { + return asn; + } + + public void setAsn(@javax.annotation.Nullable InternetAccessRoutingProtocolBgpAsn asn) { + this.asn = asn; + } + + + @Deprecated public InternetAccessRoutingProtocolBgp customerAsn(@javax.annotation.Nullable Long customerAsn) { this.customerAsn = customerAsn; return this; @@ -108,12 +135,15 @@ public InternetAccessRoutingProtocolBgp customerAsn(@javax.annotation.Nullable L /** * Customer ASN. Valid range is 1-64495 or 131072-4199999999. Currently this option is only available for EIA over dedicated port. * @return customerAsn + * @deprecated */ + @Deprecated @javax.annotation.Nullable public Long getCustomerAsn() { return customerAsn; } + @Deprecated public void setCustomerAsn(@javax.annotation.Nullable Long customerAsn) { this.customerAsn = customerAsn; } @@ -168,6 +198,7 @@ public boolean equals(Object o) { } InternetAccessRoutingProtocolBgp internetAccessRoutingProtocolBgp = (InternetAccessRoutingProtocolBgp) o; return Objects.equals(this.exportPolicy, internetAccessRoutingProtocolBgp.exportPolicy) && + Objects.equals(this.asn, internetAccessRoutingProtocolBgp.asn) && Objects.equals(this.customerAsn, internetAccessRoutingProtocolBgp.customerAsn) && Objects.equals(this.bgpAuthKey, internetAccessRoutingProtocolBgp.bgpAuthKey) && Objects.equals(this.customerAsnRange, internetAccessRoutingProtocolBgp.customerAsnRange) && @@ -176,7 +207,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(exportPolicy, customerAsn, bgpAuthKey, customerAsnRange, super.hashCode()); + return Objects.hash(exportPolicy, asn, customerAsn, bgpAuthKey, customerAsnRange, super.hashCode()); } @Override @@ -185,6 +216,7 @@ public String toString() { sb.append("class InternetAccessRoutingProtocolBgp {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" exportPolicy: ").append(toIndentedString(exportPolicy)).append("\n"); + sb.append(" asn: ").append(toIndentedString(asn)).append("\n"); sb.append(" customerAsn: ").append(toIndentedString(customerAsn)).append("\n"); sb.append(" bgpAuthKey: ").append(toIndentedString(bgpAuthKey)).append("\n"); sb.append(" customerAsnRange: ").append(toIndentedString(customerAsnRange)).append("\n"); @@ -209,7 +241,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("type", "customerRoutes", "connections", "exportPolicy", "customerAsn", "bgpAuthKey", "customerAsnRange")); + openapiFields = new HashSet(Arrays.asList("type", "customerRoutes", "connections", "exportPolicy", "asn", "customerAsn", "bgpAuthKey", "customerAsnRange")); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(Arrays.asList("exportPolicy", "customerAsnRange", "type", "customerRoutes", "connections")); @@ -237,6 +269,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the required field `exportPolicy` InternetAccessExportPolicy.validateJsonElement(jsonObj.get("exportPolicy")); + // validate the optional field `asn` + if (jsonObj.get("asn") != null && !jsonObj.get("asn").isJsonNull()) { + InternetAccessRoutingProtocolBgpAsn.validateJsonElement(jsonObj.get("asn")); + } if ((jsonObj.get("bgpAuthKey") != null && !jsonObj.get("bgpAuthKey").isJsonNull()) && !jsonObj.get("bgpAuthKey").isJsonPrimitive()) { throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `bgpAuthKey` to be a primitive type in the JSON string but got `%s`", jsonObj.get("bgpAuthKey").toString())); } diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/InternetAccessRoutingProtocolBgpAsn.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/InternetAccessRoutingProtocolBgpAsn.java new file mode 100644 index 00000000..5f2061ba --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/InternetAccessRoutingProtocolBgpAsn.java @@ -0,0 +1,323 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import java.util.UUID; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * InternetAccessRoutingProtocolBgpAsn + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class InternetAccessRoutingProtocolBgpAsn { + public static final String SERIALIZED_NAME_HREF = "href"; + @SerializedName(SERIALIZED_NAME_HREF) + @javax.annotation.Nullable + private String href; + + public static final String SERIALIZED_NAME_UUID = "uuid"; + @SerializedName(SERIALIZED_NAME_UUID) + @javax.annotation.Nonnull + private UUID uuid; + + public InternetAccessRoutingProtocolBgpAsn() { + } + + public InternetAccessRoutingProtocolBgpAsn href(@javax.annotation.Nullable String href) { + this.href = href; + return this; + } + + /** + * URI of the ASN resource + * @return href + */ + @javax.annotation.Nullable + public String getHref() { + return href; + } + + public void setHref(@javax.annotation.Nullable String href) { + this.href = href; + } + + + public InternetAccessRoutingProtocolBgpAsn uuid(@javax.annotation.Nonnull UUID uuid) { + this.uuid = uuid; + return this; + } + + /** + * Unique identifier of the ASN + * @return uuid + */ + @javax.annotation.Nonnull + public UUID getUuid() { + return uuid; + } + + public void setUuid(@javax.annotation.Nonnull UUID uuid) { + this.uuid = uuid; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the InternetAccessRoutingProtocolBgpAsn instance itself + */ + public InternetAccessRoutingProtocolBgpAsn putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InternetAccessRoutingProtocolBgpAsn internetAccessRoutingProtocolBgpAsn = (InternetAccessRoutingProtocolBgpAsn) o; + return Objects.equals(this.href, internetAccessRoutingProtocolBgpAsn.href) && + Objects.equals(this.uuid, internetAccessRoutingProtocolBgpAsn.uuid)&& + Objects.equals(this.additionalProperties, internetAccessRoutingProtocolBgpAsn.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(href, uuid, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class InternetAccessRoutingProtocolBgpAsn {\n"); + sb.append(" href: ").append(toIndentedString(href)).append("\n"); + sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("href", "uuid")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("uuid")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to InternetAccessRoutingProtocolBgpAsn + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!InternetAccessRoutingProtocolBgpAsn.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in InternetAccessRoutingProtocolBgpAsn is not found in the empty JSON string", InternetAccessRoutingProtocolBgpAsn.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : InternetAccessRoutingProtocolBgpAsn.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("href") != null && !jsonObj.get("href").isJsonNull()) && !jsonObj.get("href").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `href` to be a primitive type in the JSON string but got `%s`", jsonObj.get("href").toString())); + } + if (!jsonObj.get("uuid").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `uuid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("uuid").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!InternetAccessRoutingProtocolBgpAsn.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'InternetAccessRoutingProtocolBgpAsn' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(InternetAccessRoutingProtocolBgpAsn.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, InternetAccessRoutingProtocolBgpAsn value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public InternetAccessRoutingProtocolBgpAsn read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + InternetAccessRoutingProtocolBgpAsn instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of InternetAccessRoutingProtocolBgpAsn given an JSON string + * + * @param jsonString JSON string + * @return An instance of InternetAccessRoutingProtocolBgpAsn + * @throws IOException if the JSON string is invalid with respect to InternetAccessRoutingProtocolBgpAsn + */ + public static InternetAccessRoutingProtocolBgpAsn fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, InternetAccessRoutingProtocolBgpAsn.class); + } + + /** + * Convert an instance of InternetAccessRoutingProtocolBgpAsn to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/InternetAccessRoutingProtocolBgpRequest.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/InternetAccessRoutingProtocolBgpRequest.java index d33fdbb5..37fca8f2 100644 --- a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/InternetAccessRoutingProtocolBgpRequest.java +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/InternetAccessRoutingProtocolBgpRequest.java @@ -17,6 +17,7 @@ import com.equinix.sdk.fabricv4.model.InternetAccessCustomerAsnRange; import com.equinix.sdk.fabricv4.model.InternetAccessCustomerRouteRequest; import com.equinix.sdk.fabricv4.model.InternetAccessExportPolicy; +import com.equinix.sdk.fabricv4.model.InternetAccessRoutingProtocolBgpRequestAsn; import com.equinix.sdk.fabricv4.model.InternetAccessRoutingProtocolRequest; import com.equinix.sdk.fabricv4.model.InternetAccessRoutingProtocolType; import com.google.gson.TypeAdapter; @@ -68,7 +69,13 @@ public class InternetAccessRoutingProtocolBgpRequest extends InternetAccessRouti @javax.annotation.Nonnull private InternetAccessExportPolicy exportPolicy; + public static final String SERIALIZED_NAME_ASN = "asn"; + @SerializedName(SERIALIZED_NAME_ASN) + @javax.annotation.Nullable + private InternetAccessRoutingProtocolBgpRequestAsn asn; + public static final String SERIALIZED_NAME_CUSTOMER_ASN = "customerAsn"; + @Deprecated @SerializedName(SERIALIZED_NAME_CUSTOMER_ASN) @javax.annotation.Nullable private Long customerAsn; @@ -132,6 +139,26 @@ public void setExportPolicy(@javax.annotation.Nonnull InternetAccessExportPolicy } + public InternetAccessRoutingProtocolBgpRequest asn(@javax.annotation.Nullable InternetAccessRoutingProtocolBgpRequestAsn asn) { + this.asn = asn; + return this; + } + + /** + * Get asn + * @return asn + */ + @javax.annotation.Nullable + public InternetAccessRoutingProtocolBgpRequestAsn getAsn() { + return asn; + } + + public void setAsn(@javax.annotation.Nullable InternetAccessRoutingProtocolBgpRequestAsn asn) { + this.asn = asn; + } + + + @Deprecated public InternetAccessRoutingProtocolBgpRequest customerAsn(@javax.annotation.Nullable Long customerAsn) { this.customerAsn = customerAsn; return this; @@ -140,12 +167,15 @@ public InternetAccessRoutingProtocolBgpRequest customerAsn(@javax.annotation.Nul /** * Customer ASN. Valid range is 1-64495 or 65536-4199999999. * @return customerAsn + * @deprecated */ + @Deprecated @javax.annotation.Nullable public Long getCustomerAsn() { return customerAsn; } + @Deprecated public void setCustomerAsn(@javax.annotation.Nullable Long customerAsn) { this.customerAsn = customerAsn; } @@ -201,6 +231,7 @@ public boolean equals(Object o) { InternetAccessRoutingProtocolBgpRequest internetAccessRoutingProtocolBgpRequest = (InternetAccessRoutingProtocolBgpRequest) o; return Objects.equals(this.connections, internetAccessRoutingProtocolBgpRequest.connections) && Objects.equals(this.exportPolicy, internetAccessRoutingProtocolBgpRequest.exportPolicy) && + Objects.equals(this.asn, internetAccessRoutingProtocolBgpRequest.asn) && Objects.equals(this.customerAsn, internetAccessRoutingProtocolBgpRequest.customerAsn) && Objects.equals(this.bgpAuthKey, internetAccessRoutingProtocolBgpRequest.bgpAuthKey) && Objects.equals(this.customerAsnRange, internetAccessRoutingProtocolBgpRequest.customerAsnRange) && @@ -209,7 +240,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(connections, exportPolicy, customerAsn, bgpAuthKey, customerAsnRange, super.hashCode()); + return Objects.hash(connections, exportPolicy, asn, customerAsn, bgpAuthKey, customerAsnRange, super.hashCode()); } @Override @@ -219,6 +250,7 @@ public String toString() { sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" connections: ").append(toIndentedString(connections)).append("\n"); sb.append(" exportPolicy: ").append(toIndentedString(exportPolicy)).append("\n"); + sb.append(" asn: ").append(toIndentedString(asn)).append("\n"); sb.append(" customerAsn: ").append(toIndentedString(customerAsn)).append("\n"); sb.append(" bgpAuthKey: ").append(toIndentedString(bgpAuthKey)).append("\n"); sb.append(" customerAsnRange: ").append(toIndentedString(customerAsnRange)).append("\n"); @@ -243,7 +275,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("type", "customerRoutes", "connections", "exportPolicy", "customerAsn", "bgpAuthKey", "customerAsnRange")); + openapiFields = new HashSet(Arrays.asList("type", "customerRoutes", "connections", "exportPolicy", "asn", "customerAsn", "bgpAuthKey", "customerAsnRange")); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(Arrays.asList("connections", "exportPolicy", "type", "customerRoutes")); @@ -281,6 +313,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti }; // validate the required field `exportPolicy` InternetAccessExportPolicy.validateJsonElement(jsonObj.get("exportPolicy")); + // validate the optional field `asn` + if (jsonObj.get("asn") != null && !jsonObj.get("asn").isJsonNull()) { + InternetAccessRoutingProtocolBgpRequestAsn.validateJsonElement(jsonObj.get("asn")); + } if ((jsonObj.get("bgpAuthKey") != null && !jsonObj.get("bgpAuthKey").isJsonNull()) && !jsonObj.get("bgpAuthKey").isJsonPrimitive()) { throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `bgpAuthKey` to be a primitive type in the JSON string but got `%s`", jsonObj.get("bgpAuthKey").toString())); } diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/InternetAccessRoutingProtocolBgpRequestAsn.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/InternetAccessRoutingProtocolBgpRequestAsn.java new file mode 100644 index 00000000..14f0273b --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/InternetAccessRoutingProtocolBgpRequestAsn.java @@ -0,0 +1,294 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import java.util.UUID; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * InternetAccessRoutingProtocolBgpRequestAsn + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class InternetAccessRoutingProtocolBgpRequestAsn { + public static final String SERIALIZED_NAME_UUID = "uuid"; + @SerializedName(SERIALIZED_NAME_UUID) + @javax.annotation.Nonnull + private UUID uuid; + + public InternetAccessRoutingProtocolBgpRequestAsn() { + } + + public InternetAccessRoutingProtocolBgpRequestAsn uuid(@javax.annotation.Nonnull UUID uuid) { + this.uuid = uuid; + return this; + } + + /** + * Unique identifier of the ASN + * @return uuid + */ + @javax.annotation.Nonnull + public UUID getUuid() { + return uuid; + } + + public void setUuid(@javax.annotation.Nonnull UUID uuid) { + this.uuid = uuid; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the InternetAccessRoutingProtocolBgpRequestAsn instance itself + */ + public InternetAccessRoutingProtocolBgpRequestAsn putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InternetAccessRoutingProtocolBgpRequestAsn internetAccessRoutingProtocolBgpRequestAsn = (InternetAccessRoutingProtocolBgpRequestAsn) o; + return Objects.equals(this.uuid, internetAccessRoutingProtocolBgpRequestAsn.uuid)&& + Objects.equals(this.additionalProperties, internetAccessRoutingProtocolBgpRequestAsn.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(uuid, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class InternetAccessRoutingProtocolBgpRequestAsn {\n"); + sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("uuid")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("uuid")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to InternetAccessRoutingProtocolBgpRequestAsn + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!InternetAccessRoutingProtocolBgpRequestAsn.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in InternetAccessRoutingProtocolBgpRequestAsn is not found in the empty JSON string", InternetAccessRoutingProtocolBgpRequestAsn.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : InternetAccessRoutingProtocolBgpRequestAsn.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("uuid").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `uuid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("uuid").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!InternetAccessRoutingProtocolBgpRequestAsn.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'InternetAccessRoutingProtocolBgpRequestAsn' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(InternetAccessRoutingProtocolBgpRequestAsn.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, InternetAccessRoutingProtocolBgpRequestAsn value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public InternetAccessRoutingProtocolBgpRequestAsn read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + InternetAccessRoutingProtocolBgpRequestAsn instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of InternetAccessRoutingProtocolBgpRequestAsn given an JSON string + * + * @param jsonString JSON string + * @return An instance of InternetAccessRoutingProtocolBgpRequestAsn + * @throws IOException if the JSON string is invalid with respect to InternetAccessRoutingProtocolBgpRequestAsn + */ + public static InternetAccessRoutingProtocolBgpRequestAsn fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, InternetAccessRoutingProtocolBgpRequestAsn.class); + } + + /** + * Convert an instance of InternetAccessRoutingProtocolBgpRequestAsn to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/IpBlock.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/IpBlock.java index 289454e5..1b066415 100644 --- a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/IpBlock.java +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/IpBlock.java @@ -154,7 +154,7 @@ public IpBlock uuid(@javax.annotation.Nonnull UUID uuid) { } /** - * Unique identifier for the Ip Block + * Unique identifier for the IP Block * @return uuid */ @javax.annotation.Nonnull @@ -173,7 +173,7 @@ public IpBlock href(@javax.annotation.Nonnull String href) { } /** - * Resource URL path for the Ip Block + * Resource URL path for the IP Block * @return href */ @javax.annotation.Nonnull @@ -392,7 +392,7 @@ public IpBlock addAssetsItem(IpBlockAsset assetsItem) { } /** - * Products using this Ip Block + * Products using this IP Block * @return assets */ @javax.annotation.Nullable diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/IpBlockOwnership.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/IpBlockOwnership.java index faf41a48..c225f551 100644 --- a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/IpBlockOwnership.java +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/IpBlockOwnership.java @@ -24,7 +24,7 @@ import com.google.gson.stream.JsonWriter; /** - * IpBlockOwnership of the Ip Block + * IpBlockOwnership of the IP Block */ @JsonAdapter(IpBlockOwnership.Adapter.class) public enum IpBlockOwnership { diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/IpBlockState.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/IpBlockState.java index 3731f835..a28f8fc6 100644 --- a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/IpBlockState.java +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/IpBlockState.java @@ -24,7 +24,7 @@ import com.google.gson.stream.JsonWriter; /** - * Current state of the Ip Block + * Current state of the IP Block */ @JsonAdapter(IpBlockState.Adapter.class) public enum IpBlockState { diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/IssueLoa.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/IssueLoa.java new file mode 100644 index 00000000..299526ba --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/IssueLoa.java @@ -0,0 +1,467 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.LoaDemarcationPoint; +import com.equinix.sdk.fabricv4.model.LoaProductType; +import com.equinix.sdk.fabricv4.model.LoaRequestor; +import com.equinix.sdk.fabricv4.model.LoaType; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * Issue Loa + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class IssueLoa { + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nonnull + private LoaType type; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable + private String description; + + public static final String SERIALIZED_NAME_AUTHORIZED_PRODUCT_TYPE = "authorizedProductType"; + @SerializedName(SERIALIZED_NAME_AUTHORIZED_PRODUCT_TYPE) + @javax.annotation.Nonnull + private LoaProductType authorizedProductType; + + public static final String SERIALIZED_NAME_EXPIRATION_DATE_TIME = "expirationDateTime"; + @SerializedName(SERIALIZED_NAME_EXPIRATION_DATE_TIME) + @javax.annotation.Nullable + private OffsetDateTime expirationDateTime; + + public static final String SERIALIZED_NAME_REQUESTOR = "requestor"; + @SerializedName(SERIALIZED_NAME_REQUESTOR) + @javax.annotation.Nullable + private LoaRequestor requestor; + + public static final String SERIALIZED_NAME_DEMARCATION_POINT = "demarcationPoint"; + @SerializedName(SERIALIZED_NAME_DEMARCATION_POINT) + @javax.annotation.Nonnull + private LoaDemarcationPoint demarcationPoint; + + public IssueLoa() { + } + + public IssueLoa type(@javax.annotation.Nonnull LoaType type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + */ + @javax.annotation.Nonnull + public LoaType getType() { + return type; + } + + public void setType(@javax.annotation.Nonnull LoaType type) { + this.type = type; + } + + + public IssueLoa name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * A short, descriptive name for this LOA. + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public IssueLoa description(@javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * Additional context about this LOA. + * @return description + */ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + + + public IssueLoa authorizedProductType(@javax.annotation.Nonnull LoaProductType authorizedProductType) { + this.authorizedProductType = authorizedProductType; + return this; + } + + /** + * Get authorizedProductType + * @return authorizedProductType + */ + @javax.annotation.Nonnull + public LoaProductType getAuthorizedProductType() { + return authorizedProductType; + } + + public void setAuthorizedProductType(@javax.annotation.Nonnull LoaProductType authorizedProductType) { + this.authorizedProductType = authorizedProductType; + } + + + public IssueLoa expirationDateTime(@javax.annotation.Nullable OffsetDateTime expirationDateTime) { + this.expirationDateTime = expirationDateTime; + return this; + } + + /** + * Date and time when this LOA expires.<br> Default to 3 months from the creation date + * @return expirationDateTime + */ + @javax.annotation.Nullable + public OffsetDateTime getExpirationDateTime() { + return expirationDateTime; + } + + public void setExpirationDateTime(@javax.annotation.Nullable OffsetDateTime expirationDateTime) { + this.expirationDateTime = expirationDateTime; + } + + + public IssueLoa requestor(@javax.annotation.Nullable LoaRequestor requestor) { + this.requestor = requestor; + return this; + } + + /** + * Get requestor + * @return requestor + */ + @javax.annotation.Nullable + public LoaRequestor getRequestor() { + return requestor; + } + + public void setRequestor(@javax.annotation.Nullable LoaRequestor requestor) { + this.requestor = requestor; + } + + + public IssueLoa demarcationPoint(@javax.annotation.Nonnull LoaDemarcationPoint demarcationPoint) { + this.demarcationPoint = demarcationPoint; + return this; + } + + /** + * Get demarcationPoint + * @return demarcationPoint + */ + @javax.annotation.Nonnull + public LoaDemarcationPoint getDemarcationPoint() { + return demarcationPoint; + } + + public void setDemarcationPoint(@javax.annotation.Nonnull LoaDemarcationPoint demarcationPoint) { + this.demarcationPoint = demarcationPoint; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the IssueLoa instance itself + */ + public IssueLoa putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IssueLoa issueLoa = (IssueLoa) o; + return Objects.equals(this.type, issueLoa.type) && + Objects.equals(this.name, issueLoa.name) && + Objects.equals(this.description, issueLoa.description) && + Objects.equals(this.authorizedProductType, issueLoa.authorizedProductType) && + Objects.equals(this.expirationDateTime, issueLoa.expirationDateTime) && + Objects.equals(this.requestor, issueLoa.requestor) && + Objects.equals(this.demarcationPoint, issueLoa.demarcationPoint)&& + Objects.equals(this.additionalProperties, issueLoa.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(type, name, description, authorizedProductType, expirationDateTime, requestor, demarcationPoint, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IssueLoa {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" authorizedProductType: ").append(toIndentedString(authorizedProductType)).append("\n"); + sb.append(" expirationDateTime: ").append(toIndentedString(expirationDateTime)).append("\n"); + sb.append(" requestor: ").append(toIndentedString(requestor)).append("\n"); + sb.append(" demarcationPoint: ").append(toIndentedString(demarcationPoint)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("type", "name", "description", "authorizedProductType", "expirationDateTime", "requestor", "demarcationPoint")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("type", "name", "authorizedProductType", "demarcationPoint")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to IssueLoa + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!IssueLoa.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in IssueLoa is not found in the empty JSON string", IssueLoa.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : IssueLoa.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the required field `type` + LoaType.validateJsonElement(jsonObj.get("type")); + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + } + // validate the required field `authorizedProductType` + LoaProductType.validateJsonElement(jsonObj.get("authorizedProductType")); + // validate the optional field `requestor` + if (jsonObj.get("requestor") != null && !jsonObj.get("requestor").isJsonNull()) { + LoaRequestor.validateJsonElement(jsonObj.get("requestor")); + } + // validate the required field `demarcationPoint` + LoaDemarcationPoint.validateJsonElement(jsonObj.get("demarcationPoint")); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!IssueLoa.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'IssueLoa' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(IssueLoa.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, IssueLoa value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public IssueLoa read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + IssueLoa instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of IssueLoa given an JSON string + * + * @param jsonString JSON string + * @return An instance of IssueLoa + * @throws IOException if the JSON string is invalid with respect to IssueLoa + */ + public static IssueLoa fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, IssueLoa.class); + } + + /** + * Convert an instance of IssueLoa to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaActionData.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaActionData.java new file mode 100644 index 00000000..3a54a862 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaActionData.java @@ -0,0 +1,343 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.LoaDemarcationPoint; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * Action Data. <br> For LOA_ISSUER_AUTHORIZATION — always required. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class LoaActionData { + public static final String SERIALIZED_NAME_DEMARCATION_POINT = "demarcationPoint"; + @SerializedName(SERIALIZED_NAME_DEMARCATION_POINT) + @javax.annotation.Nullable + private LoaDemarcationPoint demarcationPoint; + + public static final String SERIALIZED_NAME_EXPIRATION_DATE_TIME = "expirationDateTime"; + @SerializedName(SERIALIZED_NAME_EXPIRATION_DATE_TIME) + @javax.annotation.Nullable + private OffsetDateTime expirationDateTime; + + public static final String SERIALIZED_NAME_PORTAL_URL = "portalUrl"; + @SerializedName(SERIALIZED_NAME_PORTAL_URL) + @javax.annotation.Nullable + private String portalUrl; + + public LoaActionData() { + } + + public LoaActionData( + String portalUrl + ) { + this(); + this.portalUrl = portalUrl; + } + + public LoaActionData demarcationPoint(@javax.annotation.Nullable LoaDemarcationPoint demarcationPoint) { + this.demarcationPoint = demarcationPoint; + return this; + } + + /** + * Get demarcationPoint + * @return demarcationPoint + */ + @javax.annotation.Nullable + public LoaDemarcationPoint getDemarcationPoint() { + return demarcationPoint; + } + + public void setDemarcationPoint(@javax.annotation.Nullable LoaDemarcationPoint demarcationPoint) { + this.demarcationPoint = demarcationPoint; + } + + + public LoaActionData expirationDateTime(@javax.annotation.Nullable OffsetDateTime expirationDateTime) { + this.expirationDateTime = expirationDateTime; + return this; + } + + /** + * Date and time when this LOA expires.<br> Default to 3 months from the creation date + * @return expirationDateTime + */ + @javax.annotation.Nullable + public OffsetDateTime getExpirationDateTime() { + return expirationDateTime; + } + + public void setExpirationDateTime(@javax.annotation.Nullable OffsetDateTime expirationDateTime) { + this.expirationDateTime = expirationDateTime; + } + + + /** + * Portal URL for the LOA to either accept from requestor <br> or authorize from the issuer. + * @return portalUrl + */ + @javax.annotation.Nullable + public String getPortalUrl() { + return portalUrl; + } + + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the LoaActionData instance itself + */ + public LoaActionData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LoaActionData loaActionData = (LoaActionData) o; + return Objects.equals(this.demarcationPoint, loaActionData.demarcationPoint) && + Objects.equals(this.expirationDateTime, loaActionData.expirationDateTime) && + Objects.equals(this.portalUrl, loaActionData.portalUrl)&& + Objects.equals(this.additionalProperties, loaActionData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(demarcationPoint, expirationDateTime, portalUrl, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LoaActionData {\n"); + sb.append(" demarcationPoint: ").append(toIndentedString(demarcationPoint)).append("\n"); + sb.append(" expirationDateTime: ").append(toIndentedString(expirationDateTime)).append("\n"); + sb.append(" portalUrl: ").append(toIndentedString(portalUrl)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("demarcationPoint", "expirationDateTime", "portalUrl")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to LoaActionData + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!LoaActionData.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in LoaActionData is not found in the empty JSON string", LoaActionData.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `demarcationPoint` + if (jsonObj.get("demarcationPoint") != null && !jsonObj.get("demarcationPoint").isJsonNull()) { + LoaDemarcationPoint.validateJsonElement(jsonObj.get("demarcationPoint")); + } + if ((jsonObj.get("portalUrl") != null && !jsonObj.get("portalUrl").isJsonNull()) && !jsonObj.get("portalUrl").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `portalUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("portalUrl").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!LoaActionData.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'LoaActionData' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(LoaActionData.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, LoaActionData value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public LoaActionData read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + LoaActionData instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of LoaActionData given an JSON string + * + * @param jsonString JSON string + * @return An instance of LoaActionData + * @throws IOException if the JSON string is invalid with respect to LoaActionData + */ + public static LoaActionData fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, LoaActionData.class); + } + + /** + * Convert an instance of LoaActionData to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaActionFieldName.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaActionFieldName.java new file mode 100644 index 00000000..d103277b --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaActionFieldName.java @@ -0,0 +1,80 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.google.gson.annotations.SerializedName; + +import java.io.IOException; +import java.util.Locale; +import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; + +/** + * Possible field names to use on filters + */ +@JsonAdapter(LoaActionFieldName.Adapter.class) +public enum LoaActionFieldName { + + TYPE("/type"), + + STATE("/state"), + + UUID("/uuid"); + + private String value; + + LoaActionFieldName(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static LoaActionFieldName fromValue(String value) { + for (LoaActionFieldName b : LoaActionFieldName.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final LoaActionFieldName enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public LoaActionFieldName read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return LoaActionFieldName.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + LoaActionFieldName.fromValue(value); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaActionFilter.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaActionFilter.java new file mode 100644 index 00000000..c3bdd6cc --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaActionFilter.java @@ -0,0 +1,270 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.LoaActionFieldName; +import com.equinix.sdk.fabricv4.model.LoaActionOrFilter; +import com.equinix.sdk.fabricv4.model.LoaActionSearchSimpleExpressions; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + + + +import java.io.IOException; +import java.lang.reflect.Type; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Locale; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.JsonPrimitive; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonSerializationContext; +import com.google.gson.JsonSerializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonArray; +import com.google.gson.JsonParseException; + +import com.equinix.sdk.fabricv4.JSON; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class LoaActionFilter extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(LoaActionFilter.class.getName()); + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!LoaActionFilter.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'LoaActionFilter' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter adapterLoaActionSearchSimpleExpressions = gson.getDelegateAdapter(this, TypeToken.get(LoaActionSearchSimpleExpressions.class)); + final TypeAdapter adapterLoaActionOrFilter = gson.getDelegateAdapter(this, TypeToken.get(LoaActionOrFilter.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, LoaActionFilter value) throws IOException { + if (value == null || value.getActualInstance() == null) { + elementAdapter.write(out, null); + return; + } + + // check if the actual instance is of the type `LoaActionSearchSimpleExpressions` + if (value.getActualInstance() instanceof LoaActionSearchSimpleExpressions) { + JsonElement element = adapterLoaActionSearchSimpleExpressions.toJsonTree((LoaActionSearchSimpleExpressions)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + // check if the actual instance is of the type `LoaActionOrFilter` + if (value.getActualInstance() instanceof LoaActionOrFilter) { + JsonElement element = adapterLoaActionOrFilter.toJsonTree((LoaActionOrFilter)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + throw new IOException("Failed to serialize as the type doesn't match anyOf schemas: LoaActionOrFilter, LoaActionSearchSimpleExpressions"); + } + + @Override + public LoaActionFilter read(JsonReader in) throws IOException { + Object deserialized = null; + JsonElement jsonElement = elementAdapter.read(in); + + ArrayList errorMessages = new ArrayList<>(); + TypeAdapter actualAdapter = elementAdapter; + + // deserialize LoaActionSearchSimpleExpressions + try { + // validate the JSON object to see if any exception is thrown + LoaActionSearchSimpleExpressions.validateJsonElement(jsonElement); + actualAdapter = adapterLoaActionSearchSimpleExpressions; + LoaActionFilter ret = new LoaActionFilter(); + ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); + return ret; + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format(Locale.ROOT, "Deserialization for LoaActionSearchSimpleExpressions failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'LoaActionSearchSimpleExpressions'", e); + } + // deserialize LoaActionOrFilter + try { + // validate the JSON object to see if any exception is thrown + LoaActionOrFilter.validateJsonElement(jsonElement); + actualAdapter = adapterLoaActionOrFilter; + LoaActionFilter ret = new LoaActionFilter(); + ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); + return ret; + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format(Locale.ROOT, "Deserialization for LoaActionOrFilter failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'LoaActionOrFilter'", e); + } + + throw new IOException(String.format(Locale.ROOT, "Failed deserialization for LoaActionFilter: no class matches result, expected at least 1. Detailed failure message for anyOf schemas: %s. JSON: %s", errorMessages, jsonElement.toString())); + } + }.nullSafe(); + } + } + + // store a list of schema names defined in anyOf + public static final Map> schemas = new HashMap>(); + + public LoaActionFilter() { + super("anyOf", Boolean.FALSE); + } + + public LoaActionFilter(Object o) { + super("anyOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("LoaActionSearchSimpleExpressions", LoaActionSearchSimpleExpressions.class); + schemas.put("LoaActionOrFilter", LoaActionOrFilter.class); + } + + @Override + public Map> getSchemas() { + return LoaActionFilter.schemas; + } + + /** + * Set the instance that matches the anyOf child schema, check + * the instance parameter is valid against the anyOf child schemas: + * LoaActionOrFilter, LoaActionSearchSimpleExpressions + * + * It could be an instance of the 'anyOf' schemas. + */ + @Override + public void setActualInstance(Object instance) { + if (instance instanceof LoaActionSearchSimpleExpressions) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof LoaActionOrFilter) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException("Invalid instance type. Must be LoaActionOrFilter, LoaActionSearchSimpleExpressions"); + } + + /** + * Get the actual instance, which can be the following: + * LoaActionOrFilter, LoaActionSearchSimpleExpressions + * + * @return The actual instance (LoaActionOrFilter, LoaActionSearchSimpleExpressions) + */ + @SuppressWarnings("unchecked") + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `LoaActionSearchSimpleExpressions`. If the actual instance is not `LoaActionSearchSimpleExpressions`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `LoaActionSearchSimpleExpressions` + * @throws ClassCastException if the instance is not `LoaActionSearchSimpleExpressions` + */ + public LoaActionSearchSimpleExpressions getLoaActionSearchSimpleExpressions() throws ClassCastException { + return (LoaActionSearchSimpleExpressions)super.getActualInstance(); + } + + /** + * Get the actual instance of `LoaActionOrFilter`. If the actual instance is not `LoaActionOrFilter`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `LoaActionOrFilter` + * @throws ClassCastException if the instance is not `LoaActionOrFilter` + */ + public LoaActionOrFilter getLoaActionOrFilter() throws ClassCastException { + return (LoaActionOrFilter)super.getActualInstance(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to LoaActionFilter + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + // validate anyOf schemas one by one + ArrayList errorMessages = new ArrayList<>(); + // validate the json string with LoaActionSearchSimpleExpressions + try { + LoaActionSearchSimpleExpressions.validateJsonElement(jsonElement); + return; + } catch (Exception e) { + errorMessages.add(String.format(Locale.ROOT, "Deserialization for LoaActionSearchSimpleExpressions failed with `%s`.", e.getMessage())); + // continue to the next one + } + // validate the json string with LoaActionOrFilter + try { + LoaActionOrFilter.validateJsonElement(jsonElement); + return; + } catch (Exception e) { + errorMessages.add(String.format(Locale.ROOT, "Deserialization for LoaActionOrFilter failed with `%s`.", e.getMessage())); + // continue to the next one + } + throw new IOException(String.format(Locale.ROOT, "The JSON string is invalid for LoaActionFilter with anyOf schemas: LoaActionOrFilter, LoaActionSearchSimpleExpressions. no class match the result, expected at least 1. Detailed failure message for anyOf schemas: %s. JSON: %s", errorMessages, jsonElement.toString())); + } + + /** + * Create an instance of LoaActionFilter given an JSON string + * + * @param jsonString JSON string + * @return An instance of LoaActionFilter + * @throws IOException if the JSON string is invalid with respect to LoaActionFilter + */ + public static LoaActionFilter fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, LoaActionFilter.class); + } + + /** + * Convert an instance of LoaActionFilter to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaActionOrFilter.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaActionOrFilter.java new file mode 100644 index 00000000..eaa02cbb --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaActionOrFilter.java @@ -0,0 +1,308 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.LoaActionSearchSimpleExpressions; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * LoaActionOrFilter + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class LoaActionOrFilter { + public static final String SERIALIZED_NAME_OR = "or"; + @SerializedName(SERIALIZED_NAME_OR) + @javax.annotation.Nullable + private List or = new ArrayList<>(); + + public LoaActionOrFilter() { + } + + public LoaActionOrFilter or(@javax.annotation.Nullable List or) { + this.or = or; + return this; + } + + public LoaActionOrFilter addOrItem(LoaActionSearchSimpleExpressions orItem) { + if (this.or == null) { + this.or = new ArrayList<>(); + } + this.or.add(orItem); + return this; + } + + /** + * Get or + * @return or + */ + @javax.annotation.Nullable + public List getOr() { + return or; + } + + public void setOr(@javax.annotation.Nullable List or) { + this.or = or; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the LoaActionOrFilter instance itself + */ + public LoaActionOrFilter putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LoaActionOrFilter loaActionOrFilter = (LoaActionOrFilter) o; + return Objects.equals(this.or, loaActionOrFilter.or)&& + Objects.equals(this.additionalProperties, loaActionOrFilter.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(or, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LoaActionOrFilter {\n"); + sb.append(" or: ").append(toIndentedString(or)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("or")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to LoaActionOrFilter + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!LoaActionOrFilter.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in LoaActionOrFilter is not found in the empty JSON string", LoaActionOrFilter.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("or") != null && !jsonObj.get("or").isJsonNull()) { + JsonArray jsonArrayor = jsonObj.getAsJsonArray("or"); + if (jsonArrayor != null) { + // ensure the json data is an array + if (!jsonObj.get("or").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `or` to be an array in the JSON string but got `%s`", jsonObj.get("or").toString())); + } + + // validate the optional field `or` (array) + for (int i = 0; i < jsonArrayor.size(); i++) { + LoaActionSearchSimpleExpressions.validateJsonElement(jsonArrayor.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!LoaActionOrFilter.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'LoaActionOrFilter' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(LoaActionOrFilter.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, LoaActionOrFilter value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public LoaActionOrFilter read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + LoaActionOrFilter instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of LoaActionOrFilter given an JSON string + * + * @param jsonString JSON string + * @return An instance of LoaActionOrFilter + * @throws IOException if the JSON string is invalid with respect to LoaActionOrFilter + */ + public static LoaActionOrFilter fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, LoaActionOrFilter.class); + } + + /** + * Convert an instance of LoaActionOrFilter to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaActionRequest.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaActionRequest.java new file mode 100644 index 00000000..ff720444 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaActionRequest.java @@ -0,0 +1,324 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.LoaActionData; +import com.equinix.sdk.fabricv4.model.LoaActionType; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * Action Request + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class LoaActionRequest { + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nonnull + private LoaActionType type; + + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + @javax.annotation.Nullable + private LoaActionData data; + + public LoaActionRequest() { + } + + public LoaActionRequest type(@javax.annotation.Nonnull LoaActionType type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + */ + @javax.annotation.Nonnull + public LoaActionType getType() { + return type; + } + + public void setType(@javax.annotation.Nonnull LoaActionType type) { + this.type = type; + } + + + public LoaActionRequest data(@javax.annotation.Nullable LoaActionData data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + */ + @javax.annotation.Nullable + public LoaActionData getData() { + return data; + } + + public void setData(@javax.annotation.Nullable LoaActionData data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the LoaActionRequest instance itself + */ + public LoaActionRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LoaActionRequest loaActionRequest = (LoaActionRequest) o; + return Objects.equals(this.type, loaActionRequest.type) && + Objects.equals(this.data, loaActionRequest.data)&& + Objects.equals(this.additionalProperties, loaActionRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(type, data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LoaActionRequest {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("type", "data")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("type")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to LoaActionRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!LoaActionRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in LoaActionRequest is not found in the empty JSON string", LoaActionRequest.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : LoaActionRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the required field `type` + LoaActionType.validateJsonElement(jsonObj.get("type")); + // validate the optional field `data` + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + LoaActionData.validateJsonElement(jsonObj.get("data")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!LoaActionRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'LoaActionRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(LoaActionRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, LoaActionRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public LoaActionRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + LoaActionRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of LoaActionRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of LoaActionRequest + * @throws IOException if the JSON string is invalid with respect to LoaActionRequest + */ + public static LoaActionRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, LoaActionRequest.class); + } + + /** + * Convert an instance of LoaActionRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaActionResponse.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaActionResponse.java new file mode 100644 index 00000000..baa40d5d --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaActionResponse.java @@ -0,0 +1,441 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.LoaActionData; +import com.equinix.sdk.fabricv4.model.LoaActionState; +import com.equinix.sdk.fabricv4.model.LoaActionType; +import com.equinix.sdk.fabricv4.model.LoaChangelog; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.net.URI; +import java.util.Arrays; +import java.util.UUID; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * Action Response + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class LoaActionResponse { + public static final String SERIALIZED_NAME_HREF = "href"; + @SerializedName(SERIALIZED_NAME_HREF) + @javax.annotation.Nullable + private URI href; + + public static final String SERIALIZED_NAME_UUID = "uuid"; + @SerializedName(SERIALIZED_NAME_UUID) + @javax.annotation.Nullable + private UUID uuid; + + public static final String SERIALIZED_NAME_STATE = "state"; + @SerializedName(SERIALIZED_NAME_STATE) + @javax.annotation.Nullable + private LoaActionState state; + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nullable + private LoaActionType type; + + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + @javax.annotation.Nullable + private LoaActionData data; + + public static final String SERIALIZED_NAME_CHANGE_LOG = "changeLog"; + @SerializedName(SERIALIZED_NAME_CHANGE_LOG) + @javax.annotation.Nullable + private LoaChangelog changeLog; + + public LoaActionResponse() { + } + + public LoaActionResponse href(@javax.annotation.Nullable URI href) { + this.href = href; + return this; + } + + /** + * Action URI + * @return href + */ + @javax.annotation.Nullable + public URI getHref() { + return href; + } + + public void setHref(@javax.annotation.Nullable URI href) { + this.href = href; + } + + + public LoaActionResponse uuid(@javax.annotation.Nullable UUID uuid) { + this.uuid = uuid; + return this; + } + + /** + * Action Identifier + * @return uuid + */ + @javax.annotation.Nullable + public UUID getUuid() { + return uuid; + } + + public void setUuid(@javax.annotation.Nullable UUID uuid) { + this.uuid = uuid; + } + + + public LoaActionResponse state(@javax.annotation.Nullable LoaActionState state) { + this.state = state; + return this; + } + + /** + * Get state + * @return state + */ + @javax.annotation.Nullable + public LoaActionState getState() { + return state; + } + + public void setState(@javax.annotation.Nullable LoaActionState state) { + this.state = state; + } + + + public LoaActionResponse type(@javax.annotation.Nullable LoaActionType type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + */ + @javax.annotation.Nullable + public LoaActionType getType() { + return type; + } + + public void setType(@javax.annotation.Nullable LoaActionType type) { + this.type = type; + } + + + public LoaActionResponse data(@javax.annotation.Nullable LoaActionData data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + */ + @javax.annotation.Nullable + public LoaActionData getData() { + return data; + } + + public void setData(@javax.annotation.Nullable LoaActionData data) { + this.data = data; + } + + + public LoaActionResponse changeLog(@javax.annotation.Nullable LoaChangelog changeLog) { + this.changeLog = changeLog; + return this; + } + + /** + * Get changeLog + * @return changeLog + */ + @javax.annotation.Nullable + public LoaChangelog getChangeLog() { + return changeLog; + } + + public void setChangeLog(@javax.annotation.Nullable LoaChangelog changeLog) { + this.changeLog = changeLog; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the LoaActionResponse instance itself + */ + public LoaActionResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LoaActionResponse loaActionResponse = (LoaActionResponse) o; + return Objects.equals(this.href, loaActionResponse.href) && + Objects.equals(this.uuid, loaActionResponse.uuid) && + Objects.equals(this.state, loaActionResponse.state) && + Objects.equals(this.type, loaActionResponse.type) && + Objects.equals(this.data, loaActionResponse.data) && + Objects.equals(this.changeLog, loaActionResponse.changeLog)&& + Objects.equals(this.additionalProperties, loaActionResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(href, uuid, state, type, data, changeLog, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LoaActionResponse {\n"); + sb.append(" href: ").append(toIndentedString(href)).append("\n"); + sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); + sb.append(" state: ").append(toIndentedString(state)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" changeLog: ").append(toIndentedString(changeLog)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("href", "uuid", "state", "type", "data", "changeLog")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to LoaActionResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!LoaActionResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in LoaActionResponse is not found in the empty JSON string", LoaActionResponse.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("href") != null && !jsonObj.get("href").isJsonNull()) && !jsonObj.get("href").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `href` to be a primitive type in the JSON string but got `%s`", jsonObj.get("href").toString())); + } + if ((jsonObj.get("uuid") != null && !jsonObj.get("uuid").isJsonNull()) && !jsonObj.get("uuid").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `uuid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("uuid").toString())); + } + // validate the optional field `state` + if (jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) { + LoaActionState.validateJsonElement(jsonObj.get("state")); + } + // validate the optional field `type` + if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { + LoaActionType.validateJsonElement(jsonObj.get("type")); + } + // validate the optional field `data` + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + LoaActionData.validateJsonElement(jsonObj.get("data")); + } + // validate the optional field `changeLog` + if (jsonObj.get("changeLog") != null && !jsonObj.get("changeLog").isJsonNull()) { + LoaChangelog.validateJsonElement(jsonObj.get("changeLog")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!LoaActionResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'LoaActionResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(LoaActionResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, LoaActionResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public LoaActionResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + LoaActionResponse instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of LoaActionResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of LoaActionResponse + * @throws IOException if the JSON string is invalid with respect to LoaActionResponse + */ + public static LoaActionResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, LoaActionResponse.class); + } + + /** + * Convert an instance of LoaActionResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaActionSearchFilters.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaActionSearchFilters.java new file mode 100644 index 00000000..10225c0b --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaActionSearchFilters.java @@ -0,0 +1,308 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.LoaActionFilter; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * LoaActionSearchFilters + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class LoaActionSearchFilters { + public static final String SERIALIZED_NAME_AND = "and"; + @SerializedName(SERIALIZED_NAME_AND) + @javax.annotation.Nullable + private List and = new ArrayList<>(); + + public LoaActionSearchFilters() { + } + + public LoaActionSearchFilters and(@javax.annotation.Nullable List and) { + this.and = and; + return this; + } + + public LoaActionSearchFilters addAndItem(LoaActionFilter andItem) { + if (this.and == null) { + this.and = new ArrayList<>(); + } + this.and.add(andItem); + return this; + } + + /** + * Get and + * @return and + */ + @javax.annotation.Nullable + public List getAnd() { + return and; + } + + public void setAnd(@javax.annotation.Nullable List and) { + this.and = and; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the LoaActionSearchFilters instance itself + */ + public LoaActionSearchFilters putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LoaActionSearchFilters loaActionSearchFilters = (LoaActionSearchFilters) o; + return Objects.equals(this.and, loaActionSearchFilters.and)&& + Objects.equals(this.additionalProperties, loaActionSearchFilters.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(and, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LoaActionSearchFilters {\n"); + sb.append(" and: ").append(toIndentedString(and)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("and")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to LoaActionSearchFilters + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!LoaActionSearchFilters.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in LoaActionSearchFilters is not found in the empty JSON string", LoaActionSearchFilters.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("and") != null && !jsonObj.get("and").isJsonNull()) { + JsonArray jsonArrayand = jsonObj.getAsJsonArray("and"); + if (jsonArrayand != null) { + // ensure the json data is an array + if (!jsonObj.get("and").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `and` to be an array in the JSON string but got `%s`", jsonObj.get("and").toString())); + } + + // validate the optional field `and` (array) + for (int i = 0; i < jsonArrayand.size(); i++) { + LoaActionFilter.validateJsonElement(jsonArrayand.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!LoaActionSearchFilters.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'LoaActionSearchFilters' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(LoaActionSearchFilters.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, LoaActionSearchFilters value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public LoaActionSearchFilters read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + LoaActionSearchFilters instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of LoaActionSearchFilters given an JSON string + * + * @param jsonString JSON string + * @return An instance of LoaActionSearchFilters + * @throws IOException if the JSON string is invalid with respect to LoaActionSearchFilters + */ + public static LoaActionSearchFilters fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, LoaActionSearchFilters.class); + } + + /** + * Convert an instance of LoaActionSearchFilters to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaActionSearchRequest.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaActionSearchRequest.java new file mode 100644 index 00000000..344a5ac7 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaActionSearchRequest.java @@ -0,0 +1,370 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.LoaActionSearchFilters; +import com.equinix.sdk.fabricv4.model.LoaActionSortCriteria; +import com.equinix.sdk.fabricv4.model.PaginationRequest; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * Search loa actions based on filter criteria + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class LoaActionSearchRequest { + public static final String SERIALIZED_NAME_FILTER = "filter"; + @SerializedName(SERIALIZED_NAME_FILTER) + @javax.annotation.Nullable + private LoaActionSearchFilters filter; + + public static final String SERIALIZED_NAME_PAGINATION = "pagination"; + @SerializedName(SERIALIZED_NAME_PAGINATION) + @javax.annotation.Nullable + private PaginationRequest pagination; + + public static final String SERIALIZED_NAME_SORT = "sort"; + @SerializedName(SERIALIZED_NAME_SORT) + @javax.annotation.Nullable + private List sort = new ArrayList<>(); + + public LoaActionSearchRequest() { + } + + public LoaActionSearchRequest filter(@javax.annotation.Nullable LoaActionSearchFilters filter) { + this.filter = filter; + return this; + } + + /** + * Get filter + * @return filter + */ + @javax.annotation.Nullable + public LoaActionSearchFilters getFilter() { + return filter; + } + + public void setFilter(@javax.annotation.Nullable LoaActionSearchFilters filter) { + this.filter = filter; + } + + + public LoaActionSearchRequest pagination(@javax.annotation.Nullable PaginationRequest pagination) { + this.pagination = pagination; + return this; + } + + /** + * Get pagination + * @return pagination + */ + @javax.annotation.Nullable + public PaginationRequest getPagination() { + return pagination; + } + + public void setPagination(@javax.annotation.Nullable PaginationRequest pagination) { + this.pagination = pagination; + } + + + public LoaActionSearchRequest sort(@javax.annotation.Nullable List sort) { + this.sort = sort; + return this; + } + + public LoaActionSearchRequest addSortItem(LoaActionSortCriteria sortItem) { + if (this.sort == null) { + this.sort = new ArrayList<>(); + } + this.sort.add(sortItem); + return this; + } + + /** + * Get sort + * @return sort + */ + @javax.annotation.Nullable + public List getSort() { + return sort; + } + + public void setSort(@javax.annotation.Nullable List sort) { + this.sort = sort; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the LoaActionSearchRequest instance itself + */ + public LoaActionSearchRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LoaActionSearchRequest loaActionSearchRequest = (LoaActionSearchRequest) o; + return Objects.equals(this.filter, loaActionSearchRequest.filter) && + Objects.equals(this.pagination, loaActionSearchRequest.pagination) && + Objects.equals(this.sort, loaActionSearchRequest.sort)&& + Objects.equals(this.additionalProperties, loaActionSearchRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(filter, pagination, sort, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LoaActionSearchRequest {\n"); + sb.append(" filter: ").append(toIndentedString(filter)).append("\n"); + sb.append(" pagination: ").append(toIndentedString(pagination)).append("\n"); + sb.append(" sort: ").append(toIndentedString(sort)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("filter", "pagination", "sort")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to LoaActionSearchRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!LoaActionSearchRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in LoaActionSearchRequest is not found in the empty JSON string", LoaActionSearchRequest.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `filter` + if (jsonObj.get("filter") != null && !jsonObj.get("filter").isJsonNull()) { + LoaActionSearchFilters.validateJsonElement(jsonObj.get("filter")); + } + // validate the optional field `pagination` + if (jsonObj.get("pagination") != null && !jsonObj.get("pagination").isJsonNull()) { + PaginationRequest.validateJsonElement(jsonObj.get("pagination")); + } + if (jsonObj.get("sort") != null && !jsonObj.get("sort").isJsonNull()) { + JsonArray jsonArraysort = jsonObj.getAsJsonArray("sort"); + if (jsonArraysort != null) { + // ensure the json data is an array + if (!jsonObj.get("sort").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `sort` to be an array in the JSON string but got `%s`", jsonObj.get("sort").toString())); + } + + // validate the optional field `sort` (array) + for (int i = 0; i < jsonArraysort.size(); i++) { + LoaActionSortCriteria.validateJsonElement(jsonArraysort.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!LoaActionSearchRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'LoaActionSearchRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(LoaActionSearchRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, LoaActionSearchRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public LoaActionSearchRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + LoaActionSearchRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of LoaActionSearchRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of LoaActionSearchRequest + * @throws IOException if the JSON string is invalid with respect to LoaActionSearchRequest + */ + public static LoaActionSearchRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, LoaActionSearchRequest.class); + } + + /** + * Convert an instance of LoaActionSearchRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaActionSearchResponse.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaActionSearchResponse.java new file mode 100644 index 00000000..9e0fe877 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaActionSearchResponse.java @@ -0,0 +1,388 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.LoaActionResponse; +import com.equinix.sdk.fabricv4.model.LoaActionSortCriteria; +import com.equinix.sdk.fabricv4.model.Pagination; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * List of LOA Actions + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class LoaActionSearchResponse { + public static final String SERIALIZED_NAME_PAGINATION = "pagination"; + @SerializedName(SERIALIZED_NAME_PAGINATION) + @javax.annotation.Nullable + private Pagination pagination; + + public static final String SERIALIZED_NAME_SORT = "sort"; + @SerializedName(SERIALIZED_NAME_SORT) + @javax.annotation.Nullable + private List sort = new ArrayList<>(); + + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + @javax.annotation.Nullable + private List data = new ArrayList<>(); + + public LoaActionSearchResponse() { + } + + public LoaActionSearchResponse pagination(@javax.annotation.Nullable Pagination pagination) { + this.pagination = pagination; + return this; + } + + /** + * Get pagination + * @return pagination + */ + @javax.annotation.Nullable + public Pagination getPagination() { + return pagination; + } + + public void setPagination(@javax.annotation.Nullable Pagination pagination) { + this.pagination = pagination; + } + + + public LoaActionSearchResponse sort(@javax.annotation.Nullable List sort) { + this.sort = sort; + return this; + } + + public LoaActionSearchResponse addSortItem(LoaActionSortCriteria sortItem) { + if (this.sort == null) { + this.sort = new ArrayList<>(); + } + this.sort.add(sortItem); + return this; + } + + /** + * Get sort + * @return sort + */ + @javax.annotation.Nullable + public List getSort() { + return sort; + } + + public void setSort(@javax.annotation.Nullable List sort) { + this.sort = sort; + } + + + public LoaActionSearchResponse data(@javax.annotation.Nullable List data) { + this.data = data; + return this; + } + + public LoaActionSearchResponse addDataItem(LoaActionResponse dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + return this; + } + + /** + * Get data + * @return data + */ + @javax.annotation.Nullable + public List getData() { + return data; + } + + public void setData(@javax.annotation.Nullable List data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the LoaActionSearchResponse instance itself + */ + public LoaActionSearchResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LoaActionSearchResponse loaActionSearchResponse = (LoaActionSearchResponse) o; + return Objects.equals(this.pagination, loaActionSearchResponse.pagination) && + Objects.equals(this.sort, loaActionSearchResponse.sort) && + Objects.equals(this.data, loaActionSearchResponse.data)&& + Objects.equals(this.additionalProperties, loaActionSearchResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(pagination, sort, data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LoaActionSearchResponse {\n"); + sb.append(" pagination: ").append(toIndentedString(pagination)).append("\n"); + sb.append(" sort: ").append(toIndentedString(sort)).append("\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("pagination", "sort", "data")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to LoaActionSearchResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!LoaActionSearchResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in LoaActionSearchResponse is not found in the empty JSON string", LoaActionSearchResponse.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `pagination` + if (jsonObj.get("pagination") != null && !jsonObj.get("pagination").isJsonNull()) { + Pagination.validateJsonElement(jsonObj.get("pagination")); + } + if (jsonObj.get("sort") != null && !jsonObj.get("sort").isJsonNull()) { + JsonArray jsonArraysort = jsonObj.getAsJsonArray("sort"); + if (jsonArraysort != null) { + // ensure the json data is an array + if (!jsonObj.get("sort").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `sort` to be an array in the JSON string but got `%s`", jsonObj.get("sort").toString())); + } + + // validate the optional field `sort` (array) + for (int i = 0; i < jsonArraysort.size(); i++) { + LoaActionSortCriteria.validateJsonElement(jsonArraysort.get(i)); + }; + } + } + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); + if (jsonArraydata != null) { + // ensure the json data is an array + if (!jsonObj.get("data").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + } + + // validate the optional field `data` (array) + for (int i = 0; i < jsonArraydata.size(); i++) { + LoaActionResponse.validateJsonElement(jsonArraydata.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!LoaActionSearchResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'LoaActionSearchResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(LoaActionSearchResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, LoaActionSearchResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public LoaActionSearchResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + LoaActionSearchResponse instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of LoaActionSearchResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of LoaActionSearchResponse + * @throws IOException if the JSON string is invalid with respect to LoaActionSearchResponse + */ + public static LoaActionSearchResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, LoaActionSearchResponse.class); + } + + /** + * Convert an instance of LoaActionSearchResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaActionSearchSimpleExpressions.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaActionSearchSimpleExpressions.java new file mode 100644 index 00000000..8b3c4f6f --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaActionSearchSimpleExpressions.java @@ -0,0 +1,433 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.LoaActionFieldName; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * LoaActionSearchSimpleExpressions + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class LoaActionSearchSimpleExpressions { + public static final String SERIALIZED_NAME_PROPERTY = "property"; + @SerializedName(SERIALIZED_NAME_PROPERTY) + @javax.annotation.Nullable + private LoaActionFieldName property; + + /** + * Gets or Sets operator + */ + @JsonAdapter(OperatorEnum.Adapter.class) + public enum OperatorEnum { + EQUAL("="), + + NOT_EQUAL("!="), + + LIKE("LIKE"), + + ILIKE("ILIKE"), + + BETWEEN("BETWEEN"), + + NOT_BETWEEN("NOT BETWEEN"), + + IN("IN"), + + NOT_IN("NOT IN"), + + GREATER_THAN(">"), + + LESS_THAN("<"), + + GREATER_THAN_OR_EQUAL_TO(">="), + + LESS_THAN_OR_EQUAL_TO("<="); + + private String value; + + OperatorEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static OperatorEnum fromValue(String value) { + for (OperatorEnum b : OperatorEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final OperatorEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public OperatorEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return OperatorEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + OperatorEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_OPERATOR = "operator"; + @SerializedName(SERIALIZED_NAME_OPERATOR) + @javax.annotation.Nullable + private OperatorEnum operator; + + public static final String SERIALIZED_NAME_VALUES = "values"; + @SerializedName(SERIALIZED_NAME_VALUES) + @javax.annotation.Nullable + private List values = new ArrayList<>(); + + public LoaActionSearchSimpleExpressions() { + } + + public LoaActionSearchSimpleExpressions property(@javax.annotation.Nullable LoaActionFieldName property) { + this.property = property; + return this; + } + + /** + * Get property + * @return property + */ + @javax.annotation.Nullable + public LoaActionFieldName getProperty() { + return property; + } + + public void setProperty(@javax.annotation.Nullable LoaActionFieldName property) { + this.property = property; + } + + + public LoaActionSearchSimpleExpressions operator(@javax.annotation.Nullable OperatorEnum operator) { + this.operator = operator; + return this; + } + + /** + * Get operator + * @return operator + */ + @javax.annotation.Nullable + public OperatorEnum getOperator() { + return operator; + } + + public void setOperator(@javax.annotation.Nullable OperatorEnum operator) { + this.operator = operator; + } + + + public LoaActionSearchSimpleExpressions values(@javax.annotation.Nullable List values) { + this.values = values; + return this; + } + + public LoaActionSearchSimpleExpressions addValuesItem(String valuesItem) { + if (this.values == null) { + this.values = new ArrayList<>(); + } + this.values.add(valuesItem); + return this; + } + + /** + * Get values + * @return values + */ + @javax.annotation.Nullable + public List getValues() { + return values; + } + + public void setValues(@javax.annotation.Nullable List values) { + this.values = values; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the LoaActionSearchSimpleExpressions instance itself + */ + public LoaActionSearchSimpleExpressions putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LoaActionSearchSimpleExpressions loaActionSearchSimpleExpressions = (LoaActionSearchSimpleExpressions) o; + return Objects.equals(this.property, loaActionSearchSimpleExpressions.property) && + Objects.equals(this.operator, loaActionSearchSimpleExpressions.operator) && + Objects.equals(this.values, loaActionSearchSimpleExpressions.values)&& + Objects.equals(this.additionalProperties, loaActionSearchSimpleExpressions.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(property, operator, values, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LoaActionSearchSimpleExpressions {\n"); + sb.append(" property: ").append(toIndentedString(property)).append("\n"); + sb.append(" operator: ").append(toIndentedString(operator)).append("\n"); + sb.append(" values: ").append(toIndentedString(values)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("property", "operator", "values")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to LoaActionSearchSimpleExpressions + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!LoaActionSearchSimpleExpressions.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in LoaActionSearchSimpleExpressions is not found in the empty JSON string", LoaActionSearchSimpleExpressions.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `property` + if (jsonObj.get("property") != null && !jsonObj.get("property").isJsonNull()) { + LoaActionFieldName.validateJsonElement(jsonObj.get("property")); + } + if ((jsonObj.get("operator") != null && !jsonObj.get("operator").isJsonNull()) && !jsonObj.get("operator").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `operator` to be a primitive type in the JSON string but got `%s`", jsonObj.get("operator").toString())); + } + // validate the optional field `operator` + if (jsonObj.get("operator") != null && !jsonObj.get("operator").isJsonNull()) { + OperatorEnum.validateJsonElement(jsonObj.get("operator")); + } + // ensure the optional json data is an array if present + if (jsonObj.get("values") != null && !jsonObj.get("values").isJsonNull() && !jsonObj.get("values").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `values` to be an array in the JSON string but got `%s`", jsonObj.get("values").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!LoaActionSearchSimpleExpressions.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'LoaActionSearchSimpleExpressions' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(LoaActionSearchSimpleExpressions.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, LoaActionSearchSimpleExpressions value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public LoaActionSearchSimpleExpressions read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + LoaActionSearchSimpleExpressions instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of LoaActionSearchSimpleExpressions given an JSON string + * + * @param jsonString JSON string + * @return An instance of LoaActionSearchSimpleExpressions + * @throws IOException if the JSON string is invalid with respect to LoaActionSearchSimpleExpressions + */ + public static LoaActionSearchSimpleExpressions fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, LoaActionSearchSimpleExpressions.class); + } + + /** + * Convert an instance of LoaActionSearchSimpleExpressions to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaActionSortCriteria.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaActionSortCriteria.java new file mode 100644 index 00000000..bea22fa8 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaActionSortCriteria.java @@ -0,0 +1,425 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * LoaActionSortCriteria + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class LoaActionSortCriteria { + /** + * Sorting direction + */ + @JsonAdapter(DirectionEnum.Adapter.class) + public enum DirectionEnum { + DESC("DESC"), + + ASC("ASC"); + + private String value; + + DirectionEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static DirectionEnum fromValue(String value) { + for (DirectionEnum b : DirectionEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final DirectionEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public DirectionEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return DirectionEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + DirectionEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_DIRECTION = "direction"; + @SerializedName(SERIALIZED_NAME_DIRECTION) + @javax.annotation.Nullable + private DirectionEnum direction = DirectionEnum.DESC; + + /** + * Possible field names to use on sorting + */ + @JsonAdapter(PropertyEnum.Adapter.class) + public enum PropertyEnum { + _CHANGELOG_CREATEDDATETIME("/changeLog/createdDateTime"); + + private String value; + + PropertyEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static PropertyEnum fromValue(String value) { + for (PropertyEnum b : PropertyEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final PropertyEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public PropertyEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return PropertyEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + PropertyEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_PROPERTY = "property"; + @SerializedName(SERIALIZED_NAME_PROPERTY) + @javax.annotation.Nullable + private PropertyEnum property = PropertyEnum._CHANGELOG_CREATEDDATETIME; + + public LoaActionSortCriteria() { + } + + public LoaActionSortCriteria direction(@javax.annotation.Nullable DirectionEnum direction) { + this.direction = direction; + return this; + } + + /** + * Sorting direction + * @return direction + */ + @javax.annotation.Nullable + public DirectionEnum getDirection() { + return direction; + } + + public void setDirection(@javax.annotation.Nullable DirectionEnum direction) { + this.direction = direction; + } + + + public LoaActionSortCriteria property(@javax.annotation.Nullable PropertyEnum property) { + this.property = property; + return this; + } + + /** + * Possible field names to use on sorting + * @return property + */ + @javax.annotation.Nullable + public PropertyEnum getProperty() { + return property; + } + + public void setProperty(@javax.annotation.Nullable PropertyEnum property) { + this.property = property; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the LoaActionSortCriteria instance itself + */ + public LoaActionSortCriteria putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LoaActionSortCriteria loaActionSortCriteria = (LoaActionSortCriteria) o; + return Objects.equals(this.direction, loaActionSortCriteria.direction) && + Objects.equals(this.property, loaActionSortCriteria.property)&& + Objects.equals(this.additionalProperties, loaActionSortCriteria.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(direction, property, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LoaActionSortCriteria {\n"); + sb.append(" direction: ").append(toIndentedString(direction)).append("\n"); + sb.append(" property: ").append(toIndentedString(property)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("direction", "property")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to LoaActionSortCriteria + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!LoaActionSortCriteria.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in LoaActionSortCriteria is not found in the empty JSON string", LoaActionSortCriteria.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("direction") != null && !jsonObj.get("direction").isJsonNull()) && !jsonObj.get("direction").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `direction` to be a primitive type in the JSON string but got `%s`", jsonObj.get("direction").toString())); + } + // validate the optional field `direction` + if (jsonObj.get("direction") != null && !jsonObj.get("direction").isJsonNull()) { + DirectionEnum.validateJsonElement(jsonObj.get("direction")); + } + if ((jsonObj.get("property") != null && !jsonObj.get("property").isJsonNull()) && !jsonObj.get("property").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `property` to be a primitive type in the JSON string but got `%s`", jsonObj.get("property").toString())); + } + // validate the optional field `property` + if (jsonObj.get("property") != null && !jsonObj.get("property").isJsonNull()) { + PropertyEnum.validateJsonElement(jsonObj.get("property")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!LoaActionSortCriteria.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'LoaActionSortCriteria' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(LoaActionSortCriteria.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, LoaActionSortCriteria value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public LoaActionSortCriteria read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + LoaActionSortCriteria instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of LoaActionSortCriteria given an JSON string + * + * @param jsonString JSON string + * @return An instance of LoaActionSortCriteria + * @throws IOException if the JSON string is invalid with respect to LoaActionSortCriteria + */ + public static LoaActionSortCriteria fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, LoaActionSortCriteria.class); + } + + /** + * Convert an instance of LoaActionSortCriteria to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaActionState.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaActionState.java index ed1ca7da..615f25c9 100644 --- a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaActionState.java +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaActionState.java @@ -24,7 +24,7 @@ import com.google.gson.stream.JsonWriter; /** - * Loa Action State + * Action State */ @JsonAdapter(LoaActionState.Adapter.class) public enum LoaActionState { diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaActionType.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaActionType.java index c4bffe80..1948c347 100644 --- a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaActionType.java +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaActionType.java @@ -24,20 +24,20 @@ import com.google.gson.stream.JsonWriter; /** - * Loa Action Type + * Action to perform on the LOA. */ @JsonAdapter(LoaActionType.Adapter.class) public enum LoaActionType { - AUTHORIZE_LOA("AUTHORIZE_LOA"), + ISSUER_AUTHORIZATION("LOA_ISSUER_AUTHORIZATION"), - ACCEPT_LOA("ACCEPT_LOA"), + REQUESTOR_ACCEPTANCE("LOA_REQUESTOR_ACCEPTANCE"), - COPY_LOA("COPY_LOA"), + COPY_LINK("LOA_COPY_LINK"), - SEND_LOA("SEND_LOA"), + SEND_EMAIL_NOTIFICATION("LOA_SEND_EMAIL_NOTIFICATION"), - CANCEL_LOA("CANCEL_LOA"); + CANCEL("LOA_CANCEL"); private String value; diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaChangelog.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaChangelog.java new file mode 100644 index 00000000..1cde2ddd --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaChangelog.java @@ -0,0 +1,484 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * Change log + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class LoaChangelog { + public static final String SERIALIZED_NAME_CREATED_BY = "createdBy"; + @SerializedName(SERIALIZED_NAME_CREATED_BY) + @javax.annotation.Nullable + private String createdBy; + + public static final String SERIALIZED_NAME_CREATED_BY_FULL_NAME = "createdByFullName"; + @SerializedName(SERIALIZED_NAME_CREATED_BY_FULL_NAME) + @javax.annotation.Nullable + private String createdByFullName; + + public static final String SERIALIZED_NAME_CREATED_BY_EMAIL = "createdByEmail"; + @SerializedName(SERIALIZED_NAME_CREATED_BY_EMAIL) + @javax.annotation.Nullable + private String createdByEmail; + + public static final String SERIALIZED_NAME_CREATED_DATE_TIME = "createdDateTime"; + @SerializedName(SERIALIZED_NAME_CREATED_DATE_TIME) + @javax.annotation.Nullable + private OffsetDateTime createdDateTime; + + public static final String SERIALIZED_NAME_UPDATED_BY = "updatedBy"; + @SerializedName(SERIALIZED_NAME_UPDATED_BY) + @javax.annotation.Nullable + private String updatedBy; + + public static final String SERIALIZED_NAME_UPDATED_BY_FULL_NAME = "updatedByFullName"; + @SerializedName(SERIALIZED_NAME_UPDATED_BY_FULL_NAME) + @javax.annotation.Nullable + private String updatedByFullName; + + public static final String SERIALIZED_NAME_UPDATED_BY_EMAIL = "updatedByEmail"; + @SerializedName(SERIALIZED_NAME_UPDATED_BY_EMAIL) + @javax.annotation.Nullable + private String updatedByEmail; + + public static final String SERIALIZED_NAME_UPDATED_DATE_TIME = "updatedDateTime"; + @SerializedName(SERIALIZED_NAME_UPDATED_DATE_TIME) + @javax.annotation.Nullable + private OffsetDateTime updatedDateTime; + + public LoaChangelog() { + } + + public LoaChangelog createdBy(@javax.annotation.Nullable String createdBy) { + this.createdBy = createdBy; + return this; + } + + /** + * Created by User Key + * @return createdBy + */ + @javax.annotation.Nullable + public String getCreatedBy() { + return createdBy; + } + + public void setCreatedBy(@javax.annotation.Nullable String createdBy) { + this.createdBy = createdBy; + } + + + public LoaChangelog createdByFullName(@javax.annotation.Nullable String createdByFullName) { + this.createdByFullName = createdByFullName; + return this; + } + + /** + * Created by User Full Name + * @return createdByFullName + */ + @javax.annotation.Nullable + public String getCreatedByFullName() { + return createdByFullName; + } + + public void setCreatedByFullName(@javax.annotation.Nullable String createdByFullName) { + this.createdByFullName = createdByFullName; + } + + + public LoaChangelog createdByEmail(@javax.annotation.Nullable String createdByEmail) { + this.createdByEmail = createdByEmail; + return this; + } + + /** + * Created by User Email Address + * @return createdByEmail + */ + @javax.annotation.Nullable + public String getCreatedByEmail() { + return createdByEmail; + } + + public void setCreatedByEmail(@javax.annotation.Nullable String createdByEmail) { + this.createdByEmail = createdByEmail; + } + + + public LoaChangelog createdDateTime(@javax.annotation.Nullable OffsetDateTime createdDateTime) { + this.createdDateTime = createdDateTime; + return this; + } + + /** + * Created by Date and Time + * @return createdDateTime + */ + @javax.annotation.Nullable + public OffsetDateTime getCreatedDateTime() { + return createdDateTime; + } + + public void setCreatedDateTime(@javax.annotation.Nullable OffsetDateTime createdDateTime) { + this.createdDateTime = createdDateTime; + } + + + public LoaChangelog updatedBy(@javax.annotation.Nullable String updatedBy) { + this.updatedBy = updatedBy; + return this; + } + + /** + * Updated by User Key + * @return updatedBy + */ + @javax.annotation.Nullable + public String getUpdatedBy() { + return updatedBy; + } + + public void setUpdatedBy(@javax.annotation.Nullable String updatedBy) { + this.updatedBy = updatedBy; + } + + + public LoaChangelog updatedByFullName(@javax.annotation.Nullable String updatedByFullName) { + this.updatedByFullName = updatedByFullName; + return this; + } + + /** + * Updated by User Full Name + * @return updatedByFullName + */ + @javax.annotation.Nullable + public String getUpdatedByFullName() { + return updatedByFullName; + } + + public void setUpdatedByFullName(@javax.annotation.Nullable String updatedByFullName) { + this.updatedByFullName = updatedByFullName; + } + + + public LoaChangelog updatedByEmail(@javax.annotation.Nullable String updatedByEmail) { + this.updatedByEmail = updatedByEmail; + return this; + } + + /** + * Updated by User Email Address + * @return updatedByEmail + */ + @javax.annotation.Nullable + public String getUpdatedByEmail() { + return updatedByEmail; + } + + public void setUpdatedByEmail(@javax.annotation.Nullable String updatedByEmail) { + this.updatedByEmail = updatedByEmail; + } + + + public LoaChangelog updatedDateTime(@javax.annotation.Nullable OffsetDateTime updatedDateTime) { + this.updatedDateTime = updatedDateTime; + return this; + } + + /** + * Updated by Date and Time + * @return updatedDateTime + */ + @javax.annotation.Nullable + public OffsetDateTime getUpdatedDateTime() { + return updatedDateTime; + } + + public void setUpdatedDateTime(@javax.annotation.Nullable OffsetDateTime updatedDateTime) { + this.updatedDateTime = updatedDateTime; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the LoaChangelog instance itself + */ + public LoaChangelog putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LoaChangelog loaChangelog = (LoaChangelog) o; + return Objects.equals(this.createdBy, loaChangelog.createdBy) && + Objects.equals(this.createdByFullName, loaChangelog.createdByFullName) && + Objects.equals(this.createdByEmail, loaChangelog.createdByEmail) && + Objects.equals(this.createdDateTime, loaChangelog.createdDateTime) && + Objects.equals(this.updatedBy, loaChangelog.updatedBy) && + Objects.equals(this.updatedByFullName, loaChangelog.updatedByFullName) && + Objects.equals(this.updatedByEmail, loaChangelog.updatedByEmail) && + Objects.equals(this.updatedDateTime, loaChangelog.updatedDateTime)&& + Objects.equals(this.additionalProperties, loaChangelog.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(createdBy, createdByFullName, createdByEmail, createdDateTime, updatedBy, updatedByFullName, updatedByEmail, updatedDateTime, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LoaChangelog {\n"); + sb.append(" createdBy: ").append(toIndentedString(createdBy)).append("\n"); + sb.append(" createdByFullName: ").append(toIndentedString(createdByFullName)).append("\n"); + sb.append(" createdByEmail: ").append(toIndentedString(createdByEmail)).append("\n"); + sb.append(" createdDateTime: ").append(toIndentedString(createdDateTime)).append("\n"); + sb.append(" updatedBy: ").append(toIndentedString(updatedBy)).append("\n"); + sb.append(" updatedByFullName: ").append(toIndentedString(updatedByFullName)).append("\n"); + sb.append(" updatedByEmail: ").append(toIndentedString(updatedByEmail)).append("\n"); + sb.append(" updatedDateTime: ").append(toIndentedString(updatedDateTime)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("createdBy", "createdByFullName", "createdByEmail", "createdDateTime", "updatedBy", "updatedByFullName", "updatedByEmail", "updatedDateTime")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to LoaChangelog + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!LoaChangelog.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in LoaChangelog is not found in the empty JSON string", LoaChangelog.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("createdBy") != null && !jsonObj.get("createdBy").isJsonNull()) && !jsonObj.get("createdBy").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `createdBy` to be a primitive type in the JSON string but got `%s`", jsonObj.get("createdBy").toString())); + } + if ((jsonObj.get("createdByFullName") != null && !jsonObj.get("createdByFullName").isJsonNull()) && !jsonObj.get("createdByFullName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `createdByFullName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("createdByFullName").toString())); + } + if ((jsonObj.get("createdByEmail") != null && !jsonObj.get("createdByEmail").isJsonNull()) && !jsonObj.get("createdByEmail").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `createdByEmail` to be a primitive type in the JSON string but got `%s`", jsonObj.get("createdByEmail").toString())); + } + if ((jsonObj.get("updatedBy") != null && !jsonObj.get("updatedBy").isJsonNull()) && !jsonObj.get("updatedBy").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `updatedBy` to be a primitive type in the JSON string but got `%s`", jsonObj.get("updatedBy").toString())); + } + if ((jsonObj.get("updatedByFullName") != null && !jsonObj.get("updatedByFullName").isJsonNull()) && !jsonObj.get("updatedByFullName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `updatedByFullName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("updatedByFullName").toString())); + } + if ((jsonObj.get("updatedByEmail") != null && !jsonObj.get("updatedByEmail").isJsonNull()) && !jsonObj.get("updatedByEmail").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `updatedByEmail` to be a primitive type in the JSON string but got `%s`", jsonObj.get("updatedByEmail").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!LoaChangelog.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'LoaChangelog' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(LoaChangelog.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, LoaChangelog value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public LoaChangelog read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + LoaChangelog instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of LoaChangelog given an JSON string + * + * @param jsonString JSON string + * @return An instance of LoaChangelog + * @throws IOException if the JSON string is invalid with respect to LoaChangelog + */ + public static LoaChangelog fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, LoaChangelog.class); + } + + /** + * Convert an instance of LoaChangelog to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaConsumer.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaConsumer.java new file mode 100644 index 00000000..f0f8b752 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaConsumer.java @@ -0,0 +1,379 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.LoaChangelog; +import com.equinix.sdk.fabricv4.model.LoaProductType; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.net.URI; +import java.util.Arrays; +import java.util.UUID; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * Associated consumer response + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class LoaConsumer { + public static final String SERIALIZED_NAME_HREF = "href"; + @SerializedName(SERIALIZED_NAME_HREF) + @javax.annotation.Nullable + private URI href; + + public static final String SERIALIZED_NAME_UUID = "uuid"; + @SerializedName(SERIALIZED_NAME_UUID) + @javax.annotation.Nullable + private UUID uuid; + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nullable + private LoaProductType type; + + public static final String SERIALIZED_NAME_CHANGE_LOG = "changeLog"; + @SerializedName(SERIALIZED_NAME_CHANGE_LOG) + @javax.annotation.Nullable + private LoaChangelog changeLog; + + public LoaConsumer() { + } + + public LoaConsumer href(@javax.annotation.Nullable URI href) { + this.href = href; + return this; + } + + /** + * Consumer URI + * @return href + */ + @javax.annotation.Nullable + public URI getHref() { + return href; + } + + public void setHref(@javax.annotation.Nullable URI href) { + this.href = href; + } + + + public LoaConsumer uuid(@javax.annotation.Nullable UUID uuid) { + this.uuid = uuid; + return this; + } + + /** + * Consumer Identifier + * @return uuid + */ + @javax.annotation.Nullable + public UUID getUuid() { + return uuid; + } + + public void setUuid(@javax.annotation.Nullable UUID uuid) { + this.uuid = uuid; + } + + + public LoaConsumer type(@javax.annotation.Nullable LoaProductType type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + */ + @javax.annotation.Nullable + public LoaProductType getType() { + return type; + } + + public void setType(@javax.annotation.Nullable LoaProductType type) { + this.type = type; + } + + + public LoaConsumer changeLog(@javax.annotation.Nullable LoaChangelog changeLog) { + this.changeLog = changeLog; + return this; + } + + /** + * Get changeLog + * @return changeLog + */ + @javax.annotation.Nullable + public LoaChangelog getChangeLog() { + return changeLog; + } + + public void setChangeLog(@javax.annotation.Nullable LoaChangelog changeLog) { + this.changeLog = changeLog; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the LoaConsumer instance itself + */ + public LoaConsumer putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LoaConsumer loaConsumer = (LoaConsumer) o; + return Objects.equals(this.href, loaConsumer.href) && + Objects.equals(this.uuid, loaConsumer.uuid) && + Objects.equals(this.type, loaConsumer.type) && + Objects.equals(this.changeLog, loaConsumer.changeLog)&& + Objects.equals(this.additionalProperties, loaConsumer.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(href, uuid, type, changeLog, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LoaConsumer {\n"); + sb.append(" href: ").append(toIndentedString(href)).append("\n"); + sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" changeLog: ").append(toIndentedString(changeLog)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("href", "uuid", "type", "changeLog")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to LoaConsumer + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!LoaConsumer.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in LoaConsumer is not found in the empty JSON string", LoaConsumer.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("href") != null && !jsonObj.get("href").isJsonNull()) && !jsonObj.get("href").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `href` to be a primitive type in the JSON string but got `%s`", jsonObj.get("href").toString())); + } + if ((jsonObj.get("uuid") != null && !jsonObj.get("uuid").isJsonNull()) && !jsonObj.get("uuid").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `uuid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("uuid").toString())); + } + // validate the optional field `type` + if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { + LoaProductType.validateJsonElement(jsonObj.get("type")); + } + // validate the optional field `changeLog` + if (jsonObj.get("changeLog") != null && !jsonObj.get("changeLog").isJsonNull()) { + LoaChangelog.validateJsonElement(jsonObj.get("changeLog")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!LoaConsumer.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'LoaConsumer' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(LoaConsumer.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, LoaConsumer value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public LoaConsumer read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + LoaConsumer instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of LoaConsumer given an JSON string + * + * @param jsonString JSON string + * @return An instance of LoaConsumer + * @throws IOException if the JSON string is invalid with respect to LoaConsumer + */ + public static LoaConsumer fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, LoaConsumer.class); + } + + /** + * Convert an instance of LoaConsumer to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaConsumersResponse.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaConsumersResponse.java new file mode 100644 index 00000000..cf9e7f54 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaConsumersResponse.java @@ -0,0 +1,339 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.LoaConsumer; +import com.equinix.sdk.fabricv4.model.Pagination; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * List of Consumers associated with a LOA + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class LoaConsumersResponse { + public static final String SERIALIZED_NAME_PAGINATION = "pagination"; + @SerializedName(SERIALIZED_NAME_PAGINATION) + @javax.annotation.Nullable + private Pagination pagination; + + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + @javax.annotation.Nullable + private List data = new ArrayList<>(); + + public LoaConsumersResponse() { + } + + public LoaConsumersResponse pagination(@javax.annotation.Nullable Pagination pagination) { + this.pagination = pagination; + return this; + } + + /** + * Get pagination + * @return pagination + */ + @javax.annotation.Nullable + public Pagination getPagination() { + return pagination; + } + + public void setPagination(@javax.annotation.Nullable Pagination pagination) { + this.pagination = pagination; + } + + + public LoaConsumersResponse data(@javax.annotation.Nullable List data) { + this.data = data; + return this; + } + + public LoaConsumersResponse addDataItem(LoaConsumer dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + return this; + } + + /** + * Get data + * @return data + */ + @javax.annotation.Nullable + public List getData() { + return data; + } + + public void setData(@javax.annotation.Nullable List data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the LoaConsumersResponse instance itself + */ + public LoaConsumersResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LoaConsumersResponse loaConsumersResponse = (LoaConsumersResponse) o; + return Objects.equals(this.pagination, loaConsumersResponse.pagination) && + Objects.equals(this.data, loaConsumersResponse.data)&& + Objects.equals(this.additionalProperties, loaConsumersResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(pagination, data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LoaConsumersResponse {\n"); + sb.append(" pagination: ").append(toIndentedString(pagination)).append("\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("pagination", "data")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to LoaConsumersResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!LoaConsumersResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in LoaConsumersResponse is not found in the empty JSON string", LoaConsumersResponse.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `pagination` + if (jsonObj.get("pagination") != null && !jsonObj.get("pagination").isJsonNull()) { + Pagination.validateJsonElement(jsonObj.get("pagination")); + } + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); + if (jsonArraydata != null) { + // ensure the json data is an array + if (!jsonObj.get("data").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + } + + // validate the optional field `data` (array) + for (int i = 0; i < jsonArraydata.size(); i++) { + LoaConsumer.validateJsonElement(jsonArraydata.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!LoaConsumersResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'LoaConsumersResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(LoaConsumersResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, LoaConsumersResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public LoaConsumersResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + LoaConsumersResponse instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of LoaConsumersResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of LoaConsumersResponse + * @throws IOException if the JSON string is invalid with respect to LoaConsumersResponse + */ + public static LoaConsumersResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, LoaConsumersResponse.class); + } + + /** + * Convert an instance of LoaConsumersResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaDemarcationPoint.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaDemarcationPoint.java new file mode 100644 index 00000000..18b5e870 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaDemarcationPoint.java @@ -0,0 +1,398 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.LoaPatchPanelConnectorType; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * Specifies the demarcation point. <br> For CAGE_LOA - cageUniqueSpaceId is required. <br> For PATCH_PANEL_LOA - patchPanelId is required. <br> For PATCH_PANEL_PORT_LOA - patchPanelId, patchPanelPortA, patchPanelPortB and connectorType is required. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class LoaDemarcationPoint { + public static final String SERIALIZED_NAME_CAGE_UNIQUE_SPACE_ID = "cageUniqueSpaceId"; + @SerializedName(SERIALIZED_NAME_CAGE_UNIQUE_SPACE_ID) + @javax.annotation.Nullable + private String cageUniqueSpaceId; + + public static final String SERIALIZED_NAME_PATCH_PANEL_ID = "patchPanelId"; + @SerializedName(SERIALIZED_NAME_PATCH_PANEL_ID) + @javax.annotation.Nullable + private String patchPanelId; + + public static final String SERIALIZED_NAME_PATCH_PANEL_PORT_A = "patchPanelPortA"; + @SerializedName(SERIALIZED_NAME_PATCH_PANEL_PORT_A) + @javax.annotation.Nullable + private Integer patchPanelPortA; + + public static final String SERIALIZED_NAME_PATCH_PANEL_PORT_B = "patchPanelPortB"; + @SerializedName(SERIALIZED_NAME_PATCH_PANEL_PORT_B) + @javax.annotation.Nullable + private Integer patchPanelPortB; + + public static final String SERIALIZED_NAME_CONNECTOR_TYPE = "connectorType"; + @SerializedName(SERIALIZED_NAME_CONNECTOR_TYPE) + @javax.annotation.Nullable + private LoaPatchPanelConnectorType connectorType; + + public LoaDemarcationPoint() { + } + + public LoaDemarcationPoint cageUniqueSpaceId(@javax.annotation.Nullable String cageUniqueSpaceId) { + this.cageUniqueSpaceId = cageUniqueSpaceId; + return this; + } + + /** + * Unique identifier of the Cage. + * @return cageUniqueSpaceId + */ + @javax.annotation.Nullable + public String getCageUniqueSpaceId() { + return cageUniqueSpaceId; + } + + public void setCageUniqueSpaceId(@javax.annotation.Nullable String cageUniqueSpaceId) { + this.cageUniqueSpaceId = cageUniqueSpaceId; + } + + + public LoaDemarcationPoint patchPanelId(@javax.annotation.Nullable String patchPanelId) { + this.patchPanelId = patchPanelId; + return this; + } + + /** + * Unique identifier of the Patch Panel. + * @return patchPanelId + */ + @javax.annotation.Nullable + public String getPatchPanelId() { + return patchPanelId; + } + + public void setPatchPanelId(@javax.annotation.Nullable String patchPanelId) { + this.patchPanelId = patchPanelId; + } + + + public LoaDemarcationPoint patchPanelPortA(@javax.annotation.Nullable Integer patchPanelPortA) { + this.patchPanelPortA = patchPanelPortA; + return this; + } + + /** + * Specify the desired port number. <br> When ports are not provided, next available ports will be used. + * @return patchPanelPortA + */ + @javax.annotation.Nullable + public Integer getPatchPanelPortA() { + return patchPanelPortA; + } + + public void setPatchPanelPortA(@javax.annotation.Nullable Integer patchPanelPortA) { + this.patchPanelPortA = patchPanelPortA; + } + + + public LoaDemarcationPoint patchPanelPortB(@javax.annotation.Nullable Integer patchPanelPortB) { + this.patchPanelPortB = patchPanelPortB; + return this; + } + + /** + * Specify the desired port number. <br> When ports are not provided, next available ports will be used. <br> Required for Connector type FC and ST only. + * @return patchPanelPortB + */ + @javax.annotation.Nullable + public Integer getPatchPanelPortB() { + return patchPanelPortB; + } + + public void setPatchPanelPortB(@javax.annotation.Nullable Integer patchPanelPortB) { + this.patchPanelPortB = patchPanelPortB; + } + + + public LoaDemarcationPoint connectorType(@javax.annotation.Nullable LoaPatchPanelConnectorType connectorType) { + this.connectorType = connectorType; + return this; + } + + /** + * Get connectorType + * @return connectorType + */ + @javax.annotation.Nullable + public LoaPatchPanelConnectorType getConnectorType() { + return connectorType; + } + + public void setConnectorType(@javax.annotation.Nullable LoaPatchPanelConnectorType connectorType) { + this.connectorType = connectorType; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the LoaDemarcationPoint instance itself + */ + public LoaDemarcationPoint putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LoaDemarcationPoint loaDemarcationPoint = (LoaDemarcationPoint) o; + return Objects.equals(this.cageUniqueSpaceId, loaDemarcationPoint.cageUniqueSpaceId) && + Objects.equals(this.patchPanelId, loaDemarcationPoint.patchPanelId) && + Objects.equals(this.patchPanelPortA, loaDemarcationPoint.patchPanelPortA) && + Objects.equals(this.patchPanelPortB, loaDemarcationPoint.patchPanelPortB) && + Objects.equals(this.connectorType, loaDemarcationPoint.connectorType)&& + Objects.equals(this.additionalProperties, loaDemarcationPoint.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(cageUniqueSpaceId, patchPanelId, patchPanelPortA, patchPanelPortB, connectorType, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LoaDemarcationPoint {\n"); + sb.append(" cageUniqueSpaceId: ").append(toIndentedString(cageUniqueSpaceId)).append("\n"); + sb.append(" patchPanelId: ").append(toIndentedString(patchPanelId)).append("\n"); + sb.append(" patchPanelPortA: ").append(toIndentedString(patchPanelPortA)).append("\n"); + sb.append(" patchPanelPortB: ").append(toIndentedString(patchPanelPortB)).append("\n"); + sb.append(" connectorType: ").append(toIndentedString(connectorType)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("cageUniqueSpaceId", "patchPanelId", "patchPanelPortA", "patchPanelPortB", "connectorType")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to LoaDemarcationPoint + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!LoaDemarcationPoint.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in LoaDemarcationPoint is not found in the empty JSON string", LoaDemarcationPoint.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("cageUniqueSpaceId") != null && !jsonObj.get("cageUniqueSpaceId").isJsonNull()) && !jsonObj.get("cageUniqueSpaceId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `cageUniqueSpaceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("cageUniqueSpaceId").toString())); + } + if ((jsonObj.get("patchPanelId") != null && !jsonObj.get("patchPanelId").isJsonNull()) && !jsonObj.get("patchPanelId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `patchPanelId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("patchPanelId").toString())); + } + // validate the optional field `connectorType` + if (jsonObj.get("connectorType") != null && !jsonObj.get("connectorType").isJsonNull()) { + LoaPatchPanelConnectorType.validateJsonElement(jsonObj.get("connectorType")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!LoaDemarcationPoint.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'LoaDemarcationPoint' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(LoaDemarcationPoint.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, LoaDemarcationPoint value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public LoaDemarcationPoint read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + LoaDemarcationPoint instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of LoaDemarcationPoint given an JSON string + * + * @param jsonString JSON string + * @return An instance of LoaDemarcationPoint + * @throws IOException if the JSON string is invalid with respect to LoaDemarcationPoint + */ + public static LoaDemarcationPoint fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, LoaDemarcationPoint.class); + } + + /** + * Convert an instance of LoaDemarcationPoint to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaFieldName.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaFieldName.java new file mode 100644 index 00000000..83e729de --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaFieldName.java @@ -0,0 +1,114 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.google.gson.annotations.SerializedName; + +import java.io.IOException; +import java.util.Locale; +import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; + +/** + * Possible field names to use on filters + */ +@JsonAdapter(LoaFieldName.Adapter.class) +public enum LoaFieldName { + + UUID("/uuid"), + + STATE("/state"), + + TYPE("/type"), + + NAME("/name"), + + AUTHORIZEDPRODUCTTYPE("/authorizedProductType"), + + EXPIRATIONDATETIME("/expirationDateTime"), + + REQUESTOR_EMAIL("/requestor/email"), + + REQUESTOR_ORGID("/requestor/orgId"), + + REQUESTOR_ORGNAME("/requestor/orgName"), + + ISSUER_EMAIL("/issuer/email"), + + ISSUER_ORGID("/issuer/orgId"), + + ISSUER_ORGNAME("/issuer/orgName"), + + DEMARCATIONPOINT_PATCHPANELID("/demarcationPoint/patchPanelId"), + + DEMARCATIONPOINT_PATCHPANELPORTA("/demarcationPoint/patchPanelPortA"), + + DEMARCATIONPOINT_PATCHPANELPORTB("/demarcationPoint/patchPanelPortB"), + + DEMARCATIONPOINT_CONNECTORTYPE("/demarcationPoint/connectorType"), + + DEMARCATIONPOINT_CAGEUNIQUESPACEID("/demarcationPoint/cageUniqueSpaceId"), + + LOCATION_IBXCODE("/location/ibxCode"), + + CHANGELOG_CREATEDDATETIME("/changeLog/createdDateTime"), + + CHANGELOG_UPDATEDDATETIME("/changeLog/updatedDateTime"); + + private String value; + + LoaFieldName(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static LoaFieldName fromValue(String value) { + for (LoaFieldName b : LoaFieldName.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final LoaFieldName enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public LoaFieldName read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return LoaFieldName.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + LoaFieldName.fromValue(value); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaFilter.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaFilter.java new file mode 100644 index 00000000..c910c5ed --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaFilter.java @@ -0,0 +1,270 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.LoaFieldName; +import com.equinix.sdk.fabricv4.model.LoaOrFilter; +import com.equinix.sdk.fabricv4.model.LoaSimpleExpression; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + + + +import java.io.IOException; +import java.lang.reflect.Type; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Locale; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.JsonPrimitive; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonSerializationContext; +import com.google.gson.JsonSerializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonArray; +import com.google.gson.JsonParseException; + +import com.equinix.sdk.fabricv4.JSON; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class LoaFilter extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(LoaFilter.class.getName()); + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!LoaFilter.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'LoaFilter' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter adapterLoaSimpleExpression = gson.getDelegateAdapter(this, TypeToken.get(LoaSimpleExpression.class)); + final TypeAdapter adapterLoaOrFilter = gson.getDelegateAdapter(this, TypeToken.get(LoaOrFilter.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, LoaFilter value) throws IOException { + if (value == null || value.getActualInstance() == null) { + elementAdapter.write(out, null); + return; + } + + // check if the actual instance is of the type `LoaSimpleExpression` + if (value.getActualInstance() instanceof LoaSimpleExpression) { + JsonElement element = adapterLoaSimpleExpression.toJsonTree((LoaSimpleExpression)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + // check if the actual instance is of the type `LoaOrFilter` + if (value.getActualInstance() instanceof LoaOrFilter) { + JsonElement element = adapterLoaOrFilter.toJsonTree((LoaOrFilter)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + throw new IOException("Failed to serialize as the type doesn't match anyOf schemas: LoaOrFilter, LoaSimpleExpression"); + } + + @Override + public LoaFilter read(JsonReader in) throws IOException { + Object deserialized = null; + JsonElement jsonElement = elementAdapter.read(in); + + ArrayList errorMessages = new ArrayList<>(); + TypeAdapter actualAdapter = elementAdapter; + + // deserialize LoaSimpleExpression + try { + // validate the JSON object to see if any exception is thrown + LoaSimpleExpression.validateJsonElement(jsonElement); + actualAdapter = adapterLoaSimpleExpression; + LoaFilter ret = new LoaFilter(); + ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); + return ret; + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format(Locale.ROOT, "Deserialization for LoaSimpleExpression failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'LoaSimpleExpression'", e); + } + // deserialize LoaOrFilter + try { + // validate the JSON object to see if any exception is thrown + LoaOrFilter.validateJsonElement(jsonElement); + actualAdapter = adapterLoaOrFilter; + LoaFilter ret = new LoaFilter(); + ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); + return ret; + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format(Locale.ROOT, "Deserialization for LoaOrFilter failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'LoaOrFilter'", e); + } + + throw new IOException(String.format(Locale.ROOT, "Failed deserialization for LoaFilter: no class matches result, expected at least 1. Detailed failure message for anyOf schemas: %s. JSON: %s", errorMessages, jsonElement.toString())); + } + }.nullSafe(); + } + } + + // store a list of schema names defined in anyOf + public static final Map> schemas = new HashMap>(); + + public LoaFilter() { + super("anyOf", Boolean.FALSE); + } + + public LoaFilter(Object o) { + super("anyOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("LoaSimpleExpression", LoaSimpleExpression.class); + schemas.put("LoaOrFilter", LoaOrFilter.class); + } + + @Override + public Map> getSchemas() { + return LoaFilter.schemas; + } + + /** + * Set the instance that matches the anyOf child schema, check + * the instance parameter is valid against the anyOf child schemas: + * LoaOrFilter, LoaSimpleExpression + * + * It could be an instance of the 'anyOf' schemas. + */ + @Override + public void setActualInstance(Object instance) { + if (instance instanceof LoaSimpleExpression) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof LoaOrFilter) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException("Invalid instance type. Must be LoaOrFilter, LoaSimpleExpression"); + } + + /** + * Get the actual instance, which can be the following: + * LoaOrFilter, LoaSimpleExpression + * + * @return The actual instance (LoaOrFilter, LoaSimpleExpression) + */ + @SuppressWarnings("unchecked") + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `LoaSimpleExpression`. If the actual instance is not `LoaSimpleExpression`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `LoaSimpleExpression` + * @throws ClassCastException if the instance is not `LoaSimpleExpression` + */ + public LoaSimpleExpression getLoaSimpleExpression() throws ClassCastException { + return (LoaSimpleExpression)super.getActualInstance(); + } + + /** + * Get the actual instance of `LoaOrFilter`. If the actual instance is not `LoaOrFilter`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `LoaOrFilter` + * @throws ClassCastException if the instance is not `LoaOrFilter` + */ + public LoaOrFilter getLoaOrFilter() throws ClassCastException { + return (LoaOrFilter)super.getActualInstance(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to LoaFilter + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + // validate anyOf schemas one by one + ArrayList errorMessages = new ArrayList<>(); + // validate the json string with LoaSimpleExpression + try { + LoaSimpleExpression.validateJsonElement(jsonElement); + return; + } catch (Exception e) { + errorMessages.add(String.format(Locale.ROOT, "Deserialization for LoaSimpleExpression failed with `%s`.", e.getMessage())); + // continue to the next one + } + // validate the json string with LoaOrFilter + try { + LoaOrFilter.validateJsonElement(jsonElement); + return; + } catch (Exception e) { + errorMessages.add(String.format(Locale.ROOT, "Deserialization for LoaOrFilter failed with `%s`.", e.getMessage())); + // continue to the next one + } + throw new IOException(String.format(Locale.ROOT, "The JSON string is invalid for LoaFilter with anyOf schemas: LoaOrFilter, LoaSimpleExpression. no class match the result, expected at least 1. Detailed failure message for anyOf schemas: %s. JSON: %s", errorMessages, jsonElement.toString())); + } + + /** + * Create an instance of LoaFilter given an JSON string + * + * @param jsonString JSON string + * @return An instance of LoaFilter + * @throws IOException if the JSON string is invalid with respect to LoaFilter + */ + public static LoaFilter fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, LoaFilter.class); + } + + /** + * Convert an instance of LoaFilter to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaIssuer.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaIssuer.java new file mode 100644 index 00000000..1c721564 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaIssuer.java @@ -0,0 +1,341 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * Issuer + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class LoaIssuer { + public static final String SERIALIZED_NAME_EMAIL = "email"; + @SerializedName(SERIALIZED_NAME_EMAIL) + @javax.annotation.Nullable + private String email; + + public static final String SERIALIZED_NAME_ORG_ID = "orgId"; + @SerializedName(SERIALIZED_NAME_ORG_ID) + @javax.annotation.Nullable + private Integer orgId; + + public static final String SERIALIZED_NAME_ORG_NAME = "orgName"; + @SerializedName(SERIALIZED_NAME_ORG_NAME) + @javax.annotation.Nullable + private String orgName; + + public LoaIssuer() { + } + + public LoaIssuer email(@javax.annotation.Nullable String email) { + this.email = email; + return this; + } + + /** + * Email address of the issuer contact. + * @return email + */ + @javax.annotation.Nullable + public String getEmail() { + return email; + } + + public void setEmail(@javax.annotation.Nullable String email) { + this.email = email; + } + + + public LoaIssuer orgId(@javax.annotation.Nullable Integer orgId) { + this.orgId = orgId; + return this; + } + + /** + * Organization ID of the issuer. + * @return orgId + */ + @javax.annotation.Nullable + public Integer getOrgId() { + return orgId; + } + + public void setOrgId(@javax.annotation.Nullable Integer orgId) { + this.orgId = orgId; + } + + + public LoaIssuer orgName(@javax.annotation.Nullable String orgName) { + this.orgName = orgName; + return this; + } + + /** + * Organization name of the issuer. + * @return orgName + */ + @javax.annotation.Nullable + public String getOrgName() { + return orgName; + } + + public void setOrgName(@javax.annotation.Nullable String orgName) { + this.orgName = orgName; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the LoaIssuer instance itself + */ + public LoaIssuer putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LoaIssuer loaIssuer = (LoaIssuer) o; + return Objects.equals(this.email, loaIssuer.email) && + Objects.equals(this.orgId, loaIssuer.orgId) && + Objects.equals(this.orgName, loaIssuer.orgName)&& + Objects.equals(this.additionalProperties, loaIssuer.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(email, orgId, orgName, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LoaIssuer {\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" orgId: ").append(toIndentedString(orgId)).append("\n"); + sb.append(" orgName: ").append(toIndentedString(orgName)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("email", "orgId", "orgName")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to LoaIssuer + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!LoaIssuer.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in LoaIssuer is not found in the empty JSON string", LoaIssuer.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); + } + if ((jsonObj.get("orgName") != null && !jsonObj.get("orgName").isJsonNull()) && !jsonObj.get("orgName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `orgName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("orgName").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!LoaIssuer.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'LoaIssuer' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(LoaIssuer.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, LoaIssuer value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public LoaIssuer read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + LoaIssuer instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of LoaIssuer given an JSON string + * + * @param jsonString JSON string + * @return An instance of LoaIssuer + * @throws IOException if the JSON string is invalid with respect to LoaIssuer + */ + public static LoaIssuer fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, LoaIssuer.class); + } + + /** + * Convert an instance of LoaIssuer to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AgentDefinition.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaLocation.java similarity index 76% rename from services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AgentDefinition.java rename to services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaLocation.java index 56029825..7b77a2d4 100644 --- a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AgentDefinition.java +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaLocation.java @@ -46,34 +46,34 @@ import com.equinix.sdk.fabricv4.JSON; /** - * AgentDefinition + * Eligible location where LOA can be issued. */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") -public class AgentDefinition { - public static final String SERIALIZED_NAME_URL = "url"; - @SerializedName(SERIALIZED_NAME_URL) +public class LoaLocation { + public static final String SERIALIZED_NAME_IBX_CODE = "ibxCode"; + @SerializedName(SERIALIZED_NAME_IBX_CODE) @javax.annotation.Nullable - private String url; + private String ibxCode; - public AgentDefinition() { + public LoaLocation() { } - public AgentDefinition url(@javax.annotation.Nullable String url) { - this.url = url; + public LoaLocation ibxCode(@javax.annotation.Nullable String ibxCode) { + this.ibxCode = ibxCode; return this; } /** - * Agent Template ReadMe (.md) Definition - * @return url + * IBX Code + * @return ibxCode */ @javax.annotation.Nullable - public String getUrl() { - return url; + public String getIbxCode() { + return ibxCode; } - public void setUrl(@javax.annotation.Nullable String url) { - this.url = url; + public void setIbxCode(@javax.annotation.Nullable String ibxCode) { + this.ibxCode = ibxCode; } /** @@ -89,9 +89,9 @@ public void setUrl(@javax.annotation.Nullable String url) { * * @param key name of the property * @param value value of the property - * @return the AgentDefinition instance itself + * @return the LoaLocation instance itself */ - public AgentDefinition putAdditionalProperty(String key, Object value) { + public LoaLocation putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -130,21 +130,21 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - AgentDefinition agentDefinition = (AgentDefinition) o; - return Objects.equals(this.url, agentDefinition.url)&& - Objects.equals(this.additionalProperties, agentDefinition.additionalProperties); + LoaLocation loaLocation = (LoaLocation) o; + return Objects.equals(this.ibxCode, loaLocation.ibxCode)&& + Objects.equals(this.additionalProperties, loaLocation.additionalProperties); } @Override public int hashCode() { - return Objects.hash(url, additionalProperties); + return Objects.hash(ibxCode, additionalProperties); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class AgentDefinition {\n"); - sb.append(" url: ").append(toIndentedString(url)).append("\n"); + sb.append("class LoaLocation {\n"); + sb.append(" ibxCode: ").append(toIndentedString(ibxCode)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); @@ -167,7 +167,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("url")); + openapiFields = new HashSet(Arrays.asList("ibxCode")); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(0); @@ -177,17 +177,17 @@ private String toIndentedString(Object o) { * Validates the JSON Element and throws an exception if issues found * * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to AgentDefinition + * @throws IOException if the JSON Element is invalid with respect to LoaLocation */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { - if (!AgentDefinition.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in AgentDefinition is not found in the empty JSON string", AgentDefinition.openapiRequiredFields.toString())); + if (!LoaLocation.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in LoaLocation is not found in the empty JSON string", LoaLocation.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("url") != null && !jsonObj.get("url").isJsonNull()) && !jsonObj.get("url").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("url").toString())); + if ((jsonObj.get("ibxCode") != null && !jsonObj.get("ibxCode").isJsonNull()) && !jsonObj.get("ibxCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `ibxCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ibxCode").toString())); } } @@ -195,16 +195,16 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!AgentDefinition.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'AgentDefinition' and its subtypes + if (!LoaLocation.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'LoaLocation' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(AgentDefinition.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(LoaLocation.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, AgentDefinition value) throws IOException { + public void write(JsonWriter out, LoaLocation value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); // serialize additional properties @@ -232,12 +232,12 @@ else if (entry.getValue() instanceof Character) } @Override - public AgentDefinition read(JsonReader in) throws IOException { + public LoaLocation read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); JsonObject jsonObj = jsonElement.getAsJsonObject(); // store additional fields in the deserialized instance - AgentDefinition instance = thisAdapter.fromJsonTree(jsonObj); + LoaLocation instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { if (!openapiFields.contains(entry.getKey())) { if (entry.getValue().isJsonPrimitive()) { // primitive type @@ -264,18 +264,18 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } /** - * Create an instance of AgentDefinition given an JSON string + * Create an instance of LoaLocation given an JSON string * * @param jsonString JSON string - * @return An instance of AgentDefinition - * @throws IOException if the JSON string is invalid with respect to AgentDefinition + * @return An instance of LoaLocation + * @throws IOException if the JSON string is invalid with respect to LoaLocation */ - public static AgentDefinition fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, AgentDefinition.class); + public static LoaLocation fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, LoaLocation.class); } /** - * Convert an instance of AgentDefinition to an JSON string + * Convert an instance of LoaLocation to an JSON string * * @return JSON string */ diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaNoteDetails.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaNoteDetails.java new file mode 100644 index 00000000..609dab7c --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaNoteDetails.java @@ -0,0 +1,458 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.net.URI; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.UUID; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * Represents a note added to a LOA by an authorized user from either the issuer or requestor organization + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class LoaNoteDetails { + /** + * Indicates which party added the note. <br> ISSUER — note was added by a user from the issuer organization. <br> REQUESTOR — note was added by a user from the requestor organization. + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + ISSUER("ISSUER"), + + REQUESTOR("REQUESTOR"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nullable + private TypeEnum type; + + public static final String SERIALIZED_NAME_HREF = "href"; + @SerializedName(SERIALIZED_NAME_HREF) + @javax.annotation.Nullable + private URI href; + + public static final String SERIALIZED_NAME_UUID = "uuid"; + @SerializedName(SERIALIZED_NAME_UUID) + @javax.annotation.Nullable + private UUID uuid; + + public static final String SERIALIZED_NAME_COMMENTS = "comments"; + @SerializedName(SERIALIZED_NAME_COMMENTS) + @javax.annotation.Nullable + private String comments; + + public static final String SERIALIZED_NAME_CREATED_DATE_TIME = "createdDateTime"; + @SerializedName(SERIALIZED_NAME_CREATED_DATE_TIME) + @javax.annotation.Nullable + private OffsetDateTime createdDateTime; + + public LoaNoteDetails() { + } + + public LoaNoteDetails type(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + return this; + } + + /** + * Indicates which party added the note. <br> ISSUER — note was added by a user from the issuer organization. <br> REQUESTOR — note was added by a user from the requestor organization. + * @return type + */ + @javax.annotation.Nullable + public TypeEnum getType() { + return type; + } + + public void setType(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + } + + + public LoaNoteDetails href(@javax.annotation.Nullable URI href) { + this.href = href; + return this; + } + + /** + * URI to note resource. + * @return href + */ + @javax.annotation.Nullable + public URI getHref() { + return href; + } + + public void setHref(@javax.annotation.Nullable URI href) { + this.href = href; + } + + + public LoaNoteDetails uuid(@javax.annotation.Nullable UUID uuid) { + this.uuid = uuid; + return this; + } + + /** + * Unique identifier of this note. + * @return uuid + */ + @javax.annotation.Nullable + public UUID getUuid() { + return uuid; + } + + public void setUuid(@javax.annotation.Nullable UUID uuid) { + this.uuid = uuid; + } + + + public LoaNoteDetails comments(@javax.annotation.Nullable String comments) { + this.comments = comments; + return this; + } + + /** + * Content of the note as submitted by the user. + * @return comments + */ + @javax.annotation.Nullable + public String getComments() { + return comments; + } + + public void setComments(@javax.annotation.Nullable String comments) { + this.comments = comments; + } + + + public LoaNoteDetails createdDateTime(@javax.annotation.Nullable OffsetDateTime createdDateTime) { + this.createdDateTime = createdDateTime; + return this; + } + + /** + * Date and time when the note was created. + * @return createdDateTime + */ + @javax.annotation.Nullable + public OffsetDateTime getCreatedDateTime() { + return createdDateTime; + } + + public void setCreatedDateTime(@javax.annotation.Nullable OffsetDateTime createdDateTime) { + this.createdDateTime = createdDateTime; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the LoaNoteDetails instance itself + */ + public LoaNoteDetails putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LoaNoteDetails loaNoteDetails = (LoaNoteDetails) o; + return Objects.equals(this.type, loaNoteDetails.type) && + Objects.equals(this.href, loaNoteDetails.href) && + Objects.equals(this.uuid, loaNoteDetails.uuid) && + Objects.equals(this.comments, loaNoteDetails.comments) && + Objects.equals(this.createdDateTime, loaNoteDetails.createdDateTime)&& + Objects.equals(this.additionalProperties, loaNoteDetails.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(type, href, uuid, comments, createdDateTime, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LoaNoteDetails {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" href: ").append(toIndentedString(href)).append("\n"); + sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); + sb.append(" comments: ").append(toIndentedString(comments)).append("\n"); + sb.append(" createdDateTime: ").append(toIndentedString(createdDateTime)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("type", "href", "uuid", "comments", "createdDateTime")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to LoaNoteDetails + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!LoaNoteDetails.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in LoaNoteDetails is not found in the empty JSON string", LoaNoteDetails.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // validate the optional field `type` + if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { + TypeEnum.validateJsonElement(jsonObj.get("type")); + } + if ((jsonObj.get("href") != null && !jsonObj.get("href").isJsonNull()) && !jsonObj.get("href").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `href` to be a primitive type in the JSON string but got `%s`", jsonObj.get("href").toString())); + } + if ((jsonObj.get("uuid") != null && !jsonObj.get("uuid").isJsonNull()) && !jsonObj.get("uuid").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `uuid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("uuid").toString())); + } + if ((jsonObj.get("comments") != null && !jsonObj.get("comments").isJsonNull()) && !jsonObj.get("comments").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `comments` to be a primitive type in the JSON string but got `%s`", jsonObj.get("comments").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!LoaNoteDetails.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'LoaNoteDetails' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(LoaNoteDetails.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, LoaNoteDetails value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public LoaNoteDetails read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + LoaNoteDetails instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of LoaNoteDetails given an JSON string + * + * @param jsonString JSON string + * @return An instance of LoaNoteDetails + * @throws IOException if the JSON string is invalid with respect to LoaNoteDetails + */ + public static LoaNoteDetails fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, LoaNoteDetails.class); + } + + /** + * Convert an instance of LoaNoteDetails to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/BulkPortRequest.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaNotesResponse.java similarity index 81% rename from services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/BulkPortRequest.java rename to services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaNotesResponse.java index dc9f1b6f..c6446a9d 100644 --- a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/BulkPortRequest.java +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaNotesResponse.java @@ -13,7 +13,7 @@ import java.util.Objects; import java.util.Locale; -import com.equinix.sdk.fabricv4.model.PortRequest; +import com.equinix.sdk.fabricv4.model.LoaNoteDetails; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -49,24 +49,24 @@ import com.equinix.sdk.fabricv4.JSON; /** - * Create bulk port request + * List of Loa note details */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") -public class BulkPortRequest { +public class LoaNotesResponse { public static final String SERIALIZED_NAME_DATA = "data"; @SerializedName(SERIALIZED_NAME_DATA) @javax.annotation.Nullable - private List data = new ArrayList<>(); + private List data = new ArrayList<>(); - public BulkPortRequest() { + public LoaNotesResponse() { } - public BulkPortRequest data(@javax.annotation.Nullable List data) { + public LoaNotesResponse data(@javax.annotation.Nullable List data) { this.data = data; return this; } - public BulkPortRequest addDataItem(PortRequest dataItem) { + public LoaNotesResponse addDataItem(LoaNoteDetails dataItem) { if (this.data == null) { this.data = new ArrayList<>(); } @@ -79,11 +79,11 @@ public BulkPortRequest addDataItem(PortRequest dataItem) { * @return data */ @javax.annotation.Nullable - public List getData() { + public List getData() { return data; } - public void setData(@javax.annotation.Nullable List data) { + public void setData(@javax.annotation.Nullable List data) { this.data = data; } @@ -100,9 +100,9 @@ public void setData(@javax.annotation.Nullable List data) { * * @param key name of the property * @param value value of the property - * @return the BulkPortRequest instance itself + * @return the LoaNotesResponse instance itself */ - public BulkPortRequest putAdditionalProperty(String key, Object value) { + public LoaNotesResponse putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -141,9 +141,9 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - BulkPortRequest bulkPortRequest = (BulkPortRequest) o; - return Objects.equals(this.data, bulkPortRequest.data)&& - Objects.equals(this.additionalProperties, bulkPortRequest.additionalProperties); + LoaNotesResponse loaNotesResponse = (LoaNotesResponse) o; + return Objects.equals(this.data, loaNotesResponse.data)&& + Objects.equals(this.additionalProperties, loaNotesResponse.additionalProperties); } @Override @@ -154,7 +154,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class BulkPortRequest {\n"); + sb.append("class LoaNotesResponse {\n"); sb.append(" data: ").append(toIndentedString(data)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); @@ -188,12 +188,12 @@ private String toIndentedString(Object o) { * Validates the JSON Element and throws an exception if issues found * * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to BulkPortRequest + * @throws IOException if the JSON Element is invalid with respect to LoaNotesResponse */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { - if (!BulkPortRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in BulkPortRequest is not found in the empty JSON string", BulkPortRequest.openapiRequiredFields.toString())); + if (!LoaNotesResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in LoaNotesResponse is not found in the empty JSON string", LoaNotesResponse.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -207,7 +207,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `data` (array) for (int i = 0; i < jsonArraydata.size(); i++) { - PortRequest.validateJsonElement(jsonArraydata.get(i)); + LoaNoteDetails.validateJsonElement(jsonArraydata.get(i)); }; } } @@ -217,16 +217,16 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!BulkPortRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'BulkPortRequest' and its subtypes + if (!LoaNotesResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'LoaNotesResponse' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(BulkPortRequest.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(LoaNotesResponse.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, BulkPortRequest value) throws IOException { + public void write(JsonWriter out, LoaNotesResponse value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); // serialize additional properties @@ -254,12 +254,12 @@ else if (entry.getValue() instanceof Character) } @Override - public BulkPortRequest read(JsonReader in) throws IOException { + public LoaNotesResponse read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); JsonObject jsonObj = jsonElement.getAsJsonObject(); // store additional fields in the deserialized instance - BulkPortRequest instance = thisAdapter.fromJsonTree(jsonObj); + LoaNotesResponse instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { if (!openapiFields.contains(entry.getKey())) { if (entry.getValue().isJsonPrimitive()) { // primitive type @@ -286,18 +286,18 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } /** - * Create an instance of BulkPortRequest given an JSON string + * Create an instance of LoaNotesResponse given an JSON string * * @param jsonString JSON string - * @return An instance of BulkPortRequest - * @throws IOException if the JSON string is invalid with respect to BulkPortRequest + * @return An instance of LoaNotesResponse + * @throws IOException if the JSON string is invalid with respect to LoaNotesResponse */ - public static BulkPortRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, BulkPortRequest.class); + public static LoaNotesResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, LoaNotesResponse.class); } /** - * Convert an instance of BulkPortRequest to an JSON string + * Convert an instance of LoaNotesResponse to an JSON string * * @return JSON string */ diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaOpEnum.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaOpEnum.java new file mode 100644 index 00000000..cf2c3ab2 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaOpEnum.java @@ -0,0 +1,80 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.google.gson.annotations.SerializedName; + +import java.io.IOException; +import java.util.Locale; +import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; + +/** + * Operation to be performed + */ +@JsonAdapter(LoaOpEnum.Adapter.class) +public enum LoaOpEnum { + + REPLACE("replace"), + + ADD("add"), + + REMOVE("remove"); + + private String value; + + LoaOpEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static LoaOpEnum fromValue(String value) { + for (LoaOpEnum b : LoaOpEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final LoaOpEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public LoaOpEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return LoaOpEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + LoaOpEnum.fromValue(value); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ChatMessage.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaOrFilter.java similarity index 73% rename from services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ChatMessage.java rename to services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaOrFilter.java index 29987023..1034e29d 100644 --- a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ChatMessage.java +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaOrFilter.java @@ -13,7 +13,7 @@ import java.util.Objects; import java.util.Locale; -import com.equinix.sdk.fabricv4.model.MessagesInner; +import com.equinix.sdk.fabricv4.model.LoaSimpleExpression; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -49,42 +49,42 @@ import com.equinix.sdk.fabricv4.JSON; /** - * Chat message and tool call information during the agent operation + * LoaOrFilter */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") -public class ChatMessage { - public static final String SERIALIZED_NAME_MESSAGES = "messages"; - @SerializedName(SERIALIZED_NAME_MESSAGES) +public class LoaOrFilter { + public static final String SERIALIZED_NAME_OR = "or"; + @SerializedName(SERIALIZED_NAME_OR) @javax.annotation.Nullable - private List messages = new ArrayList<>(); + private List or = new ArrayList<>(); - public ChatMessage() { + public LoaOrFilter() { } - public ChatMessage messages(@javax.annotation.Nullable List messages) { - this.messages = messages; + public LoaOrFilter or(@javax.annotation.Nullable List or) { + this.or = or; return this; } - public ChatMessage addMessagesItem(MessagesInner messagesItem) { - if (this.messages == null) { - this.messages = new ArrayList<>(); + public LoaOrFilter addOrItem(LoaSimpleExpression orItem) { + if (this.or == null) { + this.or = new ArrayList<>(); } - this.messages.add(messagesItem); + this.or.add(orItem); return this; } /** - * List of chat messages - * @return messages + * Get or + * @return or */ @javax.annotation.Nullable - public List getMessages() { - return messages; + public List getOr() { + return or; } - public void setMessages(@javax.annotation.Nullable List messages) { - this.messages = messages; + public void setOr(@javax.annotation.Nullable List or) { + this.or = or; } /** @@ -100,9 +100,9 @@ public void setMessages(@javax.annotation.Nullable List messages) * * @param key name of the property * @param value value of the property - * @return the ChatMessage instance itself + * @return the LoaOrFilter instance itself */ - public ChatMessage putAdditionalProperty(String key, Object value) { + public LoaOrFilter putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -141,21 +141,21 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - ChatMessage chatMessage = (ChatMessage) o; - return Objects.equals(this.messages, chatMessage.messages)&& - Objects.equals(this.additionalProperties, chatMessage.additionalProperties); + LoaOrFilter loaOrFilter = (LoaOrFilter) o; + return Objects.equals(this.or, loaOrFilter.or)&& + Objects.equals(this.additionalProperties, loaOrFilter.additionalProperties); } @Override public int hashCode() { - return Objects.hash(messages, additionalProperties); + return Objects.hash(or, additionalProperties); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class ChatMessage {\n"); - sb.append(" messages: ").append(toIndentedString(messages)).append("\n"); + sb.append("class LoaOrFilter {\n"); + sb.append(" or: ").append(toIndentedString(or)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); @@ -178,7 +178,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("messages")); + openapiFields = new HashSet(Arrays.asList("or")); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(0); @@ -188,26 +188,26 @@ private String toIndentedString(Object o) { * Validates the JSON Element and throws an exception if issues found * * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ChatMessage + * @throws IOException if the JSON Element is invalid with respect to LoaOrFilter */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { - if (!ChatMessage.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in ChatMessage is not found in the empty JSON string", ChatMessage.openapiRequiredFields.toString())); + if (!LoaOrFilter.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in LoaOrFilter is not found in the empty JSON string", LoaOrFilter.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("messages") != null && !jsonObj.get("messages").isJsonNull()) { - JsonArray jsonArraymessages = jsonObj.getAsJsonArray("messages"); - if (jsonArraymessages != null) { + if (jsonObj.get("or") != null && !jsonObj.get("or").isJsonNull()) { + JsonArray jsonArrayor = jsonObj.getAsJsonArray("or"); + if (jsonArrayor != null) { // ensure the json data is an array - if (!jsonObj.get("messages").isJsonArray()) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `messages` to be an array in the JSON string but got `%s`", jsonObj.get("messages").toString())); + if (!jsonObj.get("or").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `or` to be an array in the JSON string but got `%s`", jsonObj.get("or").toString())); } - // validate the optional field `messages` (array) - for (int i = 0; i < jsonArraymessages.size(); i++) { - MessagesInner.validateJsonElement(jsonArraymessages.get(i)); + // validate the optional field `or` (array) + for (int i = 0; i < jsonArrayor.size(); i++) { + LoaSimpleExpression.validateJsonElement(jsonArrayor.get(i)); }; } } @@ -217,16 +217,16 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!ChatMessage.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ChatMessage' and its subtypes + if (!LoaOrFilter.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'LoaOrFilter' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ChatMessage.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(LoaOrFilter.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, ChatMessage value) throws IOException { + public void write(JsonWriter out, LoaOrFilter value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); // serialize additional properties @@ -254,12 +254,12 @@ else if (entry.getValue() instanceof Character) } @Override - public ChatMessage read(JsonReader in) throws IOException { + public LoaOrFilter read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); JsonObject jsonObj = jsonElement.getAsJsonObject(); // store additional fields in the deserialized instance - ChatMessage instance = thisAdapter.fromJsonTree(jsonObj); + LoaOrFilter instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { if (!openapiFields.contains(entry.getKey())) { if (entry.getValue().isJsonPrimitive()) { // primitive type @@ -286,18 +286,18 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } /** - * Create an instance of ChatMessage given an JSON string + * Create an instance of LoaOrFilter given an JSON string * * @param jsonString JSON string - * @return An instance of ChatMessage - * @throws IOException if the JSON string is invalid with respect to ChatMessage + * @return An instance of LoaOrFilter + * @throws IOException if the JSON string is invalid with respect to LoaOrFilter */ - public static ChatMessage fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ChatMessage.class); + public static LoaOrFilter fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, LoaOrFilter.class); } /** - * Convert an instance of ChatMessage to an JSON string + * Convert an instance of LoaOrFilter to an JSON string * * @return JSON string */ diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaPatchPanelConnectorType.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaPatchPanelConnectorType.java new file mode 100644 index 00000000..72ca0243 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaPatchPanelConnectorType.java @@ -0,0 +1,82 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.google.gson.annotations.SerializedName; + +import java.io.IOException; +import java.util.Locale; +import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; + +/** + * Connector Type + */ +@JsonAdapter(LoaPatchPanelConnectorType.Adapter.class) +public enum LoaPatchPanelConnectorType { + + FC("FC"), + + SC("SC"), + + LC("LC"), + + ST("ST"); + + private String value; + + LoaPatchPanelConnectorType(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static LoaPatchPanelConnectorType fromValue(String value) { + for (LoaPatchPanelConnectorType b : LoaPatchPanelConnectorType.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final LoaPatchPanelConnectorType enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public LoaPatchPanelConnectorType read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return LoaPatchPanelConnectorType.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + LoaPatchPanelConnectorType.fromValue(value); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaProductType.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaProductType.java new file mode 100644 index 00000000..6459a395 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaProductType.java @@ -0,0 +1,80 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.google.gson.annotations.SerializedName; + +import java.io.IOException; +import java.util.Locale; +import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; + +/** + * Product type associated with this LOA. <br> XC - Cross Connect <br> XF_PORT - Fabric Port <br> VD - Network Edge + */ +@JsonAdapter(LoaProductType.Adapter.class) +public enum LoaProductType { + + XC("XC"), + + XF_PORT("XF_PORT"), + + VD("VD"); + + private String value; + + LoaProductType(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static LoaProductType fromValue(String value) { + for (LoaProductType b : LoaProductType.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final LoaProductType enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public LoaProductType read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return LoaProductType.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + LoaProductType.fromValue(value); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AgentPatchRequest.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaReplaceOperation.java similarity index 71% rename from services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AgentPatchRequest.java rename to services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaReplaceOperation.java index c95e62bc..f5fc8d0f 100644 --- a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AgentPatchRequest.java +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaReplaceOperation.java @@ -13,6 +13,7 @@ import java.util.Objects; import java.util.Locale; +import com.equinix.sdk.fabricv4.model.LoaOpEnum; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -46,81 +47,81 @@ import com.equinix.sdk.fabricv4.JSON; /** - * Update Agent + * Replace attribute value or sub-resource in the existing model */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") -public class AgentPatchRequest { +public class LoaReplaceOperation { + public static final String SERIALIZED_NAME_OP = "op"; + @SerializedName(SERIALIZED_NAME_OP) + @javax.annotation.Nonnull + private LoaOpEnum op; + public static final String SERIALIZED_NAME_PATH = "path"; @SerializedName(SERIALIZED_NAME_PATH) @javax.annotation.Nonnull private String path; - public static final String SERIALIZED_NAME_OP = "op"; - @SerializedName(SERIALIZED_NAME_OP) - @javax.annotation.Nonnull - private String op; - public static final String SERIALIZED_NAME_VALUE = "value"; @SerializedName(SERIALIZED_NAME_VALUE) - @javax.annotation.Nullable - private Object value = null; + @javax.annotation.Nonnull + private Object value; - public AgentPatchRequest() { + public LoaReplaceOperation() { } - public AgentPatchRequest path(@javax.annotation.Nonnull String path) { - this.path = path; + public LoaReplaceOperation op(@javax.annotation.Nonnull LoaOpEnum op) { + this.op = op; return this; } /** - * path inside document leading to updated parameters for /name, /description, /enabled, and /configration/prompt - * @return path + * Get op + * @return op */ @javax.annotation.Nonnull - public String getPath() { - return path; + public LoaOpEnum getOp() { + return op; } - public void setPath(@javax.annotation.Nonnull String path) { - this.path = path; + public void setOp(@javax.annotation.Nonnull LoaOpEnum op) { + this.op = op; } - public AgentPatchRequest op(@javax.annotation.Nonnull String op) { - this.op = op; + public LoaReplaceOperation path(@javax.annotation.Nonnull String path) { + this.path = path; return this; } /** - * Handy shortcut for operation name - * @return op + * ### A JSON Pointer path. * `/name` - Name of the Loa * `/description` - Description of the Loa * `/requestor/email` - Email of the requestor contact * `/requestor/orgName` - Organization name of the requestor * `/issuer/email` - Email of the issuer contact * `/issuer/orgName` - Organization name of the issuer * `/demarcationPoint/patchPanelId` - Patch Panel Identifier * `/demarcationPoint/patchPanelPortA` - Patch Panel Port A * `/demarcationPoint/patchPanelPortB` - Patch Panel Port B * `/demarcationPoint/connectorType` - Connector Type * `/demarcationPoint/cageUniqueSpaceId` - Cage Unique Space Identifier * `/expirationDateTime` - Expiration date and time of the Loa * `/location/ibxCode` - IBX code of the Eligible location + * @return path */ @javax.annotation.Nonnull - public String getOp() { - return op; + public String getPath() { + return path; } - public void setOp(@javax.annotation.Nonnull String op) { - this.op = op; + public void setPath(@javax.annotation.Nonnull String path) { + this.path = path; } - public AgentPatchRequest value(@javax.annotation.Nullable Object value) { + public LoaReplaceOperation value(@javax.annotation.Nonnull Object value) { this.value = value; return this; } /** - * new value for updated parameter + * New value for updated parameter * @return value */ - @javax.annotation.Nullable + @javax.annotation.Nonnull public Object getValue() { return value; } - public void setValue(@javax.annotation.Nullable Object value) { + public void setValue(@javax.annotation.Nonnull Object value) { this.value = value; } @@ -137,9 +138,9 @@ public void setValue(@javax.annotation.Nullable Object value) { * * @param key name of the property * @param value value of the property - * @return the AgentPatchRequest instance itself + * @return the LoaReplaceOperation instance itself */ - public AgentPatchRequest putAdditionalProperty(String key, Object value) { + public LoaReplaceOperation putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -178,24 +179,24 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - AgentPatchRequest agentPatchRequest = (AgentPatchRequest) o; - return Objects.equals(this.path, agentPatchRequest.path) && - Objects.equals(this.op, agentPatchRequest.op) && - Objects.equals(this.value, agentPatchRequest.value)&& - Objects.equals(this.additionalProperties, agentPatchRequest.additionalProperties); + LoaReplaceOperation loaReplaceOperation = (LoaReplaceOperation) o; + return Objects.equals(this.op, loaReplaceOperation.op) && + Objects.equals(this.path, loaReplaceOperation.path) && + Objects.equals(this.value, loaReplaceOperation.value)&& + Objects.equals(this.additionalProperties, loaReplaceOperation.additionalProperties); } @Override public int hashCode() { - return Objects.hash(path, op, value, additionalProperties); + return Objects.hash(op, path, value, additionalProperties); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class AgentPatchRequest {\n"); - sb.append(" path: ").append(toIndentedString(path)).append("\n"); + sb.append("class LoaReplaceOperation {\n"); sb.append(" op: ").append(toIndentedString(op)).append("\n"); + sb.append(" path: ").append(toIndentedString(path)).append("\n"); sb.append(" value: ").append(toIndentedString(value)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); @@ -219,54 +220,53 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("path", "op", "value")); + openapiFields = new HashSet(Arrays.asList("op", "path", "value")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("path", "op", "value")); + openapiRequiredFields = new HashSet(Arrays.asList("op", "path", "value")); } /** * Validates the JSON Element and throws an exception if issues found * * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to AgentPatchRequest + * @throws IOException if the JSON Element is invalid with respect to LoaReplaceOperation */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { - if (!AgentPatchRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in AgentPatchRequest is not found in the empty JSON string", AgentPatchRequest.openapiRequiredFields.toString())); + if (!LoaReplaceOperation.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in LoaReplaceOperation is not found in the empty JSON string", LoaReplaceOperation.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : AgentPatchRequest.openapiRequiredFields) { + for (String requiredField : LoaReplaceOperation.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the required field `op` + LoaOpEnum.validateJsonElement(jsonObj.get("op")); if (!jsonObj.get("path").isJsonPrimitive()) { throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `path` to be a primitive type in the JSON string but got `%s`", jsonObj.get("path").toString())); } - if (!jsonObj.get("op").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `op` to be a primitive type in the JSON string but got `%s`", jsonObj.get("op").toString())); - } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!AgentPatchRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'AgentPatchRequest' and its subtypes + if (!LoaReplaceOperation.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'LoaReplaceOperation' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(AgentPatchRequest.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(LoaReplaceOperation.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, AgentPatchRequest value) throws IOException { + public void write(JsonWriter out, LoaReplaceOperation value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); // serialize additional properties @@ -294,12 +294,12 @@ else if (entry.getValue() instanceof Character) } @Override - public AgentPatchRequest read(JsonReader in) throws IOException { + public LoaReplaceOperation read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); JsonObject jsonObj = jsonElement.getAsJsonObject(); // store additional fields in the deserialized instance - AgentPatchRequest instance = thisAdapter.fromJsonTree(jsonObj); + LoaReplaceOperation instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { if (!openapiFields.contains(entry.getKey())) { if (entry.getValue().isJsonPrimitive()) { // primitive type @@ -326,18 +326,18 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } /** - * Create an instance of AgentPatchRequest given an JSON string + * Create an instance of LoaReplaceOperation given an JSON string * * @param jsonString JSON string - * @return An instance of AgentPatchRequest - * @throws IOException if the JSON string is invalid with respect to AgentPatchRequest + * @return An instance of LoaReplaceOperation + * @throws IOException if the JSON string is invalid with respect to LoaReplaceOperation */ - public static AgentPatchRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, AgentPatchRequest.class); + public static LoaReplaceOperation fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, LoaReplaceOperation.class); } /** - * Convert an instance of AgentPatchRequest to an JSON string + * Convert an instance of LoaReplaceOperation to an JSON string * * @return JSON string */ diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LogoRequest.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaRequest.java similarity index 71% rename from services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LogoRequest.java rename to services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaRequest.java index 31b23102..f2c7cebd 100644 --- a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LogoRequest.java +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaRequest.java @@ -13,12 +13,13 @@ import java.util.Objects; import java.util.Locale; +import com.equinix.sdk.fabricv4.model.LoaProductType; +import com.equinix.sdk.fabricv4.model.LoaType; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import java.io.File; import java.io.IOException; import java.util.Arrays; @@ -47,14 +48,14 @@ import com.equinix.sdk.fabricv4.JSON; /** - * Equinix Fabric Logo Request Object + * Create Loa */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") -public class LogoRequest { - public static final String SERIALIZED_NAME_LOGO = "logo"; - @SerializedName(SERIALIZED_NAME_LOGO) +public class LoaRequest { + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) @javax.annotation.Nonnull - private File logo; + private LoaType type; public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) @@ -63,43 +64,43 @@ public class LogoRequest { public static final String SERIALIZED_NAME_DESCRIPTION = "description"; @SerializedName(SERIALIZED_NAME_DESCRIPTION) - @javax.annotation.Nonnull + @javax.annotation.Nullable private String description; - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) + public static final String SERIALIZED_NAME_AUTHORIZED_PRODUCT_TYPE = "authorizedProductType"; + @SerializedName(SERIALIZED_NAME_AUTHORIZED_PRODUCT_TYPE) @javax.annotation.Nonnull - private String type; + private LoaProductType authorizedProductType; - public LogoRequest() { + public LoaRequest() { } - public LogoRequest logo(@javax.annotation.Nonnull File logo) { - this.logo = logo; + public LoaRequest type(@javax.annotation.Nonnull LoaType type) { + this.type = type; return this; } /** - * Logo image file - * @return logo + * Get type + * @return type */ @javax.annotation.Nonnull - public File getLogo() { - return logo; + public LoaType getType() { + return type; } - public void setLogo(@javax.annotation.Nonnull File logo) { - this.logo = logo; + public void setType(@javax.annotation.Nonnull LoaType type) { + this.type = type; } - public LogoRequest name(@javax.annotation.Nonnull String name) { + public LoaRequest name(@javax.annotation.Nonnull String name) { this.name = name; return this; } /** - * Name of the Logo + * A short, descriptive name for this LOA. * @return name */ @javax.annotation.Nonnull @@ -112,41 +113,41 @@ public void setName(@javax.annotation.Nonnull String name) { } - public LogoRequest description(@javax.annotation.Nonnull String description) { + public LoaRequest description(@javax.annotation.Nullable String description) { this.description = description; return this; } /** - * Description of the logo + * Additional context about this LOA. * @return description */ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getDescription() { return description; } - public void setDescription(@javax.annotation.Nonnull String description) { + public void setDescription(@javax.annotation.Nullable String description) { this.description = description; } - public LogoRequest type(@javax.annotation.Nonnull String type) { - this.type = type; + public LoaRequest authorizedProductType(@javax.annotation.Nonnull LoaProductType authorizedProductType) { + this.authorizedProductType = authorizedProductType; return this; } /** - * Type of logo - * @return type + * Get authorizedProductType + * @return authorizedProductType */ @javax.annotation.Nonnull - public String getType() { - return type; + public LoaProductType getAuthorizedProductType() { + return authorizedProductType; } - public void setType(@javax.annotation.Nonnull String type) { - this.type = type; + public void setAuthorizedProductType(@javax.annotation.Nonnull LoaProductType authorizedProductType) { + this.authorizedProductType = authorizedProductType; } /** @@ -162,9 +163,9 @@ public void setType(@javax.annotation.Nonnull String type) { * * @param key name of the property * @param value value of the property - * @return the LogoRequest instance itself + * @return the LoaRequest instance itself */ - public LogoRequest putAdditionalProperty(String key, Object value) { + public LoaRequest putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -203,27 +204,27 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - LogoRequest logoRequest = (LogoRequest) o; - return Objects.equals(this.logo, logoRequest.logo) && - Objects.equals(this.name, logoRequest.name) && - Objects.equals(this.description, logoRequest.description) && - Objects.equals(this.type, logoRequest.type)&& - Objects.equals(this.additionalProperties, logoRequest.additionalProperties); + LoaRequest loaRequest = (LoaRequest) o; + return Objects.equals(this.type, loaRequest.type) && + Objects.equals(this.name, loaRequest.name) && + Objects.equals(this.description, loaRequest.description) && + Objects.equals(this.authorizedProductType, loaRequest.authorizedProductType)&& + Objects.equals(this.additionalProperties, loaRequest.additionalProperties); } @Override public int hashCode() { - return Objects.hash(logo, name, description, type, additionalProperties); + return Objects.hash(type, name, description, authorizedProductType, additionalProperties); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class LogoRequest {\n"); - sb.append(" logo: ").append(toIndentedString(logo)).append("\n"); + sb.append("class LoaRequest {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" authorizedProductType: ").append(toIndentedString(authorizedProductType)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); @@ -246,57 +247,58 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("logo", "name", "description", "type")); + openapiFields = new HashSet(Arrays.asList("type", "name", "description", "authorizedProductType")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("logo", "name", "description", "type")); + openapiRequiredFields = new HashSet(Arrays.asList("type", "name", "authorizedProductType")); } /** * Validates the JSON Element and throws an exception if issues found * * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to LogoRequest + * @throws IOException if the JSON Element is invalid with respect to LoaRequest */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { - if (!LogoRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in LogoRequest is not found in the empty JSON string", LogoRequest.openapiRequiredFields.toString())); + if (!LoaRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in LoaRequest is not found in the empty JSON string", LoaRequest.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : LogoRequest.openapiRequiredFields) { + for (String requiredField : LoaRequest.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the required field `type` + LoaType.validateJsonElement(jsonObj.get("type")); if (!jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } - if (!jsonObj.get("description").isJsonPrimitive()) { + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } - if (!jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } + // validate the required field `authorizedProductType` + LoaProductType.validateJsonElement(jsonObj.get("authorizedProductType")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!LogoRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'LogoRequest' and its subtypes + if (!LoaRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'LoaRequest' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(LogoRequest.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(LoaRequest.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, LogoRequest value) throws IOException { + public void write(JsonWriter out, LoaRequest value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); // serialize additional properties @@ -324,12 +326,12 @@ else if (entry.getValue() instanceof Character) } @Override - public LogoRequest read(JsonReader in) throws IOException { + public LoaRequest read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); JsonObject jsonObj = jsonElement.getAsJsonObject(); // store additional fields in the deserialized instance - LogoRequest instance = thisAdapter.fromJsonTree(jsonObj); + LoaRequest instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { if (!openapiFields.contains(entry.getKey())) { if (entry.getValue().isJsonPrimitive()) { // primitive type @@ -356,18 +358,18 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } /** - * Create an instance of LogoRequest given an JSON string + * Create an instance of LoaRequest given an JSON string * * @param jsonString JSON string - * @return An instance of LogoRequest - * @throws IOException if the JSON string is invalid with respect to LogoRequest + * @return An instance of LoaRequest + * @throws IOException if the JSON string is invalid with respect to LoaRequest */ - public static LogoRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, LogoRequest.class); + public static LoaRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, LoaRequest.class); } /** - * Convert an instance of LogoRequest to an JSON string + * Convert an instance of LoaRequest to an JSON string * * @return JSON string */ diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaRequestor.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaRequestor.java new file mode 100644 index 00000000..03a6ee6c --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaRequestor.java @@ -0,0 +1,341 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * Requestor + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class LoaRequestor { + public static final String SERIALIZED_NAME_EMAIL = "email"; + @SerializedName(SERIALIZED_NAME_EMAIL) + @javax.annotation.Nullable + private String email; + + public static final String SERIALIZED_NAME_ORG_ID = "orgId"; + @SerializedName(SERIALIZED_NAME_ORG_ID) + @javax.annotation.Nullable + private Integer orgId; + + public static final String SERIALIZED_NAME_ORG_NAME = "orgName"; + @SerializedName(SERIALIZED_NAME_ORG_NAME) + @javax.annotation.Nullable + private String orgName; + + public LoaRequestor() { + } + + public LoaRequestor email(@javax.annotation.Nullable String email) { + this.email = email; + return this; + } + + /** + * Email address of the requestor contact. + * @return email + */ + @javax.annotation.Nullable + public String getEmail() { + return email; + } + + public void setEmail(@javax.annotation.Nullable String email) { + this.email = email; + } + + + public LoaRequestor orgId(@javax.annotation.Nullable Integer orgId) { + this.orgId = orgId; + return this; + } + + /** + * Organization ID of the requestor. + * @return orgId + */ + @javax.annotation.Nullable + public Integer getOrgId() { + return orgId; + } + + public void setOrgId(@javax.annotation.Nullable Integer orgId) { + this.orgId = orgId; + } + + + public LoaRequestor orgName(@javax.annotation.Nullable String orgName) { + this.orgName = orgName; + return this; + } + + /** + * Organization name of the requestor. + * @return orgName + */ + @javax.annotation.Nullable + public String getOrgName() { + return orgName; + } + + public void setOrgName(@javax.annotation.Nullable String orgName) { + this.orgName = orgName; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the LoaRequestor instance itself + */ + public LoaRequestor putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LoaRequestor loaRequestor = (LoaRequestor) o; + return Objects.equals(this.email, loaRequestor.email) && + Objects.equals(this.orgId, loaRequestor.orgId) && + Objects.equals(this.orgName, loaRequestor.orgName)&& + Objects.equals(this.additionalProperties, loaRequestor.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(email, orgId, orgName, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LoaRequestor {\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" orgId: ").append(toIndentedString(orgId)).append("\n"); + sb.append(" orgName: ").append(toIndentedString(orgName)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("email", "orgId", "orgName")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to LoaRequestor + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!LoaRequestor.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in LoaRequestor is not found in the empty JSON string", LoaRequestor.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); + } + if ((jsonObj.get("orgName") != null && !jsonObj.get("orgName").isJsonNull()) && !jsonObj.get("orgName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `orgName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("orgName").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!LoaRequestor.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'LoaRequestor' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(LoaRequestor.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, LoaRequestor value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public LoaRequestor read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + LoaRequestor instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of LoaRequestor given an JSON string + * + * @param jsonString JSON string + * @return An instance of LoaRequestor + * @throws IOException if the JSON string is invalid with respect to LoaRequestor + */ + public static LoaRequestor fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, LoaRequestor.class); + } + + /** + * Convert an instance of LoaRequestor to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaResponse.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaResponse.java new file mode 100644 index 00000000..70d5bbcf --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaResponse.java @@ -0,0 +1,681 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.LoaChangelog; +import com.equinix.sdk.fabricv4.model.LoaDemarcationPoint; +import com.equinix.sdk.fabricv4.model.LoaIssuer; +import com.equinix.sdk.fabricv4.model.LoaLocation; +import com.equinix.sdk.fabricv4.model.LoaProductType; +import com.equinix.sdk.fabricv4.model.LoaRequestor; +import com.equinix.sdk.fabricv4.model.LoaResponseOperation; +import com.equinix.sdk.fabricv4.model.LoaState; +import com.equinix.sdk.fabricv4.model.LoaType; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.net.URI; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.UUID; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * Loa Response + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class LoaResponse { + public static final String SERIALIZED_NAME_HREF = "href"; + @SerializedName(SERIALIZED_NAME_HREF) + @javax.annotation.Nullable + private URI href; + + public static final String SERIALIZED_NAME_UUID = "uuid"; + @SerializedName(SERIALIZED_NAME_UUID) + @javax.annotation.Nullable + private UUID uuid; + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nullable + private LoaType type; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable + private String name; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable + private String description; + + public static final String SERIALIZED_NAME_AUTHORIZED_PRODUCT_TYPE = "authorizedProductType"; + @SerializedName(SERIALIZED_NAME_AUTHORIZED_PRODUCT_TYPE) + @javax.annotation.Nullable + private LoaProductType authorizedProductType; + + public static final String SERIALIZED_NAME_STATE = "state"; + @SerializedName(SERIALIZED_NAME_STATE) + @javax.annotation.Nullable + private LoaState state; + + public static final String SERIALIZED_NAME_OPERATION = "operation"; + @SerializedName(SERIALIZED_NAME_OPERATION) + @javax.annotation.Nullable + private LoaResponseOperation operation; + + public static final String SERIALIZED_NAME_REQUESTOR = "requestor"; + @SerializedName(SERIALIZED_NAME_REQUESTOR) + @javax.annotation.Nullable + private LoaRequestor requestor; + + public static final String SERIALIZED_NAME_ISSUER = "issuer"; + @SerializedName(SERIALIZED_NAME_ISSUER) + @javax.annotation.Nullable + private LoaIssuer issuer; + + public static final String SERIALIZED_NAME_DEMARCATION_POINT = "demarcationPoint"; + @SerializedName(SERIALIZED_NAME_DEMARCATION_POINT) + @javax.annotation.Nullable + private LoaDemarcationPoint demarcationPoint; + + public static final String SERIALIZED_NAME_LOCATION = "location"; + @SerializedName(SERIALIZED_NAME_LOCATION) + @javax.annotation.Nullable + private LoaLocation location; + + public static final String SERIALIZED_NAME_EXPIRATION_DATE_TIME = "expirationDateTime"; + @SerializedName(SERIALIZED_NAME_EXPIRATION_DATE_TIME) + @javax.annotation.Nullable + private OffsetDateTime expirationDateTime; + + public static final String SERIALIZED_NAME_CHANGE_LOG = "changeLog"; + @SerializedName(SERIALIZED_NAME_CHANGE_LOG) + @javax.annotation.Nullable + private LoaChangelog changeLog; + + public LoaResponse() { + } + + public LoaResponse href(@javax.annotation.Nullable URI href) { + this.href = href; + return this; + } + + /** + * URI of this LOA resource. + * @return href + */ + @javax.annotation.Nullable + public URI getHref() { + return href; + } + + public void setHref(@javax.annotation.Nullable URI href) { + this.href = href; + } + + + public LoaResponse uuid(@javax.annotation.Nullable UUID uuid) { + this.uuid = uuid; + return this; + } + + /** + * Unique identifier of this LOA. + * @return uuid + */ + @javax.annotation.Nullable + public UUID getUuid() { + return uuid; + } + + public void setUuid(@javax.annotation.Nullable UUID uuid) { + this.uuid = uuid; + } + + + public LoaResponse type(@javax.annotation.Nullable LoaType type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + */ + @javax.annotation.Nullable + public LoaType getType() { + return type; + } + + public void setType(@javax.annotation.Nullable LoaType type) { + this.type = type; + } + + + public LoaResponse name(@javax.annotation.Nullable String name) { + this.name = name; + return this; + } + + /** + * A short, descriptive name for this LOA + * @return name + */ + @javax.annotation.Nullable + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nullable String name) { + this.name = name; + } + + + public LoaResponse description(@javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * Additional context about this LOA + * @return description + */ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + + + public LoaResponse authorizedProductType(@javax.annotation.Nullable LoaProductType authorizedProductType) { + this.authorizedProductType = authorizedProductType; + return this; + } + + /** + * Get authorizedProductType + * @return authorizedProductType + */ + @javax.annotation.Nullable + public LoaProductType getAuthorizedProductType() { + return authorizedProductType; + } + + public void setAuthorizedProductType(@javax.annotation.Nullable LoaProductType authorizedProductType) { + this.authorizedProductType = authorizedProductType; + } + + + public LoaResponse state(@javax.annotation.Nullable LoaState state) { + this.state = state; + return this; + } + + /** + * Get state + * @return state + */ + @javax.annotation.Nullable + public LoaState getState() { + return state; + } + + public void setState(@javax.annotation.Nullable LoaState state) { + this.state = state; + } + + + public LoaResponse operation(@javax.annotation.Nullable LoaResponseOperation operation) { + this.operation = operation; + return this; + } + + /** + * Get operation + * @return operation + */ + @javax.annotation.Nullable + public LoaResponseOperation getOperation() { + return operation; + } + + public void setOperation(@javax.annotation.Nullable LoaResponseOperation operation) { + this.operation = operation; + } + + + public LoaResponse requestor(@javax.annotation.Nullable LoaRequestor requestor) { + this.requestor = requestor; + return this; + } + + /** + * Get requestor + * @return requestor + */ + @javax.annotation.Nullable + public LoaRequestor getRequestor() { + return requestor; + } + + public void setRequestor(@javax.annotation.Nullable LoaRequestor requestor) { + this.requestor = requestor; + } + + + public LoaResponse issuer(@javax.annotation.Nullable LoaIssuer issuer) { + this.issuer = issuer; + return this; + } + + /** + * Get issuer + * @return issuer + */ + @javax.annotation.Nullable + public LoaIssuer getIssuer() { + return issuer; + } + + public void setIssuer(@javax.annotation.Nullable LoaIssuer issuer) { + this.issuer = issuer; + } + + + public LoaResponse demarcationPoint(@javax.annotation.Nullable LoaDemarcationPoint demarcationPoint) { + this.demarcationPoint = demarcationPoint; + return this; + } + + /** + * Get demarcationPoint + * @return demarcationPoint + */ + @javax.annotation.Nullable + public LoaDemarcationPoint getDemarcationPoint() { + return demarcationPoint; + } + + public void setDemarcationPoint(@javax.annotation.Nullable LoaDemarcationPoint demarcationPoint) { + this.demarcationPoint = demarcationPoint; + } + + + public LoaResponse location(@javax.annotation.Nullable LoaLocation location) { + this.location = location; + return this; + } + + /** + * Get location + * @return location + */ + @javax.annotation.Nullable + public LoaLocation getLocation() { + return location; + } + + public void setLocation(@javax.annotation.Nullable LoaLocation location) { + this.location = location; + } + + + public LoaResponse expirationDateTime(@javax.annotation.Nullable OffsetDateTime expirationDateTime) { + this.expirationDateTime = expirationDateTime; + return this; + } + + /** + * Date and time when this LOA expires.<br> Default to 3 months from the creation date + * @return expirationDateTime + */ + @javax.annotation.Nullable + public OffsetDateTime getExpirationDateTime() { + return expirationDateTime; + } + + public void setExpirationDateTime(@javax.annotation.Nullable OffsetDateTime expirationDateTime) { + this.expirationDateTime = expirationDateTime; + } + + + public LoaResponse changeLog(@javax.annotation.Nullable LoaChangelog changeLog) { + this.changeLog = changeLog; + return this; + } + + /** + * Get changeLog + * @return changeLog + */ + @javax.annotation.Nullable + public LoaChangelog getChangeLog() { + return changeLog; + } + + public void setChangeLog(@javax.annotation.Nullable LoaChangelog changeLog) { + this.changeLog = changeLog; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the LoaResponse instance itself + */ + public LoaResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LoaResponse loaResponse = (LoaResponse) o; + return Objects.equals(this.href, loaResponse.href) && + Objects.equals(this.uuid, loaResponse.uuid) && + Objects.equals(this.type, loaResponse.type) && + Objects.equals(this.name, loaResponse.name) && + Objects.equals(this.description, loaResponse.description) && + Objects.equals(this.authorizedProductType, loaResponse.authorizedProductType) && + Objects.equals(this.state, loaResponse.state) && + Objects.equals(this.operation, loaResponse.operation) && + Objects.equals(this.requestor, loaResponse.requestor) && + Objects.equals(this.issuer, loaResponse.issuer) && + Objects.equals(this.demarcationPoint, loaResponse.demarcationPoint) && + Objects.equals(this.location, loaResponse.location) && + Objects.equals(this.expirationDateTime, loaResponse.expirationDateTime) && + Objects.equals(this.changeLog, loaResponse.changeLog)&& + Objects.equals(this.additionalProperties, loaResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(href, uuid, type, name, description, authorizedProductType, state, operation, requestor, issuer, demarcationPoint, location, expirationDateTime, changeLog, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LoaResponse {\n"); + sb.append(" href: ").append(toIndentedString(href)).append("\n"); + sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" authorizedProductType: ").append(toIndentedString(authorizedProductType)).append("\n"); + sb.append(" state: ").append(toIndentedString(state)).append("\n"); + sb.append(" operation: ").append(toIndentedString(operation)).append("\n"); + sb.append(" requestor: ").append(toIndentedString(requestor)).append("\n"); + sb.append(" issuer: ").append(toIndentedString(issuer)).append("\n"); + sb.append(" demarcationPoint: ").append(toIndentedString(demarcationPoint)).append("\n"); + sb.append(" location: ").append(toIndentedString(location)).append("\n"); + sb.append(" expirationDateTime: ").append(toIndentedString(expirationDateTime)).append("\n"); + sb.append(" changeLog: ").append(toIndentedString(changeLog)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("href", "uuid", "type", "name", "description", "authorizedProductType", "state", "operation", "requestor", "issuer", "demarcationPoint", "location", "expirationDateTime", "changeLog")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to LoaResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!LoaResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in LoaResponse is not found in the empty JSON string", LoaResponse.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("href") != null && !jsonObj.get("href").isJsonNull()) && !jsonObj.get("href").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `href` to be a primitive type in the JSON string but got `%s`", jsonObj.get("href").toString())); + } + if ((jsonObj.get("uuid") != null && !jsonObj.get("uuid").isJsonNull()) && !jsonObj.get("uuid").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `uuid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("uuid").toString())); + } + // validate the optional field `type` + if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { + LoaType.validateJsonElement(jsonObj.get("type")); + } + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + } + // validate the optional field `authorizedProductType` + if (jsonObj.get("authorizedProductType") != null && !jsonObj.get("authorizedProductType").isJsonNull()) { + LoaProductType.validateJsonElement(jsonObj.get("authorizedProductType")); + } + // validate the optional field `state` + if (jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) { + LoaState.validateJsonElement(jsonObj.get("state")); + } + // validate the optional field `operation` + if (jsonObj.get("operation") != null && !jsonObj.get("operation").isJsonNull()) { + LoaResponseOperation.validateJsonElement(jsonObj.get("operation")); + } + // validate the optional field `requestor` + if (jsonObj.get("requestor") != null && !jsonObj.get("requestor").isJsonNull()) { + LoaRequestor.validateJsonElement(jsonObj.get("requestor")); + } + // validate the optional field `issuer` + if (jsonObj.get("issuer") != null && !jsonObj.get("issuer").isJsonNull()) { + LoaIssuer.validateJsonElement(jsonObj.get("issuer")); + } + // validate the optional field `demarcationPoint` + if (jsonObj.get("demarcationPoint") != null && !jsonObj.get("demarcationPoint").isJsonNull()) { + LoaDemarcationPoint.validateJsonElement(jsonObj.get("demarcationPoint")); + } + // validate the optional field `location` + if (jsonObj.get("location") != null && !jsonObj.get("location").isJsonNull()) { + LoaLocation.validateJsonElement(jsonObj.get("location")); + } + // validate the optional field `changeLog` + if (jsonObj.get("changeLog") != null && !jsonObj.get("changeLog").isJsonNull()) { + LoaChangelog.validateJsonElement(jsonObj.get("changeLog")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!LoaResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'LoaResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(LoaResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, LoaResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public LoaResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + LoaResponse instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of LoaResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of LoaResponse + * @throws IOException if the JSON string is invalid with respect to LoaResponse + */ + public static LoaResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, LoaResponse.class); + } + + /** + * Convert an instance of LoaResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ModelConfiguration.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaResponseOperation.java similarity index 74% rename from services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ModelConfiguration.java rename to services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaResponseOperation.java index 66183131..865f0308 100644 --- a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ModelConfiguration.java +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaResponseOperation.java @@ -46,34 +46,34 @@ import com.equinix.sdk.fabricv4.JSON; /** - * ModelConfiguration + * LoaResponseOperation */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") -public class ModelConfiguration { - public static final String SERIALIZED_NAME_PROMPT = "prompt"; - @SerializedName(SERIALIZED_NAME_PROMPT) +public class LoaResponseOperation { + public static final String SERIALIZED_NAME_CONSUMERS_COUNT = "consumersCount"; + @SerializedName(SERIALIZED_NAME_CONSUMERS_COUNT) @javax.annotation.Nullable - private String prompt; + private Integer consumersCount; - public ModelConfiguration() { + public LoaResponseOperation() { } - public ModelConfiguration prompt(@javax.annotation.Nullable String prompt) { - this.prompt = prompt; + public LoaResponseOperation consumersCount(@javax.annotation.Nullable Integer consumersCount) { + this.consumersCount = consumersCount; return this; } /** - * Agent configuration prompt to be used for agent specification - * @return prompt + * Number of consumers associated with this LOA. + * @return consumersCount */ @javax.annotation.Nullable - public String getPrompt() { - return prompt; + public Integer getConsumersCount() { + return consumersCount; } - public void setPrompt(@javax.annotation.Nullable String prompt) { - this.prompt = prompt; + public void setConsumersCount(@javax.annotation.Nullable Integer consumersCount) { + this.consumersCount = consumersCount; } /** @@ -89,9 +89,9 @@ public void setPrompt(@javax.annotation.Nullable String prompt) { * * @param key name of the property * @param value value of the property - * @return the ModelConfiguration instance itself + * @return the LoaResponseOperation instance itself */ - public ModelConfiguration putAdditionalProperty(String key, Object value) { + public LoaResponseOperation putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -130,21 +130,21 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - ModelConfiguration _configuration = (ModelConfiguration) o; - return Objects.equals(this.prompt, _configuration.prompt)&& - Objects.equals(this.additionalProperties, _configuration.additionalProperties); + LoaResponseOperation loaResponseOperation = (LoaResponseOperation) o; + return Objects.equals(this.consumersCount, loaResponseOperation.consumersCount)&& + Objects.equals(this.additionalProperties, loaResponseOperation.additionalProperties); } @Override public int hashCode() { - return Objects.hash(prompt, additionalProperties); + return Objects.hash(consumersCount, additionalProperties); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class ModelConfiguration {\n"); - sb.append(" prompt: ").append(toIndentedString(prompt)).append("\n"); + sb.append("class LoaResponseOperation {\n"); + sb.append(" consumersCount: ").append(toIndentedString(consumersCount)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); @@ -167,7 +167,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("prompt")); + openapiFields = new HashSet(Arrays.asList("consumersCount")); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(0); @@ -177,34 +177,31 @@ private String toIndentedString(Object o) { * Validates the JSON Element and throws an exception if issues found * * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ModelConfiguration + * @throws IOException if the JSON Element is invalid with respect to LoaResponseOperation */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { - if (!ModelConfiguration.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in ModelConfiguration is not found in the empty JSON string", ModelConfiguration.openapiRequiredFields.toString())); + if (!LoaResponseOperation.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in LoaResponseOperation is not found in the empty JSON string", LoaResponseOperation.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("prompt") != null && !jsonObj.get("prompt").isJsonNull()) && !jsonObj.get("prompt").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `prompt` to be a primitive type in the JSON string but got `%s`", jsonObj.get("prompt").toString())); - } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!ModelConfiguration.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ModelConfiguration' and its subtypes + if (!LoaResponseOperation.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'LoaResponseOperation' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ModelConfiguration.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(LoaResponseOperation.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, ModelConfiguration value) throws IOException { + public void write(JsonWriter out, LoaResponseOperation value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); // serialize additional properties @@ -232,12 +229,12 @@ else if (entry.getValue() instanceof Character) } @Override - public ModelConfiguration read(JsonReader in) throws IOException { + public LoaResponseOperation read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); JsonObject jsonObj = jsonElement.getAsJsonObject(); // store additional fields in the deserialized instance - ModelConfiguration instance = thisAdapter.fromJsonTree(jsonObj); + LoaResponseOperation instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { if (!openapiFields.contains(entry.getKey())) { if (entry.getValue().isJsonPrimitive()) { // primitive type @@ -264,18 +261,18 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } /** - * Create an instance of ModelConfiguration given an JSON string + * Create an instance of LoaResponseOperation given an JSON string * * @param jsonString JSON string - * @return An instance of ModelConfiguration - * @throws IOException if the JSON string is invalid with respect to ModelConfiguration + * @return An instance of LoaResponseOperation + * @throws IOException if the JSON string is invalid with respect to LoaResponseOperation */ - public static ModelConfiguration fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ModelConfiguration.class); + public static LoaResponseOperation fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, LoaResponseOperation.class); } /** - * Convert an instance of ModelConfiguration to an JSON string + * Convert an instance of LoaResponseOperation to an JSON string * * @return JSON string */ diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaSearchFilters.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaSearchFilters.java new file mode 100644 index 00000000..b85cf97f --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaSearchFilters.java @@ -0,0 +1,308 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.LoaFilter; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * LoaSearchFilters + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class LoaSearchFilters { + public static final String SERIALIZED_NAME_AND = "and"; + @SerializedName(SERIALIZED_NAME_AND) + @javax.annotation.Nullable + private List and = new ArrayList<>(); + + public LoaSearchFilters() { + } + + public LoaSearchFilters and(@javax.annotation.Nullable List and) { + this.and = and; + return this; + } + + public LoaSearchFilters addAndItem(LoaFilter andItem) { + if (this.and == null) { + this.and = new ArrayList<>(); + } + this.and.add(andItem); + return this; + } + + /** + * Get and + * @return and + */ + @javax.annotation.Nullable + public List getAnd() { + return and; + } + + public void setAnd(@javax.annotation.Nullable List and) { + this.and = and; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the LoaSearchFilters instance itself + */ + public LoaSearchFilters putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LoaSearchFilters loaSearchFilters = (LoaSearchFilters) o; + return Objects.equals(this.and, loaSearchFilters.and)&& + Objects.equals(this.additionalProperties, loaSearchFilters.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(and, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LoaSearchFilters {\n"); + sb.append(" and: ").append(toIndentedString(and)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("and")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to LoaSearchFilters + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!LoaSearchFilters.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in LoaSearchFilters is not found in the empty JSON string", LoaSearchFilters.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("and") != null && !jsonObj.get("and").isJsonNull()) { + JsonArray jsonArrayand = jsonObj.getAsJsonArray("and"); + if (jsonArrayand != null) { + // ensure the json data is an array + if (!jsonObj.get("and").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `and` to be an array in the JSON string but got `%s`", jsonObj.get("and").toString())); + } + + // validate the optional field `and` (array) + for (int i = 0; i < jsonArrayand.size(); i++) { + LoaFilter.validateJsonElement(jsonArrayand.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!LoaSearchFilters.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'LoaSearchFilters' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(LoaSearchFilters.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, LoaSearchFilters value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public LoaSearchFilters read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + LoaSearchFilters instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of LoaSearchFilters given an JSON string + * + * @param jsonString JSON string + * @return An instance of LoaSearchFilters + * @throws IOException if the JSON string is invalid with respect to LoaSearchFilters + */ + public static LoaSearchFilters fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, LoaSearchFilters.class); + } + + /** + * Convert an instance of LoaSearchFilters to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaSearchRequest.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaSearchRequest.java new file mode 100644 index 00000000..b0e83b4d --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaSearchRequest.java @@ -0,0 +1,370 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.LoaSearchFilters; +import com.equinix.sdk.fabricv4.model.LoaSortCriteria; +import com.equinix.sdk.fabricv4.model.PaginationRequest; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * Search loas based on filter criteria + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class LoaSearchRequest { + public static final String SERIALIZED_NAME_FILTER = "filter"; + @SerializedName(SERIALIZED_NAME_FILTER) + @javax.annotation.Nullable + private LoaSearchFilters filter; + + public static final String SERIALIZED_NAME_PAGINATION = "pagination"; + @SerializedName(SERIALIZED_NAME_PAGINATION) + @javax.annotation.Nullable + private PaginationRequest pagination; + + public static final String SERIALIZED_NAME_SORT = "sort"; + @SerializedName(SERIALIZED_NAME_SORT) + @javax.annotation.Nullable + private List sort = new ArrayList<>(); + + public LoaSearchRequest() { + } + + public LoaSearchRequest filter(@javax.annotation.Nullable LoaSearchFilters filter) { + this.filter = filter; + return this; + } + + /** + * Get filter + * @return filter + */ + @javax.annotation.Nullable + public LoaSearchFilters getFilter() { + return filter; + } + + public void setFilter(@javax.annotation.Nullable LoaSearchFilters filter) { + this.filter = filter; + } + + + public LoaSearchRequest pagination(@javax.annotation.Nullable PaginationRequest pagination) { + this.pagination = pagination; + return this; + } + + /** + * Get pagination + * @return pagination + */ + @javax.annotation.Nullable + public PaginationRequest getPagination() { + return pagination; + } + + public void setPagination(@javax.annotation.Nullable PaginationRequest pagination) { + this.pagination = pagination; + } + + + public LoaSearchRequest sort(@javax.annotation.Nullable List sort) { + this.sort = sort; + return this; + } + + public LoaSearchRequest addSortItem(LoaSortCriteria sortItem) { + if (this.sort == null) { + this.sort = new ArrayList<>(); + } + this.sort.add(sortItem); + return this; + } + + /** + * Get sort + * @return sort + */ + @javax.annotation.Nullable + public List getSort() { + return sort; + } + + public void setSort(@javax.annotation.Nullable List sort) { + this.sort = sort; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the LoaSearchRequest instance itself + */ + public LoaSearchRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LoaSearchRequest loaSearchRequest = (LoaSearchRequest) o; + return Objects.equals(this.filter, loaSearchRequest.filter) && + Objects.equals(this.pagination, loaSearchRequest.pagination) && + Objects.equals(this.sort, loaSearchRequest.sort)&& + Objects.equals(this.additionalProperties, loaSearchRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(filter, pagination, sort, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LoaSearchRequest {\n"); + sb.append(" filter: ").append(toIndentedString(filter)).append("\n"); + sb.append(" pagination: ").append(toIndentedString(pagination)).append("\n"); + sb.append(" sort: ").append(toIndentedString(sort)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("filter", "pagination", "sort")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to LoaSearchRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!LoaSearchRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in LoaSearchRequest is not found in the empty JSON string", LoaSearchRequest.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `filter` + if (jsonObj.get("filter") != null && !jsonObj.get("filter").isJsonNull()) { + LoaSearchFilters.validateJsonElement(jsonObj.get("filter")); + } + // validate the optional field `pagination` + if (jsonObj.get("pagination") != null && !jsonObj.get("pagination").isJsonNull()) { + PaginationRequest.validateJsonElement(jsonObj.get("pagination")); + } + if (jsonObj.get("sort") != null && !jsonObj.get("sort").isJsonNull()) { + JsonArray jsonArraysort = jsonObj.getAsJsonArray("sort"); + if (jsonArraysort != null) { + // ensure the json data is an array + if (!jsonObj.get("sort").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `sort` to be an array in the JSON string but got `%s`", jsonObj.get("sort").toString())); + } + + // validate the optional field `sort` (array) + for (int i = 0; i < jsonArraysort.size(); i++) { + LoaSortCriteria.validateJsonElement(jsonArraysort.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!LoaSearchRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'LoaSearchRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(LoaSearchRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, LoaSearchRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public LoaSearchRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + LoaSearchRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of LoaSearchRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of LoaSearchRequest + * @throws IOException if the JSON string is invalid with respect to LoaSearchRequest + */ + public static LoaSearchRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, LoaSearchRequest.class); + } + + /** + * Convert an instance of LoaSearchRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaSearchResponse.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaSearchResponse.java new file mode 100644 index 00000000..ccafc364 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaSearchResponse.java @@ -0,0 +1,388 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.LoaResponse; +import com.equinix.sdk.fabricv4.model.LoaSortCriteria; +import com.equinix.sdk.fabricv4.model.Pagination; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * List of LOAs + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class LoaSearchResponse { + public static final String SERIALIZED_NAME_PAGINATION = "pagination"; + @SerializedName(SERIALIZED_NAME_PAGINATION) + @javax.annotation.Nullable + private Pagination pagination; + + public static final String SERIALIZED_NAME_SORT = "sort"; + @SerializedName(SERIALIZED_NAME_SORT) + @javax.annotation.Nullable + private List sort = new ArrayList<>(); + + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + @javax.annotation.Nullable + private List data = new ArrayList<>(); + + public LoaSearchResponse() { + } + + public LoaSearchResponse pagination(@javax.annotation.Nullable Pagination pagination) { + this.pagination = pagination; + return this; + } + + /** + * Get pagination + * @return pagination + */ + @javax.annotation.Nullable + public Pagination getPagination() { + return pagination; + } + + public void setPagination(@javax.annotation.Nullable Pagination pagination) { + this.pagination = pagination; + } + + + public LoaSearchResponse sort(@javax.annotation.Nullable List sort) { + this.sort = sort; + return this; + } + + public LoaSearchResponse addSortItem(LoaSortCriteria sortItem) { + if (this.sort == null) { + this.sort = new ArrayList<>(); + } + this.sort.add(sortItem); + return this; + } + + /** + * Get sort + * @return sort + */ + @javax.annotation.Nullable + public List getSort() { + return sort; + } + + public void setSort(@javax.annotation.Nullable List sort) { + this.sort = sort; + } + + + public LoaSearchResponse data(@javax.annotation.Nullable List data) { + this.data = data; + return this; + } + + public LoaSearchResponse addDataItem(LoaResponse dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + return this; + } + + /** + * Get data + * @return data + */ + @javax.annotation.Nullable + public List getData() { + return data; + } + + public void setData(@javax.annotation.Nullable List data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the LoaSearchResponse instance itself + */ + public LoaSearchResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LoaSearchResponse loaSearchResponse = (LoaSearchResponse) o; + return Objects.equals(this.pagination, loaSearchResponse.pagination) && + Objects.equals(this.sort, loaSearchResponse.sort) && + Objects.equals(this.data, loaSearchResponse.data)&& + Objects.equals(this.additionalProperties, loaSearchResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(pagination, sort, data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LoaSearchResponse {\n"); + sb.append(" pagination: ").append(toIndentedString(pagination)).append("\n"); + sb.append(" sort: ").append(toIndentedString(sort)).append("\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("pagination", "sort", "data")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to LoaSearchResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!LoaSearchResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in LoaSearchResponse is not found in the empty JSON string", LoaSearchResponse.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `pagination` + if (jsonObj.get("pagination") != null && !jsonObj.get("pagination").isJsonNull()) { + Pagination.validateJsonElement(jsonObj.get("pagination")); + } + if (jsonObj.get("sort") != null && !jsonObj.get("sort").isJsonNull()) { + JsonArray jsonArraysort = jsonObj.getAsJsonArray("sort"); + if (jsonArraysort != null) { + // ensure the json data is an array + if (!jsonObj.get("sort").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `sort` to be an array in the JSON string but got `%s`", jsonObj.get("sort").toString())); + } + + // validate the optional field `sort` (array) + for (int i = 0; i < jsonArraysort.size(); i++) { + LoaSortCriteria.validateJsonElement(jsonArraysort.get(i)); + }; + } + } + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); + if (jsonArraydata != null) { + // ensure the json data is an array + if (!jsonObj.get("data").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + } + + // validate the optional field `data` (array) + for (int i = 0; i < jsonArraydata.size(); i++) { + LoaResponse.validateJsonElement(jsonArraydata.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!LoaSearchResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'LoaSearchResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(LoaSearchResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, LoaSearchResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public LoaSearchResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + LoaSearchResponse instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of LoaSearchResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of LoaSearchResponse + * @throws IOException if the JSON string is invalid with respect to LoaSearchResponse + */ + public static LoaSearchResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, LoaSearchResponse.class); + } + + /** + * Convert an instance of LoaSearchResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaSimpleExpression.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaSimpleExpression.java new file mode 100644 index 00000000..874d9aa7 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaSimpleExpression.java @@ -0,0 +1,433 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.LoaFieldName; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * LoaSimpleExpression + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class LoaSimpleExpression { + public static final String SERIALIZED_NAME_PROPERTY = "property"; + @SerializedName(SERIALIZED_NAME_PROPERTY) + @javax.annotation.Nullable + private LoaFieldName property; + + /** + * Gets or Sets operator + */ + @JsonAdapter(OperatorEnum.Adapter.class) + public enum OperatorEnum { + EQUAL("="), + + NOT_EQUAL("!="), + + LIKE("LIKE"), + + ILIKE("ILIKE"), + + BETWEEN("BETWEEN"), + + NOT_BETWEEN("NOT BETWEEN"), + + IN("IN"), + + NOT_IN("NOT IN"), + + GREATER_THAN(">"), + + LESS_THAN("<"), + + GREATER_THAN_OR_EQUAL_TO(">="), + + LESS_THAN_OR_EQUAL_TO("<="); + + private String value; + + OperatorEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static OperatorEnum fromValue(String value) { + for (OperatorEnum b : OperatorEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final OperatorEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public OperatorEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return OperatorEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + OperatorEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_OPERATOR = "operator"; + @SerializedName(SERIALIZED_NAME_OPERATOR) + @javax.annotation.Nullable + private OperatorEnum operator; + + public static final String SERIALIZED_NAME_VALUES = "values"; + @SerializedName(SERIALIZED_NAME_VALUES) + @javax.annotation.Nullable + private List values = new ArrayList<>(); + + public LoaSimpleExpression() { + } + + public LoaSimpleExpression property(@javax.annotation.Nullable LoaFieldName property) { + this.property = property; + return this; + } + + /** + * Get property + * @return property + */ + @javax.annotation.Nullable + public LoaFieldName getProperty() { + return property; + } + + public void setProperty(@javax.annotation.Nullable LoaFieldName property) { + this.property = property; + } + + + public LoaSimpleExpression operator(@javax.annotation.Nullable OperatorEnum operator) { + this.operator = operator; + return this; + } + + /** + * Get operator + * @return operator + */ + @javax.annotation.Nullable + public OperatorEnum getOperator() { + return operator; + } + + public void setOperator(@javax.annotation.Nullable OperatorEnum operator) { + this.operator = operator; + } + + + public LoaSimpleExpression values(@javax.annotation.Nullable List values) { + this.values = values; + return this; + } + + public LoaSimpleExpression addValuesItem(String valuesItem) { + if (this.values == null) { + this.values = new ArrayList<>(); + } + this.values.add(valuesItem); + return this; + } + + /** + * Get values + * @return values + */ + @javax.annotation.Nullable + public List getValues() { + return values; + } + + public void setValues(@javax.annotation.Nullable List values) { + this.values = values; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the LoaSimpleExpression instance itself + */ + public LoaSimpleExpression putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LoaSimpleExpression loaSimpleExpression = (LoaSimpleExpression) o; + return Objects.equals(this.property, loaSimpleExpression.property) && + Objects.equals(this.operator, loaSimpleExpression.operator) && + Objects.equals(this.values, loaSimpleExpression.values)&& + Objects.equals(this.additionalProperties, loaSimpleExpression.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(property, operator, values, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LoaSimpleExpression {\n"); + sb.append(" property: ").append(toIndentedString(property)).append("\n"); + sb.append(" operator: ").append(toIndentedString(operator)).append("\n"); + sb.append(" values: ").append(toIndentedString(values)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("property", "operator", "values")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to LoaSimpleExpression + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!LoaSimpleExpression.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in LoaSimpleExpression is not found in the empty JSON string", LoaSimpleExpression.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `property` + if (jsonObj.get("property") != null && !jsonObj.get("property").isJsonNull()) { + LoaFieldName.validateJsonElement(jsonObj.get("property")); + } + if ((jsonObj.get("operator") != null && !jsonObj.get("operator").isJsonNull()) && !jsonObj.get("operator").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `operator` to be a primitive type in the JSON string but got `%s`", jsonObj.get("operator").toString())); + } + // validate the optional field `operator` + if (jsonObj.get("operator") != null && !jsonObj.get("operator").isJsonNull()) { + OperatorEnum.validateJsonElement(jsonObj.get("operator")); + } + // ensure the optional json data is an array if present + if (jsonObj.get("values") != null && !jsonObj.get("values").isJsonNull() && !jsonObj.get("values").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `values` to be an array in the JSON string but got `%s`", jsonObj.get("values").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!LoaSimpleExpression.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'LoaSimpleExpression' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(LoaSimpleExpression.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, LoaSimpleExpression value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public LoaSimpleExpression read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + LoaSimpleExpression instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of LoaSimpleExpression given an JSON string + * + * @param jsonString JSON string + * @return An instance of LoaSimpleExpression + * @throws IOException if the JSON string is invalid with respect to LoaSimpleExpression + */ + public static LoaSimpleExpression fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, LoaSimpleExpression.class); + } + + /** + * Convert an instance of LoaSimpleExpression to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaSortCriteria.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaSortCriteria.java new file mode 100644 index 00000000..578dbb9b --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaSortCriteria.java @@ -0,0 +1,431 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * LoaSortCriteria + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class LoaSortCriteria { + /** + * Sorting direction + */ + @JsonAdapter(DirectionEnum.Adapter.class) + public enum DirectionEnum { + DESC("DESC"), + + ASC("ASC"); + + private String value; + + DirectionEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static DirectionEnum fromValue(String value) { + for (DirectionEnum b : DirectionEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final DirectionEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public DirectionEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return DirectionEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + DirectionEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_DIRECTION = "direction"; + @SerializedName(SERIALIZED_NAME_DIRECTION) + @javax.annotation.Nullable + private DirectionEnum direction = DirectionEnum.DESC; + + /** + * Possible field names to use on sorting + */ + @JsonAdapter(PropertyEnum.Adapter.class) + public enum PropertyEnum { + NAME("/name"), + + EXPIRATIONDATETIME("/expirationDateTime"), + + CHANGELOG_CREATEDDATETIME("/changeLog/createdDateTime"), + + CHANGELOG_UPDATEDDATETIME("/changeLog/updatedDateTime"); + + private String value; + + PropertyEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static PropertyEnum fromValue(String value) { + for (PropertyEnum b : PropertyEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final PropertyEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public PropertyEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return PropertyEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + PropertyEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_PROPERTY = "property"; + @SerializedName(SERIALIZED_NAME_PROPERTY) + @javax.annotation.Nullable + private PropertyEnum property = PropertyEnum.CHANGELOG_UPDATEDDATETIME; + + public LoaSortCriteria() { + } + + public LoaSortCriteria direction(@javax.annotation.Nullable DirectionEnum direction) { + this.direction = direction; + return this; + } + + /** + * Sorting direction + * @return direction + */ + @javax.annotation.Nullable + public DirectionEnum getDirection() { + return direction; + } + + public void setDirection(@javax.annotation.Nullable DirectionEnum direction) { + this.direction = direction; + } + + + public LoaSortCriteria property(@javax.annotation.Nullable PropertyEnum property) { + this.property = property; + return this; + } + + /** + * Possible field names to use on sorting + * @return property + */ + @javax.annotation.Nullable + public PropertyEnum getProperty() { + return property; + } + + public void setProperty(@javax.annotation.Nullable PropertyEnum property) { + this.property = property; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the LoaSortCriteria instance itself + */ + public LoaSortCriteria putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LoaSortCriteria loaSortCriteria = (LoaSortCriteria) o; + return Objects.equals(this.direction, loaSortCriteria.direction) && + Objects.equals(this.property, loaSortCriteria.property)&& + Objects.equals(this.additionalProperties, loaSortCriteria.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(direction, property, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LoaSortCriteria {\n"); + sb.append(" direction: ").append(toIndentedString(direction)).append("\n"); + sb.append(" property: ").append(toIndentedString(property)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("direction", "property")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to LoaSortCriteria + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!LoaSortCriteria.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in LoaSortCriteria is not found in the empty JSON string", LoaSortCriteria.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("direction") != null && !jsonObj.get("direction").isJsonNull()) && !jsonObj.get("direction").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `direction` to be a primitive type in the JSON string but got `%s`", jsonObj.get("direction").toString())); + } + // validate the optional field `direction` + if (jsonObj.get("direction") != null && !jsonObj.get("direction").isJsonNull()) { + DirectionEnum.validateJsonElement(jsonObj.get("direction")); + } + if ((jsonObj.get("property") != null && !jsonObj.get("property").isJsonNull()) && !jsonObj.get("property").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `property` to be a primitive type in the JSON string but got `%s`", jsonObj.get("property").toString())); + } + // validate the optional field `property` + if (jsonObj.get("property") != null && !jsonObj.get("property").isJsonNull()) { + PropertyEnum.validateJsonElement(jsonObj.get("property")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!LoaSortCriteria.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'LoaSortCriteria' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(LoaSortCriteria.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, LoaSortCriteria value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public LoaSortCriteria read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + LoaSortCriteria instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of LoaSortCriteria given an JSON string + * + * @param jsonString JSON string + * @return An instance of LoaSortCriteria + * @throws IOException if the JSON string is invalid with respect to LoaSortCriteria + */ + public static LoaSortCriteria fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, LoaSortCriteria.class); + } + + /** + * Convert an instance of LoaSortCriteria to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaState.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaState.java index 36434b76..18c73370 100644 --- a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaState.java +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaState.java @@ -24,7 +24,7 @@ import com.google.gson.stream.JsonWriter; /** - * Loa State + * Current lifecycle state of the LOA. */ @JsonAdapter(LoaState.Adapter.class) public enum LoaState { @@ -37,8 +37,6 @@ public enum LoaState { PENDING_ACCEPTANCE("PENDING_ACCEPTANCE"), - REJECTED("REJECTED"), - CANCELLED("CANCELLED"), INACTIVE("INACTIVE"), diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaType.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaType.java index 0e15c5ea..52db0e3d 100644 --- a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaType.java +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/LoaType.java @@ -24,14 +24,16 @@ import com.google.gson.stream.JsonWriter; /** - * Loa Type + * Type of Letter of Authorization */ @JsonAdapter(LoaType.Adapter.class) public enum LoaType { - PATCH_PANEL_PORT_LOA("PATCH_PANEL_PORT_LOA"), + CAGE_LOA("CAGE_LOA"), - CAGE_LOA("CAGE_LOA"); + PATCH_PANEL_LOA("PATCH_PANEL_LOA"), + + PATCH_PANEL_PORT_LOA("PATCH_PANEL_PORT_LOA"); private String value; diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/MaintenanceState.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/MaintenanceState.java new file mode 100644 index 00000000..9dfc0f80 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/MaintenanceState.java @@ -0,0 +1,82 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.google.gson.annotations.SerializedName; + +import java.io.IOException; +import java.util.Locale; +import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; + +/** + * Maintenance lifecycle state + */ +@JsonAdapter(MaintenanceState.Adapter.class) +public enum MaintenanceState { + + SCHEDULED("SCHEDULED"), + + IN_PROGRESS("IN_PROGRESS"), + + COMPLETED("COMPLETED"), + + DEFERRED("DEFERRED"); + + private String value; + + MaintenanceState(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static MaintenanceState fromValue(String value) { + for (MaintenanceState b : MaintenanceState.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final MaintenanceState enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public MaintenanceState read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return MaintenanceState.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + MaintenanceState.fromValue(value); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OperationalEventFilters.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OperationalEventFilters.java new file mode 100644 index 00000000..45a0cf71 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OperationalEventFilters.java @@ -0,0 +1,308 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.OperationalEventSimpleExpression; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * OperationalEventFilters + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class OperationalEventFilters { + public static final String SERIALIZED_NAME_AND = "and"; + @SerializedName(SERIALIZED_NAME_AND) + @javax.annotation.Nullable + private List and = new ArrayList<>(); + + public OperationalEventFilters() { + } + + public OperationalEventFilters and(@javax.annotation.Nullable List and) { + this.and = and; + return this; + } + + public OperationalEventFilters addAndItem(OperationalEventSimpleExpression andItem) { + if (this.and == null) { + this.and = new ArrayList<>(); + } + this.and.add(andItem); + return this; + } + + /** + * Get and + * @return and + */ + @javax.annotation.Nullable + public List getAnd() { + return and; + } + + public void setAnd(@javax.annotation.Nullable List and) { + this.and = and; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the OperationalEventFilters instance itself + */ + public OperationalEventFilters putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OperationalEventFilters operationalEventFilters = (OperationalEventFilters) o; + return Objects.equals(this.and, operationalEventFilters.and)&& + Objects.equals(this.additionalProperties, operationalEventFilters.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(and, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OperationalEventFilters {\n"); + sb.append(" and: ").append(toIndentedString(and)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("and")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OperationalEventFilters + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OperationalEventFilters.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in OperationalEventFilters is not found in the empty JSON string", OperationalEventFilters.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("and") != null && !jsonObj.get("and").isJsonNull()) { + JsonArray jsonArrayand = jsonObj.getAsJsonArray("and"); + if (jsonArrayand != null) { + // ensure the json data is an array + if (!jsonObj.get("and").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `and` to be an array in the JSON string but got `%s`", jsonObj.get("and").toString())); + } + + // validate the optional field `and` (array) + for (int i = 0; i < jsonArrayand.size(); i++) { + OperationalEventSimpleExpression.validateJsonElement(jsonArrayand.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OperationalEventFilters.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OperationalEventFilters' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OperationalEventFilters.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OperationalEventFilters value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public OperationalEventFilters read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + OperationalEventFilters instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OperationalEventFilters given an JSON string + * + * @param jsonString JSON string + * @return An instance of OperationalEventFilters + * @throws IOException if the JSON string is invalid with respect to OperationalEventFilters + */ + public static OperationalEventFilters fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OperationalEventFilters.class); + } + + /** + * Convert an instance of OperationalEventFilters to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OperationalEventSearchRequest.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OperationalEventSearchRequest.java new file mode 100644 index 00000000..5f97ea0d --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OperationalEventSearchRequest.java @@ -0,0 +1,319 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.OperationalEventFilters; +import com.equinix.sdk.fabricv4.model.PaginationRequest; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * Search requests containing criteria + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class OperationalEventSearchRequest { + public static final String SERIALIZED_NAME_FILTER = "filter"; + @SerializedName(SERIALIZED_NAME_FILTER) + @javax.annotation.Nullable + private OperationalEventFilters filter; + + public static final String SERIALIZED_NAME_PAGINATION = "pagination"; + @SerializedName(SERIALIZED_NAME_PAGINATION) + @javax.annotation.Nullable + private PaginationRequest pagination; + + public OperationalEventSearchRequest() { + } + + public OperationalEventSearchRequest filter(@javax.annotation.Nullable OperationalEventFilters filter) { + this.filter = filter; + return this; + } + + /** + * Get filter + * @return filter + */ + @javax.annotation.Nullable + public OperationalEventFilters getFilter() { + return filter; + } + + public void setFilter(@javax.annotation.Nullable OperationalEventFilters filter) { + this.filter = filter; + } + + + public OperationalEventSearchRequest pagination(@javax.annotation.Nullable PaginationRequest pagination) { + this.pagination = pagination; + return this; + } + + /** + * Get pagination + * @return pagination + */ + @javax.annotation.Nullable + public PaginationRequest getPagination() { + return pagination; + } + + public void setPagination(@javax.annotation.Nullable PaginationRequest pagination) { + this.pagination = pagination; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the OperationalEventSearchRequest instance itself + */ + public OperationalEventSearchRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OperationalEventSearchRequest operationalEventSearchRequest = (OperationalEventSearchRequest) o; + return Objects.equals(this.filter, operationalEventSearchRequest.filter) && + Objects.equals(this.pagination, operationalEventSearchRequest.pagination)&& + Objects.equals(this.additionalProperties, operationalEventSearchRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(filter, pagination, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OperationalEventSearchRequest {\n"); + sb.append(" filter: ").append(toIndentedString(filter)).append("\n"); + sb.append(" pagination: ").append(toIndentedString(pagination)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("filter", "pagination")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OperationalEventSearchRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OperationalEventSearchRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in OperationalEventSearchRequest is not found in the empty JSON string", OperationalEventSearchRequest.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `filter` + if (jsonObj.get("filter") != null && !jsonObj.get("filter").isJsonNull()) { + OperationalEventFilters.validateJsonElement(jsonObj.get("filter")); + } + // validate the optional field `pagination` + if (jsonObj.get("pagination") != null && !jsonObj.get("pagination").isJsonNull()) { + PaginationRequest.validateJsonElement(jsonObj.get("pagination")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OperationalEventSearchRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OperationalEventSearchRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OperationalEventSearchRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OperationalEventSearchRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public OperationalEventSearchRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + OperationalEventSearchRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OperationalEventSearchRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of OperationalEventSearchRequest + * @throws IOException if the JSON string is invalid with respect to OperationalEventSearchRequest + */ + public static OperationalEventSearchRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OperationalEventSearchRequest.class); + } + + /** + * Convert an instance of OperationalEventSearchRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OperationalEventSimpleExpression.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OperationalEventSimpleExpression.java new file mode 100644 index 00000000..70435ad9 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OperationalEventSimpleExpression.java @@ -0,0 +1,355 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * OperationalEventSimpleExpression + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class OperationalEventSimpleExpression { + public static final String SERIALIZED_NAME_PROPERTY = "property"; + @SerializedName(SERIALIZED_NAME_PROPERTY) + @javax.annotation.Nullable + private String property; + + public static final String SERIALIZED_NAME_OPERATOR = "operator"; + @SerializedName(SERIALIZED_NAME_OPERATOR) + @javax.annotation.Nullable + private String operator; + + public static final String SERIALIZED_NAME_VALUES = "values"; + @SerializedName(SERIALIZED_NAME_VALUES) + @javax.annotation.Nullable + private List values = new ArrayList<>(); + + public OperationalEventSimpleExpression() { + } + + public OperationalEventSimpleExpression property(@javax.annotation.Nullable String property) { + this.property = property; + return this; + } + + /** + * Possible field names to use on filters: * `/subject` - Cloud Event subject description + * @return property + */ + @javax.annotation.Nullable + public String getProperty() { + return property; + } + + public void setProperty(@javax.annotation.Nullable String property) { + this.property = property; + } + + + public OperationalEventSimpleExpression operator(@javax.annotation.Nullable String operator) { + this.operator = operator; + return this; + } + + /** + * Possible operators to use on filters: * `=` - equal * `IN` - in + * @return operator + */ + @javax.annotation.Nullable + public String getOperator() { + return operator; + } + + public void setOperator(@javax.annotation.Nullable String operator) { + this.operator = operator; + } + + + public OperationalEventSimpleExpression values(@javax.annotation.Nullable List values) { + this.values = values; + return this; + } + + public OperationalEventSimpleExpression addValuesItem(String valuesItem) { + if (this.values == null) { + this.values = new ArrayList<>(); + } + this.values.add(valuesItem); + return this; + } + + /** + * Get values + * @return values + */ + @javax.annotation.Nullable + public List getValues() { + return values; + } + + public void setValues(@javax.annotation.Nullable List values) { + this.values = values; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the OperationalEventSimpleExpression instance itself + */ + public OperationalEventSimpleExpression putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OperationalEventSimpleExpression operationalEventSimpleExpression = (OperationalEventSimpleExpression) o; + return Objects.equals(this.property, operationalEventSimpleExpression.property) && + Objects.equals(this.operator, operationalEventSimpleExpression.operator) && + Objects.equals(this.values, operationalEventSimpleExpression.values)&& + Objects.equals(this.additionalProperties, operationalEventSimpleExpression.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(property, operator, values, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OperationalEventSimpleExpression {\n"); + sb.append(" property: ").append(toIndentedString(property)).append("\n"); + sb.append(" operator: ").append(toIndentedString(operator)).append("\n"); + sb.append(" values: ").append(toIndentedString(values)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("property", "operator", "values")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OperationalEventSimpleExpression + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OperationalEventSimpleExpression.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in OperationalEventSimpleExpression is not found in the empty JSON string", OperationalEventSimpleExpression.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("property") != null && !jsonObj.get("property").isJsonNull()) && !jsonObj.get("property").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `property` to be a primitive type in the JSON string but got `%s`", jsonObj.get("property").toString())); + } + if ((jsonObj.get("operator") != null && !jsonObj.get("operator").isJsonNull()) && !jsonObj.get("operator").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `operator` to be a primitive type in the JSON string but got `%s`", jsonObj.get("operator").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("values") != null && !jsonObj.get("values").isJsonNull() && !jsonObj.get("values").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `values` to be an array in the JSON string but got `%s`", jsonObj.get("values").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OperationalEventSimpleExpression.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OperationalEventSimpleExpression' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OperationalEventSimpleExpression.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OperationalEventSimpleExpression value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public OperationalEventSimpleExpression read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + OperationalEventSimpleExpression instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OperationalEventSimpleExpression given an JSON string + * + * @param jsonString JSON string + * @return An instance of OperationalEventSimpleExpression + * @throws IOException if the JSON string is invalid with respect to OperationalEventSimpleExpression + */ + public static OperationalEventSimpleExpression fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OperationalEventSimpleExpression.class); + } + + /** + * Convert an instance of OperationalEventSimpleExpression to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OperatorEnum.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OperatorEnum.java new file mode 100644 index 00000000..bc51bb38 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OperatorEnum.java @@ -0,0 +1,90 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.google.gson.annotations.SerializedName; + +import java.io.IOException; +import java.util.Locale; +import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; + +/** + * Comparison operators for filtering + */ +@JsonAdapter(OperatorEnum.Adapter.class) +public enum OperatorEnum { + + EQUAL("="), + + NOT_EQUAL("!="), + + LIKE("LIKE"), + + NOT_LIKE("NOT LIKE"), + + ILIKE("ILIKE"), + + NOT_ILIKE("NOT ILIKE"), + + IN("IN"), + + NOT_IN("NOT IN"); + + private String value; + + OperatorEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static OperatorEnum fromValue(String value) { + for (OperatorEnum b : OperatorEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final OperatorEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public OperatorEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return OperatorEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + OperatorEnum.fromValue(value); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OpticalConnectASideRequest.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OpticalConnectASideRequest.java new file mode 100644 index 00000000..7dedc819 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OpticalConnectASideRequest.java @@ -0,0 +1,433 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * A-Side configuration. Always a patch panel port from your cage. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class OpticalConnectASideRequest { + public static final String SERIALIZED_NAME_PATCH_PANEL_ID = "patchPanelId"; + @SerializedName(SERIALIZED_NAME_PATCH_PANEL_ID) + @javax.annotation.Nullable + private String patchPanelId; + + public static final String SERIALIZED_NAME_PATCH_PANEL_PORT_A = "patchPanelPortA"; + @SerializedName(SERIALIZED_NAME_PATCH_PANEL_PORT_A) + @javax.annotation.Nullable + private String patchPanelPortA; + + public static final String SERIALIZED_NAME_PATCH_PANEL_PORT_B = "patchPanelPortB"; + @SerializedName(SERIALIZED_NAME_PATCH_PANEL_PORT_B) + @javax.annotation.Nullable + private String patchPanelPortB; + + /** + * Type of Connector + */ + @JsonAdapter(ConnectorTypeEnum.Adapter.class) + public enum ConnectorTypeEnum { + FC("FC"), + + SC("SC"), + + LC("LC"), + + ST("ST"); + + private String value; + + ConnectorTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static ConnectorTypeEnum fromValue(String value) { + for (ConnectorTypeEnum b : ConnectorTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final ConnectorTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public ConnectorTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return ConnectorTypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + ConnectorTypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_CONNECTOR_TYPE = "connectorType"; + @SerializedName(SERIALIZED_NAME_CONNECTOR_TYPE) + @javax.annotation.Nullable + private ConnectorTypeEnum connectorType; + + public OpticalConnectASideRequest() { + } + + public OpticalConnectASideRequest patchPanelId(@javax.annotation.Nullable String patchPanelId) { + this.patchPanelId = patchPanelId; + return this; + } + + /** + * Unique identifier of the patch panel. + * @return patchPanelId + */ + @javax.annotation.Nullable + public String getPatchPanelId() { + return patchPanelId; + } + + public void setPatchPanelId(@javax.annotation.Nullable String patchPanelId) { + this.patchPanelId = patchPanelId; + } + + + public OpticalConnectASideRequest patchPanelPortA(@javax.annotation.Nullable String patchPanelPortA) { + this.patchPanelPortA = patchPanelPortA; + return this; + } + + /** + * Specify the desired port number for Port A. <br> When ports are not provided, next available ports will be used. + * @return patchPanelPortA + */ + @javax.annotation.Nullable + public String getPatchPanelPortA() { + return patchPanelPortA; + } + + public void setPatchPanelPortA(@javax.annotation.Nullable String patchPanelPortA) { + this.patchPanelPortA = patchPanelPortA; + } + + + public OpticalConnectASideRequest patchPanelPortB(@javax.annotation.Nullable String patchPanelPortB) { + this.patchPanelPortB = patchPanelPortB; + return this; + } + + /** + * Specify the desired port number for Port B. <br> When ports are not provided, next available ports will be used. <br> Required for Connector type FC, SC and ST only. + * @return patchPanelPortB + */ + @javax.annotation.Nullable + public String getPatchPanelPortB() { + return patchPanelPortB; + } + + public void setPatchPanelPortB(@javax.annotation.Nullable String patchPanelPortB) { + this.patchPanelPortB = patchPanelPortB; + } + + + public OpticalConnectASideRequest connectorType(@javax.annotation.Nullable ConnectorTypeEnum connectorType) { + this.connectorType = connectorType; + return this; + } + + /** + * Type of Connector + * @return connectorType + */ + @javax.annotation.Nullable + public ConnectorTypeEnum getConnectorType() { + return connectorType; + } + + public void setConnectorType(@javax.annotation.Nullable ConnectorTypeEnum connectorType) { + this.connectorType = connectorType; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the OpticalConnectASideRequest instance itself + */ + public OpticalConnectASideRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OpticalConnectASideRequest opticalConnectASideRequest = (OpticalConnectASideRequest) o; + return Objects.equals(this.patchPanelId, opticalConnectASideRequest.patchPanelId) && + Objects.equals(this.patchPanelPortA, opticalConnectASideRequest.patchPanelPortA) && + Objects.equals(this.patchPanelPortB, opticalConnectASideRequest.patchPanelPortB) && + Objects.equals(this.connectorType, opticalConnectASideRequest.connectorType)&& + Objects.equals(this.additionalProperties, opticalConnectASideRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(patchPanelId, patchPanelPortA, patchPanelPortB, connectorType, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OpticalConnectASideRequest {\n"); + sb.append(" patchPanelId: ").append(toIndentedString(patchPanelId)).append("\n"); + sb.append(" patchPanelPortA: ").append(toIndentedString(patchPanelPortA)).append("\n"); + sb.append(" patchPanelPortB: ").append(toIndentedString(patchPanelPortB)).append("\n"); + sb.append(" connectorType: ").append(toIndentedString(connectorType)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("patchPanelId", "patchPanelPortA", "patchPanelPortB", "connectorType")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OpticalConnectASideRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OpticalConnectASideRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in OpticalConnectASideRequest is not found in the empty JSON string", OpticalConnectASideRequest.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("patchPanelId") != null && !jsonObj.get("patchPanelId").isJsonNull()) && !jsonObj.get("patchPanelId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `patchPanelId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("patchPanelId").toString())); + } + if ((jsonObj.get("patchPanelPortA") != null && !jsonObj.get("patchPanelPortA").isJsonNull()) && !jsonObj.get("patchPanelPortA").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `patchPanelPortA` to be a primitive type in the JSON string but got `%s`", jsonObj.get("patchPanelPortA").toString())); + } + if ((jsonObj.get("patchPanelPortB") != null && !jsonObj.get("patchPanelPortB").isJsonNull()) && !jsonObj.get("patchPanelPortB").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `patchPanelPortB` to be a primitive type in the JSON string but got `%s`", jsonObj.get("patchPanelPortB").toString())); + } + if ((jsonObj.get("connectorType") != null && !jsonObj.get("connectorType").isJsonNull()) && !jsonObj.get("connectorType").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `connectorType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("connectorType").toString())); + } + // validate the optional field `connectorType` + if (jsonObj.get("connectorType") != null && !jsonObj.get("connectorType").isJsonNull()) { + ConnectorTypeEnum.validateJsonElement(jsonObj.get("connectorType")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OpticalConnectASideRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OpticalConnectASideRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OpticalConnectASideRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OpticalConnectASideRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public OpticalConnectASideRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + OpticalConnectASideRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OpticalConnectASideRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of OpticalConnectASideRequest + * @throws IOException if the JSON string is invalid with respect to OpticalConnectASideRequest + */ + public static OpticalConnectASideRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OpticalConnectASideRequest.class); + } + + /** + * Convert an instance of OpticalConnectASideRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OpticalConnectASideResponse.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OpticalConnectASideResponse.java new file mode 100644 index 00000000..f8d5e8e3 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OpticalConnectASideResponse.java @@ -0,0 +1,522 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.OpticalConnectLocation; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * Originating end as provisioned, with the cage, cabinet and IBX location. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class OpticalConnectASideResponse { + public static final String SERIALIZED_NAME_PATCH_PANEL_ID = "patchPanelId"; + @SerializedName(SERIALIZED_NAME_PATCH_PANEL_ID) + @javax.annotation.Nullable + private String patchPanelId; + + public static final String SERIALIZED_NAME_PATCH_PANEL_PORT_A = "patchPanelPortA"; + @SerializedName(SERIALIZED_NAME_PATCH_PANEL_PORT_A) + @javax.annotation.Nullable + private String patchPanelPortA; + + public static final String SERIALIZED_NAME_PATCH_PANEL_PORT_B = "patchPanelPortB"; + @SerializedName(SERIALIZED_NAME_PATCH_PANEL_PORT_B) + @javax.annotation.Nullable + private String patchPanelPortB; + + /** + * Type of Connector + */ + @JsonAdapter(ConnectorTypeEnum.Adapter.class) + public enum ConnectorTypeEnum { + FC("FC"), + + SC("SC"), + + LC("LC"), + + ST("ST"); + + private String value; + + ConnectorTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static ConnectorTypeEnum fromValue(String value) { + for (ConnectorTypeEnum b : ConnectorTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final ConnectorTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public ConnectorTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return ConnectorTypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + ConnectorTypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_CONNECTOR_TYPE = "connectorType"; + @SerializedName(SERIALIZED_NAME_CONNECTOR_TYPE) + @javax.annotation.Nullable + private ConnectorTypeEnum connectorType; + + public static final String SERIALIZED_NAME_CAGE_UNIQUE_SPACE_ID = "cageUniqueSpaceId"; + @SerializedName(SERIALIZED_NAME_CAGE_UNIQUE_SPACE_ID) + @javax.annotation.Nullable + private String cageUniqueSpaceId; + + public static final String SERIALIZED_NAME_CABINET_UNIQUE_SPACE_ID = "cabinetUniqueSpaceId"; + @SerializedName(SERIALIZED_NAME_CABINET_UNIQUE_SPACE_ID) + @javax.annotation.Nullable + private String cabinetUniqueSpaceId; + + public static final String SERIALIZED_NAME_LOCATION = "location"; + @SerializedName(SERIALIZED_NAME_LOCATION) + @javax.annotation.Nullable + private OpticalConnectLocation location; + + public OpticalConnectASideResponse() { + } + + public OpticalConnectASideResponse patchPanelId(@javax.annotation.Nullable String patchPanelId) { + this.patchPanelId = patchPanelId; + return this; + } + + /** + * Unique identifier of the patch panel. + * @return patchPanelId + */ + @javax.annotation.Nullable + public String getPatchPanelId() { + return patchPanelId; + } + + public void setPatchPanelId(@javax.annotation.Nullable String patchPanelId) { + this.patchPanelId = patchPanelId; + } + + + public OpticalConnectASideResponse patchPanelPortA(@javax.annotation.Nullable String patchPanelPortA) { + this.patchPanelPortA = patchPanelPortA; + return this; + } + + /** + * Specify the desired port number for Port A. <br> When ports are not provided, next available ports will be used. + * @return patchPanelPortA + */ + @javax.annotation.Nullable + public String getPatchPanelPortA() { + return patchPanelPortA; + } + + public void setPatchPanelPortA(@javax.annotation.Nullable String patchPanelPortA) { + this.patchPanelPortA = patchPanelPortA; + } + + + public OpticalConnectASideResponse patchPanelPortB(@javax.annotation.Nullable String patchPanelPortB) { + this.patchPanelPortB = patchPanelPortB; + return this; + } + + /** + * Specify the desired port number for Port B. <br> When ports are not provided, next available ports will be used. <br> Required for Connector type FC, SC and ST only. + * @return patchPanelPortB + */ + @javax.annotation.Nullable + public String getPatchPanelPortB() { + return patchPanelPortB; + } + + public void setPatchPanelPortB(@javax.annotation.Nullable String patchPanelPortB) { + this.patchPanelPortB = patchPanelPortB; + } + + + public OpticalConnectASideResponse connectorType(@javax.annotation.Nullable ConnectorTypeEnum connectorType) { + this.connectorType = connectorType; + return this; + } + + /** + * Type of Connector + * @return connectorType + */ + @javax.annotation.Nullable + public ConnectorTypeEnum getConnectorType() { + return connectorType; + } + + public void setConnectorType(@javax.annotation.Nullable ConnectorTypeEnum connectorType) { + this.connectorType = connectorType; + } + + + public OpticalConnectASideResponse cageUniqueSpaceId(@javax.annotation.Nullable String cageUniqueSpaceId) { + this.cageUniqueSpaceId = cageUniqueSpaceId; + return this; + } + + /** + * Unique identifier of the cage. + * @return cageUniqueSpaceId + */ + @javax.annotation.Nullable + public String getCageUniqueSpaceId() { + return cageUniqueSpaceId; + } + + public void setCageUniqueSpaceId(@javax.annotation.Nullable String cageUniqueSpaceId) { + this.cageUniqueSpaceId = cageUniqueSpaceId; + } + + + public OpticalConnectASideResponse cabinetUniqueSpaceId(@javax.annotation.Nullable String cabinetUniqueSpaceId) { + this.cabinetUniqueSpaceId = cabinetUniqueSpaceId; + return this; + } + + /** + * Unique identifier of the cabinet. + * @return cabinetUniqueSpaceId + */ + @javax.annotation.Nullable + public String getCabinetUniqueSpaceId() { + return cabinetUniqueSpaceId; + } + + public void setCabinetUniqueSpaceId(@javax.annotation.Nullable String cabinetUniqueSpaceId) { + this.cabinetUniqueSpaceId = cabinetUniqueSpaceId; + } + + + public OpticalConnectASideResponse location(@javax.annotation.Nullable OpticalConnectLocation location) { + this.location = location; + return this; + } + + /** + * Get location + * @return location + */ + @javax.annotation.Nullable + public OpticalConnectLocation getLocation() { + return location; + } + + public void setLocation(@javax.annotation.Nullable OpticalConnectLocation location) { + this.location = location; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the OpticalConnectASideResponse instance itself + */ + public OpticalConnectASideResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OpticalConnectASideResponse opticalConnectASideResponse = (OpticalConnectASideResponse) o; + return Objects.equals(this.patchPanelId, opticalConnectASideResponse.patchPanelId) && + Objects.equals(this.patchPanelPortA, opticalConnectASideResponse.patchPanelPortA) && + Objects.equals(this.patchPanelPortB, opticalConnectASideResponse.patchPanelPortB) && + Objects.equals(this.connectorType, opticalConnectASideResponse.connectorType) && + Objects.equals(this.cageUniqueSpaceId, opticalConnectASideResponse.cageUniqueSpaceId) && + Objects.equals(this.cabinetUniqueSpaceId, opticalConnectASideResponse.cabinetUniqueSpaceId) && + Objects.equals(this.location, opticalConnectASideResponse.location)&& + Objects.equals(this.additionalProperties, opticalConnectASideResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(patchPanelId, patchPanelPortA, patchPanelPortB, connectorType, cageUniqueSpaceId, cabinetUniqueSpaceId, location, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OpticalConnectASideResponse {\n"); + sb.append(" patchPanelId: ").append(toIndentedString(patchPanelId)).append("\n"); + sb.append(" patchPanelPortA: ").append(toIndentedString(patchPanelPortA)).append("\n"); + sb.append(" patchPanelPortB: ").append(toIndentedString(patchPanelPortB)).append("\n"); + sb.append(" connectorType: ").append(toIndentedString(connectorType)).append("\n"); + sb.append(" cageUniqueSpaceId: ").append(toIndentedString(cageUniqueSpaceId)).append("\n"); + sb.append(" cabinetUniqueSpaceId: ").append(toIndentedString(cabinetUniqueSpaceId)).append("\n"); + sb.append(" location: ").append(toIndentedString(location)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("patchPanelId", "patchPanelPortA", "patchPanelPortB", "connectorType", "cageUniqueSpaceId", "cabinetUniqueSpaceId", "location")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OpticalConnectASideResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OpticalConnectASideResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in OpticalConnectASideResponse is not found in the empty JSON string", OpticalConnectASideResponse.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("patchPanelId") != null && !jsonObj.get("patchPanelId").isJsonNull()) && !jsonObj.get("patchPanelId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `patchPanelId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("patchPanelId").toString())); + } + if ((jsonObj.get("patchPanelPortA") != null && !jsonObj.get("patchPanelPortA").isJsonNull()) && !jsonObj.get("patchPanelPortA").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `patchPanelPortA` to be a primitive type in the JSON string but got `%s`", jsonObj.get("patchPanelPortA").toString())); + } + if ((jsonObj.get("patchPanelPortB") != null && !jsonObj.get("patchPanelPortB").isJsonNull()) && !jsonObj.get("patchPanelPortB").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `patchPanelPortB` to be a primitive type in the JSON string but got `%s`", jsonObj.get("patchPanelPortB").toString())); + } + if ((jsonObj.get("connectorType") != null && !jsonObj.get("connectorType").isJsonNull()) && !jsonObj.get("connectorType").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `connectorType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("connectorType").toString())); + } + // validate the optional field `connectorType` + if (jsonObj.get("connectorType") != null && !jsonObj.get("connectorType").isJsonNull()) { + ConnectorTypeEnum.validateJsonElement(jsonObj.get("connectorType")); + } + if ((jsonObj.get("cageUniqueSpaceId") != null && !jsonObj.get("cageUniqueSpaceId").isJsonNull()) && !jsonObj.get("cageUniqueSpaceId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `cageUniqueSpaceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("cageUniqueSpaceId").toString())); + } + if ((jsonObj.get("cabinetUniqueSpaceId") != null && !jsonObj.get("cabinetUniqueSpaceId").isJsonNull()) && !jsonObj.get("cabinetUniqueSpaceId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `cabinetUniqueSpaceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("cabinetUniqueSpaceId").toString())); + } + // validate the optional field `location` + if (jsonObj.get("location") != null && !jsonObj.get("location").isJsonNull()) { + OpticalConnectLocation.validateJsonElement(jsonObj.get("location")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OpticalConnectASideResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OpticalConnectASideResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OpticalConnectASideResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OpticalConnectASideResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public OpticalConnectASideResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + OpticalConnectASideResponse instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OpticalConnectASideResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of OpticalConnectASideResponse + * @throws IOException if the JSON string is invalid with respect to OpticalConnectASideResponse + */ + public static OpticalConnectASideResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OpticalConnectASideResponse.class); + } + + /** + * Convert an instance of OpticalConnectASideResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OpticalConnectBulk.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OpticalConnectBulk.java new file mode 100644 index 00000000..d0aec58e --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OpticalConnectBulk.java @@ -0,0 +1,308 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.OpticalConnectResponse; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * Dual diverse pair Connection + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class OpticalConnectBulk { + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + @javax.annotation.Nullable + private List data = new ArrayList<>(); + + public OpticalConnectBulk() { + } + + public OpticalConnectBulk data(@javax.annotation.Nullable List data) { + this.data = data; + return this; + } + + public OpticalConnectBulk addDataItem(OpticalConnectResponse dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + return this; + } + + /** + * Get data + * @return data + */ + @javax.annotation.Nullable + public List getData() { + return data; + } + + public void setData(@javax.annotation.Nullable List data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the OpticalConnectBulk instance itself + */ + public OpticalConnectBulk putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OpticalConnectBulk opticalConnectBulk = (OpticalConnectBulk) o; + return Objects.equals(this.data, opticalConnectBulk.data)&& + Objects.equals(this.additionalProperties, opticalConnectBulk.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OpticalConnectBulk {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("data")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OpticalConnectBulk + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OpticalConnectBulk.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in OpticalConnectBulk is not found in the empty JSON string", OpticalConnectBulk.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); + if (jsonArraydata != null) { + // ensure the json data is an array + if (!jsonObj.get("data").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + } + + // validate the optional field `data` (array) + for (int i = 0; i < jsonArraydata.size(); i++) { + OpticalConnectResponse.validateJsonElement(jsonArraydata.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OpticalConnectBulk.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OpticalConnectBulk' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OpticalConnectBulk.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OpticalConnectBulk value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public OpticalConnectBulk read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + OpticalConnectBulk instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OpticalConnectBulk given an JSON string + * + * @param jsonString JSON string + * @return An instance of OpticalConnectBulk + * @throws IOException if the JSON string is invalid with respect to OpticalConnectBulk + */ + public static OpticalConnectBulk fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OpticalConnectBulk.class); + } + + /** + * Convert an instance of OpticalConnectBulk to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OpticalConnectConnectionDestinationType.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OpticalConnectConnectionDestinationType.java new file mode 100644 index 00000000..d20061e9 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OpticalConnectConnectionDestinationType.java @@ -0,0 +1,80 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.google.gson.annotations.SerializedName; + +import java.io.IOException; +import java.util.Locale; +import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; + +/** + * Destination Port connectivity type + */ +@JsonAdapter(OpticalConnectConnectionDestinationType.Adapter.class) +public enum OpticalConnectConnectionDestinationType { + + COLO("COLO"), + + BMMR("BMMR"), + + REMOTE("REMOTE"); + + private String value; + + OpticalConnectConnectionDestinationType(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static OpticalConnectConnectionDestinationType fromValue(String value) { + for (OpticalConnectConnectionDestinationType b : OpticalConnectConnectionDestinationType.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final OpticalConnectConnectionDestinationType enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public OpticalConnectConnectionDestinationType read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return OpticalConnectConnectionDestinationType.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + OpticalConnectConnectionDestinationType.fromValue(value); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OpticalConnectFilter.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OpticalConnectFilter.java new file mode 100644 index 00000000..b54bf32a --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OpticalConnectFilter.java @@ -0,0 +1,269 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.OpticalConnectOrFilter; +import com.equinix.sdk.fabricv4.model.OpticalConnectSimpleExpression; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + + + +import java.io.IOException; +import java.lang.reflect.Type; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Locale; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.JsonPrimitive; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonSerializationContext; +import com.google.gson.JsonSerializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonArray; +import com.google.gson.JsonParseException; + +import com.equinix.sdk.fabricv4.JSON; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class OpticalConnectFilter extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(OpticalConnectFilter.class.getName()); + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OpticalConnectFilter.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OpticalConnectFilter' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter adapterOpticalConnectSimpleExpression = gson.getDelegateAdapter(this, TypeToken.get(OpticalConnectSimpleExpression.class)); + final TypeAdapter adapterOpticalConnectOrFilter = gson.getDelegateAdapter(this, TypeToken.get(OpticalConnectOrFilter.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OpticalConnectFilter value) throws IOException { + if (value == null || value.getActualInstance() == null) { + elementAdapter.write(out, null); + return; + } + + // check if the actual instance is of the type `OpticalConnectSimpleExpression` + if (value.getActualInstance() instanceof OpticalConnectSimpleExpression) { + JsonElement element = adapterOpticalConnectSimpleExpression.toJsonTree((OpticalConnectSimpleExpression)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + // check if the actual instance is of the type `OpticalConnectOrFilter` + if (value.getActualInstance() instanceof OpticalConnectOrFilter) { + JsonElement element = adapterOpticalConnectOrFilter.toJsonTree((OpticalConnectOrFilter)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + throw new IOException("Failed to serialize as the type doesn't match anyOf schemas: OpticalConnectOrFilter, OpticalConnectSimpleExpression"); + } + + @Override + public OpticalConnectFilter read(JsonReader in) throws IOException { + Object deserialized = null; + JsonElement jsonElement = elementAdapter.read(in); + + ArrayList errorMessages = new ArrayList<>(); + TypeAdapter actualAdapter = elementAdapter; + + // deserialize OpticalConnectSimpleExpression + try { + // validate the JSON object to see if any exception is thrown + OpticalConnectSimpleExpression.validateJsonElement(jsonElement); + actualAdapter = adapterOpticalConnectSimpleExpression; + OpticalConnectFilter ret = new OpticalConnectFilter(); + ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); + return ret; + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format(Locale.ROOT, "Deserialization for OpticalConnectSimpleExpression failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'OpticalConnectSimpleExpression'", e); + } + // deserialize OpticalConnectOrFilter + try { + // validate the JSON object to see if any exception is thrown + OpticalConnectOrFilter.validateJsonElement(jsonElement); + actualAdapter = adapterOpticalConnectOrFilter; + OpticalConnectFilter ret = new OpticalConnectFilter(); + ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); + return ret; + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format(Locale.ROOT, "Deserialization for OpticalConnectOrFilter failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'OpticalConnectOrFilter'", e); + } + + throw new IOException(String.format(Locale.ROOT, "Failed deserialization for OpticalConnectFilter: no class matches result, expected at least 1. Detailed failure message for anyOf schemas: %s. JSON: %s", errorMessages, jsonElement.toString())); + } + }.nullSafe(); + } + } + + // store a list of schema names defined in anyOf + public static final Map> schemas = new HashMap>(); + + public OpticalConnectFilter() { + super("anyOf", Boolean.FALSE); + } + + public OpticalConnectFilter(Object o) { + super("anyOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("OpticalConnectSimpleExpression", OpticalConnectSimpleExpression.class); + schemas.put("OpticalConnectOrFilter", OpticalConnectOrFilter.class); + } + + @Override + public Map> getSchemas() { + return OpticalConnectFilter.schemas; + } + + /** + * Set the instance that matches the anyOf child schema, check + * the instance parameter is valid against the anyOf child schemas: + * OpticalConnectOrFilter, OpticalConnectSimpleExpression + * + * It could be an instance of the 'anyOf' schemas. + */ + @Override + public void setActualInstance(Object instance) { + if (instance instanceof OpticalConnectSimpleExpression) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof OpticalConnectOrFilter) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException("Invalid instance type. Must be OpticalConnectOrFilter, OpticalConnectSimpleExpression"); + } + + /** + * Get the actual instance, which can be the following: + * OpticalConnectOrFilter, OpticalConnectSimpleExpression + * + * @return The actual instance (OpticalConnectOrFilter, OpticalConnectSimpleExpression) + */ + @SuppressWarnings("unchecked") + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `OpticalConnectSimpleExpression`. If the actual instance is not `OpticalConnectSimpleExpression`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `OpticalConnectSimpleExpression` + * @throws ClassCastException if the instance is not `OpticalConnectSimpleExpression` + */ + public OpticalConnectSimpleExpression getOpticalConnectSimpleExpression() throws ClassCastException { + return (OpticalConnectSimpleExpression)super.getActualInstance(); + } + + /** + * Get the actual instance of `OpticalConnectOrFilter`. If the actual instance is not `OpticalConnectOrFilter`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `OpticalConnectOrFilter` + * @throws ClassCastException if the instance is not `OpticalConnectOrFilter` + */ + public OpticalConnectOrFilter getOpticalConnectOrFilter() throws ClassCastException { + return (OpticalConnectOrFilter)super.getActualInstance(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OpticalConnectFilter + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + // validate anyOf schemas one by one + ArrayList errorMessages = new ArrayList<>(); + // validate the json string with OpticalConnectSimpleExpression + try { + OpticalConnectSimpleExpression.validateJsonElement(jsonElement); + return; + } catch (Exception e) { + errorMessages.add(String.format(Locale.ROOT, "Deserialization for OpticalConnectSimpleExpression failed with `%s`.", e.getMessage())); + // continue to the next one + } + // validate the json string with OpticalConnectOrFilter + try { + OpticalConnectOrFilter.validateJsonElement(jsonElement); + return; + } catch (Exception e) { + errorMessages.add(String.format(Locale.ROOT, "Deserialization for OpticalConnectOrFilter failed with `%s`.", e.getMessage())); + // continue to the next one + } + throw new IOException(String.format(Locale.ROOT, "The JSON string is invalid for OpticalConnectFilter with anyOf schemas: OpticalConnectOrFilter, OpticalConnectSimpleExpression. no class match the result, expected at least 1. Detailed failure message for anyOf schemas: %s. JSON: %s", errorMessages, jsonElement.toString())); + } + + /** + * Create an instance of OpticalConnectFilter given an JSON string + * + * @param jsonString JSON string + * @return An instance of OpticalConnectFilter + * @throws IOException if the JSON string is invalid with respect to OpticalConnectFilter + */ + public static OpticalConnectFilter fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OpticalConnectFilter.class); + } + + /** + * Convert an instance of OpticalConnectFilter to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OpticalConnectFilters.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OpticalConnectFilters.java new file mode 100644 index 00000000..43ec36ba --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OpticalConnectFilters.java @@ -0,0 +1,308 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.OpticalConnectFilter; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * OpticalConnectFilters + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class OpticalConnectFilters { + public static final String SERIALIZED_NAME_AND = "and"; + @SerializedName(SERIALIZED_NAME_AND) + @javax.annotation.Nullable + private List and = new ArrayList<>(); + + public OpticalConnectFilters() { + } + + public OpticalConnectFilters and(@javax.annotation.Nullable List and) { + this.and = and; + return this; + } + + public OpticalConnectFilters addAndItem(OpticalConnectFilter andItem) { + if (this.and == null) { + this.and = new ArrayList<>(); + } + this.and.add(andItem); + return this; + } + + /** + * Get and + * @return and + */ + @javax.annotation.Nullable + public List getAnd() { + return and; + } + + public void setAnd(@javax.annotation.Nullable List and) { + this.and = and; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the OpticalConnectFilters instance itself + */ + public OpticalConnectFilters putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OpticalConnectFilters opticalConnectFilters = (OpticalConnectFilters) o; + return Objects.equals(this.and, opticalConnectFilters.and)&& + Objects.equals(this.additionalProperties, opticalConnectFilters.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(and, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OpticalConnectFilters {\n"); + sb.append(" and: ").append(toIndentedString(and)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("and")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OpticalConnectFilters + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OpticalConnectFilters.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in OpticalConnectFilters is not found in the empty JSON string", OpticalConnectFilters.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("and") != null && !jsonObj.get("and").isJsonNull()) { + JsonArray jsonArrayand = jsonObj.getAsJsonArray("and"); + if (jsonArrayand != null) { + // ensure the json data is an array + if (!jsonObj.get("and").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `and` to be an array in the JSON string but got `%s`", jsonObj.get("and").toString())); + } + + // validate the optional field `and` (array) + for (int i = 0; i < jsonArrayand.size(); i++) { + OpticalConnectFilter.validateJsonElement(jsonArrayand.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OpticalConnectFilters.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OpticalConnectFilters' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OpticalConnectFilters.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OpticalConnectFilters value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public OpticalConnectFilters read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + OpticalConnectFilters instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OpticalConnectFilters given an JSON string + * + * @param jsonString JSON string + * @return An instance of OpticalConnectFilters + * @throws IOException if the JSON string is invalid with respect to OpticalConnectFilters + */ + public static OpticalConnectFilters fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OpticalConnectFilters.class); + } + + /** + * Convert an instance of OpticalConnectFilters to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AgentTemplate.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OpticalConnectLOA.java similarity index 81% rename from services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AgentTemplate.java rename to services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OpticalConnectLOA.java index e0cf5d6b..775a91cd 100644 --- a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AgentTemplate.java +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OpticalConnectLOA.java @@ -46,25 +46,25 @@ import com.equinix.sdk.fabricv4.JSON; /** - * AgentTemplate + * Letter of Authorization granting the right to terminate at the Z-side location. <br> Required for BMMR and REMOTE. */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") -public class AgentTemplate { +public class OpticalConnectLOA { public static final String SERIALIZED_NAME_UUID = "uuid"; @SerializedName(SERIALIZED_NAME_UUID) @javax.annotation.Nullable private String uuid; - public AgentTemplate() { + public OpticalConnectLOA() { } - public AgentTemplate uuid(@javax.annotation.Nullable String uuid) { + public OpticalConnectLOA uuid(@javax.annotation.Nullable String uuid) { this.uuid = uuid; return this; } /** - * Agent Template Uuid + * Identifier of the Letter of Authorization * @return uuid */ @javax.annotation.Nullable @@ -89,9 +89,9 @@ public void setUuid(@javax.annotation.Nullable String uuid) { * * @param key name of the property * @param value value of the property - * @return the AgentTemplate instance itself + * @return the OpticalConnectLOA instance itself */ - public AgentTemplate putAdditionalProperty(String key, Object value) { + public OpticalConnectLOA putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -130,9 +130,9 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - AgentTemplate agentTemplate = (AgentTemplate) o; - return Objects.equals(this.uuid, agentTemplate.uuid)&& - Objects.equals(this.additionalProperties, agentTemplate.additionalProperties); + OpticalConnectLOA opticalConnectLOA = (OpticalConnectLOA) o; + return Objects.equals(this.uuid, opticalConnectLOA.uuid)&& + Objects.equals(this.additionalProperties, opticalConnectLOA.additionalProperties); } @Override @@ -143,7 +143,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class AgentTemplate {\n"); + sb.append("class OpticalConnectLOA {\n"); sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); @@ -177,12 +177,12 @@ private String toIndentedString(Object o) { * Validates the JSON Element and throws an exception if issues found * * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to AgentTemplate + * @throws IOException if the JSON Element is invalid with respect to OpticalConnectLOA */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { - if (!AgentTemplate.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in AgentTemplate is not found in the empty JSON string", AgentTemplate.openapiRequiredFields.toString())); + if (!OpticalConnectLOA.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in OpticalConnectLOA is not found in the empty JSON string", OpticalConnectLOA.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -195,16 +195,16 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!AgentTemplate.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'AgentTemplate' and its subtypes + if (!OpticalConnectLOA.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OpticalConnectLOA' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(AgentTemplate.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OpticalConnectLOA.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, AgentTemplate value) throws IOException { + public void write(JsonWriter out, OpticalConnectLOA value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); // serialize additional properties @@ -232,12 +232,12 @@ else if (entry.getValue() instanceof Character) } @Override - public AgentTemplate read(JsonReader in) throws IOException { + public OpticalConnectLOA read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); JsonObject jsonObj = jsonElement.getAsJsonObject(); // store additional fields in the deserialized instance - AgentTemplate instance = thisAdapter.fromJsonTree(jsonObj); + OpticalConnectLOA instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { if (!openapiFields.contains(entry.getKey())) { if (entry.getValue().isJsonPrimitive()) { // primitive type @@ -264,18 +264,18 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } /** - * Create an instance of AgentTemplate given an JSON string + * Create an instance of OpticalConnectLOA given an JSON string * * @param jsonString JSON string - * @return An instance of AgentTemplate - * @throws IOException if the JSON string is invalid with respect to AgentTemplate + * @return An instance of OpticalConnectLOA + * @throws IOException if the JSON string is invalid with respect to OpticalConnectLOA */ - public static AgentTemplate fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, AgentTemplate.class); + public static OpticalConnectLOA fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OpticalConnectLOA.class); } /** - * Convert an instance of AgentTemplate to an JSON string + * Convert an instance of OpticalConnectLOA to an JSON string * * @return JSON string */ diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OpticalConnectLocation.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OpticalConnectLocation.java new file mode 100644 index 00000000..edf25f6e --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OpticalConnectLocation.java @@ -0,0 +1,286 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * Destination location for BMMR and REMOTE connections. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class OpticalConnectLocation { + public static final String SERIALIZED_NAME_IBX_CODE = "ibxCode"; + @SerializedName(SERIALIZED_NAME_IBX_CODE) + @javax.annotation.Nullable + private String ibxCode; + + public OpticalConnectLocation() { + } + + public OpticalConnectLocation ibxCode(@javax.annotation.Nullable String ibxCode) { + this.ibxCode = ibxCode; + return this; + } + + /** + * Equinix IBX data centre code. + * @return ibxCode + */ + @javax.annotation.Nullable + public String getIbxCode() { + return ibxCode; + } + + public void setIbxCode(@javax.annotation.Nullable String ibxCode) { + this.ibxCode = ibxCode; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the OpticalConnectLocation instance itself + */ + public OpticalConnectLocation putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OpticalConnectLocation opticalConnectLocation = (OpticalConnectLocation) o; + return Objects.equals(this.ibxCode, opticalConnectLocation.ibxCode)&& + Objects.equals(this.additionalProperties, opticalConnectLocation.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(ibxCode, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OpticalConnectLocation {\n"); + sb.append(" ibxCode: ").append(toIndentedString(ibxCode)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("ibxCode")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OpticalConnectLocation + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OpticalConnectLocation.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in OpticalConnectLocation is not found in the empty JSON string", OpticalConnectLocation.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("ibxCode") != null && !jsonObj.get("ibxCode").isJsonNull()) && !jsonObj.get("ibxCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `ibxCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ibxCode").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OpticalConnectLocation.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OpticalConnectLocation' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OpticalConnectLocation.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OpticalConnectLocation value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public OpticalConnectLocation read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + OpticalConnectLocation instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OpticalConnectLocation given an JSON string + * + * @param jsonString JSON string + * @return An instance of OpticalConnectLocation + * @throws IOException if the JSON string is invalid with respect to OpticalConnectLocation + */ + public static OpticalConnectLocation fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OpticalConnectLocation.class); + } + + /** + * Convert an instance of OpticalConnectLocation to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OpticalConnectNotification.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OpticalConnectNotification.java new file mode 100644 index 00000000..03961e06 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OpticalConnectNotification.java @@ -0,0 +1,429 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * Notification preferences for this connection. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class OpticalConnectNotification { + /** + * Notification category. <br> NOTIFICATION - states and configuration updates. <br> ORDERING - order and fulfilment correspondence. <br> TECHNICAL - maintenance and technical advisories. + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + NOTIFICATION("NOTIFICATION"), + + ORDERING("ORDERING"), + + TECHNICAL("TECHNICAL"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nonnull + private TypeEnum type; + + public static final String SERIALIZED_NAME_EMAILS = "emails"; + @SerializedName(SERIALIZED_NAME_EMAILS) + @javax.annotation.Nonnull + private List emails = new ArrayList<>(); + + public static final String SERIALIZED_NAME_REGISTERED_USERS = "registeredUsers"; + @SerializedName(SERIALIZED_NAME_REGISTERED_USERS) + @javax.annotation.Nullable + private List registeredUsers = new ArrayList<>(); + + public OpticalConnectNotification() { + } + + public OpticalConnectNotification type(@javax.annotation.Nonnull TypeEnum type) { + this.type = type; + return this; + } + + /** + * Notification category. <br> NOTIFICATION - states and configuration updates. <br> ORDERING - order and fulfilment correspondence. <br> TECHNICAL - maintenance and technical advisories. + * @return type + */ + @javax.annotation.Nonnull + public TypeEnum getType() { + return type; + } + + public void setType(@javax.annotation.Nonnull TypeEnum type) { + this.type = type; + } + + + public OpticalConnectNotification emails(@javax.annotation.Nonnull List emails) { + this.emails = emails; + return this; + } + + public OpticalConnectNotification addEmailsItem(String emailsItem) { + if (this.emails == null) { + this.emails = new ArrayList<>(); + } + this.emails.add(emailsItem); + return this; + } + + /** + * Email addresses to notify. + * @return emails + */ + @javax.annotation.Nonnull + public List getEmails() { + return emails; + } + + public void setEmails(@javax.annotation.Nonnull List emails) { + this.emails = emails; + } + + + public OpticalConnectNotification registeredUsers(@javax.annotation.Nullable List registeredUsers) { + this.registeredUsers = registeredUsers; + return this; + } + + public OpticalConnectNotification addRegisteredUsersItem(String registeredUsersItem) { + if (this.registeredUsers == null) { + this.registeredUsers = new ArrayList<>(); + } + this.registeredUsers.add(registeredUsersItem); + return this; + } + + /** + * Usernames of registered Equinix Portal users to notify. + * @return registeredUsers + */ + @javax.annotation.Nullable + public List getRegisteredUsers() { + return registeredUsers; + } + + public void setRegisteredUsers(@javax.annotation.Nullable List registeredUsers) { + this.registeredUsers = registeredUsers; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the OpticalConnectNotification instance itself + */ + public OpticalConnectNotification putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OpticalConnectNotification opticalConnectNotification = (OpticalConnectNotification) o; + return Objects.equals(this.type, opticalConnectNotification.type) && + Objects.equals(this.emails, opticalConnectNotification.emails) && + Objects.equals(this.registeredUsers, opticalConnectNotification.registeredUsers)&& + Objects.equals(this.additionalProperties, opticalConnectNotification.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(type, emails, registeredUsers, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OpticalConnectNotification {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" emails: ").append(toIndentedString(emails)).append("\n"); + sb.append(" registeredUsers: ").append(toIndentedString(registeredUsers)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("type", "emails", "registeredUsers")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("type", "emails")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OpticalConnectNotification + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OpticalConnectNotification.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in OpticalConnectNotification is not found in the empty JSON string", OpticalConnectNotification.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : OpticalConnectNotification.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // validate the required field `type` + TypeEnum.validateJsonElement(jsonObj.get("type")); + // ensure the required json array is present + if (jsonObj.get("emails") == null) { + throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); + } else if (!jsonObj.get("emails").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `emails` to be an array in the JSON string but got `%s`", jsonObj.get("emails").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("registeredUsers") != null && !jsonObj.get("registeredUsers").isJsonNull() && !jsonObj.get("registeredUsers").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `registeredUsers` to be an array in the JSON string but got `%s`", jsonObj.get("registeredUsers").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OpticalConnectNotification.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OpticalConnectNotification' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OpticalConnectNotification.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OpticalConnectNotification value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public OpticalConnectNotification read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + OpticalConnectNotification instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OpticalConnectNotification given an JSON string + * + * @param jsonString JSON string + * @return An instance of OpticalConnectNotification + * @throws IOException if the JSON string is invalid with respect to OpticalConnectNotification + */ + public static OpticalConnectNotification fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OpticalConnectNotification.class); + } + + /** + * Convert an instance of OpticalConnectNotification to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OpticalConnectOrFilter.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OpticalConnectOrFilter.java new file mode 100644 index 00000000..6e0a1707 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OpticalConnectOrFilter.java @@ -0,0 +1,308 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.OpticalConnectSimpleExpression; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * OpticalConnectOrFilter + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class OpticalConnectOrFilter { + public static final String SERIALIZED_NAME_OR = "or"; + @SerializedName(SERIALIZED_NAME_OR) + @javax.annotation.Nullable + private List or = new ArrayList<>(); + + public OpticalConnectOrFilter() { + } + + public OpticalConnectOrFilter or(@javax.annotation.Nullable List or) { + this.or = or; + return this; + } + + public OpticalConnectOrFilter addOrItem(OpticalConnectSimpleExpression orItem) { + if (this.or == null) { + this.or = new ArrayList<>(); + } + this.or.add(orItem); + return this; + } + + /** + * Get or + * @return or + */ + @javax.annotation.Nullable + public List getOr() { + return or; + } + + public void setOr(@javax.annotation.Nullable List or) { + this.or = or; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the OpticalConnectOrFilter instance itself + */ + public OpticalConnectOrFilter putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OpticalConnectOrFilter opticalConnectOrFilter = (OpticalConnectOrFilter) o; + return Objects.equals(this.or, opticalConnectOrFilter.or)&& + Objects.equals(this.additionalProperties, opticalConnectOrFilter.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(or, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OpticalConnectOrFilter {\n"); + sb.append(" or: ").append(toIndentedString(or)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("or")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OpticalConnectOrFilter + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OpticalConnectOrFilter.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in OpticalConnectOrFilter is not found in the empty JSON string", OpticalConnectOrFilter.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("or") != null && !jsonObj.get("or").isJsonNull()) { + JsonArray jsonArrayor = jsonObj.getAsJsonArray("or"); + if (jsonArrayor != null) { + // ensure the json data is an array + if (!jsonObj.get("or").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `or` to be an array in the JSON string but got `%s`", jsonObj.get("or").toString())); + } + + // validate the optional field `or` (array) + for (int i = 0; i < jsonArrayor.size(); i++) { + OpticalConnectSimpleExpression.validateJsonElement(jsonArrayor.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OpticalConnectOrFilter.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OpticalConnectOrFilter' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OpticalConnectOrFilter.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OpticalConnectOrFilter value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public OpticalConnectOrFilter read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + OpticalConnectOrFilter instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OpticalConnectOrFilter given an JSON string + * + * @param jsonString JSON string + * @return An instance of OpticalConnectOrFilter + * @throws IOException if the JSON string is invalid with respect to OpticalConnectOrFilter + */ + public static OpticalConnectOrFilter fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OpticalConnectOrFilter.class); + } + + /** + * Convert an instance of OpticalConnectOrFilter to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ServiceProfileLastMileNotification.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OpticalConnectOrder.java similarity index 60% rename from services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ServiceProfileLastMileNotification.java rename to services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OpticalConnectOrder.java index ab9ca35e..4f62498e 100644 --- a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ServiceProfileLastMileNotification.java +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OpticalConnectOrder.java @@ -46,82 +46,82 @@ import com.equinix.sdk.fabricv4.JSON; /** - * Last-mile notification contact details. + * Ordering and billing reference details for this connection. */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") -public class ServiceProfileLastMileNotification { - public static final String SERIALIZED_NAME_DATA_TYPE = "dataType"; - @SerializedName(SERIALIZED_NAME_DATA_TYPE) +public class OpticalConnectOrder { + public static final String SERIALIZED_NAME_PURCHASE_ORDER_NUMBER = "purchaseOrderNumber"; + @SerializedName(SERIALIZED_NAME_PURCHASE_ORDER_NUMBER) @javax.annotation.Nullable - private String dataType; + private String purchaseOrderNumber; - public static final String SERIALIZED_NAME_LABEL = "label"; - @SerializedName(SERIALIZED_NAME_LABEL) + public static final String SERIALIZED_NAME_CUSTOMER_REFERENCE_ID = "customerReferenceId"; + @SerializedName(SERIALIZED_NAME_CUSTOMER_REFERENCE_ID) @javax.annotation.Nullable - private String label; + private String customerReferenceId; - public static final String SERIALIZED_NAME_REQUIRED = "required"; - @SerializedName(SERIALIZED_NAME_REQUIRED) + public static final String SERIALIZED_NAME_ORDER_NUMBER = "orderNumber"; + @SerializedName(SERIALIZED_NAME_ORDER_NUMBER) @javax.annotation.Nullable - private Boolean required; + private String orderNumber; - public ServiceProfileLastMileNotification() { + public OpticalConnectOrder() { } - public ServiceProfileLastMileNotification dataType(@javax.annotation.Nullable String dataType) { - this.dataType = dataType; + public OpticalConnectOrder purchaseOrderNumber(@javax.annotation.Nullable String purchaseOrderNumber) { + this.purchaseOrderNumber = purchaseOrderNumber; return this; } /** - * Expected format of the contact information, such as email or phone number. - * @return dataType + * Purchase order number reference. + * @return purchaseOrderNumber */ @javax.annotation.Nullable - public String getDataType() { - return dataType; + public String getPurchaseOrderNumber() { + return purchaseOrderNumber; } - public void setDataType(@javax.annotation.Nullable String dataType) { - this.dataType = dataType; + public void setPurchaseOrderNumber(@javax.annotation.Nullable String purchaseOrderNumber) { + this.purchaseOrderNumber = purchaseOrderNumber; } - public ServiceProfileLastMileNotification label(@javax.annotation.Nullable String label) { - this.label = label; + public OpticalConnectOrder customerReferenceId(@javax.annotation.Nullable String customerReferenceId) { + this.customerReferenceId = customerReferenceId; return this; } /** - * Type of contact information, such as ordering or technical support. - * @return label + * Your own reference for this connection. + * @return customerReferenceId */ @javax.annotation.Nullable - public String getLabel() { - return label; + public String getCustomerReferenceId() { + return customerReferenceId; } - public void setLabel(@javax.annotation.Nullable String label) { - this.label = label; + public void setCustomerReferenceId(@javax.annotation.Nullable String customerReferenceId) { + this.customerReferenceId = customerReferenceId; } - public ServiceProfileLastMileNotification required(@javax.annotation.Nullable Boolean required) { - this.required = required; + public OpticalConnectOrder orderNumber(@javax.annotation.Nullable String orderNumber) { + this.orderNumber = orderNumber; return this; } /** - * Whether this contact information is required for provisioning and ordering. - * @return required + * Equinix order reference number. + * @return orderNumber */ @javax.annotation.Nullable - public Boolean getRequired() { - return required; + public String getOrderNumber() { + return orderNumber; } - public void setRequired(@javax.annotation.Nullable Boolean required) { - this.required = required; + public void setOrderNumber(@javax.annotation.Nullable String orderNumber) { + this.orderNumber = orderNumber; } /** @@ -137,9 +137,9 @@ public void setRequired(@javax.annotation.Nullable Boolean required) { * * @param key name of the property * @param value value of the property - * @return the ServiceProfileLastMileNotification instance itself + * @return the OpticalConnectOrder instance itself */ - public ServiceProfileLastMileNotification putAdditionalProperty(String key, Object value) { + public OpticalConnectOrder putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -178,25 +178,25 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - ServiceProfileLastMileNotification serviceProfileLastMileNotification = (ServiceProfileLastMileNotification) o; - return Objects.equals(this.dataType, serviceProfileLastMileNotification.dataType) && - Objects.equals(this.label, serviceProfileLastMileNotification.label) && - Objects.equals(this.required, serviceProfileLastMileNotification.required)&& - Objects.equals(this.additionalProperties, serviceProfileLastMileNotification.additionalProperties); + OpticalConnectOrder opticalConnectOrder = (OpticalConnectOrder) o; + return Objects.equals(this.purchaseOrderNumber, opticalConnectOrder.purchaseOrderNumber) && + Objects.equals(this.customerReferenceId, opticalConnectOrder.customerReferenceId) && + Objects.equals(this.orderNumber, opticalConnectOrder.orderNumber)&& + Objects.equals(this.additionalProperties, opticalConnectOrder.additionalProperties); } @Override public int hashCode() { - return Objects.hash(dataType, label, required, additionalProperties); + return Objects.hash(purchaseOrderNumber, customerReferenceId, orderNumber, additionalProperties); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class ServiceProfileLastMileNotification {\n"); - sb.append(" dataType: ").append(toIndentedString(dataType)).append("\n"); - sb.append(" label: ").append(toIndentedString(label)).append("\n"); - sb.append(" required: ").append(toIndentedString(required)).append("\n"); + sb.append("class OpticalConnectOrder {\n"); + sb.append(" purchaseOrderNumber: ").append(toIndentedString(purchaseOrderNumber)).append("\n"); + sb.append(" customerReferenceId: ").append(toIndentedString(customerReferenceId)).append("\n"); + sb.append(" orderNumber: ").append(toIndentedString(orderNumber)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); @@ -219,7 +219,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("dataType", "label", "required")); + openapiFields = new HashSet(Arrays.asList("purchaseOrderNumber", "customerReferenceId", "orderNumber")); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(0); @@ -229,20 +229,23 @@ private String toIndentedString(Object o) { * Validates the JSON Element and throws an exception if issues found * * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ServiceProfileLastMileNotification + * @throws IOException if the JSON Element is invalid with respect to OpticalConnectOrder */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { - if (!ServiceProfileLastMileNotification.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in ServiceProfileLastMileNotification is not found in the empty JSON string", ServiceProfileLastMileNotification.openapiRequiredFields.toString())); + if (!OpticalConnectOrder.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in OpticalConnectOrder is not found in the empty JSON string", OpticalConnectOrder.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("dataType") != null && !jsonObj.get("dataType").isJsonNull()) && !jsonObj.get("dataType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `dataType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dataType").toString())); + if ((jsonObj.get("purchaseOrderNumber") != null && !jsonObj.get("purchaseOrderNumber").isJsonNull()) && !jsonObj.get("purchaseOrderNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `purchaseOrderNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("purchaseOrderNumber").toString())); } - if ((jsonObj.get("label") != null && !jsonObj.get("label").isJsonNull()) && !jsonObj.get("label").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `label` to be a primitive type in the JSON string but got `%s`", jsonObj.get("label").toString())); + if ((jsonObj.get("customerReferenceId") != null && !jsonObj.get("customerReferenceId").isJsonNull()) && !jsonObj.get("customerReferenceId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `customerReferenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("customerReferenceId").toString())); + } + if ((jsonObj.get("orderNumber") != null && !jsonObj.get("orderNumber").isJsonNull()) && !jsonObj.get("orderNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `orderNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("orderNumber").toString())); } } @@ -250,16 +253,16 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!ServiceProfileLastMileNotification.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ServiceProfileLastMileNotification' and its subtypes + if (!OpticalConnectOrder.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OpticalConnectOrder' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ServiceProfileLastMileNotification.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OpticalConnectOrder.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, ServiceProfileLastMileNotification value) throws IOException { + public void write(JsonWriter out, OpticalConnectOrder value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); // serialize additional properties @@ -287,12 +290,12 @@ else if (entry.getValue() instanceof Character) } @Override - public ServiceProfileLastMileNotification read(JsonReader in) throws IOException { + public OpticalConnectOrder read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); JsonObject jsonObj = jsonElement.getAsJsonObject(); // store additional fields in the deserialized instance - ServiceProfileLastMileNotification instance = thisAdapter.fromJsonTree(jsonObj); + OpticalConnectOrder instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { if (!openapiFields.contains(entry.getKey())) { if (entry.getValue().isJsonPrimitive()) { // primitive type @@ -319,18 +322,18 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } /** - * Create an instance of ServiceProfileLastMileNotification given an JSON string + * Create an instance of OpticalConnectOrder given an JSON string * * @param jsonString JSON string - * @return An instance of ServiceProfileLastMileNotification - * @throws IOException if the JSON string is invalid with respect to ServiceProfileLastMileNotification + * @return An instance of OpticalConnectOrder + * @throws IOException if the JSON string is invalid with respect to OpticalConnectOrder */ - public static ServiceProfileLastMileNotification fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ServiceProfileLastMileNotification.class); + public static OpticalConnectOrder fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OpticalConnectOrder.class); } /** - * Convert an instance of ServiceProfileLastMileNotification to an JSON string + * Convert an instance of OpticalConnectOrder to an JSON string * * @return JSON string */ diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OpticalConnectPatchPanelFields.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OpticalConnectPatchPanelFields.java new file mode 100644 index 00000000..10668074 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OpticalConnectPatchPanelFields.java @@ -0,0 +1,433 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * Patch Panel configuration. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class OpticalConnectPatchPanelFields { + public static final String SERIALIZED_NAME_PATCH_PANEL_ID = "patchPanelId"; + @SerializedName(SERIALIZED_NAME_PATCH_PANEL_ID) + @javax.annotation.Nullable + private String patchPanelId; + + public static final String SERIALIZED_NAME_PATCH_PANEL_PORT_A = "patchPanelPortA"; + @SerializedName(SERIALIZED_NAME_PATCH_PANEL_PORT_A) + @javax.annotation.Nullable + private String patchPanelPortA; + + public static final String SERIALIZED_NAME_PATCH_PANEL_PORT_B = "patchPanelPortB"; + @SerializedName(SERIALIZED_NAME_PATCH_PANEL_PORT_B) + @javax.annotation.Nullable + private String patchPanelPortB; + + /** + * Type of Connector + */ + @JsonAdapter(ConnectorTypeEnum.Adapter.class) + public enum ConnectorTypeEnum { + FC("FC"), + + SC("SC"), + + LC("LC"), + + ST("ST"); + + private String value; + + ConnectorTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static ConnectorTypeEnum fromValue(String value) { + for (ConnectorTypeEnum b : ConnectorTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final ConnectorTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public ConnectorTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return ConnectorTypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + ConnectorTypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_CONNECTOR_TYPE = "connectorType"; + @SerializedName(SERIALIZED_NAME_CONNECTOR_TYPE) + @javax.annotation.Nullable + private ConnectorTypeEnum connectorType; + + public OpticalConnectPatchPanelFields() { + } + + public OpticalConnectPatchPanelFields patchPanelId(@javax.annotation.Nullable String patchPanelId) { + this.patchPanelId = patchPanelId; + return this; + } + + /** + * Unique identifier of the patch panel. + * @return patchPanelId + */ + @javax.annotation.Nullable + public String getPatchPanelId() { + return patchPanelId; + } + + public void setPatchPanelId(@javax.annotation.Nullable String patchPanelId) { + this.patchPanelId = patchPanelId; + } + + + public OpticalConnectPatchPanelFields patchPanelPortA(@javax.annotation.Nullable String patchPanelPortA) { + this.patchPanelPortA = patchPanelPortA; + return this; + } + + /** + * Specify the desired port number for Port A. <br> When ports are not provided, next available ports will be used. + * @return patchPanelPortA + */ + @javax.annotation.Nullable + public String getPatchPanelPortA() { + return patchPanelPortA; + } + + public void setPatchPanelPortA(@javax.annotation.Nullable String patchPanelPortA) { + this.patchPanelPortA = patchPanelPortA; + } + + + public OpticalConnectPatchPanelFields patchPanelPortB(@javax.annotation.Nullable String patchPanelPortB) { + this.patchPanelPortB = patchPanelPortB; + return this; + } + + /** + * Specify the desired port number for Port B. <br> When ports are not provided, next available ports will be used. <br> Required for Connector type FC, SC and ST only. + * @return patchPanelPortB + */ + @javax.annotation.Nullable + public String getPatchPanelPortB() { + return patchPanelPortB; + } + + public void setPatchPanelPortB(@javax.annotation.Nullable String patchPanelPortB) { + this.patchPanelPortB = patchPanelPortB; + } + + + public OpticalConnectPatchPanelFields connectorType(@javax.annotation.Nullable ConnectorTypeEnum connectorType) { + this.connectorType = connectorType; + return this; + } + + /** + * Type of Connector + * @return connectorType + */ + @javax.annotation.Nullable + public ConnectorTypeEnum getConnectorType() { + return connectorType; + } + + public void setConnectorType(@javax.annotation.Nullable ConnectorTypeEnum connectorType) { + this.connectorType = connectorType; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the OpticalConnectPatchPanelFields instance itself + */ + public OpticalConnectPatchPanelFields putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OpticalConnectPatchPanelFields opticalConnectPatchPanelFields = (OpticalConnectPatchPanelFields) o; + return Objects.equals(this.patchPanelId, opticalConnectPatchPanelFields.patchPanelId) && + Objects.equals(this.patchPanelPortA, opticalConnectPatchPanelFields.patchPanelPortA) && + Objects.equals(this.patchPanelPortB, opticalConnectPatchPanelFields.patchPanelPortB) && + Objects.equals(this.connectorType, opticalConnectPatchPanelFields.connectorType)&& + Objects.equals(this.additionalProperties, opticalConnectPatchPanelFields.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(patchPanelId, patchPanelPortA, patchPanelPortB, connectorType, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OpticalConnectPatchPanelFields {\n"); + sb.append(" patchPanelId: ").append(toIndentedString(patchPanelId)).append("\n"); + sb.append(" patchPanelPortA: ").append(toIndentedString(patchPanelPortA)).append("\n"); + sb.append(" patchPanelPortB: ").append(toIndentedString(patchPanelPortB)).append("\n"); + sb.append(" connectorType: ").append(toIndentedString(connectorType)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("patchPanelId", "patchPanelPortA", "patchPanelPortB", "connectorType")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OpticalConnectPatchPanelFields + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OpticalConnectPatchPanelFields.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in OpticalConnectPatchPanelFields is not found in the empty JSON string", OpticalConnectPatchPanelFields.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("patchPanelId") != null && !jsonObj.get("patchPanelId").isJsonNull()) && !jsonObj.get("patchPanelId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `patchPanelId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("patchPanelId").toString())); + } + if ((jsonObj.get("patchPanelPortA") != null && !jsonObj.get("patchPanelPortA").isJsonNull()) && !jsonObj.get("patchPanelPortA").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `patchPanelPortA` to be a primitive type in the JSON string but got `%s`", jsonObj.get("patchPanelPortA").toString())); + } + if ((jsonObj.get("patchPanelPortB") != null && !jsonObj.get("patchPanelPortB").isJsonNull()) && !jsonObj.get("patchPanelPortB").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `patchPanelPortB` to be a primitive type in the JSON string but got `%s`", jsonObj.get("patchPanelPortB").toString())); + } + if ((jsonObj.get("connectorType") != null && !jsonObj.get("connectorType").isJsonNull()) && !jsonObj.get("connectorType").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `connectorType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("connectorType").toString())); + } + // validate the optional field `connectorType` + if (jsonObj.get("connectorType") != null && !jsonObj.get("connectorType").isJsonNull()) { + ConnectorTypeEnum.validateJsonElement(jsonObj.get("connectorType")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OpticalConnectPatchPanelFields.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OpticalConnectPatchPanelFields' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OpticalConnectPatchPanelFields.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OpticalConnectPatchPanelFields value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public OpticalConnectPatchPanelFields read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + OpticalConnectPatchPanelFields instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OpticalConnectPatchPanelFields given an JSON string + * + * @param jsonString JSON string + * @return An instance of OpticalConnectPatchPanelFields + * @throws IOException if the JSON string is invalid with respect to OpticalConnectPatchPanelFields + */ + public static OpticalConnectPatchPanelFields fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OpticalConnectPatchPanelFields.class); + } + + /** + * Convert an instance of OpticalConnectPatchPanelFields to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OpticalConnectPostRequest.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OpticalConnectPostRequest.java new file mode 100644 index 00000000..858c41a8 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OpticalConnectPostRequest.java @@ -0,0 +1,828 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.OpticalConnectASideRequest; +import com.equinix.sdk.fabricv4.model.OpticalConnectNotification; +import com.equinix.sdk.fabricv4.model.OpticalConnectOrder; +import com.equinix.sdk.fabricv4.model.OpticalConnectRedundancy; +import com.equinix.sdk.fabricv4.model.OpticalConnectZSideRequest; +import com.equinix.sdk.fabricv4.model.SimplifiedAccount; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * Request to order a single connection. The A-side is always a patch panel port in your own cage; the Z-side shape depends on connectionDestinationType. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class OpticalConnectPostRequest { + /** + * OC - Optical Connect Type + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + OC("OC"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nonnull + private TypeEnum type; + + public static final String SERIALIZED_NAME_BANDWIDTH = "bandwidth"; + @SerializedName(SERIALIZED_NAME_BANDWIDTH) + @javax.annotation.Nonnull + private Integer bandwidth; + + /** + * Where the Z-side terminates. <br> COLO - your own colocation space at another Equinix IBX. <br> BMMR - a Building Meet-Me Room. <br> REMOTE - another customer's colocation space at another Equinix IBX. <br> BMMR and REMOTE require a Letter of Authorization on the Z-side. + */ + @JsonAdapter(ConnectionDestinationTypeEnum.Adapter.class) + public enum ConnectionDestinationTypeEnum { + COLO("COLO"), + + BMMR("BMMR"), + + REMOTE("REMOTE"); + + private String value; + + ConnectionDestinationTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static ConnectionDestinationTypeEnum fromValue(String value) { + for (ConnectionDestinationTypeEnum b : ConnectionDestinationTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final ConnectionDestinationTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public ConnectionDestinationTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return ConnectionDestinationTypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + ConnectionDestinationTypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_CONNECTION_DESTINATION_TYPE = "connectionDestinationType"; + @SerializedName(SERIALIZED_NAME_CONNECTION_DESTINATION_TYPE) + @javax.annotation.Nonnull + private ConnectionDestinationTypeEnum connectionDestinationType; + + /** + * Level of resilience for the connection. <br> UNPROTECTED - a single fiber path with no node redundancy. <br> PROTECTED - two diverse fiber paths between single nodes at each IBX. <br> DUAL_DIVERSE - two diverse fiber paths terminating on redundant nodes at both IBXs. + */ + @JsonAdapter(PathTypeEnum.Adapter.class) + public enum PathTypeEnum { + DUAL_DIVERSE("DUAL_DIVERSE"), + + PROTECTED("PROTECTED"), + + UNPROTECTED("UNPROTECTED"); + + private String value; + + PathTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static PathTypeEnum fromValue(String value) { + for (PathTypeEnum b : PathTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final PathTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public PathTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return PathTypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + PathTypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_PATH_TYPE = "pathType"; + @SerializedName(SERIALIZED_NAME_PATH_TYPE) + @javax.annotation.Nonnull + private PathTypeEnum pathType; + + public static final String SERIALIZED_NAME_REDUNDANCY = "redundancy"; + @SerializedName(SERIALIZED_NAME_REDUNDANCY) + @javax.annotation.Nullable + private OpticalConnectRedundancy redundancy; + + public static final String SERIALIZED_NAME_A_SIDE = "aSide"; + @SerializedName(SERIALIZED_NAME_A_SIDE) + @javax.annotation.Nonnull + private OpticalConnectASideRequest aSide; + + public static final String SERIALIZED_NAME_Z_SIDE = "zSide"; + @SerializedName(SERIALIZED_NAME_Z_SIDE) + @javax.annotation.Nonnull + private OpticalConnectZSideRequest zSide; + + public static final String SERIALIZED_NAME_ORDER = "order"; + @SerializedName(SERIALIZED_NAME_ORDER) + @javax.annotation.Nullable + private OpticalConnectOrder order; + + public static final String SERIALIZED_NAME_ACCOUNT = "account"; + @SerializedName(SERIALIZED_NAME_ACCOUNT) + @javax.annotation.Nullable + private SimplifiedAccount account; + + public static final String SERIALIZED_NAME_NOTIFICATIONS = "notifications"; + @SerializedName(SERIALIZED_NAME_NOTIFICATIONS) + @javax.annotation.Nullable + private List notifications = new ArrayList<>(); + + /** + * BMMR infrastructure ownership type. <br> EQUINIX - Equinix-operated. <br> SELF - customer-operated. <br> Required only when connectionDestinationType is BMMR. + */ + @JsonAdapter(BmmrTypeEnum.Adapter.class) + public enum BmmrTypeEnum { + EQUINIX("EQUINIX"), + + SELF("SELF"); + + private String value; + + BmmrTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static BmmrTypeEnum fromValue(String value) { + for (BmmrTypeEnum b : BmmrTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final BmmrTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public BmmrTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return BmmrTypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + BmmrTypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_BMMR_TYPE = "bmmrType"; + @SerializedName(SERIALIZED_NAME_BMMR_TYPE) + @javax.annotation.Nullable + private BmmrTypeEnum bmmrType; + + public OpticalConnectPostRequest() { + } + + public OpticalConnectPostRequest type(@javax.annotation.Nonnull TypeEnum type) { + this.type = type; + return this; + } + + /** + * OC - Optical Connect Type + * @return type + */ + @javax.annotation.Nonnull + public TypeEnum getType() { + return type; + } + + public void setType(@javax.annotation.Nonnull TypeEnum type) { + this.type = type; + } + + + public OpticalConnectPostRequest bandwidth(@javax.annotation.Nonnull Integer bandwidth) { + this.bandwidth = bandwidth; + return this; + } + + /** + * Connection bandwidth Mbps. <br> Available bandwidths depend on the IBX pair. <br> 1000 - 1 Gbps. <br> 10000 - 10 Gbps. <br> 100000 - 100 Gbps. <br> + * @return bandwidth + */ + @javax.annotation.Nonnull + public Integer getBandwidth() { + return bandwidth; + } + + public void setBandwidth(@javax.annotation.Nonnull Integer bandwidth) { + this.bandwidth = bandwidth; + } + + + public OpticalConnectPostRequest connectionDestinationType(@javax.annotation.Nonnull ConnectionDestinationTypeEnum connectionDestinationType) { + this.connectionDestinationType = connectionDestinationType; + return this; + } + + /** + * Where the Z-side terminates. <br> COLO - your own colocation space at another Equinix IBX. <br> BMMR - a Building Meet-Me Room. <br> REMOTE - another customer's colocation space at another Equinix IBX. <br> BMMR and REMOTE require a Letter of Authorization on the Z-side. + * @return connectionDestinationType + */ + @javax.annotation.Nonnull + public ConnectionDestinationTypeEnum getConnectionDestinationType() { + return connectionDestinationType; + } + + public void setConnectionDestinationType(@javax.annotation.Nonnull ConnectionDestinationTypeEnum connectionDestinationType) { + this.connectionDestinationType = connectionDestinationType; + } + + + public OpticalConnectPostRequest pathType(@javax.annotation.Nonnull PathTypeEnum pathType) { + this.pathType = pathType; + return this; + } + + /** + * Level of resilience for the connection. <br> UNPROTECTED - a single fiber path with no node redundancy. <br> PROTECTED - two diverse fiber paths between single nodes at each IBX. <br> DUAL_DIVERSE - two diverse fiber paths terminating on redundant nodes at both IBXs. + * @return pathType + */ + @javax.annotation.Nonnull + public PathTypeEnum getPathType() { + return pathType; + } + + public void setPathType(@javax.annotation.Nonnull PathTypeEnum pathType) { + this.pathType = pathType; + } + + + public OpticalConnectPostRequest redundancy(@javax.annotation.Nullable OpticalConnectRedundancy redundancy) { + this.redundancy = redundancy; + return this; + } + + /** + * Get redundancy + * @return redundancy + */ + @javax.annotation.Nullable + public OpticalConnectRedundancy getRedundancy() { + return redundancy; + } + + public void setRedundancy(@javax.annotation.Nullable OpticalConnectRedundancy redundancy) { + this.redundancy = redundancy; + } + + + public OpticalConnectPostRequest aSide(@javax.annotation.Nonnull OpticalConnectASideRequest aSide) { + this.aSide = aSide; + return this; + } + + /** + * Get aSide + * @return aSide + */ + @javax.annotation.Nonnull + public OpticalConnectASideRequest getaSide() { + return aSide; + } + + public void setaSide(@javax.annotation.Nonnull OpticalConnectASideRequest aSide) { + this.aSide = aSide; + } + + + public OpticalConnectPostRequest zSide(@javax.annotation.Nonnull OpticalConnectZSideRequest zSide) { + this.zSide = zSide; + return this; + } + + /** + * Get zSide + * @return zSide + */ + @javax.annotation.Nonnull + public OpticalConnectZSideRequest getzSide() { + return zSide; + } + + public void setzSide(@javax.annotation.Nonnull OpticalConnectZSideRequest zSide) { + this.zSide = zSide; + } + + + public OpticalConnectPostRequest order(@javax.annotation.Nullable OpticalConnectOrder order) { + this.order = order; + return this; + } + + /** + * Get order + * @return order + */ + @javax.annotation.Nullable + public OpticalConnectOrder getOrder() { + return order; + } + + public void setOrder(@javax.annotation.Nullable OpticalConnectOrder order) { + this.order = order; + } + + + public OpticalConnectPostRequest account(@javax.annotation.Nullable SimplifiedAccount account) { + this.account = account; + return this; + } + + /** + * Get account + * @return account + */ + @javax.annotation.Nullable + public SimplifiedAccount getAccount() { + return account; + } + + public void setAccount(@javax.annotation.Nullable SimplifiedAccount account) { + this.account = account; + } + + + public OpticalConnectPostRequest notifications(@javax.annotation.Nullable List notifications) { + this.notifications = notifications; + return this; + } + + public OpticalConnectPostRequest addNotificationsItem(OpticalConnectNotification notificationsItem) { + if (this.notifications == null) { + this.notifications = new ArrayList<>(); + } + this.notifications.add(notificationsItem); + return this; + } + + /** + * Contacts to notify about connection configuration and status changes + * @return notifications + */ + @javax.annotation.Nullable + public List getNotifications() { + return notifications; + } + + public void setNotifications(@javax.annotation.Nullable List notifications) { + this.notifications = notifications; + } + + + public OpticalConnectPostRequest bmmrType(@javax.annotation.Nullable BmmrTypeEnum bmmrType) { + this.bmmrType = bmmrType; + return this; + } + + /** + * BMMR infrastructure ownership type. <br> EQUINIX - Equinix-operated. <br> SELF - customer-operated. <br> Required only when connectionDestinationType is BMMR. + * @return bmmrType + */ + @javax.annotation.Nullable + public BmmrTypeEnum getBmmrType() { + return bmmrType; + } + + public void setBmmrType(@javax.annotation.Nullable BmmrTypeEnum bmmrType) { + this.bmmrType = bmmrType; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the OpticalConnectPostRequest instance itself + */ + public OpticalConnectPostRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OpticalConnectPostRequest opticalConnectPostRequest = (OpticalConnectPostRequest) o; + return Objects.equals(this.type, opticalConnectPostRequest.type) && + Objects.equals(this.bandwidth, opticalConnectPostRequest.bandwidth) && + Objects.equals(this.connectionDestinationType, opticalConnectPostRequest.connectionDestinationType) && + Objects.equals(this.pathType, opticalConnectPostRequest.pathType) && + Objects.equals(this.redundancy, opticalConnectPostRequest.redundancy) && + Objects.equals(this.aSide, opticalConnectPostRequest.aSide) && + Objects.equals(this.zSide, opticalConnectPostRequest.zSide) && + Objects.equals(this.order, opticalConnectPostRequest.order) && + Objects.equals(this.account, opticalConnectPostRequest.account) && + Objects.equals(this.notifications, opticalConnectPostRequest.notifications) && + Objects.equals(this.bmmrType, opticalConnectPostRequest.bmmrType)&& + Objects.equals(this.additionalProperties, opticalConnectPostRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(type, bandwidth, connectionDestinationType, pathType, redundancy, aSide, zSide, order, account, notifications, bmmrType, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OpticalConnectPostRequest {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" bandwidth: ").append(toIndentedString(bandwidth)).append("\n"); + sb.append(" connectionDestinationType: ").append(toIndentedString(connectionDestinationType)).append("\n"); + sb.append(" pathType: ").append(toIndentedString(pathType)).append("\n"); + sb.append(" redundancy: ").append(toIndentedString(redundancy)).append("\n"); + sb.append(" aSide: ").append(toIndentedString(aSide)).append("\n"); + sb.append(" zSide: ").append(toIndentedString(zSide)).append("\n"); + sb.append(" order: ").append(toIndentedString(order)).append("\n"); + sb.append(" account: ").append(toIndentedString(account)).append("\n"); + sb.append(" notifications: ").append(toIndentedString(notifications)).append("\n"); + sb.append(" bmmrType: ").append(toIndentedString(bmmrType)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("type", "bandwidth", "connectionDestinationType", "pathType", "redundancy", "aSide", "zSide", "order", "account", "notifications", "bmmrType")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("type", "bandwidth", "connectionDestinationType", "pathType", "aSide", "zSide")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OpticalConnectPostRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OpticalConnectPostRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in OpticalConnectPostRequest is not found in the empty JSON string", OpticalConnectPostRequest.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : OpticalConnectPostRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // validate the required field `type` + TypeEnum.validateJsonElement(jsonObj.get("type")); + if (!jsonObj.get("connectionDestinationType").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `connectionDestinationType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("connectionDestinationType").toString())); + } + // validate the required field `connectionDestinationType` + ConnectionDestinationTypeEnum.validateJsonElement(jsonObj.get("connectionDestinationType")); + if (!jsonObj.get("pathType").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `pathType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("pathType").toString())); + } + // validate the required field `pathType` + PathTypeEnum.validateJsonElement(jsonObj.get("pathType")); + // validate the optional field `redundancy` + if (jsonObj.get("redundancy") != null && !jsonObj.get("redundancy").isJsonNull()) { + OpticalConnectRedundancy.validateJsonElement(jsonObj.get("redundancy")); + } + // validate the required field `aSide` + OpticalConnectASideRequest.validateJsonElement(jsonObj.get("aSide")); + // validate the required field `zSide` + OpticalConnectZSideRequest.validateJsonElement(jsonObj.get("zSide")); + // validate the optional field `order` + if (jsonObj.get("order") != null && !jsonObj.get("order").isJsonNull()) { + OpticalConnectOrder.validateJsonElement(jsonObj.get("order")); + } + // validate the optional field `account` + if (jsonObj.get("account") != null && !jsonObj.get("account").isJsonNull()) { + SimplifiedAccount.validateJsonElement(jsonObj.get("account")); + } + if (jsonObj.get("notifications") != null && !jsonObj.get("notifications").isJsonNull()) { + JsonArray jsonArraynotifications = jsonObj.getAsJsonArray("notifications"); + if (jsonArraynotifications != null) { + // ensure the json data is an array + if (!jsonObj.get("notifications").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `notifications` to be an array in the JSON string but got `%s`", jsonObj.get("notifications").toString())); + } + + // validate the optional field `notifications` (array) + for (int i = 0; i < jsonArraynotifications.size(); i++) { + OpticalConnectNotification.validateJsonElement(jsonArraynotifications.get(i)); + }; + } + } + if ((jsonObj.get("bmmrType") != null && !jsonObj.get("bmmrType").isJsonNull()) && !jsonObj.get("bmmrType").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `bmmrType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("bmmrType").toString())); + } + // validate the optional field `bmmrType` + if (jsonObj.get("bmmrType") != null && !jsonObj.get("bmmrType").isJsonNull()) { + BmmrTypeEnum.validateJsonElement(jsonObj.get("bmmrType")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OpticalConnectPostRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OpticalConnectPostRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OpticalConnectPostRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OpticalConnectPostRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public OpticalConnectPostRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + OpticalConnectPostRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OpticalConnectPostRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of OpticalConnectPostRequest + * @throws IOException if the JSON string is invalid with respect to OpticalConnectPostRequest + */ + public static OpticalConnectPostRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OpticalConnectPostRequest.class); + } + + /** + * Convert an instance of OpticalConnectPostRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OpticalConnectPrice.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OpticalConnectPrice.java new file mode 100644 index 00000000..f026bdb6 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OpticalConnectPrice.java @@ -0,0 +1,437 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.OpticalConnectConnectionDestinationType; +import com.equinix.sdk.fabricv4.model.OpticalConnectPriceASide; +import com.equinix.sdk.fabricv4.model.OpticalConnectPricePathType; +import com.equinix.sdk.fabricv4.model.OpticalConnectPriceZSide; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * Optical Metro Connect Port Product configuration + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class OpticalConnectPrice { + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nullable + private String type; + + public static final String SERIALIZED_NAME_BANDWIDTH = "bandwidth"; + @SerializedName(SERIALIZED_NAME_BANDWIDTH) + @javax.annotation.Nullable + private Integer bandwidth; + + public static final String SERIALIZED_NAME_PATH_TYPE = "pathType"; + @SerializedName(SERIALIZED_NAME_PATH_TYPE) + @javax.annotation.Nullable + private OpticalConnectPricePathType pathType; + + public static final String SERIALIZED_NAME_CONNECTION_DESTINATION_TYPE = "connectionDestinationType"; + @SerializedName(SERIALIZED_NAME_CONNECTION_DESTINATION_TYPE) + @javax.annotation.Nullable + private OpticalConnectConnectionDestinationType connectionDestinationType; + + public static final String SERIALIZED_NAME_A_SIDE = "aSide"; + @SerializedName(SERIALIZED_NAME_A_SIDE) + @javax.annotation.Nullable + private OpticalConnectPriceASide aSide; + + public static final String SERIALIZED_NAME_Z_SIDE = "zSide"; + @SerializedName(SERIALIZED_NAME_Z_SIDE) + @javax.annotation.Nullable + private OpticalConnectPriceZSide zSide; + + public OpticalConnectPrice() { + } + + public OpticalConnectPrice type(@javax.annotation.Nullable String type) { + this.type = type; + return this; + } + + /** + * Optical Connect type. + * @return type + */ + @javax.annotation.Nullable + public String getType() { + return type; + } + + public void setType(@javax.annotation.Nullable String type) { + this.type = type; + } + + + public OpticalConnectPrice bandwidth(@javax.annotation.Nullable Integer bandwidth) { + this.bandwidth = bandwidth; + return this; + } + + /** + * Bandwidth in Mbps + * minimum: 0 + * @return bandwidth + */ + @javax.annotation.Nullable + public Integer getBandwidth() { + return bandwidth; + } + + public void setBandwidth(@javax.annotation.Nullable Integer bandwidth) { + this.bandwidth = bandwidth; + } + + + public OpticalConnectPrice pathType(@javax.annotation.Nullable OpticalConnectPricePathType pathType) { + this.pathType = pathType; + return this; + } + + /** + * Get pathType + * @return pathType + */ + @javax.annotation.Nullable + public OpticalConnectPricePathType getPathType() { + return pathType; + } + + public void setPathType(@javax.annotation.Nullable OpticalConnectPricePathType pathType) { + this.pathType = pathType; + } + + + public OpticalConnectPrice connectionDestinationType(@javax.annotation.Nullable OpticalConnectConnectionDestinationType connectionDestinationType) { + this.connectionDestinationType = connectionDestinationType; + return this; + } + + /** + * Get connectionDestinationType + * @return connectionDestinationType + */ + @javax.annotation.Nullable + public OpticalConnectConnectionDestinationType getConnectionDestinationType() { + return connectionDestinationType; + } + + public void setConnectionDestinationType(@javax.annotation.Nullable OpticalConnectConnectionDestinationType connectionDestinationType) { + this.connectionDestinationType = connectionDestinationType; + } + + + public OpticalConnectPrice aSide(@javax.annotation.Nullable OpticalConnectPriceASide aSide) { + this.aSide = aSide; + return this; + } + + /** + * Get aSide + * @return aSide + */ + @javax.annotation.Nullable + public OpticalConnectPriceASide getaSide() { + return aSide; + } + + public void setaSide(@javax.annotation.Nullable OpticalConnectPriceASide aSide) { + this.aSide = aSide; + } + + + public OpticalConnectPrice zSide(@javax.annotation.Nullable OpticalConnectPriceZSide zSide) { + this.zSide = zSide; + return this; + } + + /** + * Get zSide + * @return zSide + */ + @javax.annotation.Nullable + public OpticalConnectPriceZSide getzSide() { + return zSide; + } + + public void setzSide(@javax.annotation.Nullable OpticalConnectPriceZSide zSide) { + this.zSide = zSide; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the OpticalConnectPrice instance itself + */ + public OpticalConnectPrice putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OpticalConnectPrice opticalConnectPrice = (OpticalConnectPrice) o; + return Objects.equals(this.type, opticalConnectPrice.type) && + Objects.equals(this.bandwidth, opticalConnectPrice.bandwidth) && + Objects.equals(this.pathType, opticalConnectPrice.pathType) && + Objects.equals(this.connectionDestinationType, opticalConnectPrice.connectionDestinationType) && + Objects.equals(this.aSide, opticalConnectPrice.aSide) && + Objects.equals(this.zSide, opticalConnectPrice.zSide)&& + Objects.equals(this.additionalProperties, opticalConnectPrice.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(type, bandwidth, pathType, connectionDestinationType, aSide, zSide, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OpticalConnectPrice {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" bandwidth: ").append(toIndentedString(bandwidth)).append("\n"); + sb.append(" pathType: ").append(toIndentedString(pathType)).append("\n"); + sb.append(" connectionDestinationType: ").append(toIndentedString(connectionDestinationType)).append("\n"); + sb.append(" aSide: ").append(toIndentedString(aSide)).append("\n"); + sb.append(" zSide: ").append(toIndentedString(zSide)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("type", "bandwidth", "pathType", "connectionDestinationType", "aSide", "zSide")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OpticalConnectPrice + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OpticalConnectPrice.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in OpticalConnectPrice is not found in the empty JSON string", OpticalConnectPrice.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // validate the optional field `pathType` + if (jsonObj.get("pathType") != null && !jsonObj.get("pathType").isJsonNull()) { + OpticalConnectPricePathType.validateJsonElement(jsonObj.get("pathType")); + } + // validate the optional field `connectionDestinationType` + if (jsonObj.get("connectionDestinationType") != null && !jsonObj.get("connectionDestinationType").isJsonNull()) { + OpticalConnectConnectionDestinationType.validateJsonElement(jsonObj.get("connectionDestinationType")); + } + // validate the optional field `aSide` + if (jsonObj.get("aSide") != null && !jsonObj.get("aSide").isJsonNull()) { + OpticalConnectPriceASide.validateJsonElement(jsonObj.get("aSide")); + } + // validate the optional field `zSide` + if (jsonObj.get("zSide") != null && !jsonObj.get("zSide").isJsonNull()) { + OpticalConnectPriceZSide.validateJsonElement(jsonObj.get("zSide")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OpticalConnectPrice.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OpticalConnectPrice' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OpticalConnectPrice.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OpticalConnectPrice value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public OpticalConnectPrice read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + OpticalConnectPrice instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OpticalConnectPrice given an JSON string + * + * @param jsonString JSON string + * @return An instance of OpticalConnectPrice + * @throws IOException if the JSON string is invalid with respect to OpticalConnectPrice + */ + public static OpticalConnectPrice fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OpticalConnectPrice.class); + } + + /** + * Convert an instance of OpticalConnectPrice to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OpticalConnectPriceASide.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OpticalConnectPriceASide.java new file mode 100644 index 00000000..5a2c44df --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OpticalConnectPriceASide.java @@ -0,0 +1,288 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.OpticalConnectPriceLocation; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * Optical Connection ASide configuration + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class OpticalConnectPriceASide { + public static final String SERIALIZED_NAME_LOCATION = "location"; + @SerializedName(SERIALIZED_NAME_LOCATION) + @javax.annotation.Nullable + private OpticalConnectPriceLocation location; + + public OpticalConnectPriceASide() { + } + + public OpticalConnectPriceASide location(@javax.annotation.Nullable OpticalConnectPriceLocation location) { + this.location = location; + return this; + } + + /** + * Get location + * @return location + */ + @javax.annotation.Nullable + public OpticalConnectPriceLocation getLocation() { + return location; + } + + public void setLocation(@javax.annotation.Nullable OpticalConnectPriceLocation location) { + this.location = location; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the OpticalConnectPriceASide instance itself + */ + public OpticalConnectPriceASide putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OpticalConnectPriceASide opticalConnectPriceASide = (OpticalConnectPriceASide) o; + return Objects.equals(this.location, opticalConnectPriceASide.location)&& + Objects.equals(this.additionalProperties, opticalConnectPriceASide.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(location, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OpticalConnectPriceASide {\n"); + sb.append(" location: ").append(toIndentedString(location)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("location")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OpticalConnectPriceASide + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OpticalConnectPriceASide.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in OpticalConnectPriceASide is not found in the empty JSON string", OpticalConnectPriceASide.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `location` + if (jsonObj.get("location") != null && !jsonObj.get("location").isJsonNull()) { + OpticalConnectPriceLocation.validateJsonElement(jsonObj.get("location")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OpticalConnectPriceASide.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OpticalConnectPriceASide' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OpticalConnectPriceASide.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OpticalConnectPriceASide value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public OpticalConnectPriceASide read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + OpticalConnectPriceASide instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OpticalConnectPriceASide given an JSON string + * + * @param jsonString JSON string + * @return An instance of OpticalConnectPriceASide + * @throws IOException if the JSON string is invalid with respect to OpticalConnectPriceASide + */ + public static OpticalConnectPriceASide fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OpticalConnectPriceASide.class); + } + + /** + * Convert an instance of OpticalConnectPriceASide to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OpticalConnectPriceLocation.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OpticalConnectPriceLocation.java new file mode 100644 index 00000000..390bdc9a --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OpticalConnectPriceLocation.java @@ -0,0 +1,286 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * Optical Connect Location + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class OpticalConnectPriceLocation { + public static final String SERIALIZED_NAME_IBX_CODE = "ibxCode"; + @SerializedName(SERIALIZED_NAME_IBX_CODE) + @javax.annotation.Nullable + private String ibxCode; + + public OpticalConnectPriceLocation() { + } + + public OpticalConnectPriceLocation ibxCode(@javax.annotation.Nullable String ibxCode) { + this.ibxCode = ibxCode; + return this; + } + + /** + * IBX identifier + * @return ibxCode + */ + @javax.annotation.Nullable + public String getIbxCode() { + return ibxCode; + } + + public void setIbxCode(@javax.annotation.Nullable String ibxCode) { + this.ibxCode = ibxCode; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the OpticalConnectPriceLocation instance itself + */ + public OpticalConnectPriceLocation putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OpticalConnectPriceLocation opticalConnectPriceLocation = (OpticalConnectPriceLocation) o; + return Objects.equals(this.ibxCode, opticalConnectPriceLocation.ibxCode)&& + Objects.equals(this.additionalProperties, opticalConnectPriceLocation.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(ibxCode, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OpticalConnectPriceLocation {\n"); + sb.append(" ibxCode: ").append(toIndentedString(ibxCode)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("ibxCode")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OpticalConnectPriceLocation + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OpticalConnectPriceLocation.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in OpticalConnectPriceLocation is not found in the empty JSON string", OpticalConnectPriceLocation.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("ibxCode") != null && !jsonObj.get("ibxCode").isJsonNull()) && !jsonObj.get("ibxCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `ibxCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ibxCode").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OpticalConnectPriceLocation.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OpticalConnectPriceLocation' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OpticalConnectPriceLocation.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OpticalConnectPriceLocation value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public OpticalConnectPriceLocation read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + OpticalConnectPriceLocation instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OpticalConnectPriceLocation given an JSON string + * + * @param jsonString JSON string + * @return An instance of OpticalConnectPriceLocation + * @throws IOException if the JSON string is invalid with respect to OpticalConnectPriceLocation + */ + public static OpticalConnectPriceLocation fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OpticalConnectPriceLocation.class); + } + + /** + * Convert an instance of OpticalConnectPriceLocation to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OpticalConnectPricePathType.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OpticalConnectPricePathType.java new file mode 100644 index 00000000..a650ad8e --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OpticalConnectPricePathType.java @@ -0,0 +1,80 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.google.gson.annotations.SerializedName; + +import java.io.IOException; +import java.util.Locale; +import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; + +/** + * Optical Connect Port Path type. + */ +@JsonAdapter(OpticalConnectPricePathType.Adapter.class) +public enum OpticalConnectPricePathType { + + PROTECTED("PROTECTED"), + + UNPROTECTED("UNPROTECTED"), + + DUAL_DIVERSE("DUAL_DIVERSE"); + + private String value; + + OpticalConnectPricePathType(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static OpticalConnectPricePathType fromValue(String value) { + for (OpticalConnectPricePathType b : OpticalConnectPricePathType.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final OpticalConnectPricePathType enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public OpticalConnectPricePathType read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return OpticalConnectPricePathType.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + OpticalConnectPricePathType.fromValue(value); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OpticalConnectPriceZSide.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OpticalConnectPriceZSide.java new file mode 100644 index 00000000..3cd6bd25 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OpticalConnectPriceZSide.java @@ -0,0 +1,288 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.OpticalConnectPriceLocation; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * Optical Connection ZSide configuration + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class OpticalConnectPriceZSide { + public static final String SERIALIZED_NAME_LOCATION = "location"; + @SerializedName(SERIALIZED_NAME_LOCATION) + @javax.annotation.Nullable + private OpticalConnectPriceLocation location; + + public OpticalConnectPriceZSide() { + } + + public OpticalConnectPriceZSide location(@javax.annotation.Nullable OpticalConnectPriceLocation location) { + this.location = location; + return this; + } + + /** + * Get location + * @return location + */ + @javax.annotation.Nullable + public OpticalConnectPriceLocation getLocation() { + return location; + } + + public void setLocation(@javax.annotation.Nullable OpticalConnectPriceLocation location) { + this.location = location; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the OpticalConnectPriceZSide instance itself + */ + public OpticalConnectPriceZSide putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OpticalConnectPriceZSide opticalConnectPriceZSide = (OpticalConnectPriceZSide) o; + return Objects.equals(this.location, opticalConnectPriceZSide.location)&& + Objects.equals(this.additionalProperties, opticalConnectPriceZSide.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(location, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OpticalConnectPriceZSide {\n"); + sb.append(" location: ").append(toIndentedString(location)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("location")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OpticalConnectPriceZSide + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OpticalConnectPriceZSide.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in OpticalConnectPriceZSide is not found in the empty JSON string", OpticalConnectPriceZSide.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `location` + if (jsonObj.get("location") != null && !jsonObj.get("location").isJsonNull()) { + OpticalConnectPriceLocation.validateJsonElement(jsonObj.get("location")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OpticalConnectPriceZSide.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OpticalConnectPriceZSide' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OpticalConnectPriceZSide.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OpticalConnectPriceZSide value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public OpticalConnectPriceZSide read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + OpticalConnectPriceZSide instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OpticalConnectPriceZSide given an JSON string + * + * @param jsonString JSON string + * @return An instance of OpticalConnectPriceZSide + * @throws IOException if the JSON string is invalid with respect to OpticalConnectPriceZSide + */ + public static OpticalConnectPriceZSide fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OpticalConnectPriceZSide.class); + } + + /** + * Convert an instance of OpticalConnectPriceZSide to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OpticalConnectRedundancy.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OpticalConnectRedundancy.java new file mode 100644 index 00000000..f8a1745a --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OpticalConnectRedundancy.java @@ -0,0 +1,372 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import java.util.UUID; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * Optical Connect redundancy configuration. <br> Required only for DUAL_DIVERSE connection. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class OpticalConnectRedundancy { + /** + * Role within the diverse pair. <br> PRIMARY - first connection of the pair. <br> SECONDARY - the diverse connection on a separate path. + */ + @JsonAdapter(PriorityEnum.Adapter.class) + public enum PriorityEnum { + PRIMARY("PRIMARY"), + + SECONDARY("SECONDARY"); + + private String value; + + PriorityEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static PriorityEnum fromValue(String value) { + for (PriorityEnum b : PriorityEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final PriorityEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public PriorityEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return PriorityEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + PriorityEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_PRIORITY = "priority"; + @SerializedName(SERIALIZED_NAME_PRIORITY) + @javax.annotation.Nullable + private PriorityEnum priority; + + public static final String SERIALIZED_NAME_GROUP = "group"; + @SerializedName(SERIALIZED_NAME_GROUP) + @javax.annotation.Nullable + private UUID group; + + public OpticalConnectRedundancy() { + } + + public OpticalConnectRedundancy priority(@javax.annotation.Nullable PriorityEnum priority) { + this.priority = priority; + return this; + } + + /** + * Role within the diverse pair. <br> PRIMARY - first connection of the pair. <br> SECONDARY - the diverse connection on a separate path. + * @return priority + */ + @javax.annotation.Nullable + public PriorityEnum getPriority() { + return priority; + } + + public void setPriority(@javax.annotation.Nullable PriorityEnum priority) { + this.priority = priority; + } + + + public OpticalConnectRedundancy group(@javax.annotation.Nullable UUID group) { + this.group = group; + return this; + } + + /** + * Redundancy group identifier + * @return group + */ + @javax.annotation.Nullable + public UUID getGroup() { + return group; + } + + public void setGroup(@javax.annotation.Nullable UUID group) { + this.group = group; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the OpticalConnectRedundancy instance itself + */ + public OpticalConnectRedundancy putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OpticalConnectRedundancy opticalConnectRedundancy = (OpticalConnectRedundancy) o; + return Objects.equals(this.priority, opticalConnectRedundancy.priority) && + Objects.equals(this.group, opticalConnectRedundancy.group)&& + Objects.equals(this.additionalProperties, opticalConnectRedundancy.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(priority, group, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OpticalConnectRedundancy {\n"); + sb.append(" priority: ").append(toIndentedString(priority)).append("\n"); + sb.append(" group: ").append(toIndentedString(group)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("priority", "group")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OpticalConnectRedundancy + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OpticalConnectRedundancy.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in OpticalConnectRedundancy is not found in the empty JSON string", OpticalConnectRedundancy.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("priority") != null && !jsonObj.get("priority").isJsonNull()) && !jsonObj.get("priority").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `priority` to be a primitive type in the JSON string but got `%s`", jsonObj.get("priority").toString())); + } + // validate the optional field `priority` + if (jsonObj.get("priority") != null && !jsonObj.get("priority").isJsonNull()) { + PriorityEnum.validateJsonElement(jsonObj.get("priority")); + } + if ((jsonObj.get("group") != null && !jsonObj.get("group").isJsonNull()) && !jsonObj.get("group").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `group` to be a primitive type in the JSON string but got `%s`", jsonObj.get("group").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OpticalConnectRedundancy.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OpticalConnectRedundancy' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OpticalConnectRedundancy.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OpticalConnectRedundancy value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public OpticalConnectRedundancy read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + OpticalConnectRedundancy instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OpticalConnectRedundancy given an JSON string + * + * @param jsonString JSON string + * @return An instance of OpticalConnectRedundancy + * @throws IOException if the JSON string is invalid with respect to OpticalConnectRedundancy + */ + public static OpticalConnectRedundancy fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OpticalConnectRedundancy.class); + } + + /** + * Convert an instance of OpticalConnectRedundancy to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OpticalConnectResponse.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OpticalConnectResponse.java new file mode 100644 index 00000000..208e3093 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OpticalConnectResponse.java @@ -0,0 +1,969 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.Changelog; +import com.equinix.sdk.fabricv4.model.OpticalConnectASideResponse; +import com.equinix.sdk.fabricv4.model.OpticalConnectNotification; +import com.equinix.sdk.fabricv4.model.OpticalConnectOrder; +import com.equinix.sdk.fabricv4.model.OpticalConnectRedundancy; +import com.equinix.sdk.fabricv4.model.OpticalConnectState; +import com.equinix.sdk.fabricv4.model.OpticalConnectZSideResponse; +import com.equinix.sdk.fabricv4.model.SimplifiedAccount; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.net.URI; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * Optical Metro Connect connection with its current state and the resolved physical termination points at both ends. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class OpticalConnectResponse { + public static final String SERIALIZED_NAME_HREF = "href"; + @SerializedName(SERIALIZED_NAME_HREF) + @javax.annotation.Nullable + private URI href; + + public static final String SERIALIZED_NAME_UUID = "uuid"; + @SerializedName(SERIALIZED_NAME_UUID) + @javax.annotation.Nullable + private UUID uuid; + + /** + * Connection Type. <br> OC - Optical Connect. + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + OC("OC"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nullable + private TypeEnum type; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable + private String name; + + public static final String SERIALIZED_NAME_STATE = "state"; + @SerializedName(SERIALIZED_NAME_STATE) + @javax.annotation.Nullable + private OpticalConnectState state; + + public static final String SERIALIZED_NAME_BANDWIDTH = "bandwidth"; + @SerializedName(SERIALIZED_NAME_BANDWIDTH) + @javax.annotation.Nullable + private Integer bandwidth; + + /** + * Where the Z-side terminates. <br> COLO - your own colocation space at another Equinix IBX. <br> BMMR - a Building Meet-Me Room. <br> REMOTE - another customer's colocation space at another Equinix IBX. <br> + */ + @JsonAdapter(ConnectionDestinationTypeEnum.Adapter.class) + public enum ConnectionDestinationTypeEnum { + COLO("COLO"), + + BMMR("BMMR"), + + REMOTE("REMOTE"); + + private String value; + + ConnectionDestinationTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static ConnectionDestinationTypeEnum fromValue(String value) { + for (ConnectionDestinationTypeEnum b : ConnectionDestinationTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final ConnectionDestinationTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public ConnectionDestinationTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return ConnectionDestinationTypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + ConnectionDestinationTypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_CONNECTION_DESTINATION_TYPE = "connectionDestinationType"; + @SerializedName(SERIALIZED_NAME_CONNECTION_DESTINATION_TYPE) + @javax.annotation.Nullable + private ConnectionDestinationTypeEnum connectionDestinationType; + + /** + * Level of resilience for the connection. <br> UNPROTECTED - a single fiber path with no node redundancy. <br> PROTECTED - two diverse fiber paths between single nodes at each IBX. <br> DUAL_DIVERSE - two diverse fiber paths terminating on redundant nodes at both IBXs. + */ + @JsonAdapter(PathTypeEnum.Adapter.class) + public enum PathTypeEnum { + DUAL_DIVERSE("DUAL_DIVERSE"), + + PROTECTED("PROTECTED"), + + UNPROTECTED("UNPROTECTED"); + + private String value; + + PathTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static PathTypeEnum fromValue(String value) { + for (PathTypeEnum b : PathTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final PathTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public PathTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return PathTypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + PathTypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_PATH_TYPE = "pathType"; + @SerializedName(SERIALIZED_NAME_PATH_TYPE) + @javax.annotation.Nullable + private PathTypeEnum pathType; + + /** + * BMMR infrastructure ownership type. <br> EQUINIX - Equinix-operated. <br> SELF - customer-operated. <br> Required only when connectionDestinationType is BMMR. + */ + @JsonAdapter(BmmrTypeEnum.Adapter.class) + public enum BmmrTypeEnum { + EQUINIX("EQUINIX"), + + SELF("SELF"); + + private String value; + + BmmrTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static BmmrTypeEnum fromValue(String value) { + for (BmmrTypeEnum b : BmmrTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final BmmrTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public BmmrTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return BmmrTypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + BmmrTypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_BMMR_TYPE = "bmmrType"; + @SerializedName(SERIALIZED_NAME_BMMR_TYPE) + @javax.annotation.Nullable + private BmmrTypeEnum bmmrType; + + public static final String SERIALIZED_NAME_REDUNDANCY = "redundancy"; + @SerializedName(SERIALIZED_NAME_REDUNDANCY) + @javax.annotation.Nullable + private OpticalConnectRedundancy redundancy; + + public static final String SERIALIZED_NAME_A_SIDE = "aSide"; + @SerializedName(SERIALIZED_NAME_A_SIDE) + @javax.annotation.Nullable + private OpticalConnectASideResponse aSide; + + public static final String SERIALIZED_NAME_Z_SIDE = "zSide"; + @SerializedName(SERIALIZED_NAME_Z_SIDE) + @javax.annotation.Nullable + private OpticalConnectZSideResponse zSide; + + public static final String SERIALIZED_NAME_ORDER = "order"; + @SerializedName(SERIALIZED_NAME_ORDER) + @javax.annotation.Nullable + private OpticalConnectOrder order; + + public static final String SERIALIZED_NAME_ACCOUNT = "account"; + @SerializedName(SERIALIZED_NAME_ACCOUNT) + @javax.annotation.Nullable + private SimplifiedAccount account; + + public static final String SERIALIZED_NAME_NOTIFICATIONS = "notifications"; + @SerializedName(SERIALIZED_NAME_NOTIFICATIONS) + @javax.annotation.Nullable + private List notifications = new ArrayList<>(); + + public static final String SERIALIZED_NAME_CHANGE_LOG = "changeLog"; + @SerializedName(SERIALIZED_NAME_CHANGE_LOG) + @javax.annotation.Nullable + private Changelog changeLog; + + public OpticalConnectResponse() { + } + + public OpticalConnectResponse( + URI href, + UUID uuid, + String name + ) { + this(); + this.href = href; + this.uuid = uuid; + this.name = name; + } + + /** + * URI of this Optical Connect resource. + * @return href + */ + @javax.annotation.Nullable + public URI getHref() { + return href; + } + + + + /** + * Unique identifier of this Optical Connect. + * @return uuid + */ + @javax.annotation.Nullable + public UUID getUuid() { + return uuid; + } + + + + public OpticalConnectResponse type(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + return this; + } + + /** + * Connection Type. <br> OC - Optical Connect. + * @return type + */ + @javax.annotation.Nullable + public TypeEnum getType() { + return type; + } + + public void setType(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + } + + + /** + * Equinix-assigned name, derived from the account number and the two IBX locations. + * @return name + */ + @javax.annotation.Nullable + public String getName() { + return name; + } + + + + public OpticalConnectResponse state(@javax.annotation.Nullable OpticalConnectState state) { + this.state = state; + return this; + } + + /** + * Get state + * @return state + */ + @javax.annotation.Nullable + public OpticalConnectState getState() { + return state; + } + + public void setState(@javax.annotation.Nullable OpticalConnectState state) { + this.state = state; + } + + + public OpticalConnectResponse bandwidth(@javax.annotation.Nullable Integer bandwidth) { + this.bandwidth = bandwidth; + return this; + } + + /** + * Provisioned connection bandwidth in Mbps. + * @return bandwidth + */ + @javax.annotation.Nullable + public Integer getBandwidth() { + return bandwidth; + } + + public void setBandwidth(@javax.annotation.Nullable Integer bandwidth) { + this.bandwidth = bandwidth; + } + + + public OpticalConnectResponse connectionDestinationType(@javax.annotation.Nullable ConnectionDestinationTypeEnum connectionDestinationType) { + this.connectionDestinationType = connectionDestinationType; + return this; + } + + /** + * Where the Z-side terminates. <br> COLO - your own colocation space at another Equinix IBX. <br> BMMR - a Building Meet-Me Room. <br> REMOTE - another customer's colocation space at another Equinix IBX. <br> + * @return connectionDestinationType + */ + @javax.annotation.Nullable + public ConnectionDestinationTypeEnum getConnectionDestinationType() { + return connectionDestinationType; + } + + public void setConnectionDestinationType(@javax.annotation.Nullable ConnectionDestinationTypeEnum connectionDestinationType) { + this.connectionDestinationType = connectionDestinationType; + } + + + public OpticalConnectResponse pathType(@javax.annotation.Nullable PathTypeEnum pathType) { + this.pathType = pathType; + return this; + } + + /** + * Level of resilience for the connection. <br> UNPROTECTED - a single fiber path with no node redundancy. <br> PROTECTED - two diverse fiber paths between single nodes at each IBX. <br> DUAL_DIVERSE - two diverse fiber paths terminating on redundant nodes at both IBXs. + * @return pathType + */ + @javax.annotation.Nullable + public PathTypeEnum getPathType() { + return pathType; + } + + public void setPathType(@javax.annotation.Nullable PathTypeEnum pathType) { + this.pathType = pathType; + } + + + public OpticalConnectResponse bmmrType(@javax.annotation.Nullable BmmrTypeEnum bmmrType) { + this.bmmrType = bmmrType; + return this; + } + + /** + * BMMR infrastructure ownership type. <br> EQUINIX - Equinix-operated. <br> SELF - customer-operated. <br> Required only when connectionDestinationType is BMMR. + * @return bmmrType + */ + @javax.annotation.Nullable + public BmmrTypeEnum getBmmrType() { + return bmmrType; + } + + public void setBmmrType(@javax.annotation.Nullable BmmrTypeEnum bmmrType) { + this.bmmrType = bmmrType; + } + + + public OpticalConnectResponse redundancy(@javax.annotation.Nullable OpticalConnectRedundancy redundancy) { + this.redundancy = redundancy; + return this; + } + + /** + * Get redundancy + * @return redundancy + */ + @javax.annotation.Nullable + public OpticalConnectRedundancy getRedundancy() { + return redundancy; + } + + public void setRedundancy(@javax.annotation.Nullable OpticalConnectRedundancy redundancy) { + this.redundancy = redundancy; + } + + + public OpticalConnectResponse aSide(@javax.annotation.Nullable OpticalConnectASideResponse aSide) { + this.aSide = aSide; + return this; + } + + /** + * Get aSide + * @return aSide + */ + @javax.annotation.Nullable + public OpticalConnectASideResponse getaSide() { + return aSide; + } + + public void setaSide(@javax.annotation.Nullable OpticalConnectASideResponse aSide) { + this.aSide = aSide; + } + + + public OpticalConnectResponse zSide(@javax.annotation.Nullable OpticalConnectZSideResponse zSide) { + this.zSide = zSide; + return this; + } + + /** + * Get zSide + * @return zSide + */ + @javax.annotation.Nullable + public OpticalConnectZSideResponse getzSide() { + return zSide; + } + + public void setzSide(@javax.annotation.Nullable OpticalConnectZSideResponse zSide) { + this.zSide = zSide; + } + + + public OpticalConnectResponse order(@javax.annotation.Nullable OpticalConnectOrder order) { + this.order = order; + return this; + } + + /** + * Get order + * @return order + */ + @javax.annotation.Nullable + public OpticalConnectOrder getOrder() { + return order; + } + + public void setOrder(@javax.annotation.Nullable OpticalConnectOrder order) { + this.order = order; + } + + + public OpticalConnectResponse account(@javax.annotation.Nullable SimplifiedAccount account) { + this.account = account; + return this; + } + + /** + * Get account + * @return account + */ + @javax.annotation.Nullable + public SimplifiedAccount getAccount() { + return account; + } + + public void setAccount(@javax.annotation.Nullable SimplifiedAccount account) { + this.account = account; + } + + + public OpticalConnectResponse notifications(@javax.annotation.Nullable List notifications) { + this.notifications = notifications; + return this; + } + + public OpticalConnectResponse addNotificationsItem(OpticalConnectNotification notificationsItem) { + if (this.notifications == null) { + this.notifications = new ArrayList<>(); + } + this.notifications.add(notificationsItem); + return this; + } + + /** + * Preferences for notifications on connection configuration or status changes + * @return notifications + */ + @javax.annotation.Nullable + public List getNotifications() { + return notifications; + } + + public void setNotifications(@javax.annotation.Nullable List notifications) { + this.notifications = notifications; + } + + + public OpticalConnectResponse changeLog(@javax.annotation.Nullable Changelog changeLog) { + this.changeLog = changeLog; + return this; + } + + /** + * Get changeLog + * @return changeLog + */ + @javax.annotation.Nullable + public Changelog getChangeLog() { + return changeLog; + } + + public void setChangeLog(@javax.annotation.Nullable Changelog changeLog) { + this.changeLog = changeLog; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the OpticalConnectResponse instance itself + */ + public OpticalConnectResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OpticalConnectResponse opticalConnectResponse = (OpticalConnectResponse) o; + return Objects.equals(this.href, opticalConnectResponse.href) && + Objects.equals(this.uuid, opticalConnectResponse.uuid) && + Objects.equals(this.type, opticalConnectResponse.type) && + Objects.equals(this.name, opticalConnectResponse.name) && + Objects.equals(this.state, opticalConnectResponse.state) && + Objects.equals(this.bandwidth, opticalConnectResponse.bandwidth) && + Objects.equals(this.connectionDestinationType, opticalConnectResponse.connectionDestinationType) && + Objects.equals(this.pathType, opticalConnectResponse.pathType) && + Objects.equals(this.bmmrType, opticalConnectResponse.bmmrType) && + Objects.equals(this.redundancy, opticalConnectResponse.redundancy) && + Objects.equals(this.aSide, opticalConnectResponse.aSide) && + Objects.equals(this.zSide, opticalConnectResponse.zSide) && + Objects.equals(this.order, opticalConnectResponse.order) && + Objects.equals(this.account, opticalConnectResponse.account) && + Objects.equals(this.notifications, opticalConnectResponse.notifications) && + Objects.equals(this.changeLog, opticalConnectResponse.changeLog)&& + Objects.equals(this.additionalProperties, opticalConnectResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(href, uuid, type, name, state, bandwidth, connectionDestinationType, pathType, bmmrType, redundancy, aSide, zSide, order, account, notifications, changeLog, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OpticalConnectResponse {\n"); + sb.append(" href: ").append(toIndentedString(href)).append("\n"); + sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" state: ").append(toIndentedString(state)).append("\n"); + sb.append(" bandwidth: ").append(toIndentedString(bandwidth)).append("\n"); + sb.append(" connectionDestinationType: ").append(toIndentedString(connectionDestinationType)).append("\n"); + sb.append(" pathType: ").append(toIndentedString(pathType)).append("\n"); + sb.append(" bmmrType: ").append(toIndentedString(bmmrType)).append("\n"); + sb.append(" redundancy: ").append(toIndentedString(redundancy)).append("\n"); + sb.append(" aSide: ").append(toIndentedString(aSide)).append("\n"); + sb.append(" zSide: ").append(toIndentedString(zSide)).append("\n"); + sb.append(" order: ").append(toIndentedString(order)).append("\n"); + sb.append(" account: ").append(toIndentedString(account)).append("\n"); + sb.append(" notifications: ").append(toIndentedString(notifications)).append("\n"); + sb.append(" changeLog: ").append(toIndentedString(changeLog)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("href", "uuid", "type", "name", "state", "bandwidth", "connectionDestinationType", "pathType", "bmmrType", "redundancy", "aSide", "zSide", "order", "account", "notifications", "changeLog")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OpticalConnectResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OpticalConnectResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in OpticalConnectResponse is not found in the empty JSON string", OpticalConnectResponse.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("href") != null && !jsonObj.get("href").isJsonNull()) && !jsonObj.get("href").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `href` to be a primitive type in the JSON string but got `%s`", jsonObj.get("href").toString())); + } + if ((jsonObj.get("uuid") != null && !jsonObj.get("uuid").isJsonNull()) && !jsonObj.get("uuid").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `uuid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("uuid").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // validate the optional field `type` + if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { + TypeEnum.validateJsonElement(jsonObj.get("type")); + } + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + // validate the optional field `state` + if (jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) { + OpticalConnectState.validateJsonElement(jsonObj.get("state")); + } + if ((jsonObj.get("connectionDestinationType") != null && !jsonObj.get("connectionDestinationType").isJsonNull()) && !jsonObj.get("connectionDestinationType").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `connectionDestinationType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("connectionDestinationType").toString())); + } + // validate the optional field `connectionDestinationType` + if (jsonObj.get("connectionDestinationType") != null && !jsonObj.get("connectionDestinationType").isJsonNull()) { + ConnectionDestinationTypeEnum.validateJsonElement(jsonObj.get("connectionDestinationType")); + } + if ((jsonObj.get("pathType") != null && !jsonObj.get("pathType").isJsonNull()) && !jsonObj.get("pathType").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `pathType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("pathType").toString())); + } + // validate the optional field `pathType` + if (jsonObj.get("pathType") != null && !jsonObj.get("pathType").isJsonNull()) { + PathTypeEnum.validateJsonElement(jsonObj.get("pathType")); + } + if ((jsonObj.get("bmmrType") != null && !jsonObj.get("bmmrType").isJsonNull()) && !jsonObj.get("bmmrType").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `bmmrType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("bmmrType").toString())); + } + // validate the optional field `bmmrType` + if (jsonObj.get("bmmrType") != null && !jsonObj.get("bmmrType").isJsonNull()) { + BmmrTypeEnum.validateJsonElement(jsonObj.get("bmmrType")); + } + // validate the optional field `redundancy` + if (jsonObj.get("redundancy") != null && !jsonObj.get("redundancy").isJsonNull()) { + OpticalConnectRedundancy.validateJsonElement(jsonObj.get("redundancy")); + } + // validate the optional field `aSide` + if (jsonObj.get("aSide") != null && !jsonObj.get("aSide").isJsonNull()) { + OpticalConnectASideResponse.validateJsonElement(jsonObj.get("aSide")); + } + // validate the optional field `zSide` + if (jsonObj.get("zSide") != null && !jsonObj.get("zSide").isJsonNull()) { + OpticalConnectZSideResponse.validateJsonElement(jsonObj.get("zSide")); + } + // validate the optional field `order` + if (jsonObj.get("order") != null && !jsonObj.get("order").isJsonNull()) { + OpticalConnectOrder.validateJsonElement(jsonObj.get("order")); + } + // validate the optional field `account` + if (jsonObj.get("account") != null && !jsonObj.get("account").isJsonNull()) { + SimplifiedAccount.validateJsonElement(jsonObj.get("account")); + } + if (jsonObj.get("notifications") != null && !jsonObj.get("notifications").isJsonNull()) { + JsonArray jsonArraynotifications = jsonObj.getAsJsonArray("notifications"); + if (jsonArraynotifications != null) { + // ensure the json data is an array + if (!jsonObj.get("notifications").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `notifications` to be an array in the JSON string but got `%s`", jsonObj.get("notifications").toString())); + } + + // validate the optional field `notifications` (array) + for (int i = 0; i < jsonArraynotifications.size(); i++) { + OpticalConnectNotification.validateJsonElement(jsonArraynotifications.get(i)); + }; + } + } + // validate the optional field `changeLog` + if (jsonObj.get("changeLog") != null && !jsonObj.get("changeLog").isJsonNull()) { + Changelog.validateJsonElement(jsonObj.get("changeLog")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OpticalConnectResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OpticalConnectResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OpticalConnectResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OpticalConnectResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public OpticalConnectResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + OpticalConnectResponse instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OpticalConnectResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of OpticalConnectResponse + * @throws IOException if the JSON string is invalid with respect to OpticalConnectResponse + */ + public static OpticalConnectResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OpticalConnectResponse.class); + } + + /** + * Convert an instance of OpticalConnectResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OpticalConnectSearchRequest.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OpticalConnectSearchRequest.java new file mode 100644 index 00000000..a0f23fc8 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OpticalConnectSearchRequest.java @@ -0,0 +1,370 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.OpticalConnectFilters; +import com.equinix.sdk.fabricv4.model.OpticalConnectSortCriteria; +import com.equinix.sdk.fabricv4.model.PaginationRequest; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * Search criteria for retrieving Optical Connects, with optional filtering, pagination and sorting. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class OpticalConnectSearchRequest { + public static final String SERIALIZED_NAME_FILTER = "filter"; + @SerializedName(SERIALIZED_NAME_FILTER) + @javax.annotation.Nullable + private OpticalConnectFilters filter; + + public static final String SERIALIZED_NAME_PAGINATION = "pagination"; + @SerializedName(SERIALIZED_NAME_PAGINATION) + @javax.annotation.Nullable + private PaginationRequest pagination; + + public static final String SERIALIZED_NAME_SORT = "sort"; + @SerializedName(SERIALIZED_NAME_SORT) + @javax.annotation.Nullable + private List sort = new ArrayList<>(); + + public OpticalConnectSearchRequest() { + } + + public OpticalConnectSearchRequest filter(@javax.annotation.Nullable OpticalConnectFilters filter) { + this.filter = filter; + return this; + } + + /** + * Get filter + * @return filter + */ + @javax.annotation.Nullable + public OpticalConnectFilters getFilter() { + return filter; + } + + public void setFilter(@javax.annotation.Nullable OpticalConnectFilters filter) { + this.filter = filter; + } + + + public OpticalConnectSearchRequest pagination(@javax.annotation.Nullable PaginationRequest pagination) { + this.pagination = pagination; + return this; + } + + /** + * Get pagination + * @return pagination + */ + @javax.annotation.Nullable + public PaginationRequest getPagination() { + return pagination; + } + + public void setPagination(@javax.annotation.Nullable PaginationRequest pagination) { + this.pagination = pagination; + } + + + public OpticalConnectSearchRequest sort(@javax.annotation.Nullable List sort) { + this.sort = sort; + return this; + } + + public OpticalConnectSearchRequest addSortItem(OpticalConnectSortCriteria sortItem) { + if (this.sort == null) { + this.sort = new ArrayList<>(); + } + this.sort.add(sortItem); + return this; + } + + /** + * Get sort + * @return sort + */ + @javax.annotation.Nullable + public List getSort() { + return sort; + } + + public void setSort(@javax.annotation.Nullable List sort) { + this.sort = sort; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the OpticalConnectSearchRequest instance itself + */ + public OpticalConnectSearchRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OpticalConnectSearchRequest opticalConnectSearchRequest = (OpticalConnectSearchRequest) o; + return Objects.equals(this.filter, opticalConnectSearchRequest.filter) && + Objects.equals(this.pagination, opticalConnectSearchRequest.pagination) && + Objects.equals(this.sort, opticalConnectSearchRequest.sort)&& + Objects.equals(this.additionalProperties, opticalConnectSearchRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(filter, pagination, sort, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OpticalConnectSearchRequest {\n"); + sb.append(" filter: ").append(toIndentedString(filter)).append("\n"); + sb.append(" pagination: ").append(toIndentedString(pagination)).append("\n"); + sb.append(" sort: ").append(toIndentedString(sort)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("filter", "pagination", "sort")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OpticalConnectSearchRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OpticalConnectSearchRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in OpticalConnectSearchRequest is not found in the empty JSON string", OpticalConnectSearchRequest.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `filter` + if (jsonObj.get("filter") != null && !jsonObj.get("filter").isJsonNull()) { + OpticalConnectFilters.validateJsonElement(jsonObj.get("filter")); + } + // validate the optional field `pagination` + if (jsonObj.get("pagination") != null && !jsonObj.get("pagination").isJsonNull()) { + PaginationRequest.validateJsonElement(jsonObj.get("pagination")); + } + if (jsonObj.get("sort") != null && !jsonObj.get("sort").isJsonNull()) { + JsonArray jsonArraysort = jsonObj.getAsJsonArray("sort"); + if (jsonArraysort != null) { + // ensure the json data is an array + if (!jsonObj.get("sort").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `sort` to be an array in the JSON string but got `%s`", jsonObj.get("sort").toString())); + } + + // validate the optional field `sort` (array) + for (int i = 0; i < jsonArraysort.size(); i++) { + OpticalConnectSortCriteria.validateJsonElement(jsonArraysort.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OpticalConnectSearchRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OpticalConnectSearchRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OpticalConnectSearchRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OpticalConnectSearchRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public OpticalConnectSearchRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + OpticalConnectSearchRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OpticalConnectSearchRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of OpticalConnectSearchRequest + * @throws IOException if the JSON string is invalid with respect to OpticalConnectSearchRequest + */ + public static OpticalConnectSearchRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OpticalConnectSearchRequest.class); + } + + /** + * Convert an instance of OpticalConnectSearchRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OpticalConnectServiceSearchResponse.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OpticalConnectServiceSearchResponse.java new file mode 100644 index 00000000..423d1358 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OpticalConnectServiceSearchResponse.java @@ -0,0 +1,339 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.OpticalConnectResponse; +import com.equinix.sdk.fabricv4.model.Pagination; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * OpticalConnectServiceSearchResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class OpticalConnectServiceSearchResponse { + public static final String SERIALIZED_NAME_PAGINATION = "pagination"; + @SerializedName(SERIALIZED_NAME_PAGINATION) + @javax.annotation.Nullable + private Pagination pagination; + + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + @javax.annotation.Nullable + private List data = new ArrayList<>(); + + public OpticalConnectServiceSearchResponse() { + } + + public OpticalConnectServiceSearchResponse pagination(@javax.annotation.Nullable Pagination pagination) { + this.pagination = pagination; + return this; + } + + /** + * Get pagination + * @return pagination + */ + @javax.annotation.Nullable + public Pagination getPagination() { + return pagination; + } + + public void setPagination(@javax.annotation.Nullable Pagination pagination) { + this.pagination = pagination; + } + + + public OpticalConnectServiceSearchResponse data(@javax.annotation.Nullable List data) { + this.data = data; + return this; + } + + public OpticalConnectServiceSearchResponse addDataItem(OpticalConnectResponse dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + return this; + } + + /** + * Data returned from the API call. + * @return data + */ + @javax.annotation.Nullable + public List getData() { + return data; + } + + public void setData(@javax.annotation.Nullable List data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the OpticalConnectServiceSearchResponse instance itself + */ + public OpticalConnectServiceSearchResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OpticalConnectServiceSearchResponse opticalConnectServiceSearchResponse = (OpticalConnectServiceSearchResponse) o; + return Objects.equals(this.pagination, opticalConnectServiceSearchResponse.pagination) && + Objects.equals(this.data, opticalConnectServiceSearchResponse.data)&& + Objects.equals(this.additionalProperties, opticalConnectServiceSearchResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(pagination, data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OpticalConnectServiceSearchResponse {\n"); + sb.append(" pagination: ").append(toIndentedString(pagination)).append("\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("pagination", "data")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OpticalConnectServiceSearchResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OpticalConnectServiceSearchResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in OpticalConnectServiceSearchResponse is not found in the empty JSON string", OpticalConnectServiceSearchResponse.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `pagination` + if (jsonObj.get("pagination") != null && !jsonObj.get("pagination").isJsonNull()) { + Pagination.validateJsonElement(jsonObj.get("pagination")); + } + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); + if (jsonArraydata != null) { + // ensure the json data is an array + if (!jsonObj.get("data").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + } + + // validate the optional field `data` (array) + for (int i = 0; i < jsonArraydata.size(); i++) { + OpticalConnectResponse.validateJsonElement(jsonArraydata.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OpticalConnectServiceSearchResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OpticalConnectServiceSearchResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OpticalConnectServiceSearchResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OpticalConnectServiceSearchResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public OpticalConnectServiceSearchResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + OpticalConnectServiceSearchResponse instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OpticalConnectServiceSearchResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of OpticalConnectServiceSearchResponse + * @throws IOException if the JSON string is invalid with respect to OpticalConnectServiceSearchResponse + */ + public static OpticalConnectServiceSearchResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OpticalConnectServiceSearchResponse.class); + } + + /** + * Convert an instance of OpticalConnectServiceSearchResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OpticalConnectSimpleExpression.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OpticalConnectSimpleExpression.java new file mode 100644 index 00000000..0820e1c2 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OpticalConnectSimpleExpression.java @@ -0,0 +1,355 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * OpticalConnectSimpleExpression + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class OpticalConnectSimpleExpression { + public static final String SERIALIZED_NAME_PROPERTY = "property"; + @SerializedName(SERIALIZED_NAME_PROPERTY) + @javax.annotation.Nullable + private String property; + + public static final String SERIALIZED_NAME_OPERATOR = "operator"; + @SerializedName(SERIALIZED_NAME_OPERATOR) + @javax.annotation.Nullable + private String operator; + + public static final String SERIALIZED_NAME_VALUES = "values"; + @SerializedName(SERIALIZED_NAME_VALUES) + @javax.annotation.Nullable + private List values = new ArrayList<>(); + + public OpticalConnectSimpleExpression() { + } + + public OpticalConnectSimpleExpression property(@javax.annotation.Nullable String property) { + this.property = property; + return this; + } + + /** + * Possible field names to use on filters: * `/name` - Connection name * `/uuid` - Connection uuid * `/type` - type * `/state` - state * `/bandwidth` - Bandwidth + * @return property + */ + @javax.annotation.Nullable + public String getProperty() { + return property; + } + + public void setProperty(@javax.annotation.Nullable String property) { + this.property = property; + } + + + public OpticalConnectSimpleExpression operator(@javax.annotation.Nullable String operator) { + this.operator = operator; + return this; + } + + /** + * Possible operators to use on filters: * `=` - equal * `!=` - not equal * `[NOT] BETWEEN` - (not) between * `[NOT] LIKE` - (not) like * `[NOT] IN` - (not) in * `ILIKE` - case-insensitive like + * @return operator + */ + @javax.annotation.Nullable + public String getOperator() { + return operator; + } + + public void setOperator(@javax.annotation.Nullable String operator) { + this.operator = operator; + } + + + public OpticalConnectSimpleExpression values(@javax.annotation.Nullable List values) { + this.values = values; + return this; + } + + public OpticalConnectSimpleExpression addValuesItem(String valuesItem) { + if (this.values == null) { + this.values = new ArrayList<>(); + } + this.values.add(valuesItem); + return this; + } + + /** + * Get values + * @return values + */ + @javax.annotation.Nullable + public List getValues() { + return values; + } + + public void setValues(@javax.annotation.Nullable List values) { + this.values = values; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the OpticalConnectSimpleExpression instance itself + */ + public OpticalConnectSimpleExpression putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OpticalConnectSimpleExpression opticalConnectSimpleExpression = (OpticalConnectSimpleExpression) o; + return Objects.equals(this.property, opticalConnectSimpleExpression.property) && + Objects.equals(this.operator, opticalConnectSimpleExpression.operator) && + Objects.equals(this.values, opticalConnectSimpleExpression.values)&& + Objects.equals(this.additionalProperties, opticalConnectSimpleExpression.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(property, operator, values, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OpticalConnectSimpleExpression {\n"); + sb.append(" property: ").append(toIndentedString(property)).append("\n"); + sb.append(" operator: ").append(toIndentedString(operator)).append("\n"); + sb.append(" values: ").append(toIndentedString(values)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("property", "operator", "values")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OpticalConnectSimpleExpression + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OpticalConnectSimpleExpression.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in OpticalConnectSimpleExpression is not found in the empty JSON string", OpticalConnectSimpleExpression.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("property") != null && !jsonObj.get("property").isJsonNull()) && !jsonObj.get("property").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `property` to be a primitive type in the JSON string but got `%s`", jsonObj.get("property").toString())); + } + if ((jsonObj.get("operator") != null && !jsonObj.get("operator").isJsonNull()) && !jsonObj.get("operator").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `operator` to be a primitive type in the JSON string but got `%s`", jsonObj.get("operator").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("values") != null && !jsonObj.get("values").isJsonNull() && !jsonObj.get("values").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `values` to be an array in the JSON string but got `%s`", jsonObj.get("values").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OpticalConnectSimpleExpression.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OpticalConnectSimpleExpression' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OpticalConnectSimpleExpression.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OpticalConnectSimpleExpression value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public OpticalConnectSimpleExpression read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + OpticalConnectSimpleExpression instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OpticalConnectSimpleExpression given an JSON string + * + * @param jsonString JSON string + * @return An instance of OpticalConnectSimpleExpression + * @throws IOException if the JSON string is invalid with respect to OpticalConnectSimpleExpression + */ + public static OpticalConnectSimpleExpression fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OpticalConnectSimpleExpression.class); + } + + /** + * Convert an instance of OpticalConnectSimpleExpression to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OpticalConnectSortBy.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OpticalConnectSortBy.java new file mode 100644 index 00000000..8c2660f8 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OpticalConnectSortBy.java @@ -0,0 +1,92 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.google.gson.annotations.SerializedName; + +import java.io.IOException; +import java.util.Locale; +import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; + +/** + * Possible field names to use on sorting + */ +@JsonAdapter(OpticalConnectSortBy.Adapter.class) +public enum OpticalConnectSortBy { + + NAME("/name"), + + UUID("/uuid"), + + STATE("/state"), + + TYPE("/type"), + + BANDWIDTH("/bandwidth"), + + ASIDE_LOCATION_IBXCODE("/aSide/location/ibxCode"), + + ZSIDE_LOCATION_IBXCODE("/zSide/location/ibxCode"), + + CHANGELOG_CREATEDDATETIME("/changeLog/createdDateTime"), + + CHANGELOG_UPDATEDDATETIME("/changeLog/updatedDateTime"); + + private String value; + + OpticalConnectSortBy(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static OpticalConnectSortBy fromValue(String value) { + for (OpticalConnectSortBy b : OpticalConnectSortBy.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final OpticalConnectSortBy enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public OpticalConnectSortBy read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return OpticalConnectSortBy.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + OpticalConnectSortBy.fromValue(value); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OpticalConnectSortCriteria.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OpticalConnectSortCriteria.java new file mode 100644 index 00000000..ce92bd91 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OpticalConnectSortCriteria.java @@ -0,0 +1,319 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.OpticalConnectSortBy; +import com.equinix.sdk.fabricv4.model.OpticalConnectSortDirection; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * Sorting to apply to search results. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class OpticalConnectSortCriteria { + public static final String SERIALIZED_NAME_DIRECTION = "direction"; + @SerializedName(SERIALIZED_NAME_DIRECTION) + @javax.annotation.Nullable + private OpticalConnectSortDirection direction = OpticalConnectSortDirection.DESC; + + public static final String SERIALIZED_NAME_PROPERTY = "property"; + @SerializedName(SERIALIZED_NAME_PROPERTY) + @javax.annotation.Nullable + private OpticalConnectSortBy property = OpticalConnectSortBy.CHANGELOG_UPDATEDDATETIME; + + public OpticalConnectSortCriteria() { + } + + public OpticalConnectSortCriteria direction(@javax.annotation.Nullable OpticalConnectSortDirection direction) { + this.direction = direction; + return this; + } + + /** + * Get direction + * @return direction + */ + @javax.annotation.Nullable + public OpticalConnectSortDirection getDirection() { + return direction; + } + + public void setDirection(@javax.annotation.Nullable OpticalConnectSortDirection direction) { + this.direction = direction; + } + + + public OpticalConnectSortCriteria property(@javax.annotation.Nullable OpticalConnectSortBy property) { + this.property = property; + return this; + } + + /** + * Get property + * @return property + */ + @javax.annotation.Nullable + public OpticalConnectSortBy getProperty() { + return property; + } + + public void setProperty(@javax.annotation.Nullable OpticalConnectSortBy property) { + this.property = property; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the OpticalConnectSortCriteria instance itself + */ + public OpticalConnectSortCriteria putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OpticalConnectSortCriteria opticalConnectSortCriteria = (OpticalConnectSortCriteria) o; + return Objects.equals(this.direction, opticalConnectSortCriteria.direction) && + Objects.equals(this.property, opticalConnectSortCriteria.property)&& + Objects.equals(this.additionalProperties, opticalConnectSortCriteria.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(direction, property, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OpticalConnectSortCriteria {\n"); + sb.append(" direction: ").append(toIndentedString(direction)).append("\n"); + sb.append(" property: ").append(toIndentedString(property)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("direction", "property")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OpticalConnectSortCriteria + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OpticalConnectSortCriteria.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in OpticalConnectSortCriteria is not found in the empty JSON string", OpticalConnectSortCriteria.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `direction` + if (jsonObj.get("direction") != null && !jsonObj.get("direction").isJsonNull()) { + OpticalConnectSortDirection.validateJsonElement(jsonObj.get("direction")); + } + // validate the optional field `property` + if (jsonObj.get("property") != null && !jsonObj.get("property").isJsonNull()) { + OpticalConnectSortBy.validateJsonElement(jsonObj.get("property")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OpticalConnectSortCriteria.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OpticalConnectSortCriteria' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OpticalConnectSortCriteria.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OpticalConnectSortCriteria value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public OpticalConnectSortCriteria read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + OpticalConnectSortCriteria instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OpticalConnectSortCriteria given an JSON string + * + * @param jsonString JSON string + * @return An instance of OpticalConnectSortCriteria + * @throws IOException if the JSON string is invalid with respect to OpticalConnectSortCriteria + */ + public static OpticalConnectSortCriteria fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OpticalConnectSortCriteria.class); + } + + /** + * Convert an instance of OpticalConnectSortCriteria to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OpticalConnectSortDirection.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OpticalConnectSortDirection.java new file mode 100644 index 00000000..d2b1e8e2 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OpticalConnectSortDirection.java @@ -0,0 +1,78 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.google.gson.annotations.SerializedName; + +import java.io.IOException; +import java.util.Locale; +import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; + +/** + * Sorting direction. <br> ASC - ascending <br> DESC - descending + */ +@JsonAdapter(OpticalConnectSortDirection.Adapter.class) +public enum OpticalConnectSortDirection { + + DESC("DESC"), + + ASC("ASC"); + + private String value; + + OpticalConnectSortDirection(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static OpticalConnectSortDirection fromValue(String value) { + for (OpticalConnectSortDirection b : OpticalConnectSortDirection.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final OpticalConnectSortDirection enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public OpticalConnectSortDirection read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return OpticalConnectSortDirection.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + OpticalConnectSortDirection.fromValue(value); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OpticalConnectState.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OpticalConnectState.java new file mode 100644 index 00000000..d8768e6d --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OpticalConnectState.java @@ -0,0 +1,88 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.google.gson.annotations.SerializedName; + +import java.io.IOException; +import java.util.Locale; +import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; + +/** + * Optical Connect lifecycle states. + */ +@JsonAdapter(OpticalConnectState.Adapter.class) +public enum OpticalConnectState { + + PROVISIONING("PROVISIONING"), + + PROVISIONED("PROVISIONED"), + + PROVISIONING_FAILED("PROVISIONING_FAILED"), + + REPROVISIONING("REPROVISIONING"), + + REPROVISIONING_FAILED("REPROVISIONING_FAILED"), + + DEPROVISIONING("DEPROVISIONING"), + + DEPROVISIONED("DEPROVISIONED"); + + private String value; + + OpticalConnectState(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static OpticalConnectState fromValue(String value) { + for (OpticalConnectState b : OpticalConnectState.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final OpticalConnectState enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public OpticalConnectState read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return OpticalConnectState.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + OpticalConnectState.fromValue(value); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OpticalConnectZSideRequest.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OpticalConnectZSideRequest.java new file mode 100644 index 00000000..b895452c --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OpticalConnectZSideRequest.java @@ -0,0 +1,495 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.OpticalConnectLOA; +import com.equinix.sdk.fabricv4.model.OpticalConnectLocation; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * Z-Side configuration. <br> For COLO, specify the destination patch panel and ports. <br> For BMMR and REMOTE, specify the location and Letter of Authorization. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class OpticalConnectZSideRequest { + public static final String SERIALIZED_NAME_PATCH_PANEL_ID = "patchPanelId"; + @SerializedName(SERIALIZED_NAME_PATCH_PANEL_ID) + @javax.annotation.Nullable + private String patchPanelId; + + public static final String SERIALIZED_NAME_PATCH_PANEL_PORT_A = "patchPanelPortA"; + @SerializedName(SERIALIZED_NAME_PATCH_PANEL_PORT_A) + @javax.annotation.Nullable + private String patchPanelPortA; + + public static final String SERIALIZED_NAME_PATCH_PANEL_PORT_B = "patchPanelPortB"; + @SerializedName(SERIALIZED_NAME_PATCH_PANEL_PORT_B) + @javax.annotation.Nullable + private String patchPanelPortB; + + /** + * Type of Connector + */ + @JsonAdapter(ConnectorTypeEnum.Adapter.class) + public enum ConnectorTypeEnum { + FC("FC"), + + SC("SC"), + + LC("LC"), + + ST("ST"); + + private String value; + + ConnectorTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static ConnectorTypeEnum fromValue(String value) { + for (ConnectorTypeEnum b : ConnectorTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final ConnectorTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public ConnectorTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return ConnectorTypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + ConnectorTypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_CONNECTOR_TYPE = "connectorType"; + @SerializedName(SERIALIZED_NAME_CONNECTOR_TYPE) + @javax.annotation.Nullable + private ConnectorTypeEnum connectorType; + + public static final String SERIALIZED_NAME_LOCATION = "location"; + @SerializedName(SERIALIZED_NAME_LOCATION) + @javax.annotation.Nullable + private OpticalConnectLocation location; + + public static final String SERIALIZED_NAME_LOA = "loa"; + @SerializedName(SERIALIZED_NAME_LOA) + @javax.annotation.Nullable + private OpticalConnectLOA loa; + + public OpticalConnectZSideRequest() { + } + + public OpticalConnectZSideRequest patchPanelId(@javax.annotation.Nullable String patchPanelId) { + this.patchPanelId = patchPanelId; + return this; + } + + /** + * Unique identifier of the patch panel. + * @return patchPanelId + */ + @javax.annotation.Nullable + public String getPatchPanelId() { + return patchPanelId; + } + + public void setPatchPanelId(@javax.annotation.Nullable String patchPanelId) { + this.patchPanelId = patchPanelId; + } + + + public OpticalConnectZSideRequest patchPanelPortA(@javax.annotation.Nullable String patchPanelPortA) { + this.patchPanelPortA = patchPanelPortA; + return this; + } + + /** + * Specify the desired port number for Port A. <br> When ports are not provided, next available ports will be used. + * @return patchPanelPortA + */ + @javax.annotation.Nullable + public String getPatchPanelPortA() { + return patchPanelPortA; + } + + public void setPatchPanelPortA(@javax.annotation.Nullable String patchPanelPortA) { + this.patchPanelPortA = patchPanelPortA; + } + + + public OpticalConnectZSideRequest patchPanelPortB(@javax.annotation.Nullable String patchPanelPortB) { + this.patchPanelPortB = patchPanelPortB; + return this; + } + + /** + * Specify the desired port number for Port B. <br> When ports are not provided, next available ports will be used. <br> Required for Connector type FC, SC and ST only. + * @return patchPanelPortB + */ + @javax.annotation.Nullable + public String getPatchPanelPortB() { + return patchPanelPortB; + } + + public void setPatchPanelPortB(@javax.annotation.Nullable String patchPanelPortB) { + this.patchPanelPortB = patchPanelPortB; + } + + + public OpticalConnectZSideRequest connectorType(@javax.annotation.Nullable ConnectorTypeEnum connectorType) { + this.connectorType = connectorType; + return this; + } + + /** + * Type of Connector + * @return connectorType + */ + @javax.annotation.Nullable + public ConnectorTypeEnum getConnectorType() { + return connectorType; + } + + public void setConnectorType(@javax.annotation.Nullable ConnectorTypeEnum connectorType) { + this.connectorType = connectorType; + } + + + public OpticalConnectZSideRequest location(@javax.annotation.Nullable OpticalConnectLocation location) { + this.location = location; + return this; + } + + /** + * Get location + * @return location + */ + @javax.annotation.Nullable + public OpticalConnectLocation getLocation() { + return location; + } + + public void setLocation(@javax.annotation.Nullable OpticalConnectLocation location) { + this.location = location; + } + + + public OpticalConnectZSideRequest loa(@javax.annotation.Nullable OpticalConnectLOA loa) { + this.loa = loa; + return this; + } + + /** + * Get loa + * @return loa + */ + @javax.annotation.Nullable + public OpticalConnectLOA getLoa() { + return loa; + } + + public void setLoa(@javax.annotation.Nullable OpticalConnectLOA loa) { + this.loa = loa; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the OpticalConnectZSideRequest instance itself + */ + public OpticalConnectZSideRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OpticalConnectZSideRequest opticalConnectZSideRequest = (OpticalConnectZSideRequest) o; + return Objects.equals(this.patchPanelId, opticalConnectZSideRequest.patchPanelId) && + Objects.equals(this.patchPanelPortA, opticalConnectZSideRequest.patchPanelPortA) && + Objects.equals(this.patchPanelPortB, opticalConnectZSideRequest.patchPanelPortB) && + Objects.equals(this.connectorType, opticalConnectZSideRequest.connectorType) && + Objects.equals(this.location, opticalConnectZSideRequest.location) && + Objects.equals(this.loa, opticalConnectZSideRequest.loa)&& + Objects.equals(this.additionalProperties, opticalConnectZSideRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(patchPanelId, patchPanelPortA, patchPanelPortB, connectorType, location, loa, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OpticalConnectZSideRequest {\n"); + sb.append(" patchPanelId: ").append(toIndentedString(patchPanelId)).append("\n"); + sb.append(" patchPanelPortA: ").append(toIndentedString(patchPanelPortA)).append("\n"); + sb.append(" patchPanelPortB: ").append(toIndentedString(patchPanelPortB)).append("\n"); + sb.append(" connectorType: ").append(toIndentedString(connectorType)).append("\n"); + sb.append(" location: ").append(toIndentedString(location)).append("\n"); + sb.append(" loa: ").append(toIndentedString(loa)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("patchPanelId", "patchPanelPortA", "patchPanelPortB", "connectorType", "location", "loa")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OpticalConnectZSideRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OpticalConnectZSideRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in OpticalConnectZSideRequest is not found in the empty JSON string", OpticalConnectZSideRequest.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("patchPanelId") != null && !jsonObj.get("patchPanelId").isJsonNull()) && !jsonObj.get("patchPanelId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `patchPanelId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("patchPanelId").toString())); + } + if ((jsonObj.get("patchPanelPortA") != null && !jsonObj.get("patchPanelPortA").isJsonNull()) && !jsonObj.get("patchPanelPortA").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `patchPanelPortA` to be a primitive type in the JSON string but got `%s`", jsonObj.get("patchPanelPortA").toString())); + } + if ((jsonObj.get("patchPanelPortB") != null && !jsonObj.get("patchPanelPortB").isJsonNull()) && !jsonObj.get("patchPanelPortB").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `patchPanelPortB` to be a primitive type in the JSON string but got `%s`", jsonObj.get("patchPanelPortB").toString())); + } + if ((jsonObj.get("connectorType") != null && !jsonObj.get("connectorType").isJsonNull()) && !jsonObj.get("connectorType").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `connectorType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("connectorType").toString())); + } + // validate the optional field `connectorType` + if (jsonObj.get("connectorType") != null && !jsonObj.get("connectorType").isJsonNull()) { + ConnectorTypeEnum.validateJsonElement(jsonObj.get("connectorType")); + } + // validate the optional field `location` + if (jsonObj.get("location") != null && !jsonObj.get("location").isJsonNull()) { + OpticalConnectLocation.validateJsonElement(jsonObj.get("location")); + } + // validate the optional field `loa` + if (jsonObj.get("loa") != null && !jsonObj.get("loa").isJsonNull()) { + OpticalConnectLOA.validateJsonElement(jsonObj.get("loa")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OpticalConnectZSideRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OpticalConnectZSideRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OpticalConnectZSideRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OpticalConnectZSideRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public OpticalConnectZSideRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + OpticalConnectZSideRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OpticalConnectZSideRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of OpticalConnectZSideRequest + * @throws IOException if the JSON string is invalid with respect to OpticalConnectZSideRequest + */ + public static OpticalConnectZSideRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OpticalConnectZSideRequest.class); + } + + /** + * Convert an instance of OpticalConnectZSideRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OpticalConnectZSideResponse.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OpticalConnectZSideResponse.java new file mode 100644 index 00000000..a18d98fc --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OpticalConnectZSideResponse.java @@ -0,0 +1,553 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.OpticalConnectLOA; +import com.equinix.sdk.fabricv4.model.OpticalConnectLocation; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * Terminating end as provisioned, with the cage, cabinet and IBX location. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class OpticalConnectZSideResponse { + public static final String SERIALIZED_NAME_PATCH_PANEL_ID = "patchPanelId"; + @SerializedName(SERIALIZED_NAME_PATCH_PANEL_ID) + @javax.annotation.Nullable + private String patchPanelId; + + public static final String SERIALIZED_NAME_PATCH_PANEL_PORT_A = "patchPanelPortA"; + @SerializedName(SERIALIZED_NAME_PATCH_PANEL_PORT_A) + @javax.annotation.Nullable + private String patchPanelPortA; + + public static final String SERIALIZED_NAME_PATCH_PANEL_PORT_B = "patchPanelPortB"; + @SerializedName(SERIALIZED_NAME_PATCH_PANEL_PORT_B) + @javax.annotation.Nullable + private String patchPanelPortB; + + /** + * Type of Connector + */ + @JsonAdapter(ConnectorTypeEnum.Adapter.class) + public enum ConnectorTypeEnum { + FC("FC"), + + SC("SC"), + + LC("LC"), + + ST("ST"); + + private String value; + + ConnectorTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static ConnectorTypeEnum fromValue(String value) { + for (ConnectorTypeEnum b : ConnectorTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final ConnectorTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public ConnectorTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return ConnectorTypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + ConnectorTypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_CONNECTOR_TYPE = "connectorType"; + @SerializedName(SERIALIZED_NAME_CONNECTOR_TYPE) + @javax.annotation.Nullable + private ConnectorTypeEnum connectorType; + + public static final String SERIALIZED_NAME_CAGE_UNIQUE_SPACE_ID = "cageUniqueSpaceId"; + @SerializedName(SERIALIZED_NAME_CAGE_UNIQUE_SPACE_ID) + @javax.annotation.Nullable + private String cageUniqueSpaceId; + + public static final String SERIALIZED_NAME_CABINET_UNIQUE_SPACE_ID = "cabinetUniqueSpaceId"; + @SerializedName(SERIALIZED_NAME_CABINET_UNIQUE_SPACE_ID) + @javax.annotation.Nullable + private String cabinetUniqueSpaceId; + + public static final String SERIALIZED_NAME_LOCATION = "location"; + @SerializedName(SERIALIZED_NAME_LOCATION) + @javax.annotation.Nullable + private OpticalConnectLocation location; + + public static final String SERIALIZED_NAME_LOA = "loa"; + @SerializedName(SERIALIZED_NAME_LOA) + @javax.annotation.Nullable + private OpticalConnectLOA loa; + + public OpticalConnectZSideResponse() { + } + + public OpticalConnectZSideResponse patchPanelId(@javax.annotation.Nullable String patchPanelId) { + this.patchPanelId = patchPanelId; + return this; + } + + /** + * Unique identifier of the patch panel. + * @return patchPanelId + */ + @javax.annotation.Nullable + public String getPatchPanelId() { + return patchPanelId; + } + + public void setPatchPanelId(@javax.annotation.Nullable String patchPanelId) { + this.patchPanelId = patchPanelId; + } + + + public OpticalConnectZSideResponse patchPanelPortA(@javax.annotation.Nullable String patchPanelPortA) { + this.patchPanelPortA = patchPanelPortA; + return this; + } + + /** + * Specify the desired port number for Port A. <br> When ports are not provided, next available ports will be used. + * @return patchPanelPortA + */ + @javax.annotation.Nullable + public String getPatchPanelPortA() { + return patchPanelPortA; + } + + public void setPatchPanelPortA(@javax.annotation.Nullable String patchPanelPortA) { + this.patchPanelPortA = patchPanelPortA; + } + + + public OpticalConnectZSideResponse patchPanelPortB(@javax.annotation.Nullable String patchPanelPortB) { + this.patchPanelPortB = patchPanelPortB; + return this; + } + + /** + * Specify the desired port number for Port B. <br> When ports are not provided, next available ports will be used. <br> Required for Connector type FC, SC and ST only. + * @return patchPanelPortB + */ + @javax.annotation.Nullable + public String getPatchPanelPortB() { + return patchPanelPortB; + } + + public void setPatchPanelPortB(@javax.annotation.Nullable String patchPanelPortB) { + this.patchPanelPortB = patchPanelPortB; + } + + + public OpticalConnectZSideResponse connectorType(@javax.annotation.Nullable ConnectorTypeEnum connectorType) { + this.connectorType = connectorType; + return this; + } + + /** + * Type of Connector + * @return connectorType + */ + @javax.annotation.Nullable + public ConnectorTypeEnum getConnectorType() { + return connectorType; + } + + public void setConnectorType(@javax.annotation.Nullable ConnectorTypeEnum connectorType) { + this.connectorType = connectorType; + } + + + public OpticalConnectZSideResponse cageUniqueSpaceId(@javax.annotation.Nullable String cageUniqueSpaceId) { + this.cageUniqueSpaceId = cageUniqueSpaceId; + return this; + } + + /** + * Unique identifier of the cage. + * @return cageUniqueSpaceId + */ + @javax.annotation.Nullable + public String getCageUniqueSpaceId() { + return cageUniqueSpaceId; + } + + public void setCageUniqueSpaceId(@javax.annotation.Nullable String cageUniqueSpaceId) { + this.cageUniqueSpaceId = cageUniqueSpaceId; + } + + + public OpticalConnectZSideResponse cabinetUniqueSpaceId(@javax.annotation.Nullable String cabinetUniqueSpaceId) { + this.cabinetUniqueSpaceId = cabinetUniqueSpaceId; + return this; + } + + /** + * Unique identifier of the cabinet. + * @return cabinetUniqueSpaceId + */ + @javax.annotation.Nullable + public String getCabinetUniqueSpaceId() { + return cabinetUniqueSpaceId; + } + + public void setCabinetUniqueSpaceId(@javax.annotation.Nullable String cabinetUniqueSpaceId) { + this.cabinetUniqueSpaceId = cabinetUniqueSpaceId; + } + + + public OpticalConnectZSideResponse location(@javax.annotation.Nullable OpticalConnectLocation location) { + this.location = location; + return this; + } + + /** + * Get location + * @return location + */ + @javax.annotation.Nullable + public OpticalConnectLocation getLocation() { + return location; + } + + public void setLocation(@javax.annotation.Nullable OpticalConnectLocation location) { + this.location = location; + } + + + public OpticalConnectZSideResponse loa(@javax.annotation.Nullable OpticalConnectLOA loa) { + this.loa = loa; + return this; + } + + /** + * Get loa + * @return loa + */ + @javax.annotation.Nullable + public OpticalConnectLOA getLoa() { + return loa; + } + + public void setLoa(@javax.annotation.Nullable OpticalConnectLOA loa) { + this.loa = loa; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the OpticalConnectZSideResponse instance itself + */ + public OpticalConnectZSideResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OpticalConnectZSideResponse opticalConnectZSideResponse = (OpticalConnectZSideResponse) o; + return Objects.equals(this.patchPanelId, opticalConnectZSideResponse.patchPanelId) && + Objects.equals(this.patchPanelPortA, opticalConnectZSideResponse.patchPanelPortA) && + Objects.equals(this.patchPanelPortB, opticalConnectZSideResponse.patchPanelPortB) && + Objects.equals(this.connectorType, opticalConnectZSideResponse.connectorType) && + Objects.equals(this.cageUniqueSpaceId, opticalConnectZSideResponse.cageUniqueSpaceId) && + Objects.equals(this.cabinetUniqueSpaceId, opticalConnectZSideResponse.cabinetUniqueSpaceId) && + Objects.equals(this.location, opticalConnectZSideResponse.location) && + Objects.equals(this.loa, opticalConnectZSideResponse.loa)&& + Objects.equals(this.additionalProperties, opticalConnectZSideResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(patchPanelId, patchPanelPortA, patchPanelPortB, connectorType, cageUniqueSpaceId, cabinetUniqueSpaceId, location, loa, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OpticalConnectZSideResponse {\n"); + sb.append(" patchPanelId: ").append(toIndentedString(patchPanelId)).append("\n"); + sb.append(" patchPanelPortA: ").append(toIndentedString(patchPanelPortA)).append("\n"); + sb.append(" patchPanelPortB: ").append(toIndentedString(patchPanelPortB)).append("\n"); + sb.append(" connectorType: ").append(toIndentedString(connectorType)).append("\n"); + sb.append(" cageUniqueSpaceId: ").append(toIndentedString(cageUniqueSpaceId)).append("\n"); + sb.append(" cabinetUniqueSpaceId: ").append(toIndentedString(cabinetUniqueSpaceId)).append("\n"); + sb.append(" location: ").append(toIndentedString(location)).append("\n"); + sb.append(" loa: ").append(toIndentedString(loa)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("patchPanelId", "patchPanelPortA", "patchPanelPortB", "connectorType", "cageUniqueSpaceId", "cabinetUniqueSpaceId", "location", "loa")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OpticalConnectZSideResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OpticalConnectZSideResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in OpticalConnectZSideResponse is not found in the empty JSON string", OpticalConnectZSideResponse.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("patchPanelId") != null && !jsonObj.get("patchPanelId").isJsonNull()) && !jsonObj.get("patchPanelId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `patchPanelId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("patchPanelId").toString())); + } + if ((jsonObj.get("patchPanelPortA") != null && !jsonObj.get("patchPanelPortA").isJsonNull()) && !jsonObj.get("patchPanelPortA").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `patchPanelPortA` to be a primitive type in the JSON string but got `%s`", jsonObj.get("patchPanelPortA").toString())); + } + if ((jsonObj.get("patchPanelPortB") != null && !jsonObj.get("patchPanelPortB").isJsonNull()) && !jsonObj.get("patchPanelPortB").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `patchPanelPortB` to be a primitive type in the JSON string but got `%s`", jsonObj.get("patchPanelPortB").toString())); + } + if ((jsonObj.get("connectorType") != null && !jsonObj.get("connectorType").isJsonNull()) && !jsonObj.get("connectorType").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `connectorType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("connectorType").toString())); + } + // validate the optional field `connectorType` + if (jsonObj.get("connectorType") != null && !jsonObj.get("connectorType").isJsonNull()) { + ConnectorTypeEnum.validateJsonElement(jsonObj.get("connectorType")); + } + if ((jsonObj.get("cageUniqueSpaceId") != null && !jsonObj.get("cageUniqueSpaceId").isJsonNull()) && !jsonObj.get("cageUniqueSpaceId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `cageUniqueSpaceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("cageUniqueSpaceId").toString())); + } + if ((jsonObj.get("cabinetUniqueSpaceId") != null && !jsonObj.get("cabinetUniqueSpaceId").isJsonNull()) && !jsonObj.get("cabinetUniqueSpaceId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `cabinetUniqueSpaceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("cabinetUniqueSpaceId").toString())); + } + // validate the optional field `location` + if (jsonObj.get("location") != null && !jsonObj.get("location").isJsonNull()) { + OpticalConnectLocation.validateJsonElement(jsonObj.get("location")); + } + // validate the optional field `loa` + if (jsonObj.get("loa") != null && !jsonObj.get("loa").isJsonNull()) { + OpticalConnectLOA.validateJsonElement(jsonObj.get("loa")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OpticalConnectZSideResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OpticalConnectZSideResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OpticalConnectZSideResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OpticalConnectZSideResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public OpticalConnectZSideResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + OpticalConnectZSideResponse instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OpticalConnectZSideResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of OpticalConnectZSideResponse + * @throws IOException if the JSON string is invalid with respect to OpticalConnectZSideResponse + */ + public static OpticalConnectZSideResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OpticalConnectZSideResponse.class); + } + + /** + * Convert an instance of OpticalConnectZSideResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/Phone.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/Phone.java new file mode 100644 index 00000000..3e11ba90 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/Phone.java @@ -0,0 +1,402 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.ContactPreference; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * Phone + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class Phone { + /** + * Notification Type + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + MOBILE("MOBILE"), + + OFFICE("OFFICE"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nullable + private TypeEnum type; + + public static final String SERIALIZED_NAME_NUMBER = "number"; + @SerializedName(SERIALIZED_NAME_NUMBER) + @javax.annotation.Nullable + private String number; + + public static final String SERIALIZED_NAME_CONTACT_PREFERENCE = "contactPreference"; + @SerializedName(SERIALIZED_NAME_CONTACT_PREFERENCE) + @javax.annotation.Nullable + private ContactPreference contactPreference; + + public Phone() { + } + + public Phone type(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + return this; + } + + /** + * Notification Type + * @return type + */ + @javax.annotation.Nullable + public TypeEnum getType() { + return type; + } + + public void setType(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + } + + + public Phone number(@javax.annotation.Nullable String number) { + this.number = number; + return this; + } + + /** + * Phone number + * @return number + */ + @javax.annotation.Nullable + public String getNumber() { + return number; + } + + public void setNumber(@javax.annotation.Nullable String number) { + this.number = number; + } + + + public Phone contactPreference(@javax.annotation.Nullable ContactPreference contactPreference) { + this.contactPreference = contactPreference; + return this; + } + + /** + * Get contactPreference + * @return contactPreference + */ + @javax.annotation.Nullable + public ContactPreference getContactPreference() { + return contactPreference; + } + + public void setContactPreference(@javax.annotation.Nullable ContactPreference contactPreference) { + this.contactPreference = contactPreference; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the Phone instance itself + */ + public Phone putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Phone phone = (Phone) o; + return Objects.equals(this.type, phone.type) && + Objects.equals(this.number, phone.number) && + Objects.equals(this.contactPreference, phone.contactPreference)&& + Objects.equals(this.additionalProperties, phone.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(type, number, contactPreference, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Phone {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" number: ").append(toIndentedString(number)).append("\n"); + sb.append(" contactPreference: ").append(toIndentedString(contactPreference)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("type", "number", "contactPreference")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to Phone + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Phone.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in Phone is not found in the empty JSON string", Phone.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // validate the optional field `type` + if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { + TypeEnum.validateJsonElement(jsonObj.get("type")); + } + if ((jsonObj.get("number") != null && !jsonObj.get("number").isJsonNull()) && !jsonObj.get("number").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `number` to be a primitive type in the JSON string but got `%s`", jsonObj.get("number").toString())); + } + // validate the optional field `contactPreference` + if (jsonObj.get("contactPreference") != null && !jsonObj.get("contactPreference").isJsonNull()) { + ContactPreference.validateJsonElement(jsonObj.get("contactPreference")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!Phone.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Phone' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Phone.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, Phone value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public Phone read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + Phone instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of Phone given an JSON string + * + * @param jsonString JSON string + * @return An instance of Phone + * @throws IOException if the JSON string is invalid with respect to Phone + */ + public static Phone fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, Phone.class); + } + + /** + * Convert an instance of Phone to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/PortExpression.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/PortExpression.java index 9c04f922..6ac422f8 100644 --- a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/PortExpression.java +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/PortExpression.java @@ -73,7 +73,27 @@ public class PortExpression { */ @JsonAdapter(OperatorEnum.Adapter.class) public enum OperatorEnum { - EQUAL("="); + EQUAL("="), + + NOT_EQUAL("!="), + + GREATER_THAN(">"), + + GREATER_THAN_OR_EQUAL_TO(">="), + + LESS_THAN("<"), + + LESS_THAN_OR_EQUAL_TO("<="), + + LIKE("LIKE"), + + ILIKE("ILIKE"), + + IN("IN"), + + NOT_IN("NOT IN"), + + BETWEEN("BETWEEN"); private String value; diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/PortOperation.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/PortOperation.java index 57979528..164bd4a6 100644 --- a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/PortOperation.java +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/PortOperation.java @@ -13,6 +13,7 @@ import java.util.Objects; import java.util.Locale; +import com.equinix.sdk.fabricv4.model.MaintenanceState; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -135,6 +136,11 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @javax.annotation.Nullable private OffsetDateTime opStatusChangedAt; + public static final String SERIALIZED_NAME_MAINTENANCE_STATUS = "maintenanceStatus"; + @SerializedName(SERIALIZED_NAME_MAINTENANCE_STATUS) + @javax.annotation.Nullable + private MaintenanceState maintenanceStatus; + public PortOperation() { } @@ -251,6 +257,25 @@ public void setOpStatusChangedAt(@javax.annotation.Nullable OffsetDateTime opSta this.opStatusChangedAt = opStatusChangedAt; } + + public PortOperation maintenanceStatus(@javax.annotation.Nullable MaintenanceState maintenanceStatus) { + this.maintenanceStatus = maintenanceStatus; + return this; + } + + /** + * Get maintenanceStatus + * @return maintenanceStatus + */ + @javax.annotation.Nullable + public MaintenanceState getMaintenanceStatus() { + return maintenanceStatus; + } + + public void setMaintenanceStatus(@javax.annotation.Nullable MaintenanceState maintenanceStatus) { + this.maintenanceStatus = maintenanceStatus; + } + /** * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with @@ -311,13 +336,14 @@ public boolean equals(Object o) { Objects.equals(this.evplVCCount, portOperation.evplVCCount) && Objects.equals(this.fgVCCount, portOperation.fgVCCount) && Objects.equals(this.accessVCCount, portOperation.accessVCCount) && - Objects.equals(this.opStatusChangedAt, portOperation.opStatusChangedAt)&& + Objects.equals(this.opStatusChangedAt, portOperation.opStatusChangedAt) && + Objects.equals(this.maintenanceStatus, portOperation.maintenanceStatus)&& Objects.equals(this.additionalProperties, portOperation.additionalProperties); } @Override public int hashCode() { - return Objects.hash(operationalStatus, connectionCount, evplVCCount, fgVCCount, accessVCCount, opStatusChangedAt, additionalProperties); + return Objects.hash(operationalStatus, connectionCount, evplVCCount, fgVCCount, accessVCCount, opStatusChangedAt, maintenanceStatus, additionalProperties); } @Override @@ -330,6 +356,7 @@ public String toString() { sb.append(" fgVCCount: ").append(toIndentedString(fgVCCount)).append("\n"); sb.append(" accessVCCount: ").append(toIndentedString(accessVCCount)).append("\n"); sb.append(" opStatusChangedAt: ").append(toIndentedString(opStatusChangedAt)).append("\n"); + sb.append(" maintenanceStatus: ").append(toIndentedString(maintenanceStatus)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); @@ -352,7 +379,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("operationalStatus", "connectionCount", "evplVCCount", "fgVCCount", "accessVCCount", "opStatusChangedAt")); + openapiFields = new HashSet(Arrays.asList("operationalStatus", "connectionCount", "evplVCCount", "fgVCCount", "accessVCCount", "opStatusChangedAt", "maintenanceStatus")); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(0); @@ -378,6 +405,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("operationalStatus") != null && !jsonObj.get("operationalStatus").isJsonNull()) { OperationalStatusEnum.validateJsonElement(jsonObj.get("operationalStatus")); } + // validate the optional field `maintenanceStatus` + if (jsonObj.get("maintenanceStatus") != null && !jsonObj.get("maintenanceStatus").isJsonNull()) { + MaintenanceState.validateJsonElement(jsonObj.get("maintenanceStatus")); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/PortSearchFieldName.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/PortSearchFieldName.java index 6c0fe0cc..863d513e 100644 --- a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/PortSearchFieldName.java +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/PortSearchFieldName.java @@ -47,7 +47,11 @@ public enum PortSearchFieldName { ACCOUNT_ACCOUNTNUMBER("/account/accountNumber"), - LOCATION_METROCODE("/location/metroCode"); + LOCATION_METROCODE("/location/metroCode"), + + OPERATION_MAINTENANCESTATUS("/operation/maintenanceStatus"), + + OPERATION_LOCKENABLED("/operation/lockEnabled"); private String value; diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/Price.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/Price.java index c216daf7..7570797a 100644 --- a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/Price.java +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/Price.java @@ -15,6 +15,7 @@ import java.util.Locale; import com.equinix.sdk.fabricv4.model.FabricCloudRouterPrice; import com.equinix.sdk.fabricv4.model.IpBlockPrice; +import com.equinix.sdk.fabricv4.model.OpticalConnectPrice; import com.equinix.sdk.fabricv4.model.PriceCategory; import com.equinix.sdk.fabricv4.model.PriceCharge; import com.equinix.sdk.fabricv4.model.ProductType; @@ -192,6 +193,11 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @javax.annotation.Nullable private TimeServicePrice timeService; + public static final String SERIALIZED_NAME_OPTICAL_CONNECT = "opticalConnect"; + @SerializedName(SERIALIZED_NAME_OPTICAL_CONNECT) + @javax.annotation.Nullable + private OpticalConnectPrice opticalConnect; + public Price() { } @@ -487,6 +493,25 @@ public void setTimeService(@javax.annotation.Nullable TimeServicePrice timeServi this.timeService = timeService; } + + public Price opticalConnect(@javax.annotation.Nullable OpticalConnectPrice opticalConnect) { + this.opticalConnect = opticalConnect; + return this; + } + + /** + * Get opticalConnect + * @return opticalConnect + */ + @javax.annotation.Nullable + public OpticalConnectPrice getOpticalConnect() { + return opticalConnect; + } + + public void setOpticalConnect(@javax.annotation.Nullable OpticalConnectPrice opticalConnect) { + this.opticalConnect = opticalConnect; + } + /** * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with @@ -556,13 +581,14 @@ public boolean equals(Object o) { Objects.equals(this.ipBlock, price.ipBlock) && Objects.equals(this.router, price.router) && Objects.equals(this.port, price.port) && - Objects.equals(this.timeService, price.timeService)&& + Objects.equals(this.timeService, price.timeService) && + Objects.equals(this.opticalConnect, price.opticalConnect)&& Objects.equals(this.additionalProperties, price.additionalProperties); } @Override public int hashCode() { - return Objects.hash(href, type, code, name, description, account, charges, currency, termLength, catgory, connection, ipBlock, router, port, timeService, additionalProperties); + return Objects.hash(href, type, code, name, description, account, charges, currency, termLength, catgory, connection, ipBlock, router, port, timeService, opticalConnect, additionalProperties); } @Override @@ -584,6 +610,7 @@ public String toString() { sb.append(" router: ").append(toIndentedString(router)).append("\n"); sb.append(" port: ").append(toIndentedString(port)).append("\n"); sb.append(" timeService: ").append(toIndentedString(timeService)).append("\n"); + sb.append(" opticalConnect: ").append(toIndentedString(opticalConnect)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); @@ -606,7 +633,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("href", "type", "code", "name", "description", "account", "charges", "currency", "termLength", "catgory", "connection", "ipBlock", "router", "port", "timeService")); + openapiFields = new HashSet(Arrays.asList("href", "type", "code", "name", "description", "account", "charges", "currency", "termLength", "catgory", "connection", "ipBlock", "router", "port", "timeService", "opticalConnect")); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(0); @@ -690,6 +717,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("timeService") != null && !jsonObj.get("timeService").isJsonNull()) { TimeServicePrice.validateJsonElement(jsonObj.get("timeService")); } + // validate the optional field `opticalConnect` + if (jsonObj.get("opticalConnect") != null && !jsonObj.get("opticalConnect").isJsonNull()) { + OpticalConnectPrice.validateJsonElement(jsonObj.get("opticalConnect")); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ConnectionCompanyProfile.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ProductOffering.java similarity index 72% rename from services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ConnectionCompanyProfile.java rename to services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ProductOffering.java index 1668ae98..25434997 100644 --- a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ConnectionCompanyProfile.java +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ProductOffering.java @@ -19,7 +19,6 @@ import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.math.BigDecimal; import java.util.Arrays; import com.google.gson.Gson; @@ -47,54 +46,49 @@ import com.equinix.sdk.fabricv4.JSON; /** - * Connection Company Profile Details + * Product offering for connection. Applicable to zSide only. */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") -public class ConnectionCompanyProfile { +public class ProductOffering { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) @javax.annotation.Nullable - private BigDecimal id; + private String id; public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) @javax.annotation.Nullable private String name; - public static final String SERIALIZED_NAME_GLOBAL_ORG_ID = "globalOrgId"; - @SerializedName(SERIALIZED_NAME_GLOBAL_ORG_ID) - @javax.annotation.Nullable - private String globalOrgId; - - public ConnectionCompanyProfile() { + public ProductOffering() { } - public ConnectionCompanyProfile id(@javax.annotation.Nullable BigDecimal id) { + public ProductOffering id(@javax.annotation.Nullable String id) { this.id = id; return this; } /** - * company profile identifier + * Product offering identifier * @return id */ @javax.annotation.Nullable - public BigDecimal getId() { + public String getId() { return id; } - public void setId(@javax.annotation.Nullable BigDecimal id) { + public void setId(@javax.annotation.Nullable String id) { this.id = id; } - public ConnectionCompanyProfile name(@javax.annotation.Nullable String name) { + public ProductOffering name(@javax.annotation.Nullable String name) { this.name = name; return this; } /** - * company profile name + * Product offering name * @return name */ @javax.annotation.Nullable @@ -106,25 +100,6 @@ public void setName(@javax.annotation.Nullable String name) { this.name = name; } - - public ConnectionCompanyProfile globalOrgId(@javax.annotation.Nullable String globalOrgId) { - this.globalOrgId = globalOrgId; - return this; - } - - /** - * global customer organization value - * @return globalOrgId - */ - @javax.annotation.Nullable - public String getGlobalOrgId() { - return globalOrgId; - } - - public void setGlobalOrgId(@javax.annotation.Nullable String globalOrgId) { - this.globalOrgId = globalOrgId; - } - /** * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with @@ -138,9 +113,9 @@ public void setGlobalOrgId(@javax.annotation.Nullable String globalOrgId) { * * @param key name of the property * @param value value of the property - * @return the ConnectionCompanyProfile instance itself + * @return the ProductOffering instance itself */ - public ConnectionCompanyProfile putAdditionalProperty(String key, Object value) { + public ProductOffering putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -179,25 +154,23 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - ConnectionCompanyProfile connectionCompanyProfile = (ConnectionCompanyProfile) o; - return Objects.equals(this.id, connectionCompanyProfile.id) && - Objects.equals(this.name, connectionCompanyProfile.name) && - Objects.equals(this.globalOrgId, connectionCompanyProfile.globalOrgId)&& - Objects.equals(this.additionalProperties, connectionCompanyProfile.additionalProperties); + ProductOffering productOffering = (ProductOffering) o; + return Objects.equals(this.id, productOffering.id) && + Objects.equals(this.name, productOffering.name)&& + Objects.equals(this.additionalProperties, productOffering.additionalProperties); } @Override public int hashCode() { - return Objects.hash(id, name, globalOrgId, additionalProperties); + return Objects.hash(id, name, additionalProperties); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class ConnectionCompanyProfile {\n"); + sb.append("class ProductOffering {\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" globalOrgId: ").append(toIndentedString(globalOrgId)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); @@ -220,7 +193,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("id", "name", "globalOrgId")); + openapiFields = new HashSet(Arrays.asList("id", "name")); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(0); @@ -230,37 +203,37 @@ private String toIndentedString(Object o) { * Validates the JSON Element and throws an exception if issues found * * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ConnectionCompanyProfile + * @throws IOException if the JSON Element is invalid with respect to ProductOffering */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { - if (!ConnectionCompanyProfile.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in ConnectionCompanyProfile is not found in the empty JSON string", ConnectionCompanyProfile.openapiRequiredFields.toString())); + if (!ProductOffering.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in ProductOffering is not found in the empty JSON string", ProductOffering.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } - if ((jsonObj.get("globalOrgId") != null && !jsonObj.get("globalOrgId").isJsonNull()) && !jsonObj.get("globalOrgId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `globalOrgId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("globalOrgId").toString())); - } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!ConnectionCompanyProfile.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ConnectionCompanyProfile' and its subtypes + if (!ProductOffering.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ProductOffering' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ConnectionCompanyProfile.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ProductOffering.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, ConnectionCompanyProfile value) throws IOException { + public void write(JsonWriter out, ProductOffering value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); // serialize additional properties @@ -288,12 +261,12 @@ else if (entry.getValue() instanceof Character) } @Override - public ConnectionCompanyProfile read(JsonReader in) throws IOException { + public ProductOffering read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); JsonObject jsonObj = jsonElement.getAsJsonObject(); // store additional fields in the deserialized instance - ConnectionCompanyProfile instance = thisAdapter.fromJsonTree(jsonObj); + ProductOffering instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { if (!openapiFields.contains(entry.getKey())) { if (entry.getValue().isJsonPrimitive()) { // primitive type @@ -320,18 +293,18 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } /** - * Create an instance of ConnectionCompanyProfile given an JSON string + * Create an instance of ProductOffering given an JSON string * * @param jsonString JSON string - * @return An instance of ConnectionCompanyProfile - * @throws IOException if the JSON string is invalid with respect to ConnectionCompanyProfile + * @return An instance of ProductOffering + * @throws IOException if the JSON string is invalid with respect to ProductOffering */ - public static ConnectionCompanyProfile fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ConnectionCompanyProfile.class); + public static ProductOffering fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ProductOffering.class); } /** - * Convert an instance of ConnectionCompanyProfile to an JSON string + * Convert an instance of ProductOffering to an JSON string * * @return JSON string */ diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ProductType.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ProductType.java index b098c51e..979b5282 100644 --- a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ProductType.java +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ProductType.java @@ -39,7 +39,7 @@ public enum ProductType { PRECISION_TIME_PRODUCT("PRECISION_TIME_PRODUCT"), - METRO_CONNECT_PRODUCT("METRO_CONNECT_PRODUCT"); + OPTICAL_CONNECT_PRODUCT("OPTICAL_CONNECT_PRODUCT"); private String value; diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ProviderEnvironment.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ProviderEnvironment.java index 12c1ba48..bf11ffd3 100644 --- a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ProviderEnvironment.java +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ProviderEnvironment.java @@ -15,6 +15,7 @@ import java.util.Locale; import com.equinix.sdk.fabricv4.model.Changelog; import com.equinix.sdk.fabricv4.model.ProviderEnvironmentTypeEnum; +import com.equinix.sdk.fabricv4.model.ServiceMetro; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -52,7 +53,7 @@ import com.equinix.sdk.fabricv4.JSON; /** - * Provider Environment associated with an IC_PROFILE service profile + * Provider Environment associated with an IC_PROFILE service profile <font color=\"red\"> <sup color='red'>Beta</sup></font> */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class ProviderEnvironment { @@ -91,6 +92,16 @@ public class ProviderEnvironment { @javax.annotation.Nullable private List supportedBandwidths = new ArrayList<>(); + public static final String SERIALIZED_NAME_METROS = "metros"; + @SerializedName(SERIALIZED_NAME_METROS) + @javax.annotation.Nullable + private List metros = new ArrayList<>(); + + public static final String SERIALIZED_NAME_SUPPORTED_FEATURES = "supportedFeatures"; + @SerializedName(SERIALIZED_NAME_SUPPORTED_FEATURES) + @javax.annotation.Nullable + private List supportedFeatures = new ArrayList<>(); + public static final String SERIALIZED_NAME_CHANGE_LOG = "changeLog"; @SerializedName(SERIALIZED_NAME_CHANGE_LOG) @javax.annotation.Nullable @@ -239,6 +250,60 @@ public void setSupportedBandwidths(@javax.annotation.Nullable List supp } + public ProviderEnvironment metros(@javax.annotation.Nullable List metros) { + this.metros = metros; + return this; + } + + public ProviderEnvironment addMetrosItem(ServiceMetro metrosItem) { + if (this.metros == null) { + this.metros = new ArrayList<>(); + } + this.metros.add(metrosItem); + return this; + } + + /** + * Derived response attribute. + * @return metros + */ + @javax.annotation.Nullable + public List getMetros() { + return metros; + } + + public void setMetros(@javax.annotation.Nullable List metros) { + this.metros = metros; + } + + + public ProviderEnvironment supportedFeatures(@javax.annotation.Nullable List supportedFeatures) { + this.supportedFeatures = supportedFeatures; + return this; + } + + public ProviderEnvironment addSupportedFeaturesItem(String supportedFeaturesItem) { + if (this.supportedFeatures == null) { + this.supportedFeatures = new ArrayList<>(); + } + this.supportedFeatures.add(supportedFeaturesItem); + return this; + } + + /** + * Supported Feature Types + * @return supportedFeatures + */ + @javax.annotation.Nullable + public List getSupportedFeatures() { + return supportedFeatures; + } + + public void setSupportedFeatures(@javax.annotation.Nullable List supportedFeatures) { + this.supportedFeatures = supportedFeatures; + } + + public ProviderEnvironment changeLog(@javax.annotation.Nullable Changelog changeLog) { this.changeLog = changeLog; return this; @@ -319,13 +384,15 @@ public boolean equals(Object o) { Objects.equals(this.description, providerEnvironment.description) && Objects.equals(this.region, providerEnvironment.region) && Objects.equals(this.supportedBandwidths, providerEnvironment.supportedBandwidths) && + Objects.equals(this.metros, providerEnvironment.metros) && + Objects.equals(this.supportedFeatures, providerEnvironment.supportedFeatures) && Objects.equals(this.changeLog, providerEnvironment.changeLog)&& Objects.equals(this.additionalProperties, providerEnvironment.additionalProperties); } @Override public int hashCode() { - return Objects.hash(href, uuid, type, name, description, region, supportedBandwidths, changeLog, additionalProperties); + return Objects.hash(href, uuid, type, name, description, region, supportedBandwidths, metros, supportedFeatures, changeLog, additionalProperties); } @Override @@ -339,6 +406,8 @@ public String toString() { sb.append(" description: ").append(toIndentedString(description)).append("\n"); sb.append(" region: ").append(toIndentedString(region)).append("\n"); sb.append(" supportedBandwidths: ").append(toIndentedString(supportedBandwidths)).append("\n"); + sb.append(" metros: ").append(toIndentedString(metros)).append("\n"); + sb.append(" supportedFeatures: ").append(toIndentedString(supportedFeatures)).append("\n"); sb.append(" changeLog: ").append(toIndentedString(changeLog)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); @@ -362,7 +431,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("href", "uuid", "type", "name", "description", "region", "supportedBandwidths", "changeLog")); + openapiFields = new HashSet(Arrays.asList("href", "uuid", "type", "name", "description", "region", "supportedBandwidths", "metros", "supportedFeatures", "changeLog")); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(0); @@ -404,6 +473,24 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("supportedBandwidths") != null && !jsonObj.get("supportedBandwidths").isJsonNull() && !jsonObj.get("supportedBandwidths").isJsonArray()) { throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `supportedBandwidths` to be an array in the JSON string but got `%s`", jsonObj.get("supportedBandwidths").toString())); } + if (jsonObj.get("metros") != null && !jsonObj.get("metros").isJsonNull()) { + JsonArray jsonArraymetros = jsonObj.getAsJsonArray("metros"); + if (jsonArraymetros != null) { + // ensure the json data is an array + if (!jsonObj.get("metros").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `metros` to be an array in the JSON string but got `%s`", jsonObj.get("metros").toString())); + } + + // validate the optional field `metros` (array) + for (int i = 0; i < jsonArraymetros.size(); i++) { + ServiceMetro.validateJsonElement(jsonArraymetros.get(i)); + }; + } + } + // ensure the optional json data is an array if present + if (jsonObj.get("supportedFeatures") != null && !jsonObj.get("supportedFeatures").isJsonNull() && !jsonObj.get("supportedFeatures").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `supportedFeatures` to be an array in the JSON string but got `%s`", jsonObj.get("supportedFeatures").toString())); + } // validate the optional field `changeLog` if (jsonObj.get("changeLog") != null && !jsonObj.get("changeLog").isJsonNull()) { Changelog.validateJsonElement(jsonObj.get("changeLog")); diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ProviderEnvironments.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ProviderEnvironments.java new file mode 100644 index 00000000..9b475803 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ProviderEnvironments.java @@ -0,0 +1,339 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.Pagination; +import com.equinix.sdk.fabricv4.model.ProviderEnvironment; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * Service Profile Provider Environments + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class ProviderEnvironments { + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + @javax.annotation.Nullable + private List data = new ArrayList<>(); + + public static final String SERIALIZED_NAME_PAGINATION = "pagination"; + @SerializedName(SERIALIZED_NAME_PAGINATION) + @javax.annotation.Nullable + private Pagination pagination; + + public ProviderEnvironments() { + } + + public ProviderEnvironments data(@javax.annotation.Nullable List data) { + this.data = data; + return this; + } + + public ProviderEnvironments addDataItem(ProviderEnvironment dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + return this; + } + + /** + * Get data + * @return data + */ + @javax.annotation.Nullable + public List getData() { + return data; + } + + public void setData(@javax.annotation.Nullable List data) { + this.data = data; + } + + + public ProviderEnvironments pagination(@javax.annotation.Nullable Pagination pagination) { + this.pagination = pagination; + return this; + } + + /** + * Get pagination + * @return pagination + */ + @javax.annotation.Nullable + public Pagination getPagination() { + return pagination; + } + + public void setPagination(@javax.annotation.Nullable Pagination pagination) { + this.pagination = pagination; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ProviderEnvironments instance itself + */ + public ProviderEnvironments putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ProviderEnvironments providerEnvironments = (ProviderEnvironments) o; + return Objects.equals(this.data, providerEnvironments.data) && + Objects.equals(this.pagination, providerEnvironments.pagination)&& + Objects.equals(this.additionalProperties, providerEnvironments.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, pagination, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ProviderEnvironments {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" pagination: ").append(toIndentedString(pagination)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("data", "pagination")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ProviderEnvironments + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ProviderEnvironments.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in ProviderEnvironments is not found in the empty JSON string", ProviderEnvironments.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); + if (jsonArraydata != null) { + // ensure the json data is an array + if (!jsonObj.get("data").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + } + + // validate the optional field `data` (array) + for (int i = 0; i < jsonArraydata.size(); i++) { + ProviderEnvironment.validateJsonElement(jsonArraydata.get(i)); + }; + } + } + // validate the optional field `pagination` + if (jsonObj.get("pagination") != null && !jsonObj.get("pagination").isJsonNull()) { + Pagination.validateJsonElement(jsonObj.get("pagination")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ProviderEnvironments.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ProviderEnvironments' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ProviderEnvironments.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ProviderEnvironments value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ProviderEnvironments read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ProviderEnvironments instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ProviderEnvironments given an JSON string + * + * @param jsonString JSON string + * @return An instance of ProviderEnvironments + * @throws IOException if the JSON string is invalid with respect to ProviderEnvironments + */ + public static ProviderEnvironments fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ProviderEnvironments.class); + } + + /** + * Convert an instance of ProviderEnvironments to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/PublicPeeringConnectionResponse.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/PublicPeeringConnectionResponse.java new file mode 100644 index 00000000..0aa2768c --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/PublicPeeringConnectionResponse.java @@ -0,0 +1,345 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import java.util.UUID; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * PublicPeeringConnectionResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class PublicPeeringConnectionResponse { + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nullable + private String type; + + public static final String SERIALIZED_NAME_HREF = "href"; + @SerializedName(SERIALIZED_NAME_HREF) + @javax.annotation.Nullable + private String href; + + public static final String SERIALIZED_NAME_UUID = "uuid"; + @SerializedName(SERIALIZED_NAME_UUID) + @javax.annotation.Nullable + private UUID uuid; + + public PublicPeeringConnectionResponse() { + } + + public PublicPeeringConnectionResponse type(@javax.annotation.Nullable String type) { + this.type = type; + return this; + } + + /** + * Connection type IX_VC + * @return type + */ + @javax.annotation.Nullable + public String getType() { + return type; + } + + public void setType(@javax.annotation.Nullable String type) { + this.type = type; + } + + + public PublicPeeringConnectionResponse href(@javax.annotation.Nullable String href) { + this.href = href; + return this; + } + + /** + * URI + * @return href + */ + @javax.annotation.Nullable + public String getHref() { + return href; + } + + public void setHref(@javax.annotation.Nullable String href) { + this.href = href; + } + + + public PublicPeeringConnectionResponse uuid(@javax.annotation.Nullable UUID uuid) { + this.uuid = uuid; + return this; + } + + /** + * uuid + * @return uuid + */ + @javax.annotation.Nullable + public UUID getUuid() { + return uuid; + } + + public void setUuid(@javax.annotation.Nullable UUID uuid) { + this.uuid = uuid; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the PublicPeeringConnectionResponse instance itself + */ + public PublicPeeringConnectionResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PublicPeeringConnectionResponse publicPeeringConnectionResponse = (PublicPeeringConnectionResponse) o; + return Objects.equals(this.type, publicPeeringConnectionResponse.type) && + Objects.equals(this.href, publicPeeringConnectionResponse.href) && + Objects.equals(this.uuid, publicPeeringConnectionResponse.uuid)&& + Objects.equals(this.additionalProperties, publicPeeringConnectionResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(type, href, uuid, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PublicPeeringConnectionResponse {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" href: ").append(toIndentedString(href)).append("\n"); + sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("type", "href", "uuid")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to PublicPeeringConnectionResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!PublicPeeringConnectionResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in PublicPeeringConnectionResponse is not found in the empty JSON string", PublicPeeringConnectionResponse.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + if ((jsonObj.get("href") != null && !jsonObj.get("href").isJsonNull()) && !jsonObj.get("href").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `href` to be a primitive type in the JSON string but got `%s`", jsonObj.get("href").toString())); + } + if ((jsonObj.get("uuid") != null && !jsonObj.get("uuid").isJsonNull()) && !jsonObj.get("uuid").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `uuid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("uuid").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PublicPeeringConnectionResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PublicPeeringConnectionResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(PublicPeeringConnectionResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, PublicPeeringConnectionResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public PublicPeeringConnectionResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + PublicPeeringConnectionResponse instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of PublicPeeringConnectionResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of PublicPeeringConnectionResponse + * @throws IOException if the JSON string is invalid with respect to PublicPeeringConnectionResponse + */ + public static PublicPeeringConnectionResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, PublicPeeringConnectionResponse.class); + } + + /** + * Convert an instance of PublicPeeringConnectionResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/RemoveOperation.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/RemoveOperation.java index 6f0ee59e..499da1e2 100644 --- a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/RemoveOperation.java +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/RemoveOperation.java @@ -13,7 +13,6 @@ import java.util.Objects; import java.util.Locale; -import com.equinix.sdk.fabricv4.model.OpEnum; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -51,6 +50,56 @@ */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class RemoveOperation { + /** + * Gets or Sets op + */ + @JsonAdapter(OpEnum.Adapter.class) + public enum OpEnum { + REMOVE("remove"); + + private String value; + + OpEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static OpEnum fromValue(String value) { + for (OpEnum b : OpEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final OpEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public OpEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return OpEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + OpEnum.fromValue(value); + } + } + public static final String SERIALIZED_NAME_OP = "op"; @SerializedName(SERIALIZED_NAME_OP) @javax.annotation.Nonnull @@ -220,6 +269,9 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("op").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `op` to be a primitive type in the JSON string but got `%s`", jsonObj.get("op").toString())); + } // validate the required field `op` OpEnum.validateJsonElement(jsonObj.get("op")); // check op value matches "remove" for RemoveOperation diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ReplaceOperation.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ReplaceOperation.java index f73d91ac..5c97470b 100644 --- a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ReplaceOperation.java +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ReplaceOperation.java @@ -13,7 +13,6 @@ import java.util.Objects; import java.util.Locale; -import com.equinix.sdk.fabricv4.model.OpEnum; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -51,6 +50,56 @@ */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class ReplaceOperation { + /** + * Gets or Sets op + */ + @JsonAdapter(OpEnum.Adapter.class) + public enum OpEnum { + REPLACE("replace"); + + private String value; + + OpEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static OpEnum fromValue(String value) { + for (OpEnum b : OpEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final OpEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public OpEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return OpEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + OpEnum.fromValue(value); + } + } + public static final String SERIALIZED_NAME_OP = "op"; @SerializedName(SERIALIZED_NAME_OP) @javax.annotation.Nonnull @@ -246,6 +295,9 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("op").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `op` to be a primitive type in the JSON string but got `%s`", jsonObj.get("op").toString())); + } // validate the required field `op` OpEnum.validateJsonElement(jsonObj.get("op")); // check op value matches "replace" for ReplaceOperation diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/RequestLoa.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/RequestLoa.java new file mode 100644 index 00000000..7f183857 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/RequestLoa.java @@ -0,0 +1,440 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.LoaIssuer; +import com.equinix.sdk.fabricv4.model.LoaLocation; +import com.equinix.sdk.fabricv4.model.LoaProductType; +import com.equinix.sdk.fabricv4.model.LoaType; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * Request Loa + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class RequestLoa { + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nonnull + private LoaType type; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable + private String description; + + public static final String SERIALIZED_NAME_AUTHORIZED_PRODUCT_TYPE = "authorizedProductType"; + @SerializedName(SERIALIZED_NAME_AUTHORIZED_PRODUCT_TYPE) + @javax.annotation.Nonnull + private LoaProductType authorizedProductType; + + public static final String SERIALIZED_NAME_ISSUER = "issuer"; + @SerializedName(SERIALIZED_NAME_ISSUER) + @javax.annotation.Nullable + private LoaIssuer issuer; + + public static final String SERIALIZED_NAME_LOCATION = "location"; + @SerializedName(SERIALIZED_NAME_LOCATION) + @javax.annotation.Nonnull + private LoaLocation location; + + public RequestLoa() { + } + + public RequestLoa type(@javax.annotation.Nonnull LoaType type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + */ + @javax.annotation.Nonnull + public LoaType getType() { + return type; + } + + public void setType(@javax.annotation.Nonnull LoaType type) { + this.type = type; + } + + + public RequestLoa name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * A short, descriptive name for this LOA. + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public RequestLoa description(@javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * Additional context about this LOA. + * @return description + */ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + + + public RequestLoa authorizedProductType(@javax.annotation.Nonnull LoaProductType authorizedProductType) { + this.authorizedProductType = authorizedProductType; + return this; + } + + /** + * Get authorizedProductType + * @return authorizedProductType + */ + @javax.annotation.Nonnull + public LoaProductType getAuthorizedProductType() { + return authorizedProductType; + } + + public void setAuthorizedProductType(@javax.annotation.Nonnull LoaProductType authorizedProductType) { + this.authorizedProductType = authorizedProductType; + } + + + public RequestLoa issuer(@javax.annotation.Nullable LoaIssuer issuer) { + this.issuer = issuer; + return this; + } + + /** + * Get issuer + * @return issuer + */ + @javax.annotation.Nullable + public LoaIssuer getIssuer() { + return issuer; + } + + public void setIssuer(@javax.annotation.Nullable LoaIssuer issuer) { + this.issuer = issuer; + } + + + public RequestLoa location(@javax.annotation.Nonnull LoaLocation location) { + this.location = location; + return this; + } + + /** + * Get location + * @return location + */ + @javax.annotation.Nonnull + public LoaLocation getLocation() { + return location; + } + + public void setLocation(@javax.annotation.Nonnull LoaLocation location) { + this.location = location; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the RequestLoa instance itself + */ + public RequestLoa putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RequestLoa requestLoa = (RequestLoa) o; + return Objects.equals(this.type, requestLoa.type) && + Objects.equals(this.name, requestLoa.name) && + Objects.equals(this.description, requestLoa.description) && + Objects.equals(this.authorizedProductType, requestLoa.authorizedProductType) && + Objects.equals(this.issuer, requestLoa.issuer) && + Objects.equals(this.location, requestLoa.location)&& + Objects.equals(this.additionalProperties, requestLoa.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(type, name, description, authorizedProductType, issuer, location, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RequestLoa {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" authorizedProductType: ").append(toIndentedString(authorizedProductType)).append("\n"); + sb.append(" issuer: ").append(toIndentedString(issuer)).append("\n"); + sb.append(" location: ").append(toIndentedString(location)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("type", "name", "description", "authorizedProductType", "issuer", "location")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("type", "name", "authorizedProductType", "location")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to RequestLoa + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!RequestLoa.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in RequestLoa is not found in the empty JSON string", RequestLoa.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : RequestLoa.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the required field `type` + LoaType.validateJsonElement(jsonObj.get("type")); + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + } + // validate the required field `authorizedProductType` + LoaProductType.validateJsonElement(jsonObj.get("authorizedProductType")); + // validate the optional field `issuer` + if (jsonObj.get("issuer") != null && !jsonObj.get("issuer").isJsonNull()) { + LoaIssuer.validateJsonElement(jsonObj.get("issuer")); + } + // validate the required field `location` + LoaLocation.validateJsonElement(jsonObj.get("location")); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!RequestLoa.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'RequestLoa' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(RequestLoa.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, RequestLoa value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public RequestLoa read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + RequestLoa instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of RequestLoa given an JSON string + * + * @param jsonString JSON string + * @return An instance of RequestLoa + * @throws IOException if the JSON string is invalid with respect to RequestLoa + */ + public static RequestLoa fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, RequestLoa.class); + } + + /** + * Convert an instance of RequestLoa to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/RouteCollector.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/RouteCollector.java new file mode 100644 index 00000000..d75afaec --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/RouteCollector.java @@ -0,0 +1,341 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * Route Collector + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class RouteCollector { + public static final String SERIALIZED_NAME_ASN = "asn"; + @SerializedName(SERIALIZED_NAME_ASN) + @javax.annotation.Nullable + private Long asn; + + public static final String SERIALIZED_NAME_IP_V4 = "ipV4"; + @SerializedName(SERIALIZED_NAME_IP_V4) + @javax.annotation.Nullable + private String ipV4; + + public static final String SERIALIZED_NAME_IP_V6 = "ipV6"; + @SerializedName(SERIALIZED_NAME_IP_V6) + @javax.annotation.Nullable + private String ipV6; + + public RouteCollector() { + } + + public RouteCollector asn(@javax.annotation.Nullable Long asn) { + this.asn = asn; + return this; + } + + /** + * Route Collector ASN + * @return asn + */ + @javax.annotation.Nullable + public Long getAsn() { + return asn; + } + + public void setAsn(@javax.annotation.Nullable Long asn) { + this.asn = asn; + } + + + public RouteCollector ipV4(@javax.annotation.Nullable String ipV4) { + this.ipV4 = ipV4; + return this; + } + + /** + * Route Collector ipV4 address + * @return ipV4 + */ + @javax.annotation.Nullable + public String getIpV4() { + return ipV4; + } + + public void setIpV4(@javax.annotation.Nullable String ipV4) { + this.ipV4 = ipV4; + } + + + public RouteCollector ipV6(@javax.annotation.Nullable String ipV6) { + this.ipV6 = ipV6; + return this; + } + + /** + * Route Collector ipV6 address + * @return ipV6 + */ + @javax.annotation.Nullable + public String getIpV6() { + return ipV6; + } + + public void setIpV6(@javax.annotation.Nullable String ipV6) { + this.ipV6 = ipV6; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the RouteCollector instance itself + */ + public RouteCollector putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RouteCollector routeCollector = (RouteCollector) o; + return Objects.equals(this.asn, routeCollector.asn) && + Objects.equals(this.ipV4, routeCollector.ipV4) && + Objects.equals(this.ipV6, routeCollector.ipV6)&& + Objects.equals(this.additionalProperties, routeCollector.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(asn, ipV4, ipV6, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RouteCollector {\n"); + sb.append(" asn: ").append(toIndentedString(asn)).append("\n"); + sb.append(" ipV4: ").append(toIndentedString(ipV4)).append("\n"); + sb.append(" ipV6: ").append(toIndentedString(ipV6)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("asn", "ipV4", "ipV6")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to RouteCollector + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!RouteCollector.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in RouteCollector is not found in the empty JSON string", RouteCollector.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("ipV4") != null && !jsonObj.get("ipV4").isJsonNull()) && !jsonObj.get("ipV4").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `ipV4` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ipV4").toString())); + } + if ((jsonObj.get("ipV6") != null && !jsonObj.get("ipV6").isJsonNull()) && !jsonObj.get("ipV6").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `ipV6` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ipV6").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!RouteCollector.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'RouteCollector' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(RouteCollector.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, RouteCollector value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public RouteCollector read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + RouteCollector instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of RouteCollector given an JSON string + * + * @param jsonString JSON string + * @return An instance of RouteCollector + * @throws IOException if the JSON string is invalid with respect to RouteCollector + */ + public static RouteCollector fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, RouteCollector.class); + } + + /** + * Convert an instance of RouteCollector to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/Router.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/Router.java new file mode 100644 index 00000000..0d5dc096 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/Router.java @@ -0,0 +1,399 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.net.URI; +import java.util.Arrays; +import java.util.UUID; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * Router + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class Router { + public static final String SERIALIZED_NAME_HREF = "href"; + @SerializedName(SERIALIZED_NAME_HREF) + @javax.annotation.Nullable + private URI href; + + public static final String SERIALIZED_NAME_UUID = "uuid"; + @SerializedName(SERIALIZED_NAME_UUID) + @javax.annotation.Nullable + private UUID uuid; + + /** + * Gets or Sets type + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + XF_ROUTER("XF_ROUTER"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nullable + private TypeEnum type; + + public Router() { + } + + public Router( + URI href + ) { + this(); + this.href = href; + } + + /** + * Fabric Cloud Router URI + * @return href + */ + @javax.annotation.Nullable + public URI getHref() { + return href; + } + + + + public Router uuid(@javax.annotation.Nullable UUID uuid) { + this.uuid = uuid; + return this; + } + + /** + * Cloud Router UUID + * @return uuid + */ + @javax.annotation.Nullable + public UUID getUuid() { + return uuid; + } + + public void setUuid(@javax.annotation.Nullable UUID uuid) { + this.uuid = uuid; + } + + + public Router type(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + */ + @javax.annotation.Nullable + public TypeEnum getType() { + return type; + } + + public void setType(@javax.annotation.Nullable TypeEnum type) { + this.type = type; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the Router instance itself + */ + public Router putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Router router = (Router) o; + return Objects.equals(this.href, router.href) && + Objects.equals(this.uuid, router.uuid) && + Objects.equals(this.type, router.type)&& + Objects.equals(this.additionalProperties, router.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(href, uuid, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Router {\n"); + sb.append(" href: ").append(toIndentedString(href)).append("\n"); + sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("href", "uuid", "type")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to Router + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Router.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in Router is not found in the empty JSON string", Router.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("href") != null && !jsonObj.get("href").isJsonNull()) && !jsonObj.get("href").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `href` to be a primitive type in the JSON string but got `%s`", jsonObj.get("href").toString())); + } + if ((jsonObj.get("uuid") != null && !jsonObj.get("uuid").isJsonNull()) && !jsonObj.get("uuid").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `uuid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("uuid").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // validate the optional field `type` + if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { + TypeEnum.validateJsonElement(jsonObj.get("type")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!Router.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Router' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Router.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, Router value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public Router read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + Router instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of Router given an JSON string + * + * @param jsonString JSON string + * @return An instance of Router + * @throws IOException if the JSON string is invalid with respect to Router + */ + public static Router fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, Router.class); + } + + /** + * Convert an instance of Router to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/RoutingProtocolResponse.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/RoutingProtocolResponse.java new file mode 100644 index 00000000..811aa6e1 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/RoutingProtocolResponse.java @@ -0,0 +1,459 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.ExchangeServiceResponseBgp; +import com.equinix.sdk.fabricv4.model.RouteCollector; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * RoutingProtocolResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class RoutingProtocolResponse { + public static final String SERIALIZED_NAME_CUSTOMER_ASN = "customerAsn"; + @SerializedName(SERIALIZED_NAME_CUSTOMER_ASN) + @javax.annotation.Nullable + private String customerAsn; + + public static final String SERIALIZED_NAME_MAC_ADDRESS = "macAddress"; + @SerializedName(SERIALIZED_NAME_MAC_ADDRESS) + @javax.annotation.Nullable + private String macAddress; + + public static final String SERIALIZED_NAME_VLAN = "vlan"; + @SerializedName(SERIALIZED_NAME_VLAN) + @javax.annotation.Nullable + private Long vlan; + + public static final String SERIALIZED_NAME_ROUTE_SERVER_ASN = "routeServerAsn"; + @SerializedName(SERIALIZED_NAME_ROUTE_SERVER_ASN) + @javax.annotation.Nullable + private Long routeServerAsn; + + public static final String SERIALIZED_NAME_BGP_IPV4 = "bgpIpv4"; + @SerializedName(SERIALIZED_NAME_BGP_IPV4) + @javax.annotation.Nullable + private ExchangeServiceResponseBgp bgpIpv4; + + public static final String SERIALIZED_NAME_BGP_IPV6 = "bgpIpv6"; + @SerializedName(SERIALIZED_NAME_BGP_IPV6) + @javax.annotation.Nullable + private ExchangeServiceResponseBgp bgpIpv6; + + public static final String SERIALIZED_NAME_ROUTE_COLLECTOR = "routeCollector"; + @SerializedName(SERIALIZED_NAME_ROUTE_COLLECTOR) + @javax.annotation.Nullable + private RouteCollector routeCollector; + + public RoutingProtocolResponse() { + } + + public RoutingProtocolResponse customerAsn(@javax.annotation.Nullable String customerAsn) { + this.customerAsn = customerAsn; + return this; + } + + /** + * Get customerAsn + * @return customerAsn + */ + @javax.annotation.Nullable + public String getCustomerAsn() { + return customerAsn; + } + + public void setCustomerAsn(@javax.annotation.Nullable String customerAsn) { + this.customerAsn = customerAsn; + } + + + public RoutingProtocolResponse macAddress(@javax.annotation.Nullable String macAddress) { + this.macAddress = macAddress; + return this; + } + + /** + * Get macAddress + * @return macAddress + */ + @javax.annotation.Nullable + public String getMacAddress() { + return macAddress; + } + + public void setMacAddress(@javax.annotation.Nullable String macAddress) { + this.macAddress = macAddress; + } + + + public RoutingProtocolResponse vlan(@javax.annotation.Nullable Long vlan) { + this.vlan = vlan; + return this; + } + + /** + * VLAN ID + * @return vlan + */ + @javax.annotation.Nullable + public Long getVlan() { + return vlan; + } + + public void setVlan(@javax.annotation.Nullable Long vlan) { + this.vlan = vlan; + } + + + public RoutingProtocolResponse routeServerAsn(@javax.annotation.Nullable Long routeServerAsn) { + this.routeServerAsn = routeServerAsn; + return this; + } + + /** + * Equinix Route Server ASN + * @return routeServerAsn + */ + @javax.annotation.Nullable + public Long getRouteServerAsn() { + return routeServerAsn; + } + + public void setRouteServerAsn(@javax.annotation.Nullable Long routeServerAsn) { + this.routeServerAsn = routeServerAsn; + } + + + public RoutingProtocolResponse bgpIpv4(@javax.annotation.Nullable ExchangeServiceResponseBgp bgpIpv4) { + this.bgpIpv4 = bgpIpv4; + return this; + } + + /** + * Get bgpIpv4 + * @return bgpIpv4 + */ + @javax.annotation.Nullable + public ExchangeServiceResponseBgp getBgpIpv4() { + return bgpIpv4; + } + + public void setBgpIpv4(@javax.annotation.Nullable ExchangeServiceResponseBgp bgpIpv4) { + this.bgpIpv4 = bgpIpv4; + } + + + public RoutingProtocolResponse bgpIpv6(@javax.annotation.Nullable ExchangeServiceResponseBgp bgpIpv6) { + this.bgpIpv6 = bgpIpv6; + return this; + } + + /** + * Get bgpIpv6 + * @return bgpIpv6 + */ + @javax.annotation.Nullable + public ExchangeServiceResponseBgp getBgpIpv6() { + return bgpIpv6; + } + + public void setBgpIpv6(@javax.annotation.Nullable ExchangeServiceResponseBgp bgpIpv6) { + this.bgpIpv6 = bgpIpv6; + } + + + public RoutingProtocolResponse routeCollector(@javax.annotation.Nullable RouteCollector routeCollector) { + this.routeCollector = routeCollector; + return this; + } + + /** + * Get routeCollector + * @return routeCollector + */ + @javax.annotation.Nullable + public RouteCollector getRouteCollector() { + return routeCollector; + } + + public void setRouteCollector(@javax.annotation.Nullable RouteCollector routeCollector) { + this.routeCollector = routeCollector; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the RoutingProtocolResponse instance itself + */ + public RoutingProtocolResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RoutingProtocolResponse routingProtocolResponse = (RoutingProtocolResponse) o; + return Objects.equals(this.customerAsn, routingProtocolResponse.customerAsn) && + Objects.equals(this.macAddress, routingProtocolResponse.macAddress) && + Objects.equals(this.vlan, routingProtocolResponse.vlan) && + Objects.equals(this.routeServerAsn, routingProtocolResponse.routeServerAsn) && + Objects.equals(this.bgpIpv4, routingProtocolResponse.bgpIpv4) && + Objects.equals(this.bgpIpv6, routingProtocolResponse.bgpIpv6) && + Objects.equals(this.routeCollector, routingProtocolResponse.routeCollector)&& + Objects.equals(this.additionalProperties, routingProtocolResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(customerAsn, macAddress, vlan, routeServerAsn, bgpIpv4, bgpIpv6, routeCollector, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RoutingProtocolResponse {\n"); + sb.append(" customerAsn: ").append(toIndentedString(customerAsn)).append("\n"); + sb.append(" macAddress: ").append(toIndentedString(macAddress)).append("\n"); + sb.append(" vlan: ").append(toIndentedString(vlan)).append("\n"); + sb.append(" routeServerAsn: ").append(toIndentedString(routeServerAsn)).append("\n"); + sb.append(" bgpIpv4: ").append(toIndentedString(bgpIpv4)).append("\n"); + sb.append(" bgpIpv6: ").append(toIndentedString(bgpIpv6)).append("\n"); + sb.append(" routeCollector: ").append(toIndentedString(routeCollector)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("customerAsn", "macAddress", "vlan", "routeServerAsn", "bgpIpv4", "bgpIpv6", "routeCollector")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to RoutingProtocolResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!RoutingProtocolResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in RoutingProtocolResponse is not found in the empty JSON string", RoutingProtocolResponse.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("customerAsn") != null && !jsonObj.get("customerAsn").isJsonNull()) && !jsonObj.get("customerAsn").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `customerAsn` to be a primitive type in the JSON string but got `%s`", jsonObj.get("customerAsn").toString())); + } + if ((jsonObj.get("macAddress") != null && !jsonObj.get("macAddress").isJsonNull()) && !jsonObj.get("macAddress").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `macAddress` to be a primitive type in the JSON string but got `%s`", jsonObj.get("macAddress").toString())); + } + // validate the optional field `bgpIpv4` + if (jsonObj.get("bgpIpv4") != null && !jsonObj.get("bgpIpv4").isJsonNull()) { + ExchangeServiceResponseBgp.validateJsonElement(jsonObj.get("bgpIpv4")); + } + // validate the optional field `bgpIpv6` + if (jsonObj.get("bgpIpv6") != null && !jsonObj.get("bgpIpv6").isJsonNull()) { + ExchangeServiceResponseBgp.validateJsonElement(jsonObj.get("bgpIpv6")); + } + // validate the optional field `routeCollector` + if (jsonObj.get("routeCollector") != null && !jsonObj.get("routeCollector").isJsonNull()) { + RouteCollector.validateJsonElement(jsonObj.get("routeCollector")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!RoutingProtocolResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'RoutingProtocolResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(RoutingProtocolResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, RoutingProtocolResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public RoutingProtocolResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + RoutingProtocolResponse instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of RoutingProtocolResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of RoutingProtocolResponse + * @throws IOException if the JSON string is invalid with respect to RoutingProtocolResponse + */ + public static RoutingProtocolResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, RoutingProtocolResponse.class); + } + + /** + * Convert an instance of RoutingProtocolResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/SearchFieldName.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/SearchFieldName.java index 326bfabe..e40dc1a9 100644 --- a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/SearchFieldName.java +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/SearchFieldName.java @@ -87,6 +87,10 @@ public enum SearchFieldName { OPERATION_PROVIDERSTATUS("/operation/providerStatus"), + OPERATION_MAINTENANCESTATUS("/operation/maintenanceStatus"), + + OPERATION_LOCKENABLED("/operation/lockEnabled"), + PROJECT_PROJECTID("/project/projectId"), REDUNDANCY_GROUP("/redundancy/group"), diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/SearchOperationalEventResponse.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/SearchOperationalEventResponse.java new file mode 100644 index 00000000..e67c5b60 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/SearchOperationalEventResponse.java @@ -0,0 +1,339 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.CloudEvent; +import com.equinix.sdk.fabricv4.model.Pagination; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * SearchOperationalEventResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class SearchOperationalEventResponse { + public static final String SERIALIZED_NAME_PAGINATION = "pagination"; + @SerializedName(SERIALIZED_NAME_PAGINATION) + @javax.annotation.Nullable + private Pagination pagination; + + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + @javax.annotation.Nullable + private List data = new ArrayList<>(); + + public SearchOperationalEventResponse() { + } + + public SearchOperationalEventResponse pagination(@javax.annotation.Nullable Pagination pagination) { + this.pagination = pagination; + return this; + } + + /** + * Get pagination + * @return pagination + */ + @javax.annotation.Nullable + public Pagination getPagination() { + return pagination; + } + + public void setPagination(@javax.annotation.Nullable Pagination pagination) { + this.pagination = pagination; + } + + + public SearchOperationalEventResponse data(@javax.annotation.Nullable List data) { + this.data = data; + return this; + } + + public SearchOperationalEventResponse addDataItem(CloudEvent dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + return this; + } + + /** + * Data returned from the API call. + * @return data + */ + @javax.annotation.Nullable + public List getData() { + return data; + } + + public void setData(@javax.annotation.Nullable List data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the SearchOperationalEventResponse instance itself + */ + public SearchOperationalEventResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SearchOperationalEventResponse searchOperationalEventResponse = (SearchOperationalEventResponse) o; + return Objects.equals(this.pagination, searchOperationalEventResponse.pagination) && + Objects.equals(this.data, searchOperationalEventResponse.data)&& + Objects.equals(this.additionalProperties, searchOperationalEventResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(pagination, data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SearchOperationalEventResponse {\n"); + sb.append(" pagination: ").append(toIndentedString(pagination)).append("\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("pagination", "data")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to SearchOperationalEventResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SearchOperationalEventResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in SearchOperationalEventResponse is not found in the empty JSON string", SearchOperationalEventResponse.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `pagination` + if (jsonObj.get("pagination") != null && !jsonObj.get("pagination").isJsonNull()) { + Pagination.validateJsonElement(jsonObj.get("pagination")); + } + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); + if (jsonArraydata != null) { + // ensure the json data is an array + if (!jsonObj.get("data").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + } + + // validate the optional field `data` (array) + for (int i = 0; i < jsonArraydata.size(); i++) { + CloudEvent.validateJsonElement(jsonArraydata.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SearchOperationalEventResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SearchOperationalEventResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(SearchOperationalEventResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, SearchOperationalEventResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public SearchOperationalEventResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + SearchOperationalEventResponse instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of SearchOperationalEventResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of SearchOperationalEventResponse + * @throws IOException if the JSON string is invalid with respect to SearchOperationalEventResponse + */ + public static SearchOperationalEventResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, SearchOperationalEventResponse.class); + } + + /** + * Convert an instance of SearchOperationalEventResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/SearchResponse.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/SearchResponse.java index 65ea643c..35d48f16 100644 --- a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/SearchResponse.java +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/SearchResponse.java @@ -13,7 +13,7 @@ import java.util.Objects; import java.util.Locale; -import com.equinix.sdk.fabricv4.model.CloudRouter; +import com.equinix.sdk.fabricv4.model.CloudRouterReadResponse; import com.equinix.sdk.fabricv4.model.Pagination; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -62,7 +62,7 @@ public class SearchResponse { public static final String SERIALIZED_NAME_DATA = "data"; @SerializedName(SERIALIZED_NAME_DATA) @javax.annotation.Nullable - private List data = new ArrayList<>(); + private List data = new ArrayList<>(); public SearchResponse() { } @@ -86,12 +86,12 @@ public void setPagination(@javax.annotation.Nullable Pagination pagination) { } - public SearchResponse data(@javax.annotation.Nullable List data) { + public SearchResponse data(@javax.annotation.Nullable List data) { this.data = data; return this; } - public SearchResponse addDataItem(CloudRouter dataItem) { + public SearchResponse addDataItem(CloudRouterReadResponse dataItem) { if (this.data == null) { this.data = new ArrayList<>(); } @@ -104,11 +104,11 @@ public SearchResponse addDataItem(CloudRouter dataItem) { * @return data */ @javax.annotation.Nullable - public List getData() { + public List getData() { return data; } - public void setData(@javax.annotation.Nullable List data) { + public void setData(@javax.annotation.Nullable List data) { this.data = data; } @@ -238,7 +238,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `data` (array) for (int i = 0; i < jsonArraydata.size(); i++) { - CloudRouter.validateJsonElement(jsonArraydata.get(i)); + CloudRouterReadResponse.validateJsonElement(jsonArraydata.get(i)); }; } } diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/GetAllStreamAssetResponse.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/SearchStreamAssetResponse.java similarity index 82% rename from services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/GetAllStreamAssetResponse.java rename to services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/SearchStreamAssetResponse.java index 93c2a30e..e6c19e02 100644 --- a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/GetAllStreamAssetResponse.java +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/SearchStreamAssetResponse.java @@ -14,7 +14,7 @@ import java.util.Objects; import java.util.Locale; import com.equinix.sdk.fabricv4.model.Pagination; -import com.equinix.sdk.fabricv4.model.StreamAsset; +import com.equinix.sdk.fabricv4.model.StreamSearchAsset; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -50,10 +50,10 @@ import com.equinix.sdk.fabricv4.JSON; /** - * GetAllStreamAssetResponse + * SearchStreamAssetResponse */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") -public class GetAllStreamAssetResponse { +public class SearchStreamAssetResponse { public static final String SERIALIZED_NAME_PAGINATION = "pagination"; @SerializedName(SERIALIZED_NAME_PAGINATION) @javax.annotation.Nullable @@ -62,12 +62,12 @@ public class GetAllStreamAssetResponse { public static final String SERIALIZED_NAME_DATA = "data"; @SerializedName(SERIALIZED_NAME_DATA) @javax.annotation.Nullable - private List data = new ArrayList<>(); + private List data = new ArrayList<>(); - public GetAllStreamAssetResponse() { + public SearchStreamAssetResponse() { } - public GetAllStreamAssetResponse pagination(@javax.annotation.Nullable Pagination pagination) { + public SearchStreamAssetResponse pagination(@javax.annotation.Nullable Pagination pagination) { this.pagination = pagination; return this; } @@ -86,12 +86,12 @@ public void setPagination(@javax.annotation.Nullable Pagination pagination) { } - public GetAllStreamAssetResponse data(@javax.annotation.Nullable List data) { + public SearchStreamAssetResponse data(@javax.annotation.Nullable List data) { this.data = data; return this; } - public GetAllStreamAssetResponse addDataItem(StreamAsset dataItem) { + public SearchStreamAssetResponse addDataItem(StreamSearchAsset dataItem) { if (this.data == null) { this.data = new ArrayList<>(); } @@ -104,11 +104,11 @@ public GetAllStreamAssetResponse addDataItem(StreamAsset dataItem) { * @return data */ @javax.annotation.Nullable - public List getData() { + public List getData() { return data; } - public void setData(@javax.annotation.Nullable List data) { + public void setData(@javax.annotation.Nullable List data) { this.data = data; } @@ -125,9 +125,9 @@ public void setData(@javax.annotation.Nullable List data) { * * @param key name of the property * @param value value of the property - * @return the GetAllStreamAssetResponse instance itself + * @return the SearchStreamAssetResponse instance itself */ - public GetAllStreamAssetResponse putAdditionalProperty(String key, Object value) { + public SearchStreamAssetResponse putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -166,10 +166,10 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - GetAllStreamAssetResponse getAllStreamAssetResponse = (GetAllStreamAssetResponse) o; - return Objects.equals(this.pagination, getAllStreamAssetResponse.pagination) && - Objects.equals(this.data, getAllStreamAssetResponse.data)&& - Objects.equals(this.additionalProperties, getAllStreamAssetResponse.additionalProperties); + SearchStreamAssetResponse searchStreamAssetResponse = (SearchStreamAssetResponse) o; + return Objects.equals(this.pagination, searchStreamAssetResponse.pagination) && + Objects.equals(this.data, searchStreamAssetResponse.data)&& + Objects.equals(this.additionalProperties, searchStreamAssetResponse.additionalProperties); } @Override @@ -180,7 +180,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class GetAllStreamAssetResponse {\n"); + sb.append("class SearchStreamAssetResponse {\n"); sb.append(" pagination: ").append(toIndentedString(pagination)).append("\n"); sb.append(" data: ").append(toIndentedString(data)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); @@ -215,12 +215,12 @@ private String toIndentedString(Object o) { * Validates the JSON Element and throws an exception if issues found * * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to GetAllStreamAssetResponse + * @throws IOException if the JSON Element is invalid with respect to SearchStreamAssetResponse */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { - if (!GetAllStreamAssetResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in GetAllStreamAssetResponse is not found in the empty JSON string", GetAllStreamAssetResponse.openapiRequiredFields.toString())); + if (!SearchStreamAssetResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in SearchStreamAssetResponse is not found in the empty JSON string", SearchStreamAssetResponse.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -238,7 +238,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `data` (array) for (int i = 0; i < jsonArraydata.size(); i++) { - StreamAsset.validateJsonElement(jsonArraydata.get(i)); + StreamSearchAsset.validateJsonElement(jsonArraydata.get(i)); }; } } @@ -248,16 +248,16 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!GetAllStreamAssetResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'GetAllStreamAssetResponse' and its subtypes + if (!SearchStreamAssetResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SearchStreamAssetResponse' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(GetAllStreamAssetResponse.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(SearchStreamAssetResponse.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, GetAllStreamAssetResponse value) throws IOException { + public void write(JsonWriter out, SearchStreamAssetResponse value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); // serialize additional properties @@ -285,12 +285,12 @@ else if (entry.getValue() instanceof Character) } @Override - public GetAllStreamAssetResponse read(JsonReader in) throws IOException { + public SearchStreamAssetResponse read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); JsonObject jsonObj = jsonElement.getAsJsonObject(); // store additional fields in the deserialized instance - GetAllStreamAssetResponse instance = thisAdapter.fromJsonTree(jsonObj); + SearchStreamAssetResponse instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { if (!openapiFields.contains(entry.getKey())) { if (entry.getValue().isJsonPrimitive()) { // primitive type @@ -317,18 +317,18 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } /** - * Create an instance of GetAllStreamAssetResponse given an JSON string + * Create an instance of SearchStreamAssetResponse given an JSON string * * @param jsonString JSON string - * @return An instance of GetAllStreamAssetResponse - * @throws IOException if the JSON string is invalid with respect to GetAllStreamAssetResponse + * @return An instance of SearchStreamAssetResponse + * @throws IOException if the JSON string is invalid with respect to SearchStreamAssetResponse */ - public static GetAllStreamAssetResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, GetAllStreamAssetResponse.class); + public static SearchStreamAssetResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, SearchStreamAssetResponse.class); } /** - * Convert an instance of GetAllStreamAssetResponse to an JSON string + * Convert an instance of SearchStreamAssetResponse to an JSON string * * @return JSON string */ diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AgentGetAllResponse.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/SearchStreamResponse.java similarity index 80% rename from services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AgentGetAllResponse.java rename to services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/SearchStreamResponse.java index 2eb138f5..40b0da8b 100644 --- a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/AgentGetAllResponse.java +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/SearchStreamResponse.java @@ -13,8 +13,8 @@ import java.util.Objects; import java.util.Locale; -import com.equinix.sdk.fabricv4.model.Agents; import com.equinix.sdk.fabricv4.model.Pagination; +import com.equinix.sdk.fabricv4.model.Stream; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -50,10 +50,10 @@ import com.equinix.sdk.fabricv4.JSON; /** - * AgentGetAllResponse + * SearchStreamResponse */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") -public class AgentGetAllResponse { +public class SearchStreamResponse { public static final String SERIALIZED_NAME_PAGINATION = "pagination"; @SerializedName(SERIALIZED_NAME_PAGINATION) @javax.annotation.Nullable @@ -62,12 +62,12 @@ public class AgentGetAllResponse { public static final String SERIALIZED_NAME_DATA = "data"; @SerializedName(SERIALIZED_NAME_DATA) @javax.annotation.Nullable - private List data = new ArrayList<>(); + private List data = new ArrayList<>(); - public AgentGetAllResponse() { + public SearchStreamResponse() { } - public AgentGetAllResponse pagination(@javax.annotation.Nullable Pagination pagination) { + public SearchStreamResponse pagination(@javax.annotation.Nullable Pagination pagination) { this.pagination = pagination; return this; } @@ -86,12 +86,12 @@ public void setPagination(@javax.annotation.Nullable Pagination pagination) { } - public AgentGetAllResponse data(@javax.annotation.Nullable List data) { + public SearchStreamResponse data(@javax.annotation.Nullable List data) { this.data = data; return this; } - public AgentGetAllResponse addDataItem(Agents dataItem) { + public SearchStreamResponse addDataItem(Stream dataItem) { if (this.data == null) { this.data = new ArrayList<>(); } @@ -104,11 +104,11 @@ public AgentGetAllResponse addDataItem(Agents dataItem) { * @return data */ @javax.annotation.Nullable - public List getData() { + public List getData() { return data; } - public void setData(@javax.annotation.Nullable List data) { + public void setData(@javax.annotation.Nullable List data) { this.data = data; } @@ -125,9 +125,9 @@ public void setData(@javax.annotation.Nullable List data) { * * @param key name of the property * @param value value of the property - * @return the AgentGetAllResponse instance itself + * @return the SearchStreamResponse instance itself */ - public AgentGetAllResponse putAdditionalProperty(String key, Object value) { + public SearchStreamResponse putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -166,10 +166,10 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - AgentGetAllResponse agentGetAllResponse = (AgentGetAllResponse) o; - return Objects.equals(this.pagination, agentGetAllResponse.pagination) && - Objects.equals(this.data, agentGetAllResponse.data)&& - Objects.equals(this.additionalProperties, agentGetAllResponse.additionalProperties); + SearchStreamResponse searchStreamResponse = (SearchStreamResponse) o; + return Objects.equals(this.pagination, searchStreamResponse.pagination) && + Objects.equals(this.data, searchStreamResponse.data)&& + Objects.equals(this.additionalProperties, searchStreamResponse.additionalProperties); } @Override @@ -180,7 +180,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class AgentGetAllResponse {\n"); + sb.append("class SearchStreamResponse {\n"); sb.append(" pagination: ").append(toIndentedString(pagination)).append("\n"); sb.append(" data: ").append(toIndentedString(data)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); @@ -215,12 +215,12 @@ private String toIndentedString(Object o) { * Validates the JSON Element and throws an exception if issues found * * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to AgentGetAllResponse + * @throws IOException if the JSON Element is invalid with respect to SearchStreamResponse */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { - if (!AgentGetAllResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in AgentGetAllResponse is not found in the empty JSON string", AgentGetAllResponse.openapiRequiredFields.toString())); + if (!SearchStreamResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in SearchStreamResponse is not found in the empty JSON string", SearchStreamResponse.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -238,7 +238,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `data` (array) for (int i = 0; i < jsonArraydata.size(); i++) { - Agents.validateJsonElement(jsonArraydata.get(i)); + Stream.validateJsonElement(jsonArraydata.get(i)); }; } } @@ -248,16 +248,16 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!AgentGetAllResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'AgentGetAllResponse' and its subtypes + if (!SearchStreamResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SearchStreamResponse' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(AgentGetAllResponse.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(SearchStreamResponse.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, AgentGetAllResponse value) throws IOException { + public void write(JsonWriter out, SearchStreamResponse value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); // serialize additional properties @@ -285,12 +285,12 @@ else if (entry.getValue() instanceof Character) } @Override - public AgentGetAllResponse read(JsonReader in) throws IOException { + public SearchStreamResponse read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); JsonObject jsonObj = jsonElement.getAsJsonObject(); // store additional fields in the deserialized instance - AgentGetAllResponse instance = thisAdapter.fromJsonTree(jsonObj); + SearchStreamResponse instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { if (!openapiFields.contains(entry.getKey())) { if (entry.getValue().isJsonPrimitive()) { // primitive type @@ -317,18 +317,18 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } /** - * Create an instance of AgentGetAllResponse given an JSON string + * Create an instance of SearchStreamResponse given an JSON string * * @param jsonString JSON string - * @return An instance of AgentGetAllResponse - * @throws IOException if the JSON string is invalid with respect to AgentGetAllResponse + * @return An instance of SearchStreamResponse + * @throws IOException if the JSON string is invalid with respect to SearchStreamResponse */ - public static AgentGetAllResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, AgentGetAllResponse.class); + public static SearchStreamResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, SearchStreamResponse.class); } /** - * Convert an instance of AgentGetAllResponse to an JSON string + * Convert an instance of SearchStreamResponse to an JSON string * * @return JSON string */ diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/SearchStreamSubscriptionResponse.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/SearchStreamSubscriptionResponse.java new file mode 100644 index 00000000..5f65afed --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/SearchStreamSubscriptionResponse.java @@ -0,0 +1,339 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.Pagination; +import com.equinix.sdk.fabricv4.model.StreamSubscription; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * SearchStreamSubscriptionResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class SearchStreamSubscriptionResponse { + public static final String SERIALIZED_NAME_PAGINATION = "pagination"; + @SerializedName(SERIALIZED_NAME_PAGINATION) + @javax.annotation.Nullable + private Pagination pagination; + + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + @javax.annotation.Nullable + private List data = new ArrayList<>(); + + public SearchStreamSubscriptionResponse() { + } + + public SearchStreamSubscriptionResponse pagination(@javax.annotation.Nullable Pagination pagination) { + this.pagination = pagination; + return this; + } + + /** + * Get pagination + * @return pagination + */ + @javax.annotation.Nullable + public Pagination getPagination() { + return pagination; + } + + public void setPagination(@javax.annotation.Nullable Pagination pagination) { + this.pagination = pagination; + } + + + public SearchStreamSubscriptionResponse data(@javax.annotation.Nullable List data) { + this.data = data; + return this; + } + + public SearchStreamSubscriptionResponse addDataItem(StreamSubscription dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + return this; + } + + /** + * Data returned from the API call. + * @return data + */ + @javax.annotation.Nullable + public List getData() { + return data; + } + + public void setData(@javax.annotation.Nullable List data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the SearchStreamSubscriptionResponse instance itself + */ + public SearchStreamSubscriptionResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SearchStreamSubscriptionResponse searchStreamSubscriptionResponse = (SearchStreamSubscriptionResponse) o; + return Objects.equals(this.pagination, searchStreamSubscriptionResponse.pagination) && + Objects.equals(this.data, searchStreamSubscriptionResponse.data)&& + Objects.equals(this.additionalProperties, searchStreamSubscriptionResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(pagination, data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SearchStreamSubscriptionResponse {\n"); + sb.append(" pagination: ").append(toIndentedString(pagination)).append("\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("pagination", "data")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to SearchStreamSubscriptionResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SearchStreamSubscriptionResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in SearchStreamSubscriptionResponse is not found in the empty JSON string", SearchStreamSubscriptionResponse.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `pagination` + if (jsonObj.get("pagination") != null && !jsonObj.get("pagination").isJsonNull()) { + Pagination.validateJsonElement(jsonObj.get("pagination")); + } + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); + if (jsonArraydata != null) { + // ensure the json data is an array + if (!jsonObj.get("data").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + } + + // validate the optional field `data` (array) + for (int i = 0; i < jsonArraydata.size(); i++) { + StreamSubscription.validateJsonElement(jsonArraydata.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SearchStreamSubscriptionResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SearchStreamSubscriptionResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(SearchStreamSubscriptionResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, SearchStreamSubscriptionResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public SearchStreamSubscriptionResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + SearchStreamSubscriptionResponse instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of SearchStreamSubscriptionResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of SearchStreamSubscriptionResponse + * @throws IOException if the JSON string is invalid with respect to SearchStreamSubscriptionResponse + */ + public static SearchStreamSubscriptionResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, SearchStreamSubscriptionResponse.class); + } + + /** + * Convert an instance of SearchStreamSubscriptionResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ServiceProfile.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ServiceProfile.java index 5a85a33f..afd4cf74 100644 --- a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ServiceProfile.java +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ServiceProfile.java @@ -194,10 +194,12 @@ public ServiceProfile() { } public ServiceProfile( - URI href + URI href, + Boolean selfProfile ) { this(); this.href = href; + this.selfProfile = selfProfile; } public ServiceProfile state(@javax.annotation.Nullable ServiceProfileStateEnum state) { @@ -650,7 +652,7 @@ public ServiceProfile addEnvironmentsItem(ProviderEnvironment environmentsItem) } /** - * Provider environments associated with this IC_PROFILE service profile. + * Provider environments associated with this IC_PROFILE service profile. <font color=\"red\"> <sup color='red'>Beta</sup></font> * @return environments */ @javax.annotation.Nullable @@ -663,11 +665,6 @@ public void setEnvironments(@javax.annotation.Nullable List } - public ServiceProfile selfProfile(@javax.annotation.Nullable Boolean selfProfile) { - this.selfProfile = selfProfile; - return this; - } - /** * response attribute indicates whether the profile belongs to the same organization as the api-invoker. * @return selfProfile @@ -677,9 +674,6 @@ public Boolean getSelfProfile() { return selfProfile; } - public void setSelfProfile(@javax.annotation.Nullable Boolean selfProfile) { - this.selfProfile = selfProfile; - } public ServiceProfile projectId(@javax.annotation.Nullable String projectId) { diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ServiceProfileAccessPointCOLO.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ServiceProfileAccessPointCOLO.java index cb616ed1..b16a84b2 100644 --- a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ServiceProfileAccessPointCOLO.java +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ServiceProfileAccessPointCOLO.java @@ -59,9 +59,7 @@ public class ServiceProfileAccessPointCOLO { public enum TypeEnum { XF_PORT("XF_PORT"), - IX_PORT("IX_PORT"), - - XF_INTERCONNECT_PORT("XF_INTERCONNECT_PORT"); + IX_PORT("IX_PORT"); private String value; diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ServiceProfileChange.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ServiceProfileChange.java index d45d70cc..c717ec3c 100644 --- a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ServiceProfileChange.java +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ServiceProfileChange.java @@ -13,7 +13,7 @@ import java.util.Objects; import java.util.Locale; -import com.equinix.sdk.fabricv4.model.JsonPatchOperation; +import com.equinix.sdk.fabricv4.model.ServiceProfileUpdateOperation; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -147,7 +147,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti public static final String SERIALIZED_NAME_DATA = "data"; @SerializedName(SERIALIZED_NAME_DATA) @javax.annotation.Nullable - private List data = new ArrayList<>(); + private List data = new ArrayList<>(); public ServiceProfileChange() { } @@ -266,12 +266,12 @@ public void setInformation(@javax.annotation.Nullable String information) { } - public ServiceProfileChange data(@javax.annotation.Nullable List data) { + public ServiceProfileChange data(@javax.annotation.Nullable List data) { this.data = data; return this; } - public ServiceProfileChange addDataItem(JsonPatchOperation dataItem) { + public ServiceProfileChange addDataItem(ServiceProfileUpdateOperation dataItem) { if (this.data == null) { this.data = new ArrayList<>(); } @@ -284,11 +284,11 @@ public ServiceProfileChange addDataItem(JsonPatchOperation dataItem) { * @return data */ @javax.annotation.Nullable - public List getData() { + public List getData() { return data; } - public void setData(@javax.annotation.Nullable List data) { + public void setData(@javax.annotation.Nullable List data) { this.data = data; } @@ -447,7 +447,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `data` (array) for (int i = 0; i < jsonArraydata.size(); i++) { - JsonPatchOperation.validateJsonElement(jsonArraydata.get(i)); + ServiceProfileUpdateOperation.validateJsonElement(jsonArraydata.get(i)); }; } } diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ServiceProfileLastMileApiIntegration.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ServiceProfileLastMileApiIntegration.java new file mode 100644 index 00000000..17827c1c --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ServiceProfileLastMileApiIntegration.java @@ -0,0 +1,413 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * Last-mile API integration details. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class ServiceProfileLastMileApiIntegration { + public static final String SERIALIZED_NAME_SITE_VALIDATION_ENABLED = "siteValidationEnabled"; + @SerializedName(SERIALIZED_NAME_SITE_VALIDATION_ENABLED) + @javax.annotation.Nullable + private Boolean siteValidationEnabled; + + public static final String SERIALIZED_NAME_DATA_CENTER_LOCATION_ENABLED = "dataCenterLocationEnabled"; + @SerializedName(SERIALIZED_NAME_DATA_CENTER_LOCATION_ENABLED) + @javax.annotation.Nullable + private Boolean dataCenterLocationEnabled; + + public static final String SERIALIZED_NAME_PRODUCT_OFFERING_ENABLED = "productOfferingEnabled"; + @SerializedName(SERIALIZED_NAME_PRODUCT_OFFERING_ENABLED) + @javax.annotation.Nullable + private Boolean productOfferingEnabled; + + public static final String SERIALIZED_NAME_POQ_ENABLED = "poqEnabled"; + @SerializedName(SERIALIZED_NAME_POQ_ENABLED) + @javax.annotation.Nullable + private Boolean poqEnabled; + + public static final String SERIALIZED_NAME_QUOTE_ENABLED = "quoteEnabled"; + @SerializedName(SERIALIZED_NAME_QUOTE_ENABLED) + @javax.annotation.Nullable + private Boolean quoteEnabled; + + public static final String SERIALIZED_NAME_PLACE_ORDER_ENABLED = "placeOrderEnabled"; + @SerializedName(SERIALIZED_NAME_PLACE_ORDER_ENABLED) + @javax.annotation.Nullable + private Boolean placeOrderEnabled; + + public ServiceProfileLastMileApiIntegration() { + } + + public ServiceProfileLastMileApiIntegration siteValidationEnabled(@javax.annotation.Nullable Boolean siteValidationEnabled) { + this.siteValidationEnabled = siteValidationEnabled; + return this; + } + + /** + * Whether site validation is enabled for the last-mile provider. + * @return siteValidationEnabled + */ + @javax.annotation.Nullable + public Boolean getSiteValidationEnabled() { + return siteValidationEnabled; + } + + public void setSiteValidationEnabled(@javax.annotation.Nullable Boolean siteValidationEnabled) { + this.siteValidationEnabled = siteValidationEnabled; + } + + + public ServiceProfileLastMileApiIntegration dataCenterLocationEnabled(@javax.annotation.Nullable Boolean dataCenterLocationEnabled) { + this.dataCenterLocationEnabled = dataCenterLocationEnabled; + return this; + } + + /** + * Whether data center location is enabled for the last-mile provider. + * @return dataCenterLocationEnabled + */ + @javax.annotation.Nullable + public Boolean getDataCenterLocationEnabled() { + return dataCenterLocationEnabled; + } + + public void setDataCenterLocationEnabled(@javax.annotation.Nullable Boolean dataCenterLocationEnabled) { + this.dataCenterLocationEnabled = dataCenterLocationEnabled; + } + + + public ServiceProfileLastMileApiIntegration productOfferingEnabled(@javax.annotation.Nullable Boolean productOfferingEnabled) { + this.productOfferingEnabled = productOfferingEnabled; + return this; + } + + /** + * Whether product offering is enabled for the last-mile provider. + * @return productOfferingEnabled + */ + @javax.annotation.Nullable + public Boolean getProductOfferingEnabled() { + return productOfferingEnabled; + } + + public void setProductOfferingEnabled(@javax.annotation.Nullable Boolean productOfferingEnabled) { + this.productOfferingEnabled = productOfferingEnabled; + } + + + public ServiceProfileLastMileApiIntegration poqEnabled(@javax.annotation.Nullable Boolean poqEnabled) { + this.poqEnabled = poqEnabled; + return this; + } + + /** + * Whether product qualification is enabled for the last-mile provider. + * @return poqEnabled + */ + @javax.annotation.Nullable + public Boolean getPoqEnabled() { + return poqEnabled; + } + + public void setPoqEnabled(@javax.annotation.Nullable Boolean poqEnabled) { + this.poqEnabled = poqEnabled; + } + + + public ServiceProfileLastMileApiIntegration quoteEnabled(@javax.annotation.Nullable Boolean quoteEnabled) { + this.quoteEnabled = quoteEnabled; + return this; + } + + /** + * Whether quote generation is enabled for the last-mile provider. + * @return quoteEnabled + */ + @javax.annotation.Nullable + public Boolean getQuoteEnabled() { + return quoteEnabled; + } + + public void setQuoteEnabled(@javax.annotation.Nullable Boolean quoteEnabled) { + this.quoteEnabled = quoteEnabled; + } + + + public ServiceProfileLastMileApiIntegration placeOrderEnabled(@javax.annotation.Nullable Boolean placeOrderEnabled) { + this.placeOrderEnabled = placeOrderEnabled; + return this; + } + + /** + * Whether place order is enabled for the last-mile provider. + * @return placeOrderEnabled + */ + @javax.annotation.Nullable + public Boolean getPlaceOrderEnabled() { + return placeOrderEnabled; + } + + public void setPlaceOrderEnabled(@javax.annotation.Nullable Boolean placeOrderEnabled) { + this.placeOrderEnabled = placeOrderEnabled; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ServiceProfileLastMileApiIntegration instance itself + */ + public ServiceProfileLastMileApiIntegration putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ServiceProfileLastMileApiIntegration serviceProfileLastMileApiIntegration = (ServiceProfileLastMileApiIntegration) o; + return Objects.equals(this.siteValidationEnabled, serviceProfileLastMileApiIntegration.siteValidationEnabled) && + Objects.equals(this.dataCenterLocationEnabled, serviceProfileLastMileApiIntegration.dataCenterLocationEnabled) && + Objects.equals(this.productOfferingEnabled, serviceProfileLastMileApiIntegration.productOfferingEnabled) && + Objects.equals(this.poqEnabled, serviceProfileLastMileApiIntegration.poqEnabled) && + Objects.equals(this.quoteEnabled, serviceProfileLastMileApiIntegration.quoteEnabled) && + Objects.equals(this.placeOrderEnabled, serviceProfileLastMileApiIntegration.placeOrderEnabled)&& + Objects.equals(this.additionalProperties, serviceProfileLastMileApiIntegration.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(siteValidationEnabled, dataCenterLocationEnabled, productOfferingEnabled, poqEnabled, quoteEnabled, placeOrderEnabled, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ServiceProfileLastMileApiIntegration {\n"); + sb.append(" siteValidationEnabled: ").append(toIndentedString(siteValidationEnabled)).append("\n"); + sb.append(" dataCenterLocationEnabled: ").append(toIndentedString(dataCenterLocationEnabled)).append("\n"); + sb.append(" productOfferingEnabled: ").append(toIndentedString(productOfferingEnabled)).append("\n"); + sb.append(" poqEnabled: ").append(toIndentedString(poqEnabled)).append("\n"); + sb.append(" quoteEnabled: ").append(toIndentedString(quoteEnabled)).append("\n"); + sb.append(" placeOrderEnabled: ").append(toIndentedString(placeOrderEnabled)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("siteValidationEnabled", "dataCenterLocationEnabled", "productOfferingEnabled", "poqEnabled", "quoteEnabled", "placeOrderEnabled")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ServiceProfileLastMileApiIntegration + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ServiceProfileLastMileApiIntegration.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in ServiceProfileLastMileApiIntegration is not found in the empty JSON string", ServiceProfileLastMileApiIntegration.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ServiceProfileLastMileApiIntegration.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ServiceProfileLastMileApiIntegration' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ServiceProfileLastMileApiIntegration.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ServiceProfileLastMileApiIntegration value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ServiceProfileLastMileApiIntegration read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ServiceProfileLastMileApiIntegration instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ServiceProfileLastMileApiIntegration given an JSON string + * + * @param jsonString JSON string + * @return An instance of ServiceProfileLastMileApiIntegration + * @throws IOException if the JSON string is invalid with respect to ServiceProfileLastMileApiIntegration + */ + public static ServiceProfileLastMileApiIntegration fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ServiceProfileLastMileApiIntegration.class); + } + + /** + * Convert an instance of ServiceProfileLastMileApiIntegration to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ServiceProfileLastMileConfig.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ServiceProfileLastMileConfig.java index 6d40d236..0fd78646 100644 --- a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ServiceProfileLastMileConfig.java +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ServiceProfileLastMileConfig.java @@ -13,8 +13,7 @@ import java.util.Objects; import java.util.Locale; -import com.equinix.sdk.fabricv4.model.ServiceProfileLastMileAddress; -import com.equinix.sdk.fabricv4.model.ServiceProfileLastMileNotification; +import com.equinix.sdk.fabricv4.model.ServiceProfileLastMileApiIntegration; import com.equinix.sdk.fabricv4.model.ServiceProfileLastMileProductCatalog; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -55,40 +54,35 @@ */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class ServiceProfileLastMileConfig { - public static final String SERIALIZED_NAME_ADDRESS = "address"; - @SerializedName(SERIALIZED_NAME_ADDRESS) + public static final String SERIALIZED_NAME_API_INTEGRATION = "apiIntegration"; + @SerializedName(SERIALIZED_NAME_API_INTEGRATION) @javax.annotation.Nullable - private ServiceProfileLastMileAddress address; + private ServiceProfileLastMileApiIntegration apiIntegration; public static final String SERIALIZED_NAME_PRODUCT_CATALOGS = "productCatalogs"; @SerializedName(SERIALIZED_NAME_PRODUCT_CATALOGS) @javax.annotation.Nullable private List productCatalogs = new ArrayList<>(); - public static final String SERIALIZED_NAME_NOTIFICATIONS = "notifications"; - @SerializedName(SERIALIZED_NAME_NOTIFICATIONS) - @javax.annotation.Nullable - private List notifications = new ArrayList<>(); - public ServiceProfileLastMileConfig() { } - public ServiceProfileLastMileConfig address(@javax.annotation.Nullable ServiceProfileLastMileAddress address) { - this.address = address; + public ServiceProfileLastMileConfig apiIntegration(@javax.annotation.Nullable ServiceProfileLastMileApiIntegration apiIntegration) { + this.apiIntegration = apiIntegration; return this; } /** - * Get address - * @return address + * Get apiIntegration + * @return apiIntegration */ @javax.annotation.Nullable - public ServiceProfileLastMileAddress getAddress() { - return address; + public ServiceProfileLastMileApiIntegration getApiIntegration() { + return apiIntegration; } - public void setAddress(@javax.annotation.Nullable ServiceProfileLastMileAddress address) { - this.address = address; + public void setApiIntegration(@javax.annotation.Nullable ServiceProfileLastMileApiIntegration apiIntegration) { + this.apiIntegration = apiIntegration; } @@ -118,33 +112,6 @@ public void setProductCatalogs(@javax.annotation.Nullable List notifications) { - this.notifications = notifications; - return this; - } - - public ServiceProfileLastMileConfig addNotificationsItem(ServiceProfileLastMileNotification notificationsItem) { - if (this.notifications == null) { - this.notifications = new ArrayList<>(); - } - this.notifications.add(notificationsItem); - return this; - } - - /** - * Contact details for notifications related to last-mile provisioning and ordering. - * @return notifications - */ - @javax.annotation.Nullable - public List getNotifications() { - return notifications; - } - - public void setNotifications(@javax.annotation.Nullable List notifications) { - this.notifications = notifications; - } - /** * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with @@ -200,24 +167,22 @@ public boolean equals(Object o) { return false; } ServiceProfileLastMileConfig serviceProfileLastMileConfig = (ServiceProfileLastMileConfig) o; - return Objects.equals(this.address, serviceProfileLastMileConfig.address) && - Objects.equals(this.productCatalogs, serviceProfileLastMileConfig.productCatalogs) && - Objects.equals(this.notifications, serviceProfileLastMileConfig.notifications)&& + return Objects.equals(this.apiIntegration, serviceProfileLastMileConfig.apiIntegration) && + Objects.equals(this.productCatalogs, serviceProfileLastMileConfig.productCatalogs)&& Objects.equals(this.additionalProperties, serviceProfileLastMileConfig.additionalProperties); } @Override public int hashCode() { - return Objects.hash(address, productCatalogs, notifications, additionalProperties); + return Objects.hash(apiIntegration, productCatalogs, additionalProperties); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ServiceProfileLastMileConfig {\n"); - sb.append(" address: ").append(toIndentedString(address)).append("\n"); + sb.append(" apiIntegration: ").append(toIndentedString(apiIntegration)).append("\n"); sb.append(" productCatalogs: ").append(toIndentedString(productCatalogs)).append("\n"); - sb.append(" notifications: ").append(toIndentedString(notifications)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); @@ -240,7 +205,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("address", "productCatalogs", "notifications")); + openapiFields = new HashSet(Arrays.asList("apiIntegration", "productCatalogs")); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(0); @@ -259,9 +224,9 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `address` - if (jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) { - ServiceProfileLastMileAddress.validateJsonElement(jsonObj.get("address")); + // validate the optional field `apiIntegration` + if (jsonObj.get("apiIntegration") != null && !jsonObj.get("apiIntegration").isJsonNull()) { + ServiceProfileLastMileApiIntegration.validateJsonElement(jsonObj.get("apiIntegration")); } if (jsonObj.get("productCatalogs") != null && !jsonObj.get("productCatalogs").isJsonNull()) { JsonArray jsonArrayproductCatalogs = jsonObj.getAsJsonArray("productCatalogs"); @@ -277,20 +242,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti }; } } - if (jsonObj.get("notifications") != null && !jsonObj.get("notifications").isJsonNull()) { - JsonArray jsonArraynotifications = jsonObj.getAsJsonArray("notifications"); - if (jsonArraynotifications != null) { - // ensure the json data is an array - if (!jsonObj.get("notifications").isJsonArray()) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `notifications` to be an array in the JSON string but got `%s`", jsonObj.get("notifications").toString())); - } - - // validate the optional field `notifications` (array) - for (int i = 0; i < jsonArraynotifications.size(); i++) { - ServiceProfileLastMileNotification.validateJsonElement(jsonArraynotifications.get(i)); - }; - } - } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ServiceProfileLastMileProductCatalog.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ServiceProfileLastMileProductCatalog.java index a1347b8b..d90fca20 100644 --- a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ServiceProfileLastMileProductCatalog.java +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ServiceProfileLastMileProductCatalog.java @@ -59,6 +59,11 @@ public class ServiceProfileLastMileProductCatalog { @javax.annotation.Nullable private String name; + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nullable + private String id; + public static final String SERIALIZED_NAME_WEB_URL = "webUrl"; @SerializedName(SERIALIZED_NAME_WEB_URL) @javax.annotation.Nullable @@ -96,6 +101,25 @@ public void setName(@javax.annotation.Nullable String name) { } + public ServiceProfileLastMileProductCatalog id(@javax.annotation.Nullable String id) { + this.id = id; + return this; + } + + /** + * Last-mile provider or catalog identifier. + * @return id + */ + @javax.annotation.Nullable + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nullable String id) { + this.id = id; + } + + public ServiceProfileLastMileProductCatalog webUrl(@javax.annotation.Nullable String webUrl) { this.webUrl = webUrl; return this; @@ -216,6 +240,7 @@ public boolean equals(Object o) { } ServiceProfileLastMileProductCatalog serviceProfileLastMileProductCatalog = (ServiceProfileLastMileProductCatalog) o; return Objects.equals(this.name, serviceProfileLastMileProductCatalog.name) && + Objects.equals(this.id, serviceProfileLastMileProductCatalog.id) && Objects.equals(this.webUrl, serviceProfileLastMileProductCatalog.webUrl) && Objects.equals(this.deliveryDate, serviceProfileLastMileProductCatalog.deliveryDate) && Objects.equals(this.offerings, serviceProfileLastMileProductCatalog.offerings)&& @@ -224,7 +249,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(name, webUrl, deliveryDate, offerings, additionalProperties); + return Objects.hash(name, id, webUrl, deliveryDate, offerings, additionalProperties); } @Override @@ -232,6 +257,7 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ServiceProfileLastMileProductCatalog {\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" webUrl: ").append(toIndentedString(webUrl)).append("\n"); sb.append(" deliveryDate: ").append(toIndentedString(deliveryDate)).append("\n"); sb.append(" offerings: ").append(toIndentedString(offerings)).append("\n"); @@ -257,7 +283,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("name", "webUrl", "deliveryDate", "offerings")); + openapiFields = new HashSet(Arrays.asList("name", "id", "webUrl", "deliveryDate", "offerings")); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(0); @@ -279,6 +305,9 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } if ((jsonObj.get("webUrl") != null && !jsonObj.get("webUrl").isJsonNull()) && !jsonObj.get("webUrl").isJsonPrimitive()) { throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `webUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("webUrl").toString())); } diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ServiceProfileRequest.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ServiceProfileRequest.java index 9f64b985..d3765d54 100644 --- a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ServiceProfileRequest.java +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ServiceProfileRequest.java @@ -170,10 +170,12 @@ public ServiceProfileRequest() { } public ServiceProfileRequest( - URI href + URI href, + Boolean selfProfile ) { this(); this.href = href; + this.selfProfile = selfProfile; } public ServiceProfileRequest project(@javax.annotation.Nullable Project project) { @@ -550,7 +552,7 @@ public ServiceProfileRequest addEnvironmentsItem(ProviderEnvironment environment } /** - * Provider environments associated with this IC_PROFILE service profile. + * Provider environments associated with this IC_PROFILE service profile. <font color=\"red\"> <sup color='red'>Beta</sup></font> * @return environments */ @javax.annotation.Nullable @@ -563,11 +565,6 @@ public void setEnvironments(@javax.annotation.Nullable List } - public ServiceProfileRequest selfProfile(@javax.annotation.Nullable Boolean selfProfile) { - this.selfProfile = selfProfile; - return this; - } - /** * response attribute indicates whether the profile belongs to the same organization as the api-invoker. * @return selfProfile @@ -577,9 +574,6 @@ public Boolean getSelfProfile() { return selfProfile; } - public void setSelfProfile(@javax.annotation.Nullable Boolean selfProfile) { - this.selfProfile = selfProfile; - } public ServiceProfileRequest projectId(@javax.annotation.Nullable String projectId) { diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/JsonPatchOperation.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ServiceProfileUpdateOperation.java similarity index 86% rename from services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/JsonPatchOperation.java rename to services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ServiceProfileUpdateOperation.java index e3df2bc5..c4f5260d 100644 --- a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/JsonPatchOperation.java +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/ServiceProfileUpdateOperation.java @@ -14,7 +14,6 @@ import java.util.Objects; import java.util.Locale; import com.equinix.sdk.fabricv4.model.AddOperation; -import com.equinix.sdk.fabricv4.model.OpEnum; import com.equinix.sdk.fabricv4.model.RemoveOperation; import com.equinix.sdk.fabricv4.model.ReplaceOperation; import com.google.gson.TypeAdapter; @@ -62,24 +61,24 @@ import com.equinix.sdk.fabricv4.JSON; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") -public class JsonPatchOperation extends AbstractOpenApiSchema { - private static final Logger log = Logger.getLogger(JsonPatchOperation.class.getName()); +public class ServiceProfileUpdateOperation extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(ServiceProfileUpdateOperation.class.getName()); public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!JsonPatchOperation.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'JsonPatchOperation' and its subtypes + if (!ServiceProfileUpdateOperation.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ServiceProfileUpdateOperation' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); final TypeAdapter adapterAddOperation = gson.getDelegateAdapter(this, TypeToken.get(AddOperation.class)); final TypeAdapter adapterRemoveOperation = gson.getDelegateAdapter(this, TypeToken.get(RemoveOperation.class)); final TypeAdapter adapterReplaceOperation = gson.getDelegateAdapter(this, TypeToken.get(ReplaceOperation.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, JsonPatchOperation value) throws IOException { + public void write(JsonWriter out, ServiceProfileUpdateOperation value) throws IOException { if (value == null || value.getActualInstance() == null) { elementAdapter.write(out, null); return; @@ -107,7 +106,7 @@ public void write(JsonWriter out, JsonPatchOperation value) throws IOException { } @Override - public JsonPatchOperation read(JsonReader in) throws IOException { + public ServiceProfileUpdateOperation read(JsonReader in) throws IOException { Object deserialized = null; JsonElement jsonElement = elementAdapter.read(in); @@ -153,12 +152,12 @@ public JsonPatchOperation read(JsonReader in) throws IOException { } if (match == 1) { - JsonPatchOperation ret = new JsonPatchOperation(); + ServiceProfileUpdateOperation ret = new ServiceProfileUpdateOperation(); ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); return ret; } - throw new IOException(String.format(Locale.ROOT, "Failed deserialization for JsonPatchOperation: %d classes match result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", match, errorMessages, jsonElement.toString())); + throw new IOException(String.format(Locale.ROOT, "Failed deserialization for ServiceProfileUpdateOperation: %d classes match result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", match, errorMessages, jsonElement.toString())); } }.nullSafe(); } @@ -167,11 +166,11 @@ public JsonPatchOperation read(JsonReader in) throws IOException { // store a list of schema names defined in oneOf public static final Map> schemas = new HashMap>(); - public JsonPatchOperation() { + public ServiceProfileUpdateOperation() { super("oneOf", Boolean.FALSE); } - public JsonPatchOperation(Object o) { + public ServiceProfileUpdateOperation(Object o) { super("oneOf", Boolean.FALSE); setActualInstance(o); } @@ -184,7 +183,7 @@ public JsonPatchOperation(Object o) { @Override public Map> getSchemas() { - return JsonPatchOperation.schemas; + return ServiceProfileUpdateOperation.schemas; } /** @@ -263,7 +262,7 @@ public ReplaceOperation getReplaceOperation() throws ClassCastException { * Validates the JSON Element and throws an exception if issues found * * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to JsonPatchOperation + * @throws IOException if the JSON Element is invalid with respect to ServiceProfileUpdateOperation */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { // validate oneOf schemas one by one @@ -294,23 +293,23 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // continue to the next one } if (validCount != 1) { - throw new IOException(String.format(Locale.ROOT, "The JSON string is invalid for JsonPatchOperation with oneOf schemas: AddOperation, RemoveOperation, ReplaceOperation. %d class(es) match the result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", validCount, errorMessages, jsonElement.toString())); + throw new IOException(String.format(Locale.ROOT, "The JSON string is invalid for ServiceProfileUpdateOperation with oneOf schemas: AddOperation, RemoveOperation, ReplaceOperation. %d class(es) match the result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", validCount, errorMessages, jsonElement.toString())); } } /** - * Create an instance of JsonPatchOperation given an JSON string + * Create an instance of ServiceProfileUpdateOperation given an JSON string * * @param jsonString JSON string - * @return An instance of JsonPatchOperation - * @throws IOException if the JSON string is invalid with respect to JsonPatchOperation + * @return An instance of ServiceProfileUpdateOperation + * @throws IOException if the JSON string is invalid with respect to ServiceProfileUpdateOperation */ - public static JsonPatchOperation fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, JsonPatchOperation.class); + public static ServiceProfileUpdateOperation fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ServiceProfileUpdateOperation.class); } /** - * Convert an instance of JsonPatchOperation to an JSON string + * Convert an instance of ServiceProfileUpdateOperation to an JSON string * * @return JSON string */ diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/SimplifiedNotification.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/SimplifiedNotification.java index 28286ff7..9f000d71 100644 --- a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/SimplifiedNotification.java +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/SimplifiedNotification.java @@ -13,6 +13,7 @@ import java.util.Objects; import java.util.Locale; +import com.equinix.sdk.fabricv4.model.Phone; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -71,7 +72,9 @@ public enum TypeEnum { TECHNICAL("TECHNICAL"), - ORDERING("ORDERING"); + ORDERING("ORDERING"), + + QUOTE_NOTIFICATIONS("QUOTE_NOTIFICATIONS"); private String value; @@ -136,6 +139,11 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @javax.annotation.Nullable private List registeredUsers = new ArrayList<>(); + public static final String SERIALIZED_NAME_PHONE = "phone"; + @SerializedName(SERIALIZED_NAME_PHONE) + @javax.annotation.Nullable + private List phone = new ArrayList<>(); + public SimplifiedNotification() { } @@ -230,6 +238,33 @@ public void setRegisteredUsers(@javax.annotation.Nullable List registere this.registeredUsers = registeredUsers; } + + public SimplifiedNotification phone(@javax.annotation.Nullable List phone) { + this.phone = phone; + return this; + } + + public SimplifiedNotification addPhoneItem(Phone phoneItem) { + if (this.phone == null) { + this.phone = new ArrayList<>(); + } + this.phone.add(phoneItem); + return this; + } + + /** + * Array of contact phone numbers + * @return phone + */ + @javax.annotation.Nullable + public List getPhone() { + return phone; + } + + public void setPhone(@javax.annotation.Nullable List phone) { + this.phone = phone; + } + /** * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with @@ -288,13 +323,14 @@ public boolean equals(Object o) { return Objects.equals(this.type, simplifiedNotification.type) && Objects.equals(this.sendInterval, simplifiedNotification.sendInterval) && Objects.equals(this.emails, simplifiedNotification.emails) && - Objects.equals(this.registeredUsers, simplifiedNotification.registeredUsers)&& + Objects.equals(this.registeredUsers, simplifiedNotification.registeredUsers) && + Objects.equals(this.phone, simplifiedNotification.phone)&& Objects.equals(this.additionalProperties, simplifiedNotification.additionalProperties); } @Override public int hashCode() { - return Objects.hash(type, sendInterval, emails, registeredUsers, additionalProperties); + return Objects.hash(type, sendInterval, emails, registeredUsers, phone, additionalProperties); } @Override @@ -305,6 +341,7 @@ public String toString() { sb.append(" sendInterval: ").append(toIndentedString(sendInterval)).append("\n"); sb.append(" emails: ").append(toIndentedString(emails)).append("\n"); sb.append(" registeredUsers: ").append(toIndentedString(registeredUsers)).append("\n"); + sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); @@ -327,7 +364,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("type", "sendInterval", "emails", "registeredUsers")); + openapiFields = new HashSet(Arrays.asList("type", "sendInterval", "emails", "registeredUsers", "phone")); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(Arrays.asList("type", "emails")); @@ -371,6 +408,20 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("registeredUsers") != null && !jsonObj.get("registeredUsers").isJsonNull() && !jsonObj.get("registeredUsers").isJsonArray()) { throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `registeredUsers` to be an array in the JSON string but got `%s`", jsonObj.get("registeredUsers").toString())); } + if (jsonObj.get("phone") != null && !jsonObj.get("phone").isJsonNull()) { + JsonArray jsonArrayphone = jsonObj.getAsJsonArray("phone"); + if (jsonArrayphone != null) { + // ensure the json data is an array + if (!jsonObj.get("phone").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `phone` to be an array in the JSON string but got `%s`", jsonObj.get("phone").toString())); + } + + // validate the optional field `phone` (array) + for (int i = 0; i < jsonArrayphone.size(); i++) { + Phone.validateJsonElement(jsonArrayphone.get(i)); + }; + } + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/SimplifiedServiceProfile.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/SimplifiedServiceProfile.java index 32b2070a..04c3b06c 100644 --- a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/SimplifiedServiceProfile.java +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/SimplifiedServiceProfile.java @@ -164,10 +164,12 @@ public SimplifiedServiceProfile() { } public SimplifiedServiceProfile( - URI href + URI href, + Boolean selfProfile ) { this(); this.href = href; + this.selfProfile = selfProfile; } /** @@ -525,7 +527,7 @@ public SimplifiedServiceProfile addEnvironmentsItem(ProviderEnvironment environm } /** - * Provider environments associated with this IC_PROFILE service profile. + * Provider environments associated with this IC_PROFILE service profile. <font color=\"red\"> <sup color='red'>Beta</sup></font> * @return environments */ @javax.annotation.Nullable @@ -538,11 +540,6 @@ public void setEnvironments(@javax.annotation.Nullable List } - public SimplifiedServiceProfile selfProfile(@javax.annotation.Nullable Boolean selfProfile) { - this.selfProfile = selfProfile; - return this; - } - /** * response attribute indicates whether the profile belongs to the same organization as the api-invoker. * @return selfProfile @@ -552,9 +549,6 @@ public Boolean getSelfProfile() { return selfProfile; } - public void setSelfProfile(@javax.annotation.Nullable Boolean selfProfile) { - this.selfProfile = selfProfile; - } public SimplifiedServiceProfile projectId(@javax.annotation.Nullable String projectId) { diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/Sort.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/Sort.java index 8c5a54c0..1b265961 100644 --- a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/Sort.java +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/Sort.java @@ -70,7 +70,7 @@ public Sort property(@javax.annotation.Nullable String property) { } /** - * Property to sort by((currently supports tags with filter syntax) + * Property to sort by. Supported values: * `/name` - Company profile name * `/state` - Company profile state * `/changeLog/updatedDateTime` - Date and time the profile was last updated * `/changeLog/createdDateTime` - Date and time the profile was created * @return property */ @javax.annotation.Nullable diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/StreamAsset.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/StreamAsset.java index 3e4e9739..68001c60 100644 --- a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/StreamAsset.java +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/StreamAsset.java @@ -81,7 +81,17 @@ public enum TypeEnum { ORGANIZATION("ORGANIZATION"), - PROJECT("PROJECT"); + PROJECT("PROJECT"), + + DATA("DATA"), + + MGMT("MGMT"), + + SSH("SSH"), + + FAB("FAB"), + + CTRL("CTRL"); private String value; diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/StreamAssetSearchRequest.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/StreamAssetSearchRequest.java index 6e70ed3e..e6fd3e8f 100644 --- a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/StreamAssetSearchRequest.java +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/StreamAssetSearchRequest.java @@ -57,7 +57,7 @@ public class StreamAssetSearchRequest { public static final String SERIALIZED_NAME_FILTER = "filter"; @SerializedName(SERIALIZED_NAME_FILTER) - @javax.annotation.Nonnull + @javax.annotation.Nullable private StreamAssetFilters filter; public static final String SERIALIZED_NAME_PAGINATION = "pagination"; @@ -73,7 +73,7 @@ public class StreamAssetSearchRequest { public StreamAssetSearchRequest() { } - public StreamAssetSearchRequest filter(@javax.annotation.Nonnull StreamAssetFilters filter) { + public StreamAssetSearchRequest filter(@javax.annotation.Nullable StreamAssetFilters filter) { this.filter = filter; return this; } @@ -82,12 +82,12 @@ public StreamAssetSearchRequest filter(@javax.annotation.Nonnull StreamAssetFilt * Get filter * @return filter */ - @javax.annotation.Nonnull + @javax.annotation.Nullable public StreamAssetFilters getFilter() { return filter; } - public void setFilter(@javax.annotation.Nonnull StreamAssetFilters filter) { + public void setFilter(@javax.annotation.Nullable StreamAssetFilters filter) { this.filter = filter; } @@ -235,7 +235,7 @@ private String toIndentedString(Object o) { openapiFields = new HashSet(Arrays.asList("filter", "pagination", "sort")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("filter")); + openapiRequiredFields = new HashSet(0); } /** @@ -250,16 +250,11 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in StreamAssetSearchRequest is not found in the empty JSON string", StreamAssetSearchRequest.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : StreamAssetSearchRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the required field `filter` - StreamAssetFilters.validateJsonElement(jsonObj.get("filter")); + // validate the optional field `filter` + if (jsonObj.get("filter") != null && !jsonObj.get("filter").isJsonNull()) { + StreamAssetFilters.validateJsonElement(jsonObj.get("filter")); + } // validate the optional field `pagination` if (jsonObj.get("pagination") != null && !jsonObj.get("pagination").isJsonNull()) { PaginationRequest.validateJsonElement(jsonObj.get("pagination")); diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/StreamAssetSimpleExpression.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/StreamAssetSimpleExpression.java index f8b5a2cd..cfa990a5 100644 --- a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/StreamAssetSimpleExpression.java +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/StreamAssetSimpleExpression.java @@ -76,7 +76,7 @@ public StreamAssetSimpleExpression property(@javax.annotation.Nullable String pr } /** - * Possible field names to use on filters: * `/uuid` - Asset uuid * `/streamUuid` - Stream uuid * `/projectId` - Asset projectId * `/_*` - all-category search + * Possible field names to use on filters: * `/uuid` - Asset uuid (`=` and `IN` only) * `/streamUuid` - Stream uuid (`=` and `IN` only) * `/attachmentStatus` - Asset attachment status (`=`, `IN`, and `NOT IN`) * @return property */ @javax.annotation.Nullable @@ -95,7 +95,7 @@ public StreamAssetSimpleExpression operator(@javax.annotation.Nullable String op } /** - * Possible operators to use on filters: * `=` - equal * `!=` - not equal * `>` - greater than * `>=` - greater than or equal to * `<` - less than * `<=` - less than or equal to * `[NOT] BETWEEN` - (not) between * `[NOT] LIKE` - (not) like * `[NOT] IN` - (not) in * `ILIKE` - case-insensitive like + * Possible operators to use on filters: * `=` - equal * `IN` - in * `NOT IN` - not in * @return operator */ @javax.annotation.Nullable diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/StreamAssetSortBy.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/StreamAssetSortBy.java index 372eb061..63ab5a26 100644 --- a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/StreamAssetSortBy.java +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/StreamAssetSortBy.java @@ -29,7 +29,9 @@ @JsonAdapter(StreamAssetSortBy.Adapter.class) public enum StreamAssetSortBy { - _UUID("/uuid"); + UUID("/uuid"), + + STREAMUUID("/streamUuid"); private String value; diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/StreamAssetSortCriteria.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/StreamAssetSortCriteria.java index e9789626..95c6a671 100644 --- a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/StreamAssetSortCriteria.java +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/StreamAssetSortCriteria.java @@ -54,18 +54,18 @@ public class StreamAssetSortCriteria { public static final String SERIALIZED_NAME_DIRECTION = "direction"; @SerializedName(SERIALIZED_NAME_DIRECTION) - @javax.annotation.Nullable + @javax.annotation.Nonnull private StreamAssetSortDirection direction = StreamAssetSortDirection.DESC; public static final String SERIALIZED_NAME_PROPERTY = "property"; @SerializedName(SERIALIZED_NAME_PROPERTY) - @javax.annotation.Nullable - private StreamAssetSortBy property = StreamAssetSortBy._UUID; + @javax.annotation.Nonnull + private StreamAssetSortBy property = StreamAssetSortBy.UUID; public StreamAssetSortCriteria() { } - public StreamAssetSortCriteria direction(@javax.annotation.Nullable StreamAssetSortDirection direction) { + public StreamAssetSortCriteria direction(@javax.annotation.Nonnull StreamAssetSortDirection direction) { this.direction = direction; return this; } @@ -74,17 +74,17 @@ public StreamAssetSortCriteria direction(@javax.annotation.Nullable StreamAssetS * Get direction * @return direction */ - @javax.annotation.Nullable + @javax.annotation.Nonnull public StreamAssetSortDirection getDirection() { return direction; } - public void setDirection(@javax.annotation.Nullable StreamAssetSortDirection direction) { + public void setDirection(@javax.annotation.Nonnull StreamAssetSortDirection direction) { this.direction = direction; } - public StreamAssetSortCriteria property(@javax.annotation.Nullable StreamAssetSortBy property) { + public StreamAssetSortCriteria property(@javax.annotation.Nonnull StreamAssetSortBy property) { this.property = property; return this; } @@ -93,12 +93,12 @@ public StreamAssetSortCriteria property(@javax.annotation.Nullable StreamAssetSo * Get property * @return property */ - @javax.annotation.Nullable + @javax.annotation.Nonnull public StreamAssetSortBy getProperty() { return property; } - public void setProperty(@javax.annotation.Nullable StreamAssetSortBy property) { + public void setProperty(@javax.annotation.Nonnull StreamAssetSortBy property) { this.property = property; } @@ -198,7 +198,7 @@ private String toIndentedString(Object o) { openapiFields = new HashSet(Arrays.asList("direction", "property")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); + openapiRequiredFields = new HashSet(Arrays.asList("direction", "property")); } /** @@ -213,15 +213,18 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in StreamAssetSortCriteria is not found in the empty JSON string", StreamAssetSortCriteria.openapiRequiredFields.toString())); } } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `direction` - if (jsonObj.get("direction") != null && !jsonObj.get("direction").isJsonNull()) { - StreamAssetSortDirection.validateJsonElement(jsonObj.get("direction")); - } - // validate the optional field `property` - if (jsonObj.get("property") != null && !jsonObj.get("property").isJsonNull()) { - StreamAssetSortBy.validateJsonElement(jsonObj.get("property")); + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : StreamAssetSortCriteria.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the required field `direction` + StreamAssetSortDirection.validateJsonElement(jsonObj.get("direction")); + // validate the required field `property` + StreamAssetSortBy.validateJsonElement(jsonObj.get("property")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/GatewayAttachmentResponse.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/StreamSearchAsset.java similarity index 64% rename from services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/GatewayAttachmentResponse.java rename to services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/StreamSearchAsset.java index b32841a3..9bc23516 100644 --- a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/GatewayAttachmentResponse.java +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/StreamSearchAsset.java @@ -13,8 +13,6 @@ import java.util.Objects; import java.util.Locale; -import com.equinix.sdk.fabricv4.model.Changelog; -import com.equinix.sdk.fabricv4.model.Error; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,9 +20,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.net.URI; -import java.util.ArrayList; import java.util.Arrays; -import java.util.List; import java.util.UUID; import com.google.gson.Gson; @@ -52,77 +48,37 @@ import com.equinix.sdk.fabricv4.JSON; /** - * Schema representing a Gateway attaching or detaching on a Cloud Router. This schema defines the structure of the response returned when a Gateway is attached or detached to a Cloud Router. + * Stream object */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") -public class GatewayAttachmentResponse { +public class StreamSearchAsset { public static final String SERIALIZED_NAME_HREF = "href"; @SerializedName(SERIALIZED_NAME_HREF) @javax.annotation.Nullable private URI href; - /** - * Gets or Sets type - */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - VPN_GATEWAY("VPN_GATEWAY"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } + public static final String SERIALIZED_NAME_UUID = "uuid"; + @SerializedName(SERIALIZED_NAME_UUID) + @javax.annotation.Nullable + private UUID uuid; - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - TypeEnum.fromValue(value); - } - } + public static final String SERIALIZED_NAME_STREAM_UUID = "streamUuid"; + @SerializedName(SERIALIZED_NAME_STREAM_UUID) + @javax.annotation.Nullable + private UUID streamUuid; public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) @javax.annotation.Nullable - private TypeEnum type; + private String type; - public static final String SERIALIZED_NAME_UUID = "uuid"; - @SerializedName(SERIALIZED_NAME_UUID) + public static final String SERIALIZED_NAME_METRICS_ENABLED = "metricsEnabled"; + @SerializedName(SERIALIZED_NAME_METRICS_ENABLED) @javax.annotation.Nullable - private UUID uuid; + private Boolean metricsEnabled; /** - * Gets or Sets attachmentStatus + * asset status */ @JsonAdapter(AttachmentStatusEnum.Adapter.class) public enum AttachmentStatusEnum { @@ -130,10 +86,10 @@ public enum AttachmentStatusEnum { ATTACHED("ATTACHED"), - DETACHING("DETACHING"), - DETACHED("DETACHED"), + DETACHING("DETACHING"), + FAILED("FAILED"); private String value; @@ -184,26 +140,23 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @javax.annotation.Nullable private AttachmentStatusEnum attachmentStatus; - public static final String SERIALIZED_NAME_ERRORS = "errors"; - @SerializedName(SERIALIZED_NAME_ERRORS) - @javax.annotation.Nullable - private List errors = new ArrayList<>(); - - public static final String SERIALIZED_NAME_CHANGE_LOG = "changeLog"; - @SerializedName(SERIALIZED_NAME_CHANGE_LOG) + public static final String SERIALIZED_NAME_PROJECT_ID = "projectId"; + @SerializedName(SERIALIZED_NAME_PROJECT_ID) @javax.annotation.Nullable - private Changelog changeLog; + private String projectId; - public GatewayAttachmentResponse() { + public StreamSearchAsset() { } - public GatewayAttachmentResponse href(@javax.annotation.Nullable URI href) { + public StreamSearchAsset( + URI href + ) { + this(); this.href = href; - return this; } /** - * Get href + * Stream Asset URI * @return href */ @javax.annotation.Nullable @@ -211,111 +164,119 @@ public URI getHref() { return href; } - public void setHref(@javax.annotation.Nullable URI href) { - this.href = href; - } - public GatewayAttachmentResponse type(@javax.annotation.Nullable TypeEnum type) { - this.type = type; + public StreamSearchAsset uuid(@javax.annotation.Nullable UUID uuid) { + this.uuid = uuid; return this; } /** - * Get type - * @return type + * Equinix-assigned access point identifier + * @return uuid */ @javax.annotation.Nullable - public TypeEnum getType() { - return type; + public UUID getUuid() { + return uuid; } - public void setType(@javax.annotation.Nullable TypeEnum type) { - this.type = type; + public void setUuid(@javax.annotation.Nullable UUID uuid) { + this.uuid = uuid; } - public GatewayAttachmentResponse uuid(@javax.annotation.Nullable UUID uuid) { - this.uuid = uuid; + public StreamSearchAsset streamUuid(@javax.annotation.Nullable UUID streamUuid) { + this.streamUuid = streamUuid; return this; } /** - * Get uuid - * @return uuid + * Equinix-assigned access point identifier + * @return streamUuid */ @javax.annotation.Nullable - public UUID getUuid() { - return uuid; + public UUID getStreamUuid() { + return streamUuid; } - public void setUuid(@javax.annotation.Nullable UUID uuid) { - this.uuid = uuid; + public void setStreamUuid(@javax.annotation.Nullable UUID streamUuid) { + this.streamUuid = streamUuid; } - public GatewayAttachmentResponse attachmentStatus(@javax.annotation.Nullable AttachmentStatusEnum attachmentStatus) { - this.attachmentStatus = attachmentStatus; + public StreamSearchAsset type(@javax.annotation.Nullable String type) { + this.type = type; return this; } /** - * Get attachmentStatus - * @return attachmentStatus + * Asset type + * @return type */ @javax.annotation.Nullable - public AttachmentStatusEnum getAttachmentStatus() { - return attachmentStatus; + public String getType() { + return type; } - public void setAttachmentStatus(@javax.annotation.Nullable AttachmentStatusEnum attachmentStatus) { - this.attachmentStatus = attachmentStatus; + public void setType(@javax.annotation.Nullable String type) { + this.type = type; } - public GatewayAttachmentResponse errors(@javax.annotation.Nullable List errors) { - this.errors = errors; + public StreamSearchAsset metricsEnabled(@javax.annotation.Nullable Boolean metricsEnabled) { + this.metricsEnabled = metricsEnabled; return this; } - public GatewayAttachmentResponse addErrorsItem(Error errorsItem) { - if (this.errors == null) { - this.errors = new ArrayList<>(); - } - this.errors.add(errorsItem); + /** + * enable metric + * @return metricsEnabled + */ + @javax.annotation.Nullable + public Boolean getMetricsEnabled() { + return metricsEnabled; + } + + public void setMetricsEnabled(@javax.annotation.Nullable Boolean metricsEnabled) { + this.metricsEnabled = metricsEnabled; + } + + + public StreamSearchAsset attachmentStatus(@javax.annotation.Nullable AttachmentStatusEnum attachmentStatus) { + this.attachmentStatus = attachmentStatus; return this; } /** - * Get errors - * @return errors + * asset status + * @return attachmentStatus */ @javax.annotation.Nullable - public List getErrors() { - return errors; + public AttachmentStatusEnum getAttachmentStatus() { + return attachmentStatus; } - public void setErrors(@javax.annotation.Nullable List errors) { - this.errors = errors; + public void setAttachmentStatus(@javax.annotation.Nullable AttachmentStatusEnum attachmentStatus) { + this.attachmentStatus = attachmentStatus; } - public GatewayAttachmentResponse changeLog(@javax.annotation.Nullable Changelog changeLog) { - this.changeLog = changeLog; + public StreamSearchAsset projectId(@javax.annotation.Nullable String projectId) { + this.projectId = projectId; return this; } /** - * Get changeLog - * @return changeLog + * project ic + * @return projectId */ @javax.annotation.Nullable - public Changelog getChangeLog() { - return changeLog; + public String getProjectId() { + return projectId; } - public void setChangeLog(@javax.annotation.Nullable Changelog changeLog) { - this.changeLog = changeLog; + public void setProjectId(@javax.annotation.Nullable String projectId) { + this.projectId = projectId; } /** @@ -331,9 +292,9 @@ public void setChangeLog(@javax.annotation.Nullable Changelog changeLog) { * * @param key name of the property * @param value value of the property - * @return the GatewayAttachmentResponse instance itself + * @return the StreamSearchAsset instance itself */ - public GatewayAttachmentResponse putAdditionalProperty(String key, Object value) { + public StreamSearchAsset putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -372,31 +333,33 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - GatewayAttachmentResponse gatewayAttachmentResponse = (GatewayAttachmentResponse) o; - return Objects.equals(this.href, gatewayAttachmentResponse.href) && - Objects.equals(this.type, gatewayAttachmentResponse.type) && - Objects.equals(this.uuid, gatewayAttachmentResponse.uuid) && - Objects.equals(this.attachmentStatus, gatewayAttachmentResponse.attachmentStatus) && - Objects.equals(this.errors, gatewayAttachmentResponse.errors) && - Objects.equals(this.changeLog, gatewayAttachmentResponse.changeLog)&& - Objects.equals(this.additionalProperties, gatewayAttachmentResponse.additionalProperties); + StreamSearchAsset streamSearchAsset = (StreamSearchAsset) o; + return Objects.equals(this.href, streamSearchAsset.href) && + Objects.equals(this.uuid, streamSearchAsset.uuid) && + Objects.equals(this.streamUuid, streamSearchAsset.streamUuid) && + Objects.equals(this.type, streamSearchAsset.type) && + Objects.equals(this.metricsEnabled, streamSearchAsset.metricsEnabled) && + Objects.equals(this.attachmentStatus, streamSearchAsset.attachmentStatus) && + Objects.equals(this.projectId, streamSearchAsset.projectId)&& + Objects.equals(this.additionalProperties, streamSearchAsset.additionalProperties); } @Override public int hashCode() { - return Objects.hash(href, type, uuid, attachmentStatus, errors, changeLog, additionalProperties); + return Objects.hash(href, uuid, streamUuid, type, metricsEnabled, attachmentStatus, projectId, additionalProperties); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class GatewayAttachmentResponse {\n"); + sb.append("class StreamSearchAsset {\n"); sb.append(" href: ").append(toIndentedString(href)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); + sb.append(" streamUuid: ").append(toIndentedString(streamUuid)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" metricsEnabled: ").append(toIndentedString(metricsEnabled)).append("\n"); sb.append(" attachmentStatus: ").append(toIndentedString(attachmentStatus)).append("\n"); - sb.append(" errors: ").append(toIndentedString(errors)).append("\n"); - sb.append(" changeLog: ").append(toIndentedString(changeLog)).append("\n"); + sb.append(" projectId: ").append(toIndentedString(projectId)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); @@ -419,7 +382,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("href", "type", "uuid", "attachmentStatus", "errors", "changeLog")); + openapiFields = new HashSet(Arrays.asList("href", "uuid", "streamUuid", "type", "metricsEnabled", "attachmentStatus", "projectId")); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(0); @@ -429,28 +392,27 @@ private String toIndentedString(Object o) { * Validates the JSON Element and throws an exception if issues found * * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to GatewayAttachmentResponse + * @throws IOException if the JSON Element is invalid with respect to StreamSearchAsset */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { - if (!GatewayAttachmentResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in GatewayAttachmentResponse is not found in the empty JSON string", GatewayAttachmentResponse.openapiRequiredFields.toString())); + if (!StreamSearchAsset.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in StreamSearchAsset is not found in the empty JSON string", StreamSearchAsset.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("href") != null && !jsonObj.get("href").isJsonNull()) && !jsonObj.get("href").isJsonPrimitive()) { throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `href` to be a primitive type in the JSON string but got `%s`", jsonObj.get("href").toString())); } - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - // validate the optional field `type` - if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { - TypeEnum.validateJsonElement(jsonObj.get("type")); - } if ((jsonObj.get("uuid") != null && !jsonObj.get("uuid").isJsonNull()) && !jsonObj.get("uuid").isJsonPrimitive()) { throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `uuid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("uuid").toString())); } + if ((jsonObj.get("streamUuid") != null && !jsonObj.get("streamUuid").isJsonNull()) && !jsonObj.get("streamUuid").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `streamUuid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("streamUuid").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } if ((jsonObj.get("attachmentStatus") != null && !jsonObj.get("attachmentStatus").isJsonNull()) && !jsonObj.get("attachmentStatus").isJsonPrimitive()) { throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `attachmentStatus` to be a primitive type in the JSON string but got `%s`", jsonObj.get("attachmentStatus").toString())); } @@ -458,23 +420,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("attachmentStatus") != null && !jsonObj.get("attachmentStatus").isJsonNull()) { AttachmentStatusEnum.validateJsonElement(jsonObj.get("attachmentStatus")); } - if (jsonObj.get("errors") != null && !jsonObj.get("errors").isJsonNull()) { - JsonArray jsonArrayerrors = jsonObj.getAsJsonArray("errors"); - if (jsonArrayerrors != null) { - // ensure the json data is an array - if (!jsonObj.get("errors").isJsonArray()) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `errors` to be an array in the JSON string but got `%s`", jsonObj.get("errors").toString())); - } - - // validate the optional field `errors` (array) - for (int i = 0; i < jsonArrayerrors.size(); i++) { - Error.validateJsonElement(jsonArrayerrors.get(i)); - }; - } - } - // validate the optional field `changeLog` - if (jsonObj.get("changeLog") != null && !jsonObj.get("changeLog").isJsonNull()) { - Changelog.validateJsonElement(jsonObj.get("changeLog")); + if ((jsonObj.get("projectId") != null && !jsonObj.get("projectId").isJsonNull()) && !jsonObj.get("projectId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `projectId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("projectId").toString())); } } @@ -482,16 +429,16 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!GatewayAttachmentResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'GatewayAttachmentResponse' and its subtypes + if (!StreamSearchAsset.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'StreamSearchAsset' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(GatewayAttachmentResponse.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(StreamSearchAsset.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, GatewayAttachmentResponse value) throws IOException { + public void write(JsonWriter out, StreamSearchAsset value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); // serialize additional properties @@ -519,12 +466,12 @@ else if (entry.getValue() instanceof Character) } @Override - public GatewayAttachmentResponse read(JsonReader in) throws IOException { + public StreamSearchAsset read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); JsonObject jsonObj = jsonElement.getAsJsonObject(); // store additional fields in the deserialized instance - GatewayAttachmentResponse instance = thisAdapter.fromJsonTree(jsonObj); + StreamSearchAsset instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { if (!openapiFields.contains(entry.getKey())) { if (entry.getValue().isJsonPrimitive()) { // primitive type @@ -551,18 +498,18 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } /** - * Create an instance of GatewayAttachmentResponse given an JSON string + * Create an instance of StreamSearchAsset given an JSON string * * @param jsonString JSON string - * @return An instance of GatewayAttachmentResponse - * @throws IOException if the JSON string is invalid with respect to GatewayAttachmentResponse + * @return An instance of StreamSearchAsset + * @throws IOException if the JSON string is invalid with respect to StreamSearchAsset */ - public static GatewayAttachmentResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, GatewayAttachmentResponse.class); + public static StreamSearchAsset fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, StreamSearchAsset.class); } /** - * Convert an instance of GatewayAttachmentResponse to an JSON string + * Convert an instance of StreamSearchAsset to an JSON string * * @return JSON string */ diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/StreamSearchFilter.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/StreamSearchFilter.java new file mode 100644 index 00000000..9a3ae0a2 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/StreamSearchFilter.java @@ -0,0 +1,269 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.StreamSearchOrFilter; +import com.equinix.sdk.fabricv4.model.StreamSearchSimpleExpression; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + + + +import java.io.IOException; +import java.lang.reflect.Type; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Locale; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.JsonPrimitive; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonSerializationContext; +import com.google.gson.JsonSerializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonArray; +import com.google.gson.JsonParseException; + +import com.equinix.sdk.fabricv4.JSON; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class StreamSearchFilter extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(StreamSearchFilter.class.getName()); + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!StreamSearchFilter.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'StreamSearchFilter' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter adapterStreamSearchSimpleExpression = gson.getDelegateAdapter(this, TypeToken.get(StreamSearchSimpleExpression.class)); + final TypeAdapter adapterStreamSearchOrFilter = gson.getDelegateAdapter(this, TypeToken.get(StreamSearchOrFilter.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, StreamSearchFilter value) throws IOException { + if (value == null || value.getActualInstance() == null) { + elementAdapter.write(out, null); + return; + } + + // check if the actual instance is of the type `StreamSearchSimpleExpression` + if (value.getActualInstance() instanceof StreamSearchSimpleExpression) { + JsonElement element = adapterStreamSearchSimpleExpression.toJsonTree((StreamSearchSimpleExpression)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + // check if the actual instance is of the type `StreamSearchOrFilter` + if (value.getActualInstance() instanceof StreamSearchOrFilter) { + JsonElement element = adapterStreamSearchOrFilter.toJsonTree((StreamSearchOrFilter)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + throw new IOException("Failed to serialize as the type doesn't match anyOf schemas: StreamSearchOrFilter, StreamSearchSimpleExpression"); + } + + @Override + public StreamSearchFilter read(JsonReader in) throws IOException { + Object deserialized = null; + JsonElement jsonElement = elementAdapter.read(in); + + ArrayList errorMessages = new ArrayList<>(); + TypeAdapter actualAdapter = elementAdapter; + + // deserialize StreamSearchSimpleExpression + try { + // validate the JSON object to see if any exception is thrown + StreamSearchSimpleExpression.validateJsonElement(jsonElement); + actualAdapter = adapterStreamSearchSimpleExpression; + StreamSearchFilter ret = new StreamSearchFilter(); + ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); + return ret; + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format(Locale.ROOT, "Deserialization for StreamSearchSimpleExpression failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'StreamSearchSimpleExpression'", e); + } + // deserialize StreamSearchOrFilter + try { + // validate the JSON object to see if any exception is thrown + StreamSearchOrFilter.validateJsonElement(jsonElement); + actualAdapter = adapterStreamSearchOrFilter; + StreamSearchFilter ret = new StreamSearchFilter(); + ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); + return ret; + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format(Locale.ROOT, "Deserialization for StreamSearchOrFilter failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'StreamSearchOrFilter'", e); + } + + throw new IOException(String.format(Locale.ROOT, "Failed deserialization for StreamSearchFilter: no class matches result, expected at least 1. Detailed failure message for anyOf schemas: %s. JSON: %s", errorMessages, jsonElement.toString())); + } + }.nullSafe(); + } + } + + // store a list of schema names defined in anyOf + public static final Map> schemas = new HashMap>(); + + public StreamSearchFilter() { + super("anyOf", Boolean.FALSE); + } + + public StreamSearchFilter(Object o) { + super("anyOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("StreamSearchSimpleExpression", StreamSearchSimpleExpression.class); + schemas.put("StreamSearchOrFilter", StreamSearchOrFilter.class); + } + + @Override + public Map> getSchemas() { + return StreamSearchFilter.schemas; + } + + /** + * Set the instance that matches the anyOf child schema, check + * the instance parameter is valid against the anyOf child schemas: + * StreamSearchOrFilter, StreamSearchSimpleExpression + * + * It could be an instance of the 'anyOf' schemas. + */ + @Override + public void setActualInstance(Object instance) { + if (instance instanceof StreamSearchSimpleExpression) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof StreamSearchOrFilter) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException("Invalid instance type. Must be StreamSearchOrFilter, StreamSearchSimpleExpression"); + } + + /** + * Get the actual instance, which can be the following: + * StreamSearchOrFilter, StreamSearchSimpleExpression + * + * @return The actual instance (StreamSearchOrFilter, StreamSearchSimpleExpression) + */ + @SuppressWarnings("unchecked") + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `StreamSearchSimpleExpression`. If the actual instance is not `StreamSearchSimpleExpression`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `StreamSearchSimpleExpression` + * @throws ClassCastException if the instance is not `StreamSearchSimpleExpression` + */ + public StreamSearchSimpleExpression getStreamSearchSimpleExpression() throws ClassCastException { + return (StreamSearchSimpleExpression)super.getActualInstance(); + } + + /** + * Get the actual instance of `StreamSearchOrFilter`. If the actual instance is not `StreamSearchOrFilter`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `StreamSearchOrFilter` + * @throws ClassCastException if the instance is not `StreamSearchOrFilter` + */ + public StreamSearchOrFilter getStreamSearchOrFilter() throws ClassCastException { + return (StreamSearchOrFilter)super.getActualInstance(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to StreamSearchFilter + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + // validate anyOf schemas one by one + ArrayList errorMessages = new ArrayList<>(); + // validate the json string with StreamSearchSimpleExpression + try { + StreamSearchSimpleExpression.validateJsonElement(jsonElement); + return; + } catch (Exception e) { + errorMessages.add(String.format(Locale.ROOT, "Deserialization for StreamSearchSimpleExpression failed with `%s`.", e.getMessage())); + // continue to the next one + } + // validate the json string with StreamSearchOrFilter + try { + StreamSearchOrFilter.validateJsonElement(jsonElement); + return; + } catch (Exception e) { + errorMessages.add(String.format(Locale.ROOT, "Deserialization for StreamSearchOrFilter failed with `%s`.", e.getMessage())); + // continue to the next one + } + throw new IOException(String.format(Locale.ROOT, "The JSON string is invalid for StreamSearchFilter with anyOf schemas: StreamSearchOrFilter, StreamSearchSimpleExpression. no class match the result, expected at least 1. Detailed failure message for anyOf schemas: %s. JSON: %s", errorMessages, jsonElement.toString())); + } + + /** + * Create an instance of StreamSearchFilter given an JSON string + * + * @param jsonString JSON string + * @return An instance of StreamSearchFilter + * @throws IOException if the JSON string is invalid with respect to StreamSearchFilter + */ + public static StreamSearchFilter fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, StreamSearchFilter.class); + } + + /** + * Convert an instance of StreamSearchFilter to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/StreamSearchFilters.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/StreamSearchFilters.java new file mode 100644 index 00000000..c681e7fe --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/StreamSearchFilters.java @@ -0,0 +1,311 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.StreamSearchFilter; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * StreamSearchFilters + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class StreamSearchFilters { + public static final String SERIALIZED_NAME_AND = "and"; + @SerializedName(SERIALIZED_NAME_AND) + @javax.annotation.Nonnull + private List and = new ArrayList<>(); + + public StreamSearchFilters() { + } + + public StreamSearchFilters and(@javax.annotation.Nonnull List and) { + this.and = and; + return this; + } + + public StreamSearchFilters addAndItem(StreamSearchFilter andItem) { + if (this.and == null) { + this.and = new ArrayList<>(); + } + this.and.add(andItem); + return this; + } + + /** + * Get and + * @return and + */ + @javax.annotation.Nonnull + public List getAnd() { + return and; + } + + public void setAnd(@javax.annotation.Nonnull List and) { + this.and = and; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the StreamSearchFilters instance itself + */ + public StreamSearchFilters putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StreamSearchFilters streamSearchFilters = (StreamSearchFilters) o; + return Objects.equals(this.and, streamSearchFilters.and)&& + Objects.equals(this.additionalProperties, streamSearchFilters.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(and, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StreamSearchFilters {\n"); + sb.append(" and: ").append(toIndentedString(and)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("and")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("and")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to StreamSearchFilters + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!StreamSearchFilters.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in StreamSearchFilters is not found in the empty JSON string", StreamSearchFilters.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : StreamSearchFilters.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the json data is an array + if (!jsonObj.get("and").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `and` to be an array in the JSON string but got `%s`", jsonObj.get("and").toString())); + } + + JsonArray jsonArrayand = jsonObj.getAsJsonArray("and"); + // validate the required field `and` (array) + for (int i = 0; i < jsonArrayand.size(); i++) { + StreamSearchFilter.validateJsonElement(jsonArrayand.get(i)); + }; + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!StreamSearchFilters.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'StreamSearchFilters' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(StreamSearchFilters.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, StreamSearchFilters value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public StreamSearchFilters read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + StreamSearchFilters instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of StreamSearchFilters given an JSON string + * + * @param jsonString JSON string + * @return An instance of StreamSearchFilters + * @throws IOException if the JSON string is invalid with respect to StreamSearchFilters + */ + public static StreamSearchFilters fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, StreamSearchFilters.class); + } + + /** + * Convert an instance of StreamSearchFilters to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/StreamSearchOrFilter.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/StreamSearchOrFilter.java new file mode 100644 index 00000000..553acf63 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/StreamSearchOrFilter.java @@ -0,0 +1,308 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.StreamSearchSimpleExpression; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * StreamSearchOrFilter + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class StreamSearchOrFilter { + public static final String SERIALIZED_NAME_OR = "or"; + @SerializedName(SERIALIZED_NAME_OR) + @javax.annotation.Nullable + private List or = new ArrayList<>(); + + public StreamSearchOrFilter() { + } + + public StreamSearchOrFilter or(@javax.annotation.Nullable List or) { + this.or = or; + return this; + } + + public StreamSearchOrFilter addOrItem(StreamSearchSimpleExpression orItem) { + if (this.or == null) { + this.or = new ArrayList<>(); + } + this.or.add(orItem); + return this; + } + + /** + * Get or + * @return or + */ + @javax.annotation.Nullable + public List getOr() { + return or; + } + + public void setOr(@javax.annotation.Nullable List or) { + this.or = or; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the StreamSearchOrFilter instance itself + */ + public StreamSearchOrFilter putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StreamSearchOrFilter streamSearchOrFilter = (StreamSearchOrFilter) o; + return Objects.equals(this.or, streamSearchOrFilter.or)&& + Objects.equals(this.additionalProperties, streamSearchOrFilter.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(or, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StreamSearchOrFilter {\n"); + sb.append(" or: ").append(toIndentedString(or)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("or")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to StreamSearchOrFilter + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!StreamSearchOrFilter.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in StreamSearchOrFilter is not found in the empty JSON string", StreamSearchOrFilter.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("or") != null && !jsonObj.get("or").isJsonNull()) { + JsonArray jsonArrayor = jsonObj.getAsJsonArray("or"); + if (jsonArrayor != null) { + // ensure the json data is an array + if (!jsonObj.get("or").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `or` to be an array in the JSON string but got `%s`", jsonObj.get("or").toString())); + } + + // validate the optional field `or` (array) + for (int i = 0; i < jsonArrayor.size(); i++) { + StreamSearchSimpleExpression.validateJsonElement(jsonArrayor.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!StreamSearchOrFilter.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'StreamSearchOrFilter' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(StreamSearchOrFilter.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, StreamSearchOrFilter value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public StreamSearchOrFilter read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + StreamSearchOrFilter instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of StreamSearchOrFilter given an JSON string + * + * @param jsonString JSON string + * @return An instance of StreamSearchOrFilter + * @throws IOException if the JSON string is invalid with respect to StreamSearchOrFilter + */ + public static StreamSearchOrFilter fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, StreamSearchOrFilter.class); + } + + /** + * Convert an instance of StreamSearchOrFilter to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/StreamSearchRequest.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/StreamSearchRequest.java new file mode 100644 index 00000000..c922d02e --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/StreamSearchRequest.java @@ -0,0 +1,370 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.PaginationRequest; +import com.equinix.sdk.fabricv4.model.StreamSearchFilters; +import com.equinix.sdk.fabricv4.model.StreamSearchSortCriteria; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * Search requests containing criteria + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class StreamSearchRequest { + public static final String SERIALIZED_NAME_FILTER = "filter"; + @SerializedName(SERIALIZED_NAME_FILTER) + @javax.annotation.Nullable + private StreamSearchFilters filter; + + public static final String SERIALIZED_NAME_PAGINATION = "pagination"; + @SerializedName(SERIALIZED_NAME_PAGINATION) + @javax.annotation.Nullable + private PaginationRequest pagination; + + public static final String SERIALIZED_NAME_SORT = "sort"; + @SerializedName(SERIALIZED_NAME_SORT) + @javax.annotation.Nullable + private List sort = new ArrayList<>(); + + public StreamSearchRequest() { + } + + public StreamSearchRequest filter(@javax.annotation.Nullable StreamSearchFilters filter) { + this.filter = filter; + return this; + } + + /** + * Get filter + * @return filter + */ + @javax.annotation.Nullable + public StreamSearchFilters getFilter() { + return filter; + } + + public void setFilter(@javax.annotation.Nullable StreamSearchFilters filter) { + this.filter = filter; + } + + + public StreamSearchRequest pagination(@javax.annotation.Nullable PaginationRequest pagination) { + this.pagination = pagination; + return this; + } + + /** + * Get pagination + * @return pagination + */ + @javax.annotation.Nullable + public PaginationRequest getPagination() { + return pagination; + } + + public void setPagination(@javax.annotation.Nullable PaginationRequest pagination) { + this.pagination = pagination; + } + + + public StreamSearchRequest sort(@javax.annotation.Nullable List sort) { + this.sort = sort; + return this; + } + + public StreamSearchRequest addSortItem(StreamSearchSortCriteria sortItem) { + if (this.sort == null) { + this.sort = new ArrayList<>(); + } + this.sort.add(sortItem); + return this; + } + + /** + * Get sort + * @return sort + */ + @javax.annotation.Nullable + public List getSort() { + return sort; + } + + public void setSort(@javax.annotation.Nullable List sort) { + this.sort = sort; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the StreamSearchRequest instance itself + */ + public StreamSearchRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StreamSearchRequest streamSearchRequest = (StreamSearchRequest) o; + return Objects.equals(this.filter, streamSearchRequest.filter) && + Objects.equals(this.pagination, streamSearchRequest.pagination) && + Objects.equals(this.sort, streamSearchRequest.sort)&& + Objects.equals(this.additionalProperties, streamSearchRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(filter, pagination, sort, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StreamSearchRequest {\n"); + sb.append(" filter: ").append(toIndentedString(filter)).append("\n"); + sb.append(" pagination: ").append(toIndentedString(pagination)).append("\n"); + sb.append(" sort: ").append(toIndentedString(sort)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("filter", "pagination", "sort")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to StreamSearchRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!StreamSearchRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in StreamSearchRequest is not found in the empty JSON string", StreamSearchRequest.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `filter` + if (jsonObj.get("filter") != null && !jsonObj.get("filter").isJsonNull()) { + StreamSearchFilters.validateJsonElement(jsonObj.get("filter")); + } + // validate the optional field `pagination` + if (jsonObj.get("pagination") != null && !jsonObj.get("pagination").isJsonNull()) { + PaginationRequest.validateJsonElement(jsonObj.get("pagination")); + } + if (jsonObj.get("sort") != null && !jsonObj.get("sort").isJsonNull()) { + JsonArray jsonArraysort = jsonObj.getAsJsonArray("sort"); + if (jsonArraysort != null) { + // ensure the json data is an array + if (!jsonObj.get("sort").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `sort` to be an array in the JSON string but got `%s`", jsonObj.get("sort").toString())); + } + + // validate the optional field `sort` (array) + for (int i = 0; i < jsonArraysort.size(); i++) { + StreamSearchSortCriteria.validateJsonElement(jsonArraysort.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!StreamSearchRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'StreamSearchRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(StreamSearchRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, StreamSearchRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public StreamSearchRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + StreamSearchRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of StreamSearchRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of StreamSearchRequest + * @throws IOException if the JSON string is invalid with respect to StreamSearchRequest + */ + public static StreamSearchRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, StreamSearchRequest.class); + } + + /** + * Convert an instance of StreamSearchRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/StreamSearchSimpleExpression.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/StreamSearchSimpleExpression.java new file mode 100644 index 00000000..a741439e --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/StreamSearchSimpleExpression.java @@ -0,0 +1,355 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * StreamSearchSimpleExpression + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class StreamSearchSimpleExpression { + public static final String SERIALIZED_NAME_PROPERTY = "property"; + @SerializedName(SERIALIZED_NAME_PROPERTY) + @javax.annotation.Nullable + private String property; + + public static final String SERIALIZED_NAME_OPERATOR = "operator"; + @SerializedName(SERIALIZED_NAME_OPERATOR) + @javax.annotation.Nullable + private String operator; + + public static final String SERIALIZED_NAME_VALUES = "values"; + @SerializedName(SERIALIZED_NAME_VALUES) + @javax.annotation.Nullable + private List values = new ArrayList<>(); + + public StreamSearchSimpleExpression() { + } + + public StreamSearchSimpleExpression property(@javax.annotation.Nullable String property) { + this.property = property; + return this; + } + + /** + * Possible field names to use on filters: * `/uuid` - Stream uuid * `/name` - Stream name * `/state` - Stream state (`DEPROVISIONED` returned only when explicitly requested) * `/type` - Stream type * `/description` - Stream description * `/project/projectId` - Stream project id * `/changeLog/createdDateTime` - Stream created date time * `/changeLog/updatedDateTime` - Stream updated date time + * @return property + */ + @javax.annotation.Nullable + public String getProperty() { + return property; + } + + public void setProperty(@javax.annotation.Nullable String property) { + this.property = property; + } + + + public StreamSearchSimpleExpression operator(@javax.annotation.Nullable String operator) { + this.operator = operator; + return this; + } + + /** + * Possible operators to use on filters: * `=` - equal * `!=` - not equal * `>` - greater than * `>=` - greater than or equal to * `<` - less than * `<=` - less than or equal to * `BETWEEN` - between * `NOT BETWEEN` - not between * `LIKE` - like * `ILIKE` - like case-insensitive * `IN` - in * `NOT IN` - not in + * @return operator + */ + @javax.annotation.Nullable + public String getOperator() { + return operator; + } + + public void setOperator(@javax.annotation.Nullable String operator) { + this.operator = operator; + } + + + public StreamSearchSimpleExpression values(@javax.annotation.Nullable List values) { + this.values = values; + return this; + } + + public StreamSearchSimpleExpression addValuesItem(String valuesItem) { + if (this.values == null) { + this.values = new ArrayList<>(); + } + this.values.add(valuesItem); + return this; + } + + /** + * Get values + * @return values + */ + @javax.annotation.Nullable + public List getValues() { + return values; + } + + public void setValues(@javax.annotation.Nullable List values) { + this.values = values; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the StreamSearchSimpleExpression instance itself + */ + public StreamSearchSimpleExpression putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StreamSearchSimpleExpression streamSearchSimpleExpression = (StreamSearchSimpleExpression) o; + return Objects.equals(this.property, streamSearchSimpleExpression.property) && + Objects.equals(this.operator, streamSearchSimpleExpression.operator) && + Objects.equals(this.values, streamSearchSimpleExpression.values)&& + Objects.equals(this.additionalProperties, streamSearchSimpleExpression.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(property, operator, values, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StreamSearchSimpleExpression {\n"); + sb.append(" property: ").append(toIndentedString(property)).append("\n"); + sb.append(" operator: ").append(toIndentedString(operator)).append("\n"); + sb.append(" values: ").append(toIndentedString(values)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("property", "operator", "values")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to StreamSearchSimpleExpression + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!StreamSearchSimpleExpression.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in StreamSearchSimpleExpression is not found in the empty JSON string", StreamSearchSimpleExpression.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("property") != null && !jsonObj.get("property").isJsonNull()) && !jsonObj.get("property").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `property` to be a primitive type in the JSON string but got `%s`", jsonObj.get("property").toString())); + } + if ((jsonObj.get("operator") != null && !jsonObj.get("operator").isJsonNull()) && !jsonObj.get("operator").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `operator` to be a primitive type in the JSON string but got `%s`", jsonObj.get("operator").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("values") != null && !jsonObj.get("values").isJsonNull() && !jsonObj.get("values").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `values` to be an array in the JSON string but got `%s`", jsonObj.get("values").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!StreamSearchSimpleExpression.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'StreamSearchSimpleExpression' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(StreamSearchSimpleExpression.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, StreamSearchSimpleExpression value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public StreamSearchSimpleExpression read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + StreamSearchSimpleExpression instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of StreamSearchSimpleExpression given an JSON string + * + * @param jsonString JSON string + * @return An instance of StreamSearchSimpleExpression + * @throws IOException if the JSON string is invalid with respect to StreamSearchSimpleExpression + */ + public static StreamSearchSimpleExpression fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, StreamSearchSimpleExpression.class); + } + + /** + * Convert an instance of StreamSearchSimpleExpression to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/StreamSearchSortBy.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/StreamSearchSortBy.java new file mode 100644 index 00000000..a9aadd9e --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/StreamSearchSortBy.java @@ -0,0 +1,78 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.google.gson.annotations.SerializedName; + +import java.io.IOException; +import java.util.Locale; +import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; + +/** + * Possible field names to use on sorting + */ +@JsonAdapter(StreamSearchSortBy.Adapter.class) +public enum StreamSearchSortBy { + + CREATEDDATETIME("/changeLog/createdDateTime"), + + UPDATEDDATETIME("/changeLog/updatedDateTime"); + + private String value; + + StreamSearchSortBy(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static StreamSearchSortBy fromValue(String value) { + for (StreamSearchSortBy b : StreamSearchSortBy.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final StreamSearchSortBy enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public StreamSearchSortBy read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return StreamSearchSortBy.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + StreamSearchSortBy.fromValue(value); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/StreamSearchSortCriteria.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/StreamSearchSortCriteria.java new file mode 100644 index 00000000..248be160 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/StreamSearchSortCriteria.java @@ -0,0 +1,322 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.StreamSearchSortBy; +import com.equinix.sdk.fabricv4.model.StreamSearchSortDirection; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * StreamSearchSortCriteria + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class StreamSearchSortCriteria { + public static final String SERIALIZED_NAME_DIRECTION = "direction"; + @SerializedName(SERIALIZED_NAME_DIRECTION) + @javax.annotation.Nonnull + private StreamSearchSortDirection direction = StreamSearchSortDirection.DESC; + + public static final String SERIALIZED_NAME_PROPERTY = "property"; + @SerializedName(SERIALIZED_NAME_PROPERTY) + @javax.annotation.Nonnull + private StreamSearchSortBy property = StreamSearchSortBy.CREATEDDATETIME; + + public StreamSearchSortCriteria() { + } + + public StreamSearchSortCriteria direction(@javax.annotation.Nonnull StreamSearchSortDirection direction) { + this.direction = direction; + return this; + } + + /** + * Get direction + * @return direction + */ + @javax.annotation.Nonnull + public StreamSearchSortDirection getDirection() { + return direction; + } + + public void setDirection(@javax.annotation.Nonnull StreamSearchSortDirection direction) { + this.direction = direction; + } + + + public StreamSearchSortCriteria property(@javax.annotation.Nonnull StreamSearchSortBy property) { + this.property = property; + return this; + } + + /** + * Get property + * @return property + */ + @javax.annotation.Nonnull + public StreamSearchSortBy getProperty() { + return property; + } + + public void setProperty(@javax.annotation.Nonnull StreamSearchSortBy property) { + this.property = property; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the StreamSearchSortCriteria instance itself + */ + public StreamSearchSortCriteria putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StreamSearchSortCriteria streamSearchSortCriteria = (StreamSearchSortCriteria) o; + return Objects.equals(this.direction, streamSearchSortCriteria.direction) && + Objects.equals(this.property, streamSearchSortCriteria.property)&& + Objects.equals(this.additionalProperties, streamSearchSortCriteria.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(direction, property, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StreamSearchSortCriteria {\n"); + sb.append(" direction: ").append(toIndentedString(direction)).append("\n"); + sb.append(" property: ").append(toIndentedString(property)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("direction", "property")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("direction", "property")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to StreamSearchSortCriteria + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!StreamSearchSortCriteria.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in StreamSearchSortCriteria is not found in the empty JSON string", StreamSearchSortCriteria.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : StreamSearchSortCriteria.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the required field `direction` + StreamSearchSortDirection.validateJsonElement(jsonObj.get("direction")); + // validate the required field `property` + StreamSearchSortBy.validateJsonElement(jsonObj.get("property")); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!StreamSearchSortCriteria.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'StreamSearchSortCriteria' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(StreamSearchSortCriteria.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, StreamSearchSortCriteria value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public StreamSearchSortCriteria read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + StreamSearchSortCriteria instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of StreamSearchSortCriteria given an JSON string + * + * @param jsonString JSON string + * @return An instance of StreamSearchSortCriteria + * @throws IOException if the JSON string is invalid with respect to StreamSearchSortCriteria + */ + public static StreamSearchSortCriteria fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, StreamSearchSortCriteria.class); + } + + /** + * Convert an instance of StreamSearchSortCriteria to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/StreamSearchSortDirection.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/StreamSearchSortDirection.java new file mode 100644 index 00000000..13e7a712 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/StreamSearchSortDirection.java @@ -0,0 +1,78 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.google.gson.annotations.SerializedName; + +import java.io.IOException; +import java.util.Locale; +import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; + +/** + * Sorting direction + */ +@JsonAdapter(StreamSearchSortDirection.Adapter.class) +public enum StreamSearchSortDirection { + + DESC("DESC"), + + ASC("ASC"); + + private String value; + + StreamSearchSortDirection(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static StreamSearchSortDirection fromValue(String value) { + for (StreamSearchSortDirection b : StreamSearchSortDirection.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final StreamSearchSortDirection enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public StreamSearchSortDirection read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return StreamSearchSortDirection.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + StreamSearchSortDirection.fromValue(value); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/StreamSubscriptionSearchFilter.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/StreamSubscriptionSearchFilter.java new file mode 100644 index 00000000..1fac7195 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/StreamSubscriptionSearchFilter.java @@ -0,0 +1,269 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.StreamSubscriptionSearchOrFilter; +import com.equinix.sdk.fabricv4.model.StreamSubscriptionSearchSimpleExpression; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + + + +import java.io.IOException; +import java.lang.reflect.Type; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Locale; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.JsonPrimitive; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonSerializationContext; +import com.google.gson.JsonSerializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonArray; +import com.google.gson.JsonParseException; + +import com.equinix.sdk.fabricv4.JSON; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class StreamSubscriptionSearchFilter extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(StreamSubscriptionSearchFilter.class.getName()); + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!StreamSubscriptionSearchFilter.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'StreamSubscriptionSearchFilter' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter adapterStreamSubscriptionSearchSimpleExpression = gson.getDelegateAdapter(this, TypeToken.get(StreamSubscriptionSearchSimpleExpression.class)); + final TypeAdapter adapterStreamSubscriptionSearchOrFilter = gson.getDelegateAdapter(this, TypeToken.get(StreamSubscriptionSearchOrFilter.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, StreamSubscriptionSearchFilter value) throws IOException { + if (value == null || value.getActualInstance() == null) { + elementAdapter.write(out, null); + return; + } + + // check if the actual instance is of the type `StreamSubscriptionSearchSimpleExpression` + if (value.getActualInstance() instanceof StreamSubscriptionSearchSimpleExpression) { + JsonElement element = adapterStreamSubscriptionSearchSimpleExpression.toJsonTree((StreamSubscriptionSearchSimpleExpression)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + // check if the actual instance is of the type `StreamSubscriptionSearchOrFilter` + if (value.getActualInstance() instanceof StreamSubscriptionSearchOrFilter) { + JsonElement element = adapterStreamSubscriptionSearchOrFilter.toJsonTree((StreamSubscriptionSearchOrFilter)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + throw new IOException("Failed to serialize as the type doesn't match anyOf schemas: StreamSubscriptionSearchOrFilter, StreamSubscriptionSearchSimpleExpression"); + } + + @Override + public StreamSubscriptionSearchFilter read(JsonReader in) throws IOException { + Object deserialized = null; + JsonElement jsonElement = elementAdapter.read(in); + + ArrayList errorMessages = new ArrayList<>(); + TypeAdapter actualAdapter = elementAdapter; + + // deserialize StreamSubscriptionSearchSimpleExpression + try { + // validate the JSON object to see if any exception is thrown + StreamSubscriptionSearchSimpleExpression.validateJsonElement(jsonElement); + actualAdapter = adapterStreamSubscriptionSearchSimpleExpression; + StreamSubscriptionSearchFilter ret = new StreamSubscriptionSearchFilter(); + ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); + return ret; + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format(Locale.ROOT, "Deserialization for StreamSubscriptionSearchSimpleExpression failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'StreamSubscriptionSearchSimpleExpression'", e); + } + // deserialize StreamSubscriptionSearchOrFilter + try { + // validate the JSON object to see if any exception is thrown + StreamSubscriptionSearchOrFilter.validateJsonElement(jsonElement); + actualAdapter = adapterStreamSubscriptionSearchOrFilter; + StreamSubscriptionSearchFilter ret = new StreamSubscriptionSearchFilter(); + ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); + return ret; + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format(Locale.ROOT, "Deserialization for StreamSubscriptionSearchOrFilter failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'StreamSubscriptionSearchOrFilter'", e); + } + + throw new IOException(String.format(Locale.ROOT, "Failed deserialization for StreamSubscriptionSearchFilter: no class matches result, expected at least 1. Detailed failure message for anyOf schemas: %s. JSON: %s", errorMessages, jsonElement.toString())); + } + }.nullSafe(); + } + } + + // store a list of schema names defined in anyOf + public static final Map> schemas = new HashMap>(); + + public StreamSubscriptionSearchFilter() { + super("anyOf", Boolean.FALSE); + } + + public StreamSubscriptionSearchFilter(Object o) { + super("anyOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("StreamSubscriptionSearchSimpleExpression", StreamSubscriptionSearchSimpleExpression.class); + schemas.put("StreamSubscriptionSearchOrFilter", StreamSubscriptionSearchOrFilter.class); + } + + @Override + public Map> getSchemas() { + return StreamSubscriptionSearchFilter.schemas; + } + + /** + * Set the instance that matches the anyOf child schema, check + * the instance parameter is valid against the anyOf child schemas: + * StreamSubscriptionSearchOrFilter, StreamSubscriptionSearchSimpleExpression + * + * It could be an instance of the 'anyOf' schemas. + */ + @Override + public void setActualInstance(Object instance) { + if (instance instanceof StreamSubscriptionSearchSimpleExpression) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof StreamSubscriptionSearchOrFilter) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException("Invalid instance type. Must be StreamSubscriptionSearchOrFilter, StreamSubscriptionSearchSimpleExpression"); + } + + /** + * Get the actual instance, which can be the following: + * StreamSubscriptionSearchOrFilter, StreamSubscriptionSearchSimpleExpression + * + * @return The actual instance (StreamSubscriptionSearchOrFilter, StreamSubscriptionSearchSimpleExpression) + */ + @SuppressWarnings("unchecked") + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `StreamSubscriptionSearchSimpleExpression`. If the actual instance is not `StreamSubscriptionSearchSimpleExpression`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `StreamSubscriptionSearchSimpleExpression` + * @throws ClassCastException if the instance is not `StreamSubscriptionSearchSimpleExpression` + */ + public StreamSubscriptionSearchSimpleExpression getStreamSubscriptionSearchSimpleExpression() throws ClassCastException { + return (StreamSubscriptionSearchSimpleExpression)super.getActualInstance(); + } + + /** + * Get the actual instance of `StreamSubscriptionSearchOrFilter`. If the actual instance is not `StreamSubscriptionSearchOrFilter`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `StreamSubscriptionSearchOrFilter` + * @throws ClassCastException if the instance is not `StreamSubscriptionSearchOrFilter` + */ + public StreamSubscriptionSearchOrFilter getStreamSubscriptionSearchOrFilter() throws ClassCastException { + return (StreamSubscriptionSearchOrFilter)super.getActualInstance(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to StreamSubscriptionSearchFilter + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + // validate anyOf schemas one by one + ArrayList errorMessages = new ArrayList<>(); + // validate the json string with StreamSubscriptionSearchSimpleExpression + try { + StreamSubscriptionSearchSimpleExpression.validateJsonElement(jsonElement); + return; + } catch (Exception e) { + errorMessages.add(String.format(Locale.ROOT, "Deserialization for StreamSubscriptionSearchSimpleExpression failed with `%s`.", e.getMessage())); + // continue to the next one + } + // validate the json string with StreamSubscriptionSearchOrFilter + try { + StreamSubscriptionSearchOrFilter.validateJsonElement(jsonElement); + return; + } catch (Exception e) { + errorMessages.add(String.format(Locale.ROOT, "Deserialization for StreamSubscriptionSearchOrFilter failed with `%s`.", e.getMessage())); + // continue to the next one + } + throw new IOException(String.format(Locale.ROOT, "The JSON string is invalid for StreamSubscriptionSearchFilter with anyOf schemas: StreamSubscriptionSearchOrFilter, StreamSubscriptionSearchSimpleExpression. no class match the result, expected at least 1. Detailed failure message for anyOf schemas: %s. JSON: %s", errorMessages, jsonElement.toString())); + } + + /** + * Create an instance of StreamSubscriptionSearchFilter given an JSON string + * + * @param jsonString JSON string + * @return An instance of StreamSubscriptionSearchFilter + * @throws IOException if the JSON string is invalid with respect to StreamSubscriptionSearchFilter + */ + public static StreamSubscriptionSearchFilter fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, StreamSubscriptionSearchFilter.class); + } + + /** + * Convert an instance of StreamSubscriptionSearchFilter to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/StreamSubscriptionSearchFilters.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/StreamSubscriptionSearchFilters.java new file mode 100644 index 00000000..6cbee0b3 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/StreamSubscriptionSearchFilters.java @@ -0,0 +1,311 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.StreamSubscriptionSearchFilter; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * StreamSubscriptionSearchFilters + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class StreamSubscriptionSearchFilters { + public static final String SERIALIZED_NAME_AND = "and"; + @SerializedName(SERIALIZED_NAME_AND) + @javax.annotation.Nonnull + private List and = new ArrayList<>(); + + public StreamSubscriptionSearchFilters() { + } + + public StreamSubscriptionSearchFilters and(@javax.annotation.Nonnull List and) { + this.and = and; + return this; + } + + public StreamSubscriptionSearchFilters addAndItem(StreamSubscriptionSearchFilter andItem) { + if (this.and == null) { + this.and = new ArrayList<>(); + } + this.and.add(andItem); + return this; + } + + /** + * Get and + * @return and + */ + @javax.annotation.Nonnull + public List getAnd() { + return and; + } + + public void setAnd(@javax.annotation.Nonnull List and) { + this.and = and; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the StreamSubscriptionSearchFilters instance itself + */ + public StreamSubscriptionSearchFilters putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StreamSubscriptionSearchFilters streamSubscriptionSearchFilters = (StreamSubscriptionSearchFilters) o; + return Objects.equals(this.and, streamSubscriptionSearchFilters.and)&& + Objects.equals(this.additionalProperties, streamSubscriptionSearchFilters.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(and, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StreamSubscriptionSearchFilters {\n"); + sb.append(" and: ").append(toIndentedString(and)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("and")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("and")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to StreamSubscriptionSearchFilters + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!StreamSubscriptionSearchFilters.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in StreamSubscriptionSearchFilters is not found in the empty JSON string", StreamSubscriptionSearchFilters.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : StreamSubscriptionSearchFilters.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the json data is an array + if (!jsonObj.get("and").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `and` to be an array in the JSON string but got `%s`", jsonObj.get("and").toString())); + } + + JsonArray jsonArrayand = jsonObj.getAsJsonArray("and"); + // validate the required field `and` (array) + for (int i = 0; i < jsonArrayand.size(); i++) { + StreamSubscriptionSearchFilter.validateJsonElement(jsonArrayand.get(i)); + }; + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!StreamSubscriptionSearchFilters.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'StreamSubscriptionSearchFilters' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(StreamSubscriptionSearchFilters.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, StreamSubscriptionSearchFilters value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public StreamSubscriptionSearchFilters read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + StreamSubscriptionSearchFilters instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of StreamSubscriptionSearchFilters given an JSON string + * + * @param jsonString JSON string + * @return An instance of StreamSubscriptionSearchFilters + * @throws IOException if the JSON string is invalid with respect to StreamSubscriptionSearchFilters + */ + public static StreamSubscriptionSearchFilters fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, StreamSubscriptionSearchFilters.class); + } + + /** + * Convert an instance of StreamSubscriptionSearchFilters to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/StreamSubscriptionSearchOrFilter.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/StreamSubscriptionSearchOrFilter.java new file mode 100644 index 00000000..b6b1fe39 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/StreamSubscriptionSearchOrFilter.java @@ -0,0 +1,308 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.StreamSubscriptionSearchSimpleExpression; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * StreamSubscriptionSearchOrFilter + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class StreamSubscriptionSearchOrFilter { + public static final String SERIALIZED_NAME_OR = "or"; + @SerializedName(SERIALIZED_NAME_OR) + @javax.annotation.Nullable + private List or = new ArrayList<>(); + + public StreamSubscriptionSearchOrFilter() { + } + + public StreamSubscriptionSearchOrFilter or(@javax.annotation.Nullable List or) { + this.or = or; + return this; + } + + public StreamSubscriptionSearchOrFilter addOrItem(StreamSubscriptionSearchSimpleExpression orItem) { + if (this.or == null) { + this.or = new ArrayList<>(); + } + this.or.add(orItem); + return this; + } + + /** + * Get or + * @return or + */ + @javax.annotation.Nullable + public List getOr() { + return or; + } + + public void setOr(@javax.annotation.Nullable List or) { + this.or = or; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the StreamSubscriptionSearchOrFilter instance itself + */ + public StreamSubscriptionSearchOrFilter putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StreamSubscriptionSearchOrFilter streamSubscriptionSearchOrFilter = (StreamSubscriptionSearchOrFilter) o; + return Objects.equals(this.or, streamSubscriptionSearchOrFilter.or)&& + Objects.equals(this.additionalProperties, streamSubscriptionSearchOrFilter.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(or, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StreamSubscriptionSearchOrFilter {\n"); + sb.append(" or: ").append(toIndentedString(or)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("or")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to StreamSubscriptionSearchOrFilter + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!StreamSubscriptionSearchOrFilter.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in StreamSubscriptionSearchOrFilter is not found in the empty JSON string", StreamSubscriptionSearchOrFilter.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("or") != null && !jsonObj.get("or").isJsonNull()) { + JsonArray jsonArrayor = jsonObj.getAsJsonArray("or"); + if (jsonArrayor != null) { + // ensure the json data is an array + if (!jsonObj.get("or").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `or` to be an array in the JSON string but got `%s`", jsonObj.get("or").toString())); + } + + // validate the optional field `or` (array) + for (int i = 0; i < jsonArrayor.size(); i++) { + StreamSubscriptionSearchSimpleExpression.validateJsonElement(jsonArrayor.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!StreamSubscriptionSearchOrFilter.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'StreamSubscriptionSearchOrFilter' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(StreamSubscriptionSearchOrFilter.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, StreamSubscriptionSearchOrFilter value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public StreamSubscriptionSearchOrFilter read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + StreamSubscriptionSearchOrFilter instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of StreamSubscriptionSearchOrFilter given an JSON string + * + * @param jsonString JSON string + * @return An instance of StreamSubscriptionSearchOrFilter + * @throws IOException if the JSON string is invalid with respect to StreamSubscriptionSearchOrFilter + */ + public static StreamSubscriptionSearchOrFilter fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, StreamSubscriptionSearchOrFilter.class); + } + + /** + * Convert an instance of StreamSubscriptionSearchOrFilter to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/StreamSubscriptionSearchRequest.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/StreamSubscriptionSearchRequest.java new file mode 100644 index 00000000..a3da76f6 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/StreamSubscriptionSearchRequest.java @@ -0,0 +1,375 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.PaginationRequest; +import com.equinix.sdk.fabricv4.model.StreamSubscriptionSearchFilters; +import com.equinix.sdk.fabricv4.model.StreamSubscriptionSearchSortCriteria; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * Search requests containing criteria + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class StreamSubscriptionSearchRequest { + public static final String SERIALIZED_NAME_FILTER = "filter"; + @SerializedName(SERIALIZED_NAME_FILTER) + @javax.annotation.Nonnull + private StreamSubscriptionSearchFilters filter; + + public static final String SERIALIZED_NAME_PAGINATION = "pagination"; + @SerializedName(SERIALIZED_NAME_PAGINATION) + @javax.annotation.Nullable + private PaginationRequest pagination; + + public static final String SERIALIZED_NAME_SORT = "sort"; + @SerializedName(SERIALIZED_NAME_SORT) + @javax.annotation.Nullable + private List sort = new ArrayList<>(); + + public StreamSubscriptionSearchRequest() { + } + + public StreamSubscriptionSearchRequest filter(@javax.annotation.Nonnull StreamSubscriptionSearchFilters filter) { + this.filter = filter; + return this; + } + + /** + * Get filter + * @return filter + */ + @javax.annotation.Nonnull + public StreamSubscriptionSearchFilters getFilter() { + return filter; + } + + public void setFilter(@javax.annotation.Nonnull StreamSubscriptionSearchFilters filter) { + this.filter = filter; + } + + + public StreamSubscriptionSearchRequest pagination(@javax.annotation.Nullable PaginationRequest pagination) { + this.pagination = pagination; + return this; + } + + /** + * Get pagination + * @return pagination + */ + @javax.annotation.Nullable + public PaginationRequest getPagination() { + return pagination; + } + + public void setPagination(@javax.annotation.Nullable PaginationRequest pagination) { + this.pagination = pagination; + } + + + public StreamSubscriptionSearchRequest sort(@javax.annotation.Nullable List sort) { + this.sort = sort; + return this; + } + + public StreamSubscriptionSearchRequest addSortItem(StreamSubscriptionSearchSortCriteria sortItem) { + if (this.sort == null) { + this.sort = new ArrayList<>(); + } + this.sort.add(sortItem); + return this; + } + + /** + * Get sort + * @return sort + */ + @javax.annotation.Nullable + public List getSort() { + return sort; + } + + public void setSort(@javax.annotation.Nullable List sort) { + this.sort = sort; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the StreamSubscriptionSearchRequest instance itself + */ + public StreamSubscriptionSearchRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StreamSubscriptionSearchRequest streamSubscriptionSearchRequest = (StreamSubscriptionSearchRequest) o; + return Objects.equals(this.filter, streamSubscriptionSearchRequest.filter) && + Objects.equals(this.pagination, streamSubscriptionSearchRequest.pagination) && + Objects.equals(this.sort, streamSubscriptionSearchRequest.sort)&& + Objects.equals(this.additionalProperties, streamSubscriptionSearchRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(filter, pagination, sort, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StreamSubscriptionSearchRequest {\n"); + sb.append(" filter: ").append(toIndentedString(filter)).append("\n"); + sb.append(" pagination: ").append(toIndentedString(pagination)).append("\n"); + sb.append(" sort: ").append(toIndentedString(sort)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("filter", "pagination", "sort")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("filter")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to StreamSubscriptionSearchRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!StreamSubscriptionSearchRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in StreamSubscriptionSearchRequest is not found in the empty JSON string", StreamSubscriptionSearchRequest.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : StreamSubscriptionSearchRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the required field `filter` + StreamSubscriptionSearchFilters.validateJsonElement(jsonObj.get("filter")); + // validate the optional field `pagination` + if (jsonObj.get("pagination") != null && !jsonObj.get("pagination").isJsonNull()) { + PaginationRequest.validateJsonElement(jsonObj.get("pagination")); + } + if (jsonObj.get("sort") != null && !jsonObj.get("sort").isJsonNull()) { + JsonArray jsonArraysort = jsonObj.getAsJsonArray("sort"); + if (jsonArraysort != null) { + // ensure the json data is an array + if (!jsonObj.get("sort").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `sort` to be an array in the JSON string but got `%s`", jsonObj.get("sort").toString())); + } + + // validate the optional field `sort` (array) + for (int i = 0; i < jsonArraysort.size(); i++) { + StreamSubscriptionSearchSortCriteria.validateJsonElement(jsonArraysort.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!StreamSubscriptionSearchRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'StreamSubscriptionSearchRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(StreamSubscriptionSearchRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, StreamSubscriptionSearchRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public StreamSubscriptionSearchRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + StreamSubscriptionSearchRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of StreamSubscriptionSearchRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of StreamSubscriptionSearchRequest + * @throws IOException if the JSON string is invalid with respect to StreamSubscriptionSearchRequest + */ + public static StreamSubscriptionSearchRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, StreamSubscriptionSearchRequest.class); + } + + /** + * Convert an instance of StreamSubscriptionSearchRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/StreamSubscriptionSearchSimpleExpression.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/StreamSubscriptionSearchSimpleExpression.java new file mode 100644 index 00000000..19d8d5ea --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/StreamSubscriptionSearchSimpleExpression.java @@ -0,0 +1,355 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * StreamSubscriptionSearchSimpleExpression + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class StreamSubscriptionSearchSimpleExpression { + public static final String SERIALIZED_NAME_PROPERTY = "property"; + @SerializedName(SERIALIZED_NAME_PROPERTY) + @javax.annotation.Nullable + private String property; + + public static final String SERIALIZED_NAME_OPERATOR = "operator"; + @SerializedName(SERIALIZED_NAME_OPERATOR) + @javax.annotation.Nullable + private String operator; + + public static final String SERIALIZED_NAME_VALUES = "values"; + @SerializedName(SERIALIZED_NAME_VALUES) + @javax.annotation.Nullable + private List values = new ArrayList<>(); + + public StreamSubscriptionSearchSimpleExpression() { + } + + public StreamSubscriptionSearchSimpleExpression property(@javax.annotation.Nullable String property) { + this.property = property; + return this; + } + + /** + * Possible field names to use on filters: * `/uuid` - Subscription uuid * `/streamUuid` - Stream uuid the subscription belongs to * `/state` - Subscription state (`DEPROVISIONED` returned only when explicitly requested) * `/name` - Subscription name * `/project/projectId` - Subscription project id * `/description` - Subscription description * `/changeLog/createdDateTime` - Subscription created date time * `/changeLog/updatedDateTime` - Subscription updated date time + * @return property + */ + @javax.annotation.Nullable + public String getProperty() { + return property; + } + + public void setProperty(@javax.annotation.Nullable String property) { + this.property = property; + } + + + public StreamSubscriptionSearchSimpleExpression operator(@javax.annotation.Nullable String operator) { + this.operator = operator; + return this; + } + + /** + * Possible operators to use on filters: * `=` - equal * `!=` - not equal * `>` - greater than * `>=` - greater than or equal to * `<` - less than * `<=` - less than or equal to * `BETWEEN` - between * `NOT BETWEEN` - not between * `LIKE` - like * `ILIKE` - like case-insensitive * `IN` - in * `NOT IN` - not in + * @return operator + */ + @javax.annotation.Nullable + public String getOperator() { + return operator; + } + + public void setOperator(@javax.annotation.Nullable String operator) { + this.operator = operator; + } + + + public StreamSubscriptionSearchSimpleExpression values(@javax.annotation.Nullable List values) { + this.values = values; + return this; + } + + public StreamSubscriptionSearchSimpleExpression addValuesItem(String valuesItem) { + if (this.values == null) { + this.values = new ArrayList<>(); + } + this.values.add(valuesItem); + return this; + } + + /** + * Get values + * @return values + */ + @javax.annotation.Nullable + public List getValues() { + return values; + } + + public void setValues(@javax.annotation.Nullable List values) { + this.values = values; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the StreamSubscriptionSearchSimpleExpression instance itself + */ + public StreamSubscriptionSearchSimpleExpression putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StreamSubscriptionSearchSimpleExpression streamSubscriptionSearchSimpleExpression = (StreamSubscriptionSearchSimpleExpression) o; + return Objects.equals(this.property, streamSubscriptionSearchSimpleExpression.property) && + Objects.equals(this.operator, streamSubscriptionSearchSimpleExpression.operator) && + Objects.equals(this.values, streamSubscriptionSearchSimpleExpression.values)&& + Objects.equals(this.additionalProperties, streamSubscriptionSearchSimpleExpression.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(property, operator, values, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StreamSubscriptionSearchSimpleExpression {\n"); + sb.append(" property: ").append(toIndentedString(property)).append("\n"); + sb.append(" operator: ").append(toIndentedString(operator)).append("\n"); + sb.append(" values: ").append(toIndentedString(values)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("property", "operator", "values")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to StreamSubscriptionSearchSimpleExpression + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!StreamSubscriptionSearchSimpleExpression.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in StreamSubscriptionSearchSimpleExpression is not found in the empty JSON string", StreamSubscriptionSearchSimpleExpression.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("property") != null && !jsonObj.get("property").isJsonNull()) && !jsonObj.get("property").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `property` to be a primitive type in the JSON string but got `%s`", jsonObj.get("property").toString())); + } + if ((jsonObj.get("operator") != null && !jsonObj.get("operator").isJsonNull()) && !jsonObj.get("operator").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `operator` to be a primitive type in the JSON string but got `%s`", jsonObj.get("operator").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("values") != null && !jsonObj.get("values").isJsonNull() && !jsonObj.get("values").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `values` to be an array in the JSON string but got `%s`", jsonObj.get("values").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!StreamSubscriptionSearchSimpleExpression.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'StreamSubscriptionSearchSimpleExpression' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(StreamSubscriptionSearchSimpleExpression.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, StreamSubscriptionSearchSimpleExpression value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public StreamSubscriptionSearchSimpleExpression read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + StreamSubscriptionSearchSimpleExpression instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of StreamSubscriptionSearchSimpleExpression given an JSON string + * + * @param jsonString JSON string + * @return An instance of StreamSubscriptionSearchSimpleExpression + * @throws IOException if the JSON string is invalid with respect to StreamSubscriptionSearchSimpleExpression + */ + public static StreamSubscriptionSearchSimpleExpression fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, StreamSubscriptionSearchSimpleExpression.class); + } + + /** + * Convert an instance of StreamSubscriptionSearchSimpleExpression to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/StreamSubscriptionSearchSortBy.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/StreamSubscriptionSearchSortBy.java new file mode 100644 index 00000000..5fcea615 --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/StreamSubscriptionSearchSortBy.java @@ -0,0 +1,78 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.google.gson.annotations.SerializedName; + +import java.io.IOException; +import java.util.Locale; +import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; + +/** + * Possible field names to use on sorting + */ +@JsonAdapter(StreamSubscriptionSearchSortBy.Adapter.class) +public enum StreamSubscriptionSearchSortBy { + + CREATEDDATETIME("/changeLog/createdDateTime"), + + UPDATEDDATETIME("/changeLog/updatedDateTime"); + + private String value; + + StreamSubscriptionSearchSortBy(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static StreamSubscriptionSearchSortBy fromValue(String value) { + for (StreamSubscriptionSearchSortBy b : StreamSubscriptionSearchSortBy.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final StreamSubscriptionSearchSortBy enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public StreamSubscriptionSearchSortBy read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return StreamSubscriptionSearchSortBy.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + StreamSubscriptionSearchSortBy.fromValue(value); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/StreamSubscriptionSearchSortCriteria.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/StreamSubscriptionSearchSortCriteria.java new file mode 100644 index 00000000..43404a6f --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/StreamSubscriptionSearchSortCriteria.java @@ -0,0 +1,322 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.equinix.sdk.fabricv4.model.StreamSubscriptionSearchSortBy; +import com.equinix.sdk.fabricv4.model.StreamSubscriptionSearchSortDirection; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.equinix.sdk.fabricv4.JSON; + +/** + * StreamSubscriptionSearchSortCriteria + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class StreamSubscriptionSearchSortCriteria { + public static final String SERIALIZED_NAME_DIRECTION = "direction"; + @SerializedName(SERIALIZED_NAME_DIRECTION) + @javax.annotation.Nonnull + private StreamSubscriptionSearchSortDirection direction = StreamSubscriptionSearchSortDirection.DESC; + + public static final String SERIALIZED_NAME_PROPERTY = "property"; + @SerializedName(SERIALIZED_NAME_PROPERTY) + @javax.annotation.Nonnull + private StreamSubscriptionSearchSortBy property = StreamSubscriptionSearchSortBy.CREATEDDATETIME; + + public StreamSubscriptionSearchSortCriteria() { + } + + public StreamSubscriptionSearchSortCriteria direction(@javax.annotation.Nonnull StreamSubscriptionSearchSortDirection direction) { + this.direction = direction; + return this; + } + + /** + * Get direction + * @return direction + */ + @javax.annotation.Nonnull + public StreamSubscriptionSearchSortDirection getDirection() { + return direction; + } + + public void setDirection(@javax.annotation.Nonnull StreamSubscriptionSearchSortDirection direction) { + this.direction = direction; + } + + + public StreamSubscriptionSearchSortCriteria property(@javax.annotation.Nonnull StreamSubscriptionSearchSortBy property) { + this.property = property; + return this; + } + + /** + * Get property + * @return property + */ + @javax.annotation.Nonnull + public StreamSubscriptionSearchSortBy getProperty() { + return property; + } + + public void setProperty(@javax.annotation.Nonnull StreamSubscriptionSearchSortBy property) { + this.property = property; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the StreamSubscriptionSearchSortCriteria instance itself + */ + public StreamSubscriptionSearchSortCriteria putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StreamSubscriptionSearchSortCriteria streamSubscriptionSearchSortCriteria = (StreamSubscriptionSearchSortCriteria) o; + return Objects.equals(this.direction, streamSubscriptionSearchSortCriteria.direction) && + Objects.equals(this.property, streamSubscriptionSearchSortCriteria.property)&& + Objects.equals(this.additionalProperties, streamSubscriptionSearchSortCriteria.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(direction, property, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StreamSubscriptionSearchSortCriteria {\n"); + sb.append(" direction: ").append(toIndentedString(direction)).append("\n"); + sb.append(" property: ").append(toIndentedString(property)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("direction", "property")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("direction", "property")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to StreamSubscriptionSearchSortCriteria + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!StreamSubscriptionSearchSortCriteria.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in StreamSubscriptionSearchSortCriteria is not found in the empty JSON string", StreamSubscriptionSearchSortCriteria.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : StreamSubscriptionSearchSortCriteria.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the required field `direction` + StreamSubscriptionSearchSortDirection.validateJsonElement(jsonObj.get("direction")); + // validate the required field `property` + StreamSubscriptionSearchSortBy.validateJsonElement(jsonObj.get("property")); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!StreamSubscriptionSearchSortCriteria.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'StreamSubscriptionSearchSortCriteria' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(StreamSubscriptionSearchSortCriteria.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, StreamSubscriptionSearchSortCriteria value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public StreamSubscriptionSearchSortCriteria read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + StreamSubscriptionSearchSortCriteria instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of StreamSubscriptionSearchSortCriteria given an JSON string + * + * @param jsonString JSON string + * @return An instance of StreamSubscriptionSearchSortCriteria + * @throws IOException if the JSON string is invalid with respect to StreamSubscriptionSearchSortCriteria + */ + public static StreamSubscriptionSearchSortCriteria fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, StreamSubscriptionSearchSortCriteria.class); + } + + /** + * Convert an instance of StreamSubscriptionSearchSortCriteria to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/StreamSubscriptionSearchSortDirection.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/StreamSubscriptionSearchSortDirection.java new file mode 100644 index 00000000..2dfd6f6f --- /dev/null +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/StreamSubscriptionSearchSortDirection.java @@ -0,0 +1,78 @@ +/* + * Equinix Fabric API v4 + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.equinix.sdk.fabricv4.model; + +import java.util.Objects; +import java.util.Locale; +import com.google.gson.annotations.SerializedName; + +import java.io.IOException; +import java.util.Locale; +import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; + +/** + * Sorting direction + */ +@JsonAdapter(StreamSubscriptionSearchSortDirection.Adapter.class) +public enum StreamSubscriptionSearchSortDirection { + + DESC("DESC"), + + ASC("ASC"); + + private String value; + + StreamSubscriptionSearchSortDirection(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static StreamSubscriptionSearchSortDirection fromValue(String value) { + for (StreamSubscriptionSearchSortDirection b : StreamSubscriptionSearchSortDirection.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final StreamSubscriptionSearchSortDirection enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public StreamSubscriptionSearchSortDirection read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return StreamSubscriptionSearchSortDirection.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + StreamSubscriptionSearchSortDirection.fromValue(value); + } +} + diff --git a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OpEnum.java b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/Style.java similarity index 69% rename from services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OpEnum.java rename to services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/Style.java index 9537d68a..5ff649a5 100644 --- a/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/OpEnum.java +++ b/services/fabricv4/src/main/java/com/equinix/sdk/fabricv4/model/Style.java @@ -24,20 +24,20 @@ import com.google.gson.stream.JsonWriter; /** - * the operation to be performed + * Detail level of the response. */ -@JsonAdapter(OpEnum.Adapter.class) -public enum OpEnum { +@JsonAdapter(Style.Adapter.class) +public enum Style { - ADD("add"), + MIN("MIN"), - REMOVE("remove"), + MEDIUM("MEDIUM"), - REPLACE("replace"); + FULL("FULL"); private String value; - OpEnum(String value) { + Style(String value) { this.value = value; } @@ -50,8 +50,8 @@ public String toString() { return String.valueOf(value); } - public static OpEnum fromValue(String value) { - for (OpEnum b : OpEnum.values()) { + public static Style fromValue(String value) { + for (Style b : Style.values()) { if (b.value.equals(value)) { return b; } @@ -59,22 +59,22 @@ public static OpEnum fromValue(String value) { throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - public static class Adapter extends TypeAdapter { + public static class Adapter extends TypeAdapter + true + + + + + + + + + + + + + + sign-artifacts + + + + org.apache.maven.plugins + maven-gpg-plugin + 3.2.1 + + + sign-artifacts + verify + + sign + + + + + + + + + + + {{#swagger1AnnotationLibrary}} + + io.swagger + swagger-annotations + ${swagger-annotations-version} + + {{/swagger1AnnotationLibrary}} + {{#swagger2AnnotationLibrary}} + + io.swagger.core.v3 + swagger-annotations + ${swagger-annotations-version} + + {{/swagger2AnnotationLibrary}} + + + com.google.code.findbugs + jsr305 + 3.0.2 + + + com.squareup.okhttp3 + okhttp + ${okhttp-version} + + + com.squareup.okhttp3 + logging-interceptor + ${okhttp-version} + + + com.google.code.gson + gson + ${gson-version} + + + io.gsonfire + gson-fire + ${gson-fire-version} + + {{#hasOAuthMethods}} + + org.apache.oltu.oauth2 + org.apache.oltu.oauth2.client + 1.0.2 + + {{/hasOAuthMethods}} + + org.apache.commons + commons-lang3 + ${commons-lang3-version} + + {{#joda}} + + joda-time + joda-time + ${jodatime-version} + + {{/joda}} + {{#dynamicOperations}} + + io.swagger.parser.v3 + swagger-parser-v3 + 2.0.30 + + {{/dynamicOperations}} + {{#useBeanValidation}} + + + jakarta.validation + jakarta.validation-api + ${beanvalidation-version} + provided + + {{/useBeanValidation}} + {{#performBeanValidation}} + + + org.hibernate + hibernate-validator + 5.4.3.Final + + + jakarta.el + jakarta.el-api + ${jakarta.el-version} + + {{/performBeanValidation}} + {{#parcelableModel}} + + + com.google.android + android + 4.1.1.4 + provided + + {{/parcelableModel}} + + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} + provided + + {{#openApiNullable}} + + org.openapitools + jackson-databind-nullable + ${jackson-databind-nullable-version} + + {{/openApiNullable}} + {{#withAWSV4Signature}} + + software.amazon.awssdk + auth + 2.20.157 + + {{/withAWSV4Signature}} + + jakarta.ws.rs + jakarta.ws.rs-api + ${jakarta.ws.rs-api-version} + + + + org.junit.jupiter + junit-jupiter-engine + ${junit-version} + test + + + org.junit.platform + junit-platform-runner + ${junit-platform-runner.version} + test + + + + 1.8 + ${java.version} + ${java.version} + 1.9.0 + {{#swagger1AnnotationLibrary}} + 1.6.6 + {{/swagger1AnnotationLibrary}} + {{#swagger2AnnotationLibrary}} + 2.2.15 + {{/swagger2AnnotationLibrary}} + 4.12.0 + 2.10.1 + 3.18.0 + {{#openApiNullable}} + 0.2.7 + {{/openApiNullable}} + {{#joda}} + 2.12.0 + {{/joda}} + {{#useJakartaEe}} + 2.1.1 + 3.0.2 + {{/useJakartaEe}} + {{^useJakartaEe}} + 1.3.5 + 2.0.2 + {{/useJakartaEe}} + {{#performBeanValidation}} + 3.0.3 + {{/performBeanValidation}} + 5.10.3 + 1.10.0 + 2.1.6 + 1.1.1 + UTF-8 + 2.43.0 + + From 4600be6a5e589543846d534d21d33c982ae2f561 Mon Sep 17 00:00:00 2001 From: "equinix-labs@auto-commit-workflow" Date: Mon, 17 Aug 2026 17:18:55 +0000 Subject: [PATCH 11/16] Auto commit generated client changes - Mon Aug 17 17:18:55 UTC 2026 --- services/fabricv4/pom.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/services/fabricv4/pom.xml b/services/fabricv4/pom.xml index 18831e79..159e82ba 100644 --- a/services/fabricv4/pom.xml +++ b/services/fabricv4/pom.xml @@ -175,6 +175,7 @@ + - 0.11.0 + 0.10.0 - 0.11.0 + 0.10.0